drm/amd/display: add always_scale debug flag to dc
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
93b8ca9b87
commit
e73b59b7e0
@@ -181,6 +181,7 @@ struct dc_debug {
|
|||||||
int urgent_latency_ns;
|
int urgent_latency_ns;
|
||||||
int percent_of_ideal_drambw;
|
int percent_of_ideal_drambw;
|
||||||
int dram_clock_change_latency_ns;
|
int dram_clock_change_latency_ns;
|
||||||
|
int always_scale;
|
||||||
#endif
|
#endif
|
||||||
bool disable_pplib_clock_request;
|
bool disable_pplib_clock_request;
|
||||||
bool disable_clock_gate;
|
bool disable_clock_gate;
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ static void transform_set_otg_blank(
|
|||||||
OTG_V_BLANK_END, v_blank_end);
|
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;
|
const long long one = dal_fixed31_32_one.value;
|
||||||
bool ycbcr = false;
|
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
|
if (data->ratios.horz.value == one
|
||||||
&& data->ratios.vert.value == one
|
&& data->ratios.vert.value == one
|
||||||
&& data->ratios.horz_c.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;
|
return DSCL_MODE_SCALING_444_BYPASS;
|
||||||
|
|
||||||
if (!format420) {
|
if (!format420) {
|
||||||
@@ -603,7 +605,8 @@ void transform_set_scaler_auto_scale(
|
|||||||
{
|
{
|
||||||
enum lb_memory_config lb_config;
|
enum lb_memory_config lb_config;
|
||||||
struct dcn10_transform *xfm = TO_DCN10_TRANSFORM(xfm_base);
|
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
|
bool ycbcr = scl_data->format >= PIXEL_FORMAT_VIDEO_BEGIN
|
||||||
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
|
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
|
||||||
|
|
||||||
@@ -611,7 +614,7 @@ void transform_set_scaler_auto_scale(
|
|||||||
|
|
||||||
transform_set_otg_blank(xfm, scl_data);
|
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);
|
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;
|
enum lb_memory_config lb_config;
|
||||||
struct dcn10_transform *xfm = TO_DCN10_TRANSFORM(xfm_base);
|
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
|
bool ycbcr = scl_data->format >= PIXEL_FORMAT_VIDEO_BEGIN
|
||||||
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
|
&& scl_data->format <= PIXEL_FORMAT_VIDEO_END;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user