diff options
author | Yongqiang Sun <yongqiang.sun@amd.com> | 2016-12-23 10:18:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:07:48 -0400 |
commit | aff20230b439921d6660eb2ef6d9f6c273d9b240 (patch) | |
tree | 6c88b429d5ea3beb8499b9bc55283f6f515d67fc /drivers/gpu/drm/amd/display/modules | |
parent | d5de97a2b9ec8ba249df6a3e29f20b56285a48dd (diff) | |
download | linux-stable-aff20230b439921d6660eb2ef6d9f6c273d9b240.tar.gz linux-stable-aff20230b439921d6660eb2ef6d9f6c273d9b240.tar.bz2 linux-stable-aff20230b439921d6660eb2ef6d9f6c273d9b240.zip |
drm/amd/display: Set gamma to NULL at release
Signed-off-by: Yongqiang Sun <yongqiang.sun@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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules')
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/color/color.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/color/color.c b/drivers/gpu/drm/amd/display/modules/color/color.c index 599d9f9aa7ca..3611de90e1e9 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color.c +++ b/drivers/gpu/drm/amd/display/modules/color/color.c @@ -1557,7 +1557,7 @@ void mod_color_destroy(struct mod_color *mod_color) for (i = 0; i < core_color->num_sinks; i++) if (core_color->state[i].gamma) - dc_gamma_release(core_color->state[i].gamma); + dc_gamma_release(&core_color->state[i].gamma); dm_free(core_color->state); @@ -1749,8 +1749,7 @@ 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) { - dc_gamma_release(core_color->state[i].gamma); - core_color->state[i].gamma = NULL; + dc_gamma_release(&core_color->state[i].gamma); } /* To remove this sink, shift everything after down */ @@ -2444,8 +2443,7 @@ bool mod_color_set_input_gamma_correction(struct mod_color *mod_color, if (core_color->state[sink_index].gamma != gamma) { if (core_color->state[sink_index].gamma) dc_gamma_release( - core_color->state[sink_index]. - gamma); + &core_color->state[sink_index].gamma); dc_gamma_retain(gamma); core_color->state[sink_index].gamma = gamma; |