Commit e73b59b7 authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

drm/amd/display: add always_scale debug flag to dc

Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@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 93b8ca9b
......@@ -181,6 +181,7 @@ struct dc_debug {
int urgent_latency_ns;
int percent_of_ideal_drambw;
int dram_clock_change_latency_ns;
int always_scale;
#endif
bool disable_pplib_clock_request;
bool disable_clock_gate;
......
......@@ -157,7 +157,8 @@ static void transform_set_otg_blank(
OTG_V_BLANK_END, v_blank_end);
}
static enum dscl_mode_sel get_dscl_mode(const struct scaler_data *data)
static enum dscl_mode_sel get_dscl_mode(
const struct scaler_data *data, bool dbg_always_scale)
{
const long long one = dal_fixed31_32_one.value;
bool ycbcr = false;
......@@ -177,7 +178,8 @@ static enum dscl_mode_sel get_dscl_mode(const struct scaler_data *data)
if (data->ratios.horz.value == one
&& data->ratios.vert.value == one
&& data->ratios.horz_c.value == one
&& data->ratios.vert_c.value == one)
&& data->ratios.vert_c.value == one
&& !dbg_always_scale)
return DSCL_MODE_SCALING_444_BYPASS;
if (!format420) {
......@@ -603,7 +605,8 @@ void transform_set_scaler_auto_scale(
{
enum lb_memory_config lb_config;
struct dcn10_transform *xfm = TO_DCN10_TRANSFORM(xfm_base);
enum dscl_mode_sel dscl_mode = get_dscl_mode(scl_data);
enum dscl_mode_sel dscl_mode = get_dscl_mode(
scl_data, xfm_base->ctx->dc->debug.always_scale);
bool ycbcr = scl_data->format >= PIXEL_FORMAT_VIDEO_BEGIN
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
......@@ -611,7 +614,7 @@ void transform_set_scaler_auto_scale(
transform_set_otg_blank(xfm, scl_data);
REG_UPDATE(SCL_MODE, DSCL_MODE, get_dscl_mode(scl_data));
REG_UPDATE(SCL_MODE, DSCL_MODE, dscl_mode);
transform_set_viewport(xfm, &scl_data->viewport, &scl_data->viewport_c);
......@@ -740,7 +743,8 @@ static void transform_set_scaler_manual_scale(
{
enum lb_memory_config lb_config;
struct dcn10_transform *xfm = TO_DCN10_TRANSFORM(xfm_base);
enum dscl_mode_sel dscl_mode = get_dscl_mode(scl_data);
enum dscl_mode_sel dscl_mode = get_dscl_mode(
scl_data, xfm_base->ctx->dc->debug.always_scale);
bool ycbcr = scl_data->format >= PIXEL_FORMAT_VIDEO_BEGIN
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
......
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