Commit e12078c5 authored by Tony Cheng's avatar Tony Cheng Committed by Alex Deucher

drm/amd/display: debug option to disable color module fucntionality

Signed-off-by: default avatarTony Cheng <tony.cheng@amd.com>
Reviewed-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dc0bcaf2
...@@ -1452,8 +1452,11 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda ...@@ -1452,8 +1452,11 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
} }
} }
if (updates[i].gamma && updates[i].gamma != if (dc->debug.disable_color_module)
surface->public.gamma_correction) { continue; /* skip below color updates */
if (updates[i].gamma &&
updates[i].gamma != surface->public.gamma_correction) {
if (surface->public.gamma_correction != NULL) if (surface->public.gamma_correction != NULL)
dc_gamma_release(surface->public. dc_gamma_release(surface->public.
gamma_correction); gamma_correction);
...@@ -1464,8 +1467,7 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda ...@@ -1464,8 +1467,7 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
} }
if (updates[i].in_transfer_func && if (updates[i].in_transfer_func &&
updates[i].in_transfer_func != updates[i].in_transfer_func != surface->public.in_transfer_func) {
surface->public.in_transfer_func) {
if (surface->public.in_transfer_func != NULL) if (surface->public.in_transfer_func != NULL)
dc_transfer_func_release( dc_transfer_func_release(
surface->public. surface->public.
...@@ -1478,8 +1480,7 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda ...@@ -1478,8 +1480,7 @@ void dc_update_surfaces_for_target(struct dc *dc, struct dc_surface_update *upda
} }
if (updates[i].out_transfer_func && if (updates[i].out_transfer_func &&
updates[i].out_transfer_func != updates[i].out_transfer_func != stream->public.out_transfer_func) {
stream->public.out_transfer_func) {
if (stream->public.out_transfer_func != NULL) if (stream->public.out_transfer_func != NULL)
dc_transfer_func_release( dc_transfer_func_release(
stream->public. stream->public.
......
...@@ -148,6 +148,7 @@ struct dc_debug { ...@@ -148,6 +148,7 @@ struct dc_debug {
bool disable_clock_gate; bool disable_clock_gate;
bool disable_dmcu; bool disable_dmcu;
bool disable_hdmi_deep_color; bool disable_hdmi_deep_color;
bool disable_color_module;
}; };
struct dc { struct dc {
......
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