Bug 53688 - Dubious looking i810 driver code
Dubious looking i810 driver code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-14 23:16 EDT by Alan Cox
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-02 17:06:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alan Cox 2001-09-14 23:16:52 EDT
So I wondered about time related bogons and I found very odd looking code
in i810_accel.c - do a grep for GetTimeInMillis

Now consider what happens close to wrap time

Firstly:
On a reload now could reload with 0. Tripping the start = 0 case next loop.
We then fall through into the last_head = ring->head load. The same occurs 
during a wrap event where start=0x7FFFFFFFF now=0x80000000 (minus loads).
We mistakenly see it as progress. Fortunately it appears to fail safe as we
merely reset the timer.

Secondly GetTimeInMillis appears to be unsigned, its stuffed into
variables. That doesn't itself seem fatal as the (now-start) maths seems to
wrap safely - but wants checking

Thirdly there is a small delay loop. Or rather in egcs-1.1.2 there is. gcc
2.96 will optimise that to "i=2000" - i must be volatile if that loop is
needed.

Can you confirm what that loop is for and if its required ?

Alan
Comment 1 Mike A. Harris 2001-09-22 05:14:39 EDT
XFree86 4.x or 3.3.6?  I assume 3.3.6 (XFree86-Servers)..

I'll look at it and ask Alan about it.
Comment 2 Alan Cox 2001-09-22 09:40:20 EDT
4.1.0-3
Comment 3 Alan Cox 2002-09-02 17:06:09 EDT
Was fixed in 4.2

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