Skip to content

Commit

Permalink
Merge pull request #3248 from canonical/ignore-zero-length-gamma
Browse files Browse the repository at this point in the history
Ignore zero length gamma curves
  • Loading branch information
Saviq authored Feb 23, 2024
2 parents d0a68ae + 0a89793 commit bd0feb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/platforms/gbm-kms/server/kms/real_kms_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ void mgg::RealKMSOutput::set_power_mode(MirPowerMode mode)

void mgg::RealKMSOutput::set_gamma(mg::GammaCurves const& gamma)
{
if (!gamma.red.size())
{
mir::log_warning("Ignoring attempt to set zero length gamma");
return;
}

if (!ensure_crtc())
{
mir::log_warning("Output %s has no associated CRTC to set gamma on",
Expand Down

0 comments on commit bd0feb1

Please sign in to comment.