| Summary: | Incorrect calculation of free dwords in ring buffer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | DRI | Reporter: | Rafał Miłecki <zajec5> | ||||
| Component: | DRM/Radeon | Assignee: | Default DRI bug account <dri-devel> | ||||
| Status: | RESOLVED NOTABUG | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | medium | ||||||
| Version: | XOrg git | ||||||
| Hardware: | Other | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| i915 platform: | i915 features: | ||||||
| Attachments: |
|
||||||
|
Description
Rafał Miłecki
2009-10-28 17:53:56 UTC
You can see real hitting this issue in bug #24535 (check rings dumps logs). The current code works as is since the ring size is always a power of two as per the comment in the code:
A B C D E F G
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
R W
(3 + 16 - 9) & 15 = 10
E F G A B C D
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
W R
(12 + 16 - 2) & 15 = 10
(In reply to comment #2) > The current code works as is since the ring size is always a power of two as > per the comment in the code: It seems so... I've never played with so hackish (like for me) bit operations. Thanks for explaining. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.