Bug 96937 - [DRI2] Direct rendering is not supported when VGA arb is necessary for the device
Summary: [DRI2] Direct rendering is not supported when VGA arb is necessary for the de...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/DRI (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-15 08:07 UTC by jqdeng
Modified: 2016-08-16 02:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description jqdeng 2016-07-15 08:07:02 UTC
The variable "rsrc_decodes" in function "xf86VGAarbiterAllowDRI" is not initialized. So it will occur error when "pScrn->vgaDev == 0", and "vga_count > 1". For this case, as "pScrn->vgaDev == 0", the function "pci_device_vgaarb_get_info" will only set the value of "vga_count", but won't set the value of "rsrc_decodes", so it will has two different return values for function "xf86VGAarbiterAllowDRI" in different platforms. One platform will return TRUE, as the "rsrc_decodes" 's default value is 0, but another platform will return FALSE, as the "rsrc_decodes" 's default value is "32767", this will cause disable direct rendering.
Comment 1 Michel Dänzer 2016-07-19 09:34:45 UTC
Can you write a patch fixing the problem, and submit it to the xorg-devel mailing list for review?
Comment 2 jqdeng 2016-07-21 03:52:29 UTC
Just send a review mail to xorg-devel mailing list.
Comment 3 Michel Dänzer 2016-08-16 02:30:53 UTC
Thanks for the fix, Emily!

commit 88820f1c7b66cbc98d3f19efca24c9f52410d9f9
Author: Emily Deng <Emily.Deng@amd.com>
Date:   Mon Jul 25 16:12:53 2016 +0800

    xfree86: vgaarb: Initialize local variable rsrc_decodes


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.