NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/49536: broken drm since changes on dec 14 2014
>Number: 49536
>Category: kern
>Synopsis: radeondrm won't work with sources after 14-12-2014 23:40
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 04 19:45:00 +0000 2015
>Originator: Onno van der Linden
>Release: NetBSD 7.99.4
>Organization:
>Environment:
System: NetBSD sheep 7.99.4 NetBSD 7.99.4 (SHEEP) #3: Sun Jan 4 13:58:28 MET 2015 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
Architecture: i386
Machine: i386
>Description:
Since the drm related mmap changes on Dec 14 2014 the non kms radeondrm driver
won't start X anymore on my i386 with an AGP HD3450.
>How-To-Repeat:
run startx
>Fix:
1) uvm_mmap_dev is called with an uninitialized variable, set it to NULL
--- /sys/external/bsd/drm/dist/bsd-core/drm_bufs.c.orig 2015-01-03 15:01:03.000000000 +0100
+++ /sys/external/bsd/drm/dist/bsd-core/drm_bufs.c 2015-01-04 15:36:34.000000000 +0100
@@ -1122,6 +1122,7 @@
#elif defined(__NetBSD__)
/* XXXNETBSD */
rsize = round_page(size);
+ addr = NULL;
retcode = uvm_mmap_dev(curproc, &addr, rsize, dev->kdev, foff);
vaddr = (vaddr_t)addr;
DRM_DEBUG("mmap %#lx/%#lx foff %#llx\n", vaddr, rsize, (long long)foff);
2) Kernel with DRM_DEBUG and fix above now gets
[drm_mmap] [drm_mmap] Can't find map, requested offset = 0
and
[ 31.716] (II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers
[ 31.716] (EE) RADEON(0): [drm] Failed to map vertex/indirect buffers list
[ 31.725] (II) RADEON(0): [drm] removed 1 reserved context for kernel
[ 31.725] (II) RADEON(0): [drm] unmapping 8192 bytes of SAREA 0xc2987000 at 0xbb400000
[ 31.725] (II) RADEON(0): [drm] Closed DRM master.
[ 31.725] (WW) RADEON(0): Direct rendering disabled
[ 31.733] (EE) RADEON(0): Acceleration initialization failed
[ 31.733] (II) RADEON(0): Acceleration disabled
# diff -u `pwd`/uvm_mmap.c.orig `pwd`/uvm_mmap.c
--- /sys/uvm/uvm_mmap.c.orig 2015-01-03 15:27:57.000000000 +0100
+++ /sys/uvm/uvm_mmap.c 2015-01-04 18:23:12.000000000 +0100
@@ -1084,7 +1084,7 @@
*addrp = (void *)p->p_emul->e_vm_default_addr(p,
(vaddr_t)p->p_vmspace->vm_daddr, len);
- uobj = udv_attach(dev, prot, 0, len);
+ uobj = udv_attach(dev, prot, off, len);
if (uobj == NULL)
return EINVAL;
3) with the 2 previous fixes I now get
[drm:pid201:drm_ioctl] [drm:pid201:drm_ioctl] pid=201, cmd=0xc0286429, nr=0x29, dev 0xc2c9a200, auth=1
[drm:pid201:radeon_freelist_get] [drm:pid201:radeon_freelist_get] done_age = -559038737
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] Can't find map, requested offset = 10000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000c2984000, handle = 00000000c2984000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000df000000, handle = 00000000db700000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000e0000000, handle = 0000000000000000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000db710000, handle = 00000000db710000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000db811000, handle = 00000000db811000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000db812000, handle = 00000000db812000
[drm:pid201:drm_mmap] [drm:pid201:drm_mmap] map offset = 00000000dba12000, handle = 0000000000000000
That offset is way too small.
And then it all crashes due to a SIGSEGV in r600_start_3d()
(And why is the DRM_DEBUG macro printing stuff twice ?)
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index