Merge lp:~andreas-pokorny/mir/fix-1417581 into lp:mir
Status: | Merged |
---|---|
Approved by: | Gerry Boland |
Approved revision: | no longer in the source branch. |
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 (community) | functional | Approve | |
PS Jenkins bot (community) | continuous-integration | Approve | |
Daniel van Vugt | Approve | ||
Alexandros Frantzis (community) | Approve | ||
Review via email: mp+249636@code.launchpad.net |
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.
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.