Bug 436064

Summary: invalid check of return value of xf86SetOperatingState
Product: [Fedora] Fedora Reporter: Doug Chapman <dchapman>
Component: xorg-x11-drv-atiAssignee: Adam Jackson <ajax>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: mcepl, xgl-maint
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-06 19:31:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 163350    
Attachments:
Description Flags
fix invalid return value check of xf86SetOperatingState
none
fix invalid return value check of xf86SetOperatingState none

Description Doug Chapman 2008-03-05 05:30:04 UTC
Description of problem:
I found this on ia64 but I can't imagine it is ia64 specific....

I have filed this upstream at:
https://bugs.freedesktop.org/show_bug.cgi?id=14826

but it would be nice to get the fix into Fedora so we can finally have X working
on ia64 (most of which have Radeon cards).

----- Bug as filed at freedesktop.org ----

In xf86-video-ati/src/radeon_driver.c this check appears to always fail:

 if (xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr))


From looking at xf86SetOperatingState it appears that it returns a pointer on
success and NULL on failure.  Looking at all other drivers I see that no other
driver is looking at the return value at all.

It appears what was meant was:

if (!xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr))

Or. perhaps the intention was to not check the return value at all.  I was
unable to find any other driver that looks at it.

This seems to resolve the issues I was seeing with the Radeon card not
initializing on ia64 running Fedora.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Doug Chapman 2008-03-05 05:30:04 UTC
Created attachment 296848 [details]
fix invalid return value check of xf86SetOperatingState

Comment 2 Doug Chapman 2008-03-05 05:35:55 UTC
Created attachment 296849 [details]
fix invalid return value check of xf86SetOperatingState

Ajax,

Same patch but in a git format that should be able to be pulled into a spec
file in case that makes it easier.

- Doug

Comment 3 Matěj Cepl 2008-03-05 21:30:11 UTC
Great, thanks.

Comment 4 Adam Jackson 2008-03-06 19:31:47 UTC
Fixed upstream, will pull new driver shortly.  Thanks!

Comment 5 Doug Chapman 2008-03-13 20:31:55 UTC
(In reply to comment #4)
> Fixed upstream, will pull new driver shortly.  Thanks!

Ajax,

can we pull the upstream driver down?  The latest version,
xorg-x11-drv-ati-6.8.0-4.fc9 does not have thsi patch.

thanks,

- Doug