Bug 51400 - Failed to load i965 driver
Summary: Failed to load i965 driver
Status: VERIFIED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/DRI (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Christopher James Halse Rogers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 01:05 UTC by fangxun
Modified: 2012-07-23 02:50 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description fangxun 2012-06-25 01:05:51 UTC
System Environment:
--------------------------
Arch:           i386
Platform:       huronriver 
Libdrm:	(master)libdrm-2.4.35-11-ga1d462d2a6f720538eaf1199a94dd27cd04e8a54
Mesa:	(master)37d699a296ac1d63b9276224847df4b645b53fe2
Xserver:(master)xorg-server-1.12.0-239-g3ef3ce069d52dcfa932c90ccd30854a8d9daa15a
Xf86_video_intel: (master)2.19.0-334-gfa10005ce31483827547b7f71eae066899f0026c
Kernel:	(drm-intel-next-queued) ff049b6ce21d2814451afd4a116d001712e0116b


Bug detailed description:
------------------------- 
It failed to load i965 driver with latest driver. 
Error messages showed:
libGL error: failed to authenticate magic 9
libGL error: failed to load driver: i965

Bisect find Xserver master branch commit 3f97284b10 is the first bad commit.
commit 3f97284b10c250457888902debd4d793cb4544d4
Author:     Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
AuthorDate: Wed Jun 20 13:53:53 2012 +1000


    dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3)

    xwayland drivers need access to their screen private data to authenticate.
    Now that drivers no longer have direct access to the global screen arrays,
    this needs to be passed in as function context.

    v2: Don't break ABI
    v3: Paint the bikeshed blue; drop fd from AuthMagic2ProcPtr prototype

    Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
    Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>


Reproduce steps:
----------------
1. start X
2. LIBGL_DEBUG=verbose glxinfo
Comment 1 Chris Wilson 2012-06-25 03:43:29 UTC
Airlied spotted that the return code from DRI2AuthMagic() is the opposite of what was expected for a ds->AuthMagic hook.
Comment 2 Christopher James Halse Rogers 2012-07-23 00:10:08 UTC
Fixed in:
commit a7b97b0fa85d695ae19d194cfa3267159d149e5d
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date:   Thu Jun 28 12:07:11 2012 +1000

    dri2: Fix authentication for < v8 clients (v2).
    
    The legacy logic was embarassingly wrong; AuthMagic should return errno,
    so returning FALSE only when AuthMagic returns nonzero is exactly wrong.
    
    v2: Match drmAuthMagic by returning -EINVAL rather than EINVAL
        Fix trailing whitespace
Comment 3 fangxun 2012-07-23 02:50:59 UTC
Verified with xserver master commit 77de2994774e7be24a0bad521180628feb1027c6.


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.