Commit 3c25e920 authored by Anthony Koo's avatar Anthony Koo Committed by Alex Deucher

drm/amd/display: Reset gamma to NULL after release

Signed-off-by: default avatarAnthony Koo <anthony.koo@amd.com>
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fafba6de
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment