Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Gamma correction isn't applied to hardware cursors #968

Closed
ddevault opened this issue May 10, 2018 · 10 comments
Closed

Gamma correction isn't applied to hardware cursors #968

ddevault opened this issue May 10, 2018 · 10 comments

Comments

@ddevault
Copy link
Contributor

No description provided.

@ddevault ddevault added the bug label May 10, 2018
@ascent12
Copy link
Member

Gamma is a CRTC property. We cannot set it on the cursor plane.
This is basically a limitation everybody faces.

The only way I'd see this working is colouring the cursor in software.

@ddevault
Copy link
Contributor Author

:(

@martinetd
Copy link
Member

Actually I don't see why we couldn't color the cursor in software, iiuc we upload an arbitrary texture to the cursor plane if there is one so we could probably apply some software filter just before uploading that texture and it should just work™ ; We do transforms like rotate/flip/scale so why not gamma?

Or am I missing something? Can the texture sometimes not go through wlroots?

One tricky point I see is that a naive implementation would likely only update the cursor gamma when the cursor texture is updated, unless we keep the latest untransformed texture around to update it on set_gamma...

@ascent12
Copy link
Member

I'm fine with doing it in software.

@ddevault ddevault reopened this May 11, 2018
@VincentVanlaer
Copy link
Contributor

This seems to be working fine on DRM backend with i915 (Intel HD Graphics 530).

@Emantor
Copy link
Contributor

Emantor commented Jul 29, 2018

The i915 driver apparently colors the cursor plane with the crtc gamma, the radeon driver does not. Seeing the same limitation on Xorg with a radeon card where the cursor is noticably blue when using redshift.

@emersion
Copy link
Member

emersion commented Jul 29, 2018

Yeah, I can reproduce on i915 too. I don't see any way of detecting if the cursor needs gamma or not.

@ddevault
Copy link
Contributor Author

The i915 driver apparently

If the drivers are making the call maybe we can speak to the AMDGPU folks?

@emersion
Copy link
Member

Not applying the gamma LUT to all planes is a driver bug, see https://lists.freedesktop.org/archives/dri-devel/2020-September/279398.html

@emersion
Copy link
Member

Reported the issue here: https://gitlab.freedesktop.org/drm/amd/-/issues/1290

If you can reproduce this issue on radeon, please add a comment with your graphics card model and kernel version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

6 participants