Bug 16894 - xf86dri protocol incorrect
Summary: xf86dri protocol incorrect
Status: RESOLVED FIXED
Alias: None
Product: XCB
Classification: Unclassified
Component: Protocol (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Jamey Sharp
QA Contact: xcb mailing list dummy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-29 13:57 UTC by Bob Paauwe
Modified: 2009-10-09 10:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Possible patch to xf86dri.xml (1010 bytes, patch)
2008-11-21 08:31 UTC, Bob Paauwe
Details | Splinter Review

Description Bob Paauwe 2008-07-29 13:57:15 UTC
A couple of the structures in the xf86dri xcb protocol don't match with xlib of the same version.  The protocol version is suppose to be 4.1.  The following are different:

The xcb_xf86dri_open_connection_reply_t looks like this:

    uint8_t  response_type; /**<  */
    uint8_t  pad0; /**<  */
    uint16_t sequence; /**<  */
    uint32_t length; /**<  */
    uint32_t drm_client_key_low; /**<  */
    uint32_t drm_client_key_high; /**<  */
    uint32_t sarea_handle_low; /**<  */
    uint32_t sarea_handle_high; /**<  */
    uint32_t bus_id_len; /**<  */
    uint8_t  pad1[12]; /**<  */


But the xlib version in xf86dristr.h looks like this (in xcb format):

    uint8_t  response_type; /**<  */
    uint8_t  pad0; /**<  */
    uint16_t sequence; /**<  */
    uint32_t length; /**<  */
    uint32_t sarea_handle_low; /**<  */
    uint32_t sarea_handle_high; /**<  */
    uint32_t bus_id_len; /**<  */
    uint8_t  pad1[12]; /**<  */

The drm_client_key fields seem to have been removed in the xlib version.


The xcb_xf86dri_create_context_request_t looks like this:
    uint8_t  major_opcode; /**<  */
    uint8_t  minor_opcode; /**<  */
    uint16_t length; /**<  */
    uint32_t visual; /**<  */
    uint32_t screen; /**<  */
    uint32_t context; /**<  */

but the xib version looks like this (in xcb format):
    uint8_t  major_opcode; /**<  */
    uint8_t  minor_opcode; /**<  */
    uint16_t length; /**<  */
    uint32_t screen; /**<  */
    uint32_t visual; /**<  */
    uint32_t context; /**<  */

The screen and visual fields are swapped.
Comment 1 Julien Danjou 2008-11-21 01:23:00 UTC
This should be fixed in xcb/proto FWIW.

If you have clue to resolv this, I suggest you modify the XML files describing the protocole and send us a patch.
Comment 2 Bob Paauwe 2008-11-21 08:31:18 UTC
Created attachment 20496 [details] [review]
Possible patch to xf86dri.xml

I don't have XML prototype parser installed anymore to test this, but I think this is what needs to be changed in the XML so that it creates the correct .h file
Comment 3 Jamey Sharp 2009-10-09 10:17:43 UTC
I think you're right. I've checked against current xorg/proto/xf86driproto and pushed a fix for xcb/proto accordingly.


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.