Skip to content

HDR Support#112

Merged
vaxerski merged 12 commits into
hyprwm:mainfrom
UjinT34:hdr
Jan 5, 2025
Merged

HDR Support#112
vaxerski merged 12 commits into
hyprwm:mainfrom
UjinT34:hdr

Conversation

@UjinT34

@UjinT34 UjinT34 commented Dec 5, 2024

Copy link
Copy Markdown
Contributor

Parses drm properties and enums needed for HDR.
Parses edid info needed for HDR and exposes it to HL.
output->state->setWideColorGamut to change colorspace to BT2020_RGB.
output->state->setHDRMetadata to set HDR properties.

Needs HL changes to be useful. Probably needs some extra colorimetry helpers in hyprutils and some helpers to create hdr metadata. kwin seems to rely only on edid info to create this metadata. wlroots https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4594 passes almost all parameters with a separate struct.

Also adds support for https://drmdb.emersion.fr/properties/3435973836/DEGAMMA_LUT just in case

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Obviously after fixing the problems we first need a Hyprland MR.

For the colorimetry utils and stuff, I think hyprgraphics would be a better place, though atm I am unsure what you want to put there.

Comment thread include/aquamarine/backend/DRM.hpp Outdated
Comment thread include/aquamarine/backend/DRM.hpp
Comment thread include/aquamarine/backend/DRM.hpp
Comment thread include/aquamarine/output/Output.hpp Outdated
Comment thread include/aquamarine/output/Output.hpp Outdated
Comment thread include/aquamarine/output/Output.hpp Outdated
Comment thread include/aquamarine/output/Output.hpp Outdated
Comment thread include/aquamarine/output/Output.hpp Outdated
Comment thread src/backend/drm/DRM.cpp Outdated
Comment thread src/backend/drm/Props.cpp Outdated
@vaxerski

vaxerski commented Jan 2, 2025

Copy link
Copy Markdown
Member

tag me for review when this one is ready to go

@UjinT34 UjinT34 requested a review from vaxerski January 3, 2025 17:17
@UjinT34

UjinT34 commented Jan 3, 2025

Copy link
Copy Markdown
Contributor Author

Should be ready.

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

Comment thread src/backend/drm/impl/Atomic.cpp Outdated
Comment thread src/backend/drm/DRM.cpp Outdated
@vaxerski

vaxerski commented Jan 4, 2025

Copy link
Copy Markdown
Member

apart from the one unresolved conversation lgtm

@vaxerski vaxerski added the abi break breaks abi label Jan 4, 2025
@vaxerski vaxerski merged commit aeab812 into hyprwm:main Jan 5, 2025
UjinT34 added a commit to UjinT34/aquamarine that referenced this pull request Jan 9, 2025
vaxerski added a commit that referenced this pull request Jan 10, 2025
* do not set cursor planeProps unless smth changed

* do not skip cursor state flag setting

* drm: scan only cards and not outputs, safeguard against null renderer (#106)

* drm: dont scan card outputs

no need to scan for card[0-9]* and probe card0-eDP etc if they are kms,
bootvga and rendernodes etc. skip the wildcard and remove a unused
size_t variable.

* drm: dont commit state if renderer is missing

setting certain env vars to force egl implentations makes the render
creation fail on the second gpu. instead of causing a coredump,
safeguard commitState and let the monitor turn blank instead.

* props: bump version to 0.5.0

* drm: Validate conn before dereference in CDRMAtomicRequest::commit() (#108)

During startup, CDRMAtomicImpl::reset() may emit a call to method
commit of a CDRMAtomicRequest instance with member "conn" uninitialized,
leading to a segfault. Validate the the pointer before dereference it as
a workaround.

Fixes: 55ac962 ("DRM: preliminary atomic support")
Closes: #107

Signed-off-by: Yao Zi <ziyao@disroot.org>

* buffer: remove useless forward def

* drm: clearer flow when rescanning connectors (#113)

* consolidates into checkOutput for clearer flow when rescanning connectors

* add error log

* drm: allow multigpu blit from explicit to implicit (#114)

* version: bump to 0.5.1

* flake.lock: update

* flake.nix: gcc13 -> gcc14 (#118)

* drm: udev scan only drm_minor, not connectors (#119)

* drm: log errno set by drmModeAtomicCommit (#120)

* drm: moved null check for renderer to shouldBlit() (#109) (#121)

* drm: only fail INVALID format when enabled (#122)

* flake.lock: update

* drm: only clear buffers when fullReconfigure succeeds (#124)

* core/drm: Add HDR Support (#112)

* version: bump to 0.6.0

* drm: limit udev drm_minor to Linux after a132fa4 (#129)

Not implemented by libudev-devd yet:

[ERR] [AQ] drm: No gpus in scanGPUs.
[ERR] [AQ] drm: Found no gpus to use, cannot continue
[ERR] [AQ] DRM Backend failed

* do not set cursor planeProps unless smth changed

* test separate cursor commits

* do not change hdr blob unless asked to

* rebase

* split atomic commit processing and move hdr & colorspace into modeset

* fix wide color gamut flag & cleanup

* remove unused debug var

---------

Signed-off-by: Yao Zi <ziyao@disroot.org>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Ziyao <ziyao@disroot.org>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
Co-authored-by: Richard Henninger <56615615+richen604@users.noreply.github.com>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abi break breaks abi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants