Bug 58806

Summary: failed to create kernel channel, -12 on G4 PPC
Product: xorg Reporter: Stefan de Konink <stefan>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: florian
Version: git   
Hardware: PowerPC   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Bisecting between v3.6 and v3.7
none
dmesg including debugging
none
dmesg for linux 3.6.6 none

Description Stefan de Konink 2012-12-27 14:33:41 UTC
Created attachment 72184 [details]
Bisecting between v3.6 and v3.7

The v3.7 version of nouveau fails to set up acceleration, while it does work for v3.6. We have tried to bisect the problem but stubled on a change we cannot beyond:

git show 77145f1cbdf8d28b46ff8070ca749bad821e0774 -- drivers/gpu/drm/nouveau/core/subdev/bios/base.c
Comment 1 Stefan de Konink 2012-12-27 14:52:13 UTC
Created attachment 72185 [details]
dmesg including debugging
Comment 2 Marcin Slusarz 2012-12-27 14:53:47 UTC
What we found so far:

Acceleration set up fails like that:
Stacktrace:
nouveau_drm_load
nouveau_accel_init
nouveau_channel_new
nouveau_channel_ind
nouveau_channel_prep
nouveau_bo_map
ttm_bo_kmap
ttm_bo_ioremap
ioremap_wc

ioremap_wc returns NULL. bo->mem.bus.base and bo->mem.bus.offset are 0. Probably because of this code:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/char/agp/uninorth-agp.c;h=a32c492baf5cc15001ad6882dc25a14d1be86419;hb=29594404d7fe73cd80eaa4ee8c43dcc53970c60e#l125
and ioremap fails because of this:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/powerpc/mm/pgtable_32.c;h=6c856fb8c15b01705fb6cf5ff28c0a232d85d3bd;hb=29594404d7fe73cd80eaa4ee8c43dcc53970c60e#l204

Booting with nouveau.agpmode=0 works.
Comment 3 Stefan de Konink 2012-12-27 14:57:06 UTC
Created attachment 72187 [details]
dmesg for linux 3.6.6
Comment 5 Stefan de Konink 2012-12-31 18:53:52 UTC
I confirm that the fix works on 3.8-rc1
Comment 6 Marcin Slusarz 2013-01-04 19:46:28 UTC
This fix just hit Linus' tree.
Comment 7 Florian Mickler 2013-01-11 21:32:39 UTC
A patch referencing this bug report has been merged in Linux v3.8-rc3:

commit eda85d6ad490923152544fba0473798b6cc0edf6
Author: Aaro Koskinen <aaro.koskinen@iki.fi>
Date:   Mon Dec 31 03:34:59 2012 +0200

    drm/nouveau: fix init with agpgart-uninorth

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.