Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm: fix wrong degamma/shaper TFs on NV12 #1507

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

melissawen
Copy link

For BT.709, AMD driver-specific color management properties define the inverse OETF for plane degamma and blend predefined TFs and the OETF for plane shaper and CRTC regamma TFs, as in drm_info:

"AMD_PLANE_DEGAMMA_TF": enum {Default, sRGB EOTF, BT.709 inv_OETF, PQ EOTF, Identity, Gamma 2.2 EOTF, Gamma 2.4 EOTF, Gamma 2.6 EOTF}

"AMD_PLANE_SHAPER_TF": enum {Default, Identity, sRGB inv_EOTF, BT.709 OETF, PQ inv_EOTF, Gamma 2.2 inv_EOTF, Gamma 2.4 inv_EOTF, Gamma 2.6 inv_EOTF}

By correctly setting degamma and shaper TFs to NV12 planes, we can bring degamma and shaper+3D LUT back and remove the workaround made in [1].

[1] 3b69847 ("drm: Add workaround for NV12 scanout on SteamOS 3.6")

For BT.709, the AMD driver-specific color management properties define
the inverse OETF for plane degamma and blend predefined TFs and the OETF
for plane shaper and CRTC regamma TFs.

By correctly setting degamma and shaper TFs to NV12 planes, we can bring
degamma and shaper+3D LUT back and remove the workaround made in [1].

[1] 3b69847 ("drm: Add workaround for NV12 scanout on SteamOS 3.6")
@misyltoad
Copy link
Collaborator

Thanks for catching, makes sense... EOTF vs inv_OETF is e_e

@misyltoad misyltoad merged commit 7bc3c67 into ValveSoftware:master Sep 6, 2024
1 check passed
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.

2 participants