summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/modules
diff options
context:
space:
mode:
authorAnthony Koo <Anthony.Koo@amd.com>2016-12-20 18:48:11 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:06:47 -0400
commit3c25e920f011d785725985733ca2625defbf680f (patch)
tree967fa803799bb73f3b011c4bcac9b62eabffbdd9 /drivers/gpu/drm/amd/display/modules
parentfafba6de3a142f46c78b937ae9783d2d0cab044d (diff)
drm/amd/display: Reset gamma to NULL after release
Signed-off-by: Anthony Koo <anthony.koo@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules')
-rw-r--r--drivers/gpu/drm/amd/display/modules/color/color.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/color/color.c b/drivers/gpu/drm/amd/display/modules/color/color.c
index 938867282d04..6d1b20f6bf98 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color.c
@@ -1748,8 +1748,10 @@ bool mod_color_remove_sink(struct mod_color *mod_color,
for (i = 0; i < core_color->num_sinks; i++) {
if (core_color->caps[i].sink == sink) {
- if (core_color->state[i].gamma)
+ if (core_color->state[i].gamma) {
dc_gamma_release(core_color->state[i].gamma);
+ core_color->state[i].gamma = NULL;
+ }
/* To remove this sink, shift everything after down */
for (j = i; j < core_color->num_sinks - 1; j++) {