drm/amd/display: fix dscl_manual_ratio_init
This change will fix wb and display scaling when ratios of 4 or more are involved 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:
parent
df099b9b60
commit
0b19fdc45f
5 changed files with 13 additions and 11 deletions
|
@ -449,6 +449,11 @@ static inline unsigned int clamp_ux_dy(
|
|||
return min_clamp;
|
||||
}
|
||||
|
||||
unsigned int dc_fixpt_u3d19(struct fixed31_32 arg)
|
||||
{
|
||||
return ux_dy(arg.value, 3, 19);
|
||||
}
|
||||
|
||||
unsigned int dc_fixpt_u2d19(struct fixed31_32 arg)
|
||||
{
|
||||
return ux_dy(arg.value, 2, 19);
|
||||
|
|
|
@ -132,8 +132,7 @@ void dpp_set_gamut_remap_bypass(struct dcn10_dpp *dpp)
|
|||
|
||||
#define IDENTITY_RATIO(ratio) (dc_fixpt_u2d19(ratio) == (1 << 19))
|
||||
|
||||
|
||||
bool dpp_get_optimal_number_of_taps(
|
||||
static bool dpp_get_optimal_number_of_taps(
|
||||
struct dpp *dpp,
|
||||
struct scaler_data *scl_data,
|
||||
const struct scaling_taps *in_taps)
|
||||
|
|
|
@ -1424,12 +1424,8 @@ void dpp1_set_degamma(
|
|||
enum ipp_degamma_mode mode);
|
||||
|
||||
void dpp1_set_degamma_pwl(struct dpp *dpp_base,
|
||||
const struct pwl_params *params);
|
||||
const struct pwl_params *params);
|
||||
|
||||
bool dpp_get_optimal_number_of_taps(
|
||||
struct dpp *dpp,
|
||||
struct scaler_data *scl_data,
|
||||
const struct scaling_taps *in_taps);
|
||||
|
||||
void dpp_read_state(struct dpp *dpp_base,
|
||||
struct dcn_dpp_state *s);
|
||||
|
|
|
@ -565,16 +565,16 @@ static void dpp1_dscl_set_manual_ratio_init(
|
|||
uint32_t init_int = 0;
|
||||
|
||||
REG_SET(SCL_HORZ_FILTER_SCALE_RATIO, 0,
|
||||
SCL_H_SCALE_RATIO, dc_fixpt_u2d19(data->ratios.horz) << 5);
|
||||
SCL_H_SCALE_RATIO, dc_fixpt_u3d19(data->ratios.horz) << 5);
|
||||
|
||||
REG_SET(SCL_VERT_FILTER_SCALE_RATIO, 0,
|
||||
SCL_V_SCALE_RATIO, dc_fixpt_u2d19(data->ratios.vert) << 5);
|
||||
SCL_V_SCALE_RATIO, dc_fixpt_u3d19(data->ratios.vert) << 5);
|
||||
|
||||
REG_SET(SCL_HORZ_FILTER_SCALE_RATIO_C, 0,
|
||||
SCL_H_SCALE_RATIO_C, dc_fixpt_u2d19(data->ratios.horz_c) << 5);
|
||||
SCL_H_SCALE_RATIO_C, dc_fixpt_u3d19(data->ratios.horz_c) << 5);
|
||||
|
||||
REG_SET(SCL_VERT_FILTER_SCALE_RATIO_C, 0,
|
||||
SCL_V_SCALE_RATIO_C, dc_fixpt_u2d19(data->ratios.vert_c) << 5);
|
||||
SCL_V_SCALE_RATIO_C, dc_fixpt_u3d19(data->ratios.vert_c) << 5);
|
||||
|
||||
/*
|
||||
* 0.24 format for fraction, first five bits zeroed
|
||||
|
|
|
@ -496,6 +496,8 @@ static inline int dc_fixpt_ceil(struct fixed31_32 arg)
|
|||
* fractional
|
||||
*/
|
||||
|
||||
unsigned int dc_fixpt_u3d19(struct fixed31_32 arg);
|
||||
|
||||
unsigned int dc_fixpt_u2d19(struct fixed31_32 arg);
|
||||
|
||||
unsigned int dc_fixpt_u0d19(struct fixed31_32 arg);
|
||||
|
|
Loading…
Reference in a new issue