http://bugs.freedesktop.org/show_bug.cgi?id=24781
Summary: Incorrect calculation of free dwords in ring buffer
Product: DRI
Version: XOrg CVS
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/Radeon
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=30782)
--> (http://bugs.freedesktop.org/attachment.cgi?id=30782)
drm/radeon/kms: fix calculation of free dwords in ring
There are two scenarios of read/write pointers relation:
1) read lower than write
/----------------------------\
| A B C D E F G |
| 1 2 3 4 5 6 7 8 9 10 11 12 |
\----------------------------/
R W
used = w - r
free = size - used
free = size - (w - r)
free = size - w + r
free = r + size - w
2) write lower than read
/----------------------------\
| E F G A B C D |
| 1 2 3 4 5 6 7 8 9 10 11 12 |
\----------------------------/
W R
free = r - w
I made there ascii pictures to make it clear, as noone believed me today on IRC
we have some bug there ;)
Problem is we calculate free dwords for first situation only (always). We have
to detect second situation and use other calculation then.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel