[prev in list] [next in list] [prev in thread] [next in thread]
List: dri-devel
Subject: [Bug 24781] New: Incorrect calculation of free dwords in ring buffer
From: bugzilla-daemon () freedesktop ! org
Date: 2009-10-29 0:53:56
Message-ID: bug-24781-502 () http ! bugs ! freedesktop ! org/
[Download RAW message or body]
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: dri-devel@lists.sourceforge.net
ReportedBy: zajec5@gmail.com
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
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic