Merge lp:~andreas-pokorny/mir/fix-1417581 into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Gerry Boland on 2015-02-16 |
| Approved revision: | 2320 |
| Merged at revision: | 2320 |
| Proposed branch: | lp:~andreas-pokorny/mir/fix-1417581 |
| Merge into: | lp:mir |
| Diff against target: |
63 lines (+31/-3) 1 file modified
src/platforms/mesa/server/cursor.cpp (+31/-3) |
| To merge this branch: | bzr merge lp:~andreas-pokorny/mir/fix-1417581 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gerry Boland | functional | 2015-02-16 | Approve on 2015-02-16 |
| PS Jenkins bot | continuous-integration | Approve on 2015-02-16 | |
| Daniel van Vugt | Approve on 2015-02-16 | ||
| Alexandros Frantzis (community) | 2015-02-13 | Approve on 2015-02-13 | |
|
Review via email:
|
|||
Commit Message
Fix corrupt AMD/radeon cursor again (LP: #1417581)
Include the omitted parts back into the bugfix
Back then when the cursor issue of radeons and kaveris was handled I omitted this check to simplify the fix. This part was necessary to make GBM return correct stride sizes. GBM seems to stick to the size provided on construction, and does not verify what buffer was returned by the driver. Yes this is broken in GBM, but we are currently not alone with this workaround.
Description of the Change
Back when this bug first fixed we had two checks for the buffer sizes of cursors. In the process of the review I omitted one. But this check is essential, as it changes the size used in the request.
This MP adds the check again.
| Andreas Pokorny (andreas-pokorny) wrote : | # |
Yes, I suggest we apply the fix for us, but keep the bug open for mesa.. Untill we entirely drop using this API and switch to the plane API..
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2319
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Daniel van Vugt (vanvugt) wrote : | # |
Happy to get a fix. Sad Mesa/GBM is still broken. I think I saw this same workaround in Weston. Sorry I made you remove it before; I didn't know just how broken Mesa is.
P.S. Can you make that comment point to the upstream Mesa bug URL? Create it if necessary.
P.P.S. Gerry needs to test this.
- 2320. By Andreas Pokorny on 2015-02-16
-
freedesktop bug id added
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2320
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://

So, the assumption is that the cursor buffer returned by the driver has dimensions equal to DRM_CAP_ CURSOR_ WIDTH/HEIGHT; it seem reasonable although it's not clear if these dimensions represent the maximum, the preferred or the only acceptable cursor sizes.
> "Yes this is broken in GBM, but we are currently not alone with this workaround."
Looking at the GBM code, I would say that this is a problem with DRI apis. GBM is asking DRI for a WxH image and DRI is silently returning a differently sized image instead of failing? Not good API design.