[Openchrome-devel] [Bug 95420] Driver 0.4.0 crashes with recent linux kernel version

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 19 04:31:20 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=95420

--- Comment #2 from Kevin Brace <kevinbrace at gmx.com> ---
Hi Torsten,

I looked at the log files, and I do see something weird.
Here is the Xorg.0.log with Linux kernel 4.4.5.

____________________________________________________________
. . .
[    11.364] (II) CHROME(0): VIAMapMMIO
[    11.364] (--) CHROME(0): mapping MMIO @ 0xfb000000 with size 0xd000
[    11.364] (--) CHROME(0): mapping BitBlt MMIO @ 0xfb200000 with size
0x200000
[    11.364] (II) CHROME(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0
[    11.364] (II) CHROME(0): VIAMapFB
[    11.364] (--) CHROME(0): mapping framebuffer @ 0xf0000000 with size
0x4000000
[    11.364] (--) CHROME(0): Frame buffer start: 0x7f2bc12cb000, free start:
0x0 end: 0x4000000
[    11.364] (II) CHROME(0): Creating default Display subsection in Screen
section
. . .
____________________________________________________________


Here is the Xorg.0.log with Linux kernel 4.5.1.

____________________________________________________________
. . .
[   354.283] (II) CHROME(0): VIAMapMMIO
[   354.283] (--) CHROME(0): mapping MMIO @ 0xfb000000 with size 0xd000
[   354.283] (--) CHROME(0): mapping BitBlt MMIO @ 0xfb200000 with size
0x200000
[   354.283] (II) CHROME(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0
[   354.283] (II) CHROME(0): VIAMapFB
[   354.283] (--) CHROME(0): mapping framebuffer @ 0xf0000000 with size
0x4000000
[   354.284] (EE) CHROME(0): Unable to map mmio BAR. Invalid argument (22)
[   354.284] (II) CHROME(0): VIAFreeRec
[   354.284] (II) CHROME(0): Entered VIAUnmapMMIO.
[   354.284] (II) CHROME(0): Exiting VIAUnmapMMIO.
[   354.284] (II) CHROME(0): VIAFreeScreen
[   354.284] (II) CHROME(0): VIAFreeRec
[   354.284] (EE) 
[   354.284] (EE) Backtrace:
[   354.284] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x139) [0x594d49]
[   354.285] (EE) 1: /usr/lib/libc.so.6 (__restore_rt+0x0) [0x7fa7fb6eb32f]
[   354.286] (EE) 2: /usr/lib/xorg/modules/drivers/openchrome_drv.so
(_init+0xd0fe) [0x7fa7f65c4fde]
[   354.286] (EE) 3: /usr/lib/xorg-server/Xorg (xf86DeleteScreen+0x5a)
[0x480c2a]
[   354.286] (EE) 4: /usr/lib/xorg-server/Xorg (InitOutput+0xcdb) [0x47b29b]
[   354.287] (EE) 5: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x264)
[0x43a074]
[   354.288] (EE) 6: /usr/lib/libc.so.6 (__libc_start_main+0xf0)
[0x7fa7fb6d8710]
[   354.288] (EE) 7: /usr/lib/xorg-server/Xorg (_start+0x29) [0x424589]
[   354.289] (EE) 8: ? (?+0x29) [0x29]
[   354.289] (EE) 
[   354.289] (EE) Segmentation fault at address 0xa4
[   354.289] (EE) 
. . .
____________________________________________________________


I do not recall the exact commit that fixed the above segmentation fault, but
it could have been this one.

https://cgit.freedesktop.org/openchrome/xf86-video-openchrome/commit/?id=c6fd0017eeafc796124437e7bfc9906433b3f28a

However, before the segmentation fault, there is an error.

____________________________________________________________
. . .
[   354.284] (EE) CHROME(0): Unable to map mmio BAR. Invalid argument (22)
. . .
____________________________________________________________


This is the code that likely tripped up OpenChrome.
____________________________________________________________________________
. . .
        err = pci_device_map_range(pVia->PciInfo, pVia->FrameBufferBase,
                                   pVia->videoRambytes,
                                   (PCI_DEV_MAP_FLAG_WRITABLE |
                                    PCI_DEV_MAP_FLAG_WRITE_COMBINE),
                                   (void **)&pVia->FBBase);

         if (err) {
             xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                        "Unable to map mmio BAR. %s (%d)\n", strerror(err),
err);
             return FALSE;
         }
. . .
____________________________________________________________________________


It appears that pci_device_map_range API's arguments or behavior has changed.
I probably should not say that OpenChrome is not responsible for it, but I feel
like this is a Linux kernel or libpciaccess problem (bug).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/openchrome-devel/attachments/20160519/6654fa0b/attachment.html>


More information about the Openchrome-devel mailing list