summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Prosyak <vitaly.prosyak@amd.com>2016-12-13 23:23:16 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-09-27 00:05:02 +0300
commit1e3d346f4fbb48f0a89134f4b834d3be2df3cc25 (patch)
treeab097d0ac398e77e1e7f0b3e4b81f45d9084fab9
parent30018e9fa27506933f232aaacfc0145ccb094272 (diff)
downloadlinux-1e3d346f4fbb48f0a89134f4b834d3be2df3cc25.tar.xz
drm/amd/display: re gamma programming
Fix gamma update logic to avoid crash Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 75b6e404d016..9a35e3bb8283 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1445,7 +1445,8 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
}
}
- if (updates[i].gamma) {
+ if (updates[i].gamma && updates[i].gamma !=
+ surface->public.gamma_correction) {
if (surface->public.gamma_correction != NULL)
dc_gamma_release(surface->public.
gamma_correction);