Skip to content

drm: skip modifiers already in the plane format list - #497

Closed
dar1k-ness wants to merge 1 commit into
hyprwm:mainfrom
dar1k-ness:drm-dedup-plane-modifiers
Closed

dar1k-ness wants to merge 1 commit into
hyprwm:mainfrom
dar1k-ness:drm-dedup-plane-modifiers

Conversation

@dar1k-ness

Copy link
Copy Markdown

Fixes #476

Since 7.3 amdgpu exposes IN_FORMATS on the cursor plane for older cards too, so LINEAR ends up in the list twice. The gbm fallback only handles the list being exactly LINEAR, so with the dup the cursor bo gets allocated with DRM_FORMAT_MOD_INVALID, which aquamarine then refuses to commit to the cursor plane, so the cursor is just gone.

This just checks if the modifier is already there before adding it.

Hit this on an RX 580, same thing on an RX 570 here: #476 (comment)
Fine on 7.2.15 (with aquamarine 0.15.1), broken on 7.3.4.

before:

GBM: Allocating with modifiers failed, falling back to implicit

cursor bo is INVALID, no fb on the cursor plane, no cursor

after:

GBM: Allocating with modifiers failed, falling back to modifier-less allocation

cursor bo is LINEAR, cursor plane has an fb, cursor is back

Tested on Arch, linux 7.3.4-arch1-1, Hyprland 0.57.2, aquamarine 0.16.0, Mesa 26.2.7

Since 7.3 amdgpu exposes IN_FORMATS on the cursor plane for older
cards too (hit this on an RX 580), so LINEAR ends up in the list
twice. The gbm fallback only handles the list being exactly LINEAR,
so with the dup the cursor bo gets allocated with
DRM_FORMAT_MOD_INVALID, which can't go on the cursor plane and the
cursor is just gone.
@github-actions

Copy link
Copy Markdown

Hi @dar1k-ness,

Thanks for your contribution! Unfortunately, Hyprland and hypr* no longer
accept contributions from unvouched contributors.

To get vouched, please see our contributing guide at wiki.hypr.land/Contributing-and-Debugging

This PR has been closed automatically and will not be re-opened.

@github-actions github-actions Bot closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardware cursor invisible on RX 580 with kernel 7.3

1 participant