drm: Check whether the gamma lut has changed before updating
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Tue, 2 Nov 2021 16:01:36 +0000 (16:01 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:29 +0000 (16:04 +0000)
commit99a78bba4435e25d8361d52e0e8237d06aace369
tree94b89a0d383caa5b72a279568546f819bd20f0f9
parent0abb5373a3cc71e672c67ce352b9b5a7d8cb2b10
drm: Check whether the gamma lut has changed before updating

drm_crtc_legacy_gamma_set updates the gamma_lut blob unconditionally,
which leads to unnecessary reprogramming of hardware.

Check whether the blob contents has actually changed before
signalling that it has been updated.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/drm_color_mgmt.c