diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c index 5609ac6d604078669bfa54995db255fa1401e14e..b78775e8c13cd831976e076ea035a59767d2661c 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c @@ -42,12 +42,6 @@ #define DC_LOGGER \ dccg->ctx->logger -enum pixel_rate_div { - PIXEL_RATE_DIV_BY_1 = 0, - PIXEL_RATE_DIV_BY_2 = 1, - PIXEL_RATE_DIV_BY_4 = 3 -}; - static void dccg32_set_pixel_rate_div( struct dccg *dccg, uint32_t otg_inst, @@ -183,6 +177,19 @@ void dccg32_set_dtbclk_dto( } } +void dccg32_set_valid_pixel_rate( + struct dccg *dccg, + int otg_inst, + int pixclk_khz) +{ + struct dtbclk_dto_params dto_params = {0}; + + dto_params.otg_inst = otg_inst; + dto_params.pixclk_khz = pixclk_khz; + + dccg32_set_dtbclk_dto(dccg, &dto_params); +} + static void dccg32_get_dccg_ref_freq(struct dccg *dccg, unsigned int xtalin_freq_inKhz, unsigned int *dccg_ref_freq_inKhz) @@ -260,6 +267,7 @@ static const struct dccg_funcs dccg32_funcs = { .disable_symclk32_le = dccg31_disable_symclk32_le, .set_physymclk = dccg31_set_physymclk, .set_dtbclk_dto = dccg32_set_dtbclk_dto, + .set_valid_pixel_rate = dccg32_set_valid_pixel_rate, .set_fifo_errdet_ovr_en = dccg2_set_fifo_errdet_ovr_en, .set_audio_dtbclk_dto = dccg31_set_audio_dtbclk_dto, .otg_add_pixel = dccg32_otg_add_pixel, diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h index b5acc6b9f3c9ca87d321491b381d1cc361d59d9b..8b450a7274ae4c7b5d9324dcee5917a4538b8a74 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h @@ -56,6 +56,12 @@ enum dentist_dispclk_change_mode { DISPCLK_CHANGE_MODE_RAMPING, }; +enum pixel_rate_div { + PIXEL_RATE_DIV_BY_1 = 0, + PIXEL_RATE_DIV_BY_2 = 1, + PIXEL_RATE_DIV_BY_4 = 3 +}; + struct dccg { struct dc_context *ctx; const struct dccg_funcs *funcs; @@ -139,6 +145,17 @@ struct dccg_funcs { struct dccg *dccg, int inst); +void (*set_pixel_rate_div)( + struct dccg *dccg, + uint32_t otg_inst, + enum pixel_rate_div k1, + enum pixel_rate_div k2); + +void (*set_valid_pixel_rate)( + struct dccg *dccg, + int otg_inst, + int pixclk_khz); + }; #endif //__DAL_DCCG_H__