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

Wrong definition of HDMI_STATIC_METADATA_TYPE1 for HDR. #19122

Closed
kleinerm opened this issue Jan 25, 2021 · 3 comments
Closed

Wrong definition of HDMI_STATIC_METADATA_TYPE1 for HDR. #19122

kleinerm opened this issue Jan 25, 2021 · 3 comments
Labels

Comments

@kleinerm
Copy link

Hello xbmc developers! As a little heads up:

HDMI_STATIC_METADATA_TYPE1 = 1,

contains a definition of HDMI_STATIC_METADATA_TYPE1 = 1. This is copied from libdrm, and libdrm's version is copied from Linux kernel headers. It turns out this definition is wrong in kernel/libdrm, and should be HDMI_STATIC_METADATA_TYPE1 = 0 instead.

The kernel doesn't validate this, and many HDR monitors have insufficient validation in their firmware, so despite being wrong, it may have worked on specific HDR monitors.

See the ongoing discussion wrt. a kernel patch which should fix this for reference:

https://lists.freedesktop.org/archives/dri-devel/2021-January/295187.html

@lrusak
Copy link
Contributor

lrusak commented Jan 25, 2021

Thanks for pointing this out. We only hardcode the definitions because they were written in combination with testing kodi with HDR. I really think these hardcoded values can be removed from Kodi or guarded with an ifdef.

What do you think is the correct approach?

@kleinerm
Copy link
Author

I don't know. Normally libdrm or the kernel would be a good reference. Or the official standards.
Wrt. HDR or similar, AMD's amdvlk driver source code could be another reference, e.g.:

https://github.com/GPUOpen-Drivers/pal/blob/26cb05f899cc587f9398399a3381ee22ab41f4c2/src/core/os/amdgpu/amdgpuScreen.h#L43

@enen92
Copy link
Member

enen92 commented Jan 30, 2021

Fixed in #19129
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants