zaphod support broke the modesetting driver
Mark Kettenis
mark.kettenis at xs4all.nl
Mon Nov 16 13:36:44 PST 2015
> Date: Mon, 16 Nov 2015 09:05:53 +1000
> From: Dave Airlie <airlied at gmail.com>
>
> On 16 November 2015 at 02:57, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
> > Commit 19e1dc8f6ea6d7ff5ba4a5caa0e2f40a47879408 broke the modesetting
> > driver quite badly on systems without XSERVER_PLATFORM_BUS. The
> > problem is that the "entity private" only gets set up when
> > ms_platform_probe() gets called, but is used unconditionally in the
> > driver. So on systems where ms_platform_probe() doesn't get called,
> > this results in a segmentation fault.
> >
> > I tried moving the code that sets up the entity private around a bit,
> > but I couldn't get it to work as the entity private ends up being a
> > NULL pointer.
>
> Can you test the two patches I've just sent, one is just a cleanup
> the second might fix this.
Unfortunately that doesn't seem to help.
The problem is that I end up in the "old-style" probe method:
(gdb) bt
#0 0x000010e501c0e085 in ms_ent_priv (scrn=0x10e53ca47000)
at /home/kettenis/src/xserver/hw/xfree86/drivers/modesetting/driver.c:189
#1 0x000010e501c0f2ee in ms_get_drm_master_fd (pScrn=0x10e53ca47000)
at /home/kettenis/src/xserver/hw/xfree86/drivers/modesetting/driver.c:722
#2 0x000010e501c0f5dc in PreInit (pScrn=0x10e53ca47000, flags=0)
at /home/kettenis/src/xserver/hw/xfree86/drivers/modesetting/driver.c:823
#3 0x000010e2943b47aa in InitOutput (pScreenInfo=0x10e2949e3a20, argc=1,
argv=0x7f7ffffdc498)
at /home/kettenis/src/xserver/hw/xfree86/common/xf86Init.c:581
#4 0x000010e29435bb33 in dix_main (argc=1, argv=0x7f7ffffdc498,
envp=0x7f7ffffdc4a8) at /home/kettenis/src/xserver/dix/main.c:204
#5 0x000010e29433caa7 in main (argc=1, argv=0x7f7ffffdc498,
envp=0x7f7ffffdc4a8) at /home/kettenis/src/xserver/dix/stubmain.c:34
(gdb) f 2
#2 0x000010e501c0f5dc in PreInit (pScrn=0x10e53ca47000, flags=0)
at /home/kettenis/src/xserver/hw/xfree86/drivers/modesetting/driver.c:823
823 if (!ms_get_drm_master_fd(pScrn))
(gdb) p *pEnt
$6 = {index = 1, location = {type = BUS_NONE, id = {pci = 0x0, sbus = {
fbNum = 0}, plat = 0x0}}, chipset = 0, active = 1,
device = 0x10e4d4830400, driver = 0x10e56ec86000}
So the "private" still has not been set up.
More information about the xorg-devel
mailing list