Skip to content

Commit

Permalink
drm/atomic: fix gamma resetting
Browse files Browse the repository at this point in the history
thanks @ikalco
  • Loading branch information
vaxerski committed Jul 12, 2024
1 parent ee0dea6 commit 996cc6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/drm/impl/Atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ bool Aquamarine::CDRMAtomicImpl::prepareConnector(Hyprutils::Memory::CSharedPoin
if (STATE.committed & COutputState::AQ_OUTPUT_STATE_GAMMA_LUT) {
if (!connector->crtc->props.gamma_lut) // TODO: allow this with legacy gamma, perhaps.
connector->backend->backend->log(AQ_LOG_ERROR, "atomic drm: failed to commit gamma: no gamma_lut prop");
else {
else if (STATE.gammaLut.empty()) {
data.atomic.gammaLut = 0;
data.atomic.gammad = true;
} else {
std::vector<drm_color_lut> lut;
lut.resize(STATE.gammaLut.size() / 3); // [r,g,b]+

Expand Down

0 comments on commit 996cc6f

Please sign in to comment.