From 9ebce0b055f0bb5fa04c2cadd32f81a7e7635a58 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 7 Oct 2024 19:21:15 +0100 Subject: [PATCH] fixes --- src/backend/drm/Props.cpp | 7 ++++--- src/backend/drm/impl/Atomic.cpp | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/backend/drm/Props.cpp b/src/backend/drm/Props.cpp index 5aa298e..3f8128b 100644 --- a/src/backend/drm/Props.cpp +++ b/src/backend/drm/Props.cpp @@ -36,9 +36,10 @@ static const struct prop_info connector_info[] = { static const struct prop_info crtc_info[] = { #define INDEX(name) (offsetof(SDRMCRTC::UDRMCRTCProps, name) / sizeof(uint32_t)) - {"ACTIVE", INDEX(active)}, {"GAMMA_LUT", INDEX(gamma_lut)}, {"GAMMA_LUT_SIZE", INDEX(gamma_lut_size)}, - {"MODE_ID", INDEX(mode_id)}, {"OUT_FENCE_PTR", INDEX(out_fence_ptr)}, {"VRR_ENABLED", INDEX(vrr_enabled)}, - {"CTM", INDEX(ctm)}, + {"ACTIVE", INDEX(active)}, {"CTM", INDEX(ctm)}, + {"GAMMA_LUT", INDEX(gamma_lut)}, {"GAMMA_LUT_SIZE", INDEX(gamma_lut_size)}, + {"MODE_ID", INDEX(mode_id)}, {"OUT_FENCE_PTR", INDEX(out_fence_ptr)}, + {"VRR_ENABLED", INDEX(vrr_enabled)}, #undef INDEX }; diff --git a/src/backend/drm/impl/Atomic.cpp b/src/backend/drm/impl/Atomic.cpp index 5aa228f..da5ec55 100644 --- a/src/backend/drm/impl/Atomic.cpp +++ b/src/backend/drm/impl/Atomic.cpp @@ -100,9 +100,6 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint if (data.modeset && enable && connector->props.max_bpc && connector->maxBpcBounds.at(1)) add(connector->id, connector->props.max_bpc, 8); // FIXME: this isnt always 8 - if (data.ctm.has_value() && connector->crtc->props.ctm && data.atomic.ctmBlob && data.atomic.ctmd) - add(connector->crtc->id, connector->crtc->props.ctm, data.atomic.ctmBlob); - add(connector->crtc->id, connector->crtc->props.active, enable); if (enable) { @@ -112,6 +109,9 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint if (connector->crtc->props.gamma_lut && data.atomic.gammad) add(connector->crtc->id, connector->crtc->props.gamma_lut, data.atomic.gammaLut); + if (connector->crtc->props.ctm && data.atomic.ctmd) + add(connector->crtc->id, connector->crtc->props.ctm, data.atomic.ctmBlob); + if (connector->crtc->props.vrr_enabled) add(connector->crtc->id, connector->crtc->props.vrr_enabled, (uint64_t)STATE.adaptiveSync);