drm/vc4: Enable gamma block only when required.
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 8 Nov 2021 17:32:45 +0000 (17:32 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 15 Nov 2021 20:07:54 +0000 (20:07 +0000)
commit1df3825249a06c2ec52dd3d97b4fc916e8f4d7e0
treeee40e45ce6d5c9e2f09bf00b950973d95c9e7f70
parentfb27937bd83e511bd2a89e5db3ab81f0f7c8209a
drm/vc4: Enable gamma block only when required.

With HVS5 the gamma block is now only reprogrammed with
a disable/enable. Loading the table from vc4_hvs_init_channel
(called from vc4_hvs_atomic_enable) appears to be at an
invalid point in time and so isn't applied.

Switch to enabling and disabling the gamma table instead. This
isn't safe if the pipeline is running, but it isn't now.
For HVS4 it is safe to enable and disable dynamically, so
adopt that approach there too.

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