Bug 488812 - Intel i915 (ARC A770): enabling HDR results in corrupted screen
Summary: Intel i915 (ARC A770): enabling HDR results in corrupted screen
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: colour-management (show other bugs)
Version: 6.1.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 18:29 UTC by Nowa Ammerlaan
Modified: 2024-07-04 16:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
log format and modifier of the shadow buffer (991 bytes, patch)
2024-07-04 14:44 UTC, Zamundaaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan 2024-06-20 18:29:29 UTC
SUMMARY

Enabling HDR for my MSI Optix MAG342CQR using an Intel ARC A770 card results in a corrupted display (see attachments).

Note, KWIN_DRM_ALLOW_INTEL_COLORSPACE=1 is in the environment, to make this setting show up at all.

Considering that the state of HDR on Intel platforms is experimental this may very well be an i915 bug. But I am reporting it here because it worked mostly okay in kwin 6.0, but is now no longer working at all in 6.1.


STEPS TO REPRODUCE
1.  add KWIN_DRM_ALLOW_INTEL_COLORSPACE=1 to system wide environment
2.  restart
3.  enable HDR in display settings

OBSERVED RESULT

See attachments

EXPECTED RESULT

No corrupted display


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

Please let me know if and how I can provide i915/kwin debug logs that may be helpful.
Comment 1 Nowa Ammerlaan 2024-06-20 18:31:50 UTC
Photos exceed file size limit, so here's a google drive link instead: https://drive.google.com/file/d/1wSD4oq04pddjrKf3r-Byat96LMuEb8DN/view?usp=sharing
Comment 2 Zamundaaa 2024-06-20 23:28:25 UTC
KWin now uses 16 bit floating point dmabufs instead of an opengl texture for compositing, which will be the cause of this issue.
RadeonSi doesn't handle them well either (https://gitlab.freedesktop.org/mesa/mesa/-/issues/10875), I assume Intel also just has problems with the used modifier on some hardware (it works fine on all tested Intel integrated GPUs so far).

If I provide a patch that prints the used format + modifier, would you apply that and make a bug report for Mesa with that information? I'll expand the workaround we have in place for AMD to Intel, but we really need this fixed in the drivers.
Comment 3 Nowa Ammerlaan 2024-06-21 08:45:10 UTC
> If I provide a patch that prints the used format + modifier, would you apply that and make a bug report for Mesa with that information? I'll expand the workaround we have in place for AMD to Intel, but we really need this fixed in the drivers.

Sure, no problem, happy to help!
Comment 4 Nowa Ammerlaan 2024-07-04 08:31:06 UTC
Today I gave the new Xe driver a try, and found that with this kernel driver I have the same HDR issue. But I guess that makes sense if the issue is in the mesa driver.
Comment 5 Zamundaaa 2024-07-04 14:44:59 UTC
Created attachment 171374 [details]
log format and modifier of the shadow buffer

Okay, here's the patch to get the format information
Comment 6 Nowa Ammerlaan 2024-07-04 16:03:36 UTC
Thanks, applied, and reported a new bug for mesa: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11460