Bug 436064 - invalid check of return value of xf86SetOperatingState
Summary: invalid check of return value of xf86SetOperatingState
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-ati
Version: rawhide
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2008-03-05 05:30 UTC by Doug Chapman
Modified: 2018-04-11 14:08 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-06 19:31:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fix invalid return value check of xf86SetOperatingState (530 bytes, patch)
2008-03-05 05:30 UTC, Doug Chapman
no flags Details | Diff
fix invalid return value check of xf86SetOperatingState (852 bytes, patch)
2008-03-05 05:35 UTC, Doug Chapman
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.