mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 13:08:01 +07:00
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>
This commit is contained in:
parent
fafba6de3a
commit
3c25e920f0
@ -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++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user