-------- Original-Nachricht --------
> Datum: Fri, 28 Aug 2009 10:04:19 +0200
> Von: "Michel Dänzer" <[email protected]>
> An: Gerhard Pircher <[email protected]>
> CC: [email protected]
> Betreff: Re: Kernel fails to boot with radeondrmfb

> On Thu, 2009-08-27 at 22:08 +0200, Gerhard Pircher wrote: 
> > 
> > I gave Radeon kernel mode setting a try on my PPC G4/7455 machine, but
> > the Radeon DRM driver fails to initialize and then the kernel prints
> > "Badness at kernel/mutex-debug.c:77". I tested it with an almost
> > (yesterday) fresh checkout of the linus-2.6 (no log, but same output),
> > drm-2.6/drm-fixes and drm-2.6/drm-next git tree.
> > 
> > Please take a look at the kernel config, log and lspci.txt files:
> > http://boot.homelinux.org:8080/kernel/drm.config
> > http://boot.homelinux.org:8080/kernel/drm-next.log
> > http://boot.homelinux.org:8080/kernel/drm-fixes.log
> > http://boot.homelinux.org:8080/kernel/lspci.txt
> > 
> > The machine is a bit special (non coherent DMA) and there is no
> > AGPGART driver for the northbridge (so the Radeon card should operate
> > in PCIGART mode!?).
> 
> My guess would be that radeon_gart_table_ram_alloc() fails. Maybe you
> can add some debugging output there and in r100_pci_gart_enable() to
> verify that.
I tried to add some debugging output with both printk() and DRM_INFO()
(see patch at the end), but it never gets printed. Even a BUG() statement
at the beginning of r100_pci_gart_enable() is not triggered. I would say
the functions are not called, or do I miss something here?

Here's an excerpt of the kernel log with some more mutex debugging
options enabled:

calling  drm_core_init+0x0/0x140 @ 1
[drm] Initialized drm 1.1.0 20060810
initcall drm_core_init+0x0/0x140 returned 0 after 3744 usecs
calling  ttm_init+0x0/0x84 @ 1
initcall ttm_init+0x0/0x84 returned 0 after 503 usecs
calling  radeon_init+0x0/0xf8 @ 1
[drm] radeon default to kernel modesetting.
[drm] radeon kernel modesetting enabled.
[drm] radeon: Initializing kernel modesetting.
[drm] register mmio base: 0x88000000
[drm] register mmio size: 65536
[drm] GPU reset succeed (RBBM_STATUS=0x00000140)
[drm] Clocks initialized !
[drm] Generation 2 PCI interface, using max accessible memory
[drm] Detected VRAM RAM=128M, BAR=128M
[drm] RAM width 128bits DDR
[drm] radeon: VRAM 128M
[drm] radeon: VRAM from 0x20000000 to 0x27FFFFFF
[drm] radeon: GTT 512M
[drm] radeon: GTT from 0x00000000 to 0x1FFFFFFF
[drm] radeon: irq initialized.
[TTM] Zone  kernel: Available graphics memory: 378488 kiB.
[TTM] Zone highmem: Available graphics memory: 771704 kiB.
[drm] radeon: 128M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.
[drm] radeon: cp idle (0x02000603)
[drm] Loading R200 Microcode
[drm:radeon_gart_bind] *ERROR* trying to bind memory to unitialized GART !
[drm:radeon_ttm_backend_bind] *ERROR* failed to bind 256 pages at 0x00000000
[TTM] Couldn't bind backend.
[TTM] Failed moving buffer. Proposed placement 0x00070002
[drm:radeon_object_create] *ERROR* Failed to allocate TTM object (1048576, 
0x00070002, 0)
[drm:radeon_ring_init] *ERROR* radeon: failed to create ring buffer (-22).

=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
swapper/1 is trying to release lock (&rdev->cp.mutex) at:
[<c01fa03c>] radeon_ring_init+0x90/0xe4
but there are no more locks to release!

other info that might help us debug this:
no locks held by swapper/1.

stack backtrace:
Call Trace:
[ef82bc40] [c0009444] show_stack+0x4c/0x144 (unreliable)
[ef82bc80] [c0053b64] print_unlock_inbalance_bug+0xf4/0x10c
[ef82bd20] [c0053e6c] lock_release+0xb4/0x1c4
[ef82bd40] [c032e8c0] __mutex_unlock_slowpath+0xbc/0x128
[ef82bd60] [c01fa03c] radeon_ring_init+0x90/0xe4
[ef82bd70] [c01ffddc] r100_cp_init+0x470/0x620
[ef82bd90] [c01e2248] radeon_device_init+0x514/0x614
[ef82bdb0] [c01e2dcc] radeon_driver_load_kms+0xa4/0xf4
[ef82bdd0] [c01b64ec] drm_get_dev+0x254/0x318
[ef82be00] [c0334514] radeon_pci_probe+0x1c/0x2c
[ef82be10] [c0179d74] local_pci_probe+0x24/0x34
[ef82be20] [c017a090] pci_device_probe+0x68/0xa0
[ef82be50] [c021d97c] driver_probe_device+0xb8/0x180
[ef82be70] [c021dab4] __driver_attach+0x70/0xa4
[ef82be90] [c021d0fc] bus_for_each_dev+0x5c/0xac
[ef82bec0] [c021d7a8] driver_attach+0x24/0x34
[ef82bed0] [c021c92c] bus_add_driver+0xb4/0x230
[ef82bef0] [c021de7c] driver_register+0xd0/0x174
[ef82bf10] [c017a4d0] __pci_register_driver+0x64/0xec
[ef82bf30] [c01b2134] drm_init+0x68/0xf0
[ef82bf50] [c049c7a8] radeon_init+0xe4/0xf8
[ef82bf70] [c0003e88] do_one_initcall+0x58/0x1b0
[ef82bfe0] [c04851d4] kernel_init+0xb4/0x124
[ef82bff0] [c0012a98] kernel_thread+0x4c/0x68
[drm] DFP table revision: 3
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm]   VGA
[drm]   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
[drm]   Encoders:
[drm]     CRT1: INTERNAL_DAC1
[drm] Connector 1:
[drm]   DVI-I
[drm]   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
[drm]   Encoders:
[drm]     CRT2: INTERNAL_DAC2
[drm]     DFP1: INTERNAL_TMDS1
i2c-adapter i2c-0: unable to read EDID block.
radeon 0000:01:00.0: VGA-1: no EDID data
[drm] fb mappable at 0x80040000
[drm] vram apper at 0x80000000
[drm] size 7680000
[drm] fb depth is 24
[drm]    pitch is 6400
[drm] TMDS-8: set mode 1600x1200 23
Console: switching to colour frame buffer device 200x75
fb0: radeondrmfb frame buffer device
registered panic notifier
[drm:radeon_driver_load_kms] *ERROR* Failed to initialize radeon, disabling 
IOCTL
[drm] radeon: finishing device.
unregistered panic notifier
[drm] radeon: cp finalized
[TTM] Zone  kernel: Used memory at exit: 0 kiB.
[TTM] Zone highmem: Used memory at exit: 0 kiB.
[drm] radeon: ttm finalized
[drm] radeon: fence finalized
radeon: probe of 0000:01:00.0 failed with error -22
initcall radeon_init+0x0/0xf8 returned 0 after 770353 usecs

Thanks!

Gerhard

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 90ff8e0..22801af 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -63,15 +63,19 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
        uint32_t tmp;
        int r;
 
+       DRM_INFO("[drm] enter r100_pci_gart_enable()\n");
+
        /* Initialize common gart structure */
        r = radeon_gart_init(rdev);
        if (r) {
+               DRM_INFO("[drm] radeon_gart_init() failed\n");
                return r;
        }
        if (rdev->gart.table.ram.ptr == NULL) {
                rdev->gart.table_size = rdev->gart.num_gpu_pages * 4;
                r = radeon_gart_table_ram_alloc(rdev);
                if (r) {
+                       DRM_INFO("[drm] radeon_gart_table_ram_alloc() 
failed\n");
                        return r;
                }
        }
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c 
b/drivers/gpu/drm/radeon/radeon_gart.c
index 2977539..6046c59 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -37,9 +37,12 @@ int radeon_gart_table_ram_alloc(struct radeon_device *rdev)
 {
        void *ptr;
 
+       DRM_INFO("[drm] enter radeon_gart_table_ram_alloc()\n");
+
        ptr = pci_alloc_consistent(rdev->pdev, rdev->gart.table_size,
                                   &rdev->gart.table_addr);
        if (ptr == NULL) {
+               DRM_INFO("[drm] pci_alloc_consistent() for gart table 
failed\n");
                return -ENOMEM;
        }
 #ifdef CONFIG_X86
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to