Commit 1e3d346f authored by Vitaly Prosyak's avatar Vitaly Prosyak Committed by Alex Deucher

drm/amd/display: re gamma programming

Fix gamma update logic to avoid crash
Signed-off-by: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 30018e9f
......@@ -1445,7 +1445,8 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
}
}
if (updates[i].gamma) {
if (updates[i].gamma && updates[i].gamma !=
surface->public.gamma_correction) {
if (surface->public.gamma_correction != NULL)
dc_gamma_release(surface->public.
gamma_correction);
......
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