提交 3c25e920 编写于 作者: A Anthony Koo 提交者: Alex Deucher

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

Signed-off-by: NAnthony Koo <anthony.koo@amd.com>
Reviewed-by: NAric Cyr <Aric.Cyr@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 fafba6de
...@@ -1748,8 +1748,10 @@ bool mod_color_remove_sink(struct mod_color *mod_color, ...@@ -1748,8 +1748,10 @@ bool mod_color_remove_sink(struct mod_color *mod_color,
for (i = 0; i < core_color->num_sinks; i++) { for (i = 0; i < core_color->num_sinks; i++) {
if (core_color->caps[i].sink == sink) { 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); dc_gamma_release(core_color->state[i].gamma);
core_color->state[i].gamma = NULL;
}
/* To remove this sink, shift everything after down */ /* To remove this sink, shift everything after down */
for (j = i; j < core_color->num_sinks - 1; j++) { for (j = i; j < core_color->num_sinks - 1; j++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册