diff options
| author | Dillon Varone <[email protected]> | 2025-06-20 20:23:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-07-15 18:07:51 +0000 |
| commit | d7b618bc41ee3d44c070212dff93949702ede997 (patch) | |
| tree | 22d5ace62b74e8c5b6f6c48e064c97c74ad719fa /drivers/gpu/drm/amd/display/dc/inc/hw | |
| parent | drm/amd/display: Make dcn401_initialize_min_clocks() available to other compi... (diff) | |
| download | kernel-d7b618bc41ee3d44c070212dff93949702ede997.tar.gz kernel-d7b618bc41ee3d44c070212dff93949702ede997.zip | |
drm/amd/display: Refactor DSC cap calculations
[WHY]
DSC block level should only be responsible for reporting single DSC
instance capabilities. Factoring in ODM combine requirements should be
handled in dc_dsc.c. Both components should acquire clocks from clk_mgr
to determine throughput capabilities instead of relying on hard coded
values as these can differ by SoC and SKU.
[HOW]
1) Add dsc_get_single_enc_caps to acquire single DSC instance
capabilities (replacing dsc_get_enc_caps), factoring in DSCCLK
2) add build_dsc_enc_caps to combine single DSC instance capabilities
3) account for max pixel rate per pipe (DISPCLK) when calculating
minimum slice count
Reviewed-by: Wenjing Liu <[email protected]>
Signed-off-by: Dillon Varone <[email protected]>
Signed-off-by: Ivan Lipski <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/hw')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h index 3b736f4687a6..7d66e62b6be6 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h @@ -100,6 +100,17 @@ struct dcn301_clk_internal { #define MAX_NUM_DPM_LVL 8 #define WM_SET_COUNT 4 +enum clk_type { + CLK_TYPE_DCFCLK, + CLK_TYPE_FCLK, + CLK_TYPE_MCLK, + CLK_TYPE_SOCCLK, + CLK_TYPE_DTBCLK, + CLK_TYPE_DISPCLK, + CLK_TYPE_DPPCLK, + CLK_TYPE_DSCCLK, + CLK_TYPE_COUNT +}; struct clk_limit_table_entry { unsigned int voltage; /* milivolts withh 2 fractional bits */ @@ -326,6 +337,7 @@ struct clk_mgr_funcs { bool (*is_dc_mode_present)(struct clk_mgr *clk_mgr); + unsigned int (*get_max_clock_khz)(struct clk_mgr *clk_mgr_base, enum clk_type clk_type); }; struct clk_mgr { |
