From: Anthony Koo Date: Tue, 20 Dec 2016 23:48:11 +0000 (-0500) Subject: drm/amd/display: Reset gamma to NULL after release X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3c25e920f011d785725985733ca2625defbf680f;p=openwrt%2Fstaging%2Fblogic.git drm/amd/display: Reset gamma to NULL after release Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- 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++) {