drm/amd/display: Reverted DSC programming sequence change
PATCH 1/21 drm/amd/display: Reverted DSC programming sequence change
From: Iswara Nagulendran <[email protected]>
[HOW&WHY]
Revert a previous commit by moving DSC programming back to before link enablement.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 13 +++++++++++++ .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +13 -0
@@ -4303,6 +4303,19 @@ void core_link_enable_stream(if (pipe_ctx->stream->dpms_off)return ; +/* Have to setup DSC before DIG FE and BE are connected (which happens before the +* link training). This is to make sure the bandwidth sent to DIG BE won't be +* bigger than what the link and/or DIG BE can handle. VBID[6]/CompressedStream_flag +* will be automatically set at a later time when the video is enabled +* (DP_VID_STREAM_EN = 1). +*/ +if (pipe_ctx->stream->timing.flags.DSC) { +if (dc_is_dp_signal (pipe_ctx->stream->signal) || +dc_is_virtual_signal (pipe_ctx->stream->signal)) +dp_set_dsc_enable (pipe_ctx, true); + + } + status =enable_link (state, pipe_ctx);if (status !=DC_OK ) {
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -13
@@ -1577,19 +1577,6 @@ static enum dc_status apply_single_controller_ctx_to_hw(if (dc_is_dp_signal (pipe_ctx->stream->signal))dp_source_sequence_trace (link,DPCD_SOURCE_SEQ_AFTER_CONNECT_DIG_FE_OTG ); -/* Have to setup DSC before DIG FE and BE are connected (which happens before the -* link training). This is to make sure the bandwidth sent to DIG BE won't be -* bigger than what the link and/or DIG BE can handle. VBID[6]/CompressedStream_flag -* will be automatically set at a later time when the video is enabled -* (DP_VID_STREAM_EN = 1). -*/ -if (pipe_ctx->stream->timing.flags.DSC) { -if (dc_is_dp_signal (pipe_ctx->stream->signal) || -dc_is_virtual_signal (pipe_ctx->stream->signal)) -dp_set_dsc_enable (pipe_ctx, true); - - } -if (!stream->dpms_off) {if (dc->hwss.update_phy_state) dc->hwss.update_phy_state (context, pipe_ctx,TX_ON_SYMCLK_ON );
Signature · 1 line
2.34.1
PATCH 2/21 drm/amd/display: Assign link type before check dsc workaround.
From: "Xu, Jinze" <[email protected]>
[Why]
link type is not assigned before check dpia_mst_dsc_always_on conditions.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -1
@@ -832,8 +832,9 @@ static bool discover_dp_mst_topology(struct dc_link *link, enum dc_detect_reasonLINK_INFO ("link=%d, mst branch is now Connected\n" , link->link_index); -apply_dpia_mst_dsc_always_on_wa (link); link->type = dc_connection_mst_branch; +apply_dpia_mst_dsc_always_on_wa (link); +dm_helpers_dp_update_branch_info (link->ctx, link);if (dm_helpers_dp_mst_start_top_mgr (link->ctx, link, (reason ==DETECT_REASON_BOOT || reason ==DETECT_REASON_RESUMEFROMS3S4 ))) {
Signature · 1 line
2.34.1
PATCH 3/21 drm/amd/display: SW cursor fallback for SubVP
In reply to Pavle KotaracFrom: "Lee, Alvin" <[email protected]>
[Description]
Leverage SW cursor fall back for SubVP
when the cursor is too big. We want to
take advantage of being able to fallback
to SW cursor when possible because it's
not worth it to disable MCLK switching
because the cursor is slightly too big.
--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 1 + 4 files changed, 8 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +5 -0
@@ -328,6 +328,11 @@ bool dc_stream_set_cursor_attributes( } dc = stream->ctx->dc; + +if (dc->debug.allow_sw_cursor_fallback && attributes->height * attributes->width *4 >16384 ) +if (stream->mall_stream_config.type ==SUBVP_MAIN ) +return false; + stream->cursor_attributes = *attributes;dc_z10_restore (dc);
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -830,6 +830,7 @@ struct dc_debug_options {bool disable_fixed_vs_aux_timeout_wa;bool force_disable_subvp;bool force_subvp_mclk_switch; +bool allow_sw_cursor_fallback;bool force_usr_allow;/* uses value at boot and disables switch */ bool disable_dtb_ref_clk_switch;
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +1 -0
@@ -747,6 +747,7 @@ static const struct dc_debug_options debug_defaults_drv = { .exit_idle_opt_for_cursor_updates = true, .enable_single_display_2to1_odm_policy = true, .enable_dp_dig_pixel_rate_div_policy = 1, + .allow_sw_cursor_fallback = false, };static const struct dc_debug_options debug_defaults_diags = {
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +1 -0
@@ -750,6 +750,7 @@ static const struct dc_debug_options debug_defaults_drv = { .exit_idle_opt_for_cursor_updates = true, .enable_single_display_2to1_odm_policy = true, .enable_dp_dig_pixel_rate_div_policy = 1, + .allow_sw_cursor_fallback = false, };static const struct dc_debug_options debug_defaults_diags = {
Signature · 1 line
2.34.1
PATCH 4/21 drm/amd/display: Fixing DIG FIFO Error
In reply to Pavle KotaracFrom: Leo Chen <[email protected]>
[Why & How]DIG_FIFO_READ_START_LEVEL should only be set to default value (7) by software. Removed all instances of resetting the register to 0
--- .../gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c +1 -2
@@ -67,8 +67,7 @@ static void enc314_disable_fifo(struct stream_encoder *enc) {struct dcn10_stream_encoder *enc1 =DCN10STRENC_FROM_STRENC (enc); -REG_UPDATE_2 (DIG_FIFO_CTRL0 ,DIG_FIFO_ENABLE ,0 , -DIG_FIFO_READ_START_LEVEL ,0 ); +REG_UPDATE (DIG_FIFO_CTRL0 ,DIG_FIFO_ENABLE ,0 ); } static void enc314_dp_set_odm_combine(
Signature · 1 line
2.34.1
PATCH 5/21 drm/amd/display: Fix divide by zero in DML
In reply to Pavle KotaracFrom: Aric Cyr <[email protected]>
[why]
Incorrectly using MicroTileWidth instead of MacroTileWidth for calculations.
[how]
Remove all unused references to MicroTile and change them to MacroTile.
--- .../dc/dml/dcn32/display_mode_vba_32.c | 24 +++++++++---------- .../drm/amd/display/dc/dml/display_mode_vba.h | 10 ++++---- 2 files changed, 16 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +12 -12
@@ -1806,10 +1806,10 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l &mode_lib->vba.Read256BlockHeightC[k], &mode_lib->vba.Read256BlockWidthY[k], &mode_lib->vba.Read256BlockWidthC[k], - &mode_lib->vba.MicroTileHeightY[k], - &mode_lib->vba.MicroTileHeightC[k], - &mode_lib->vba.MicroTileWidthY[k], - &mode_lib->vba.MicroTileWidthC[k]); + &mode_lib->vba.MacroTileHeightY[k], + &mode_lib->vba.MacroTileHeightC[k], + &mode_lib->vba.MacroTileWidthY[k], + &mode_lib->vba.MacroTileWidthC[k]); }/*Bandwidth Support Check*/
@@ -2661,10 +2661,10 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l mode_lib->vba.Read256BlockWidthC, mode_lib->vba.Read256BlockHeightY, mode_lib->vba.Read256BlockHeightC, - mode_lib->vba.MicroTileWidthY, - mode_lib->vba.MicroTileWidthC, - mode_lib->vba.MicroTileHeightY, - mode_lib->vba.MicroTileHeightC, + mode_lib->vba.MacroTileWidthY, + mode_lib->vba.MacroTileWidthC, + mode_lib->vba.MacroTileHeightY, + mode_lib->vba.MacroTileHeightC,/* Output */ mode_lib->vba.SurfaceSizeInMALL,
@@ -2711,10 +2711,10 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeight256BytesY = mode_lib->vba.Read256BlockHeightY[k]; v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockWidth256BytesC = mode_lib->vba.Read256BlockWidthC[k]; v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeight256BytesC = mode_lib->vba.Read256BlockHeightC[k]; - v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockWidthY = mode_lib->vba.MicroTileWidthY[k]; - v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeightY = mode_lib->vba.MicroTileHeightY[k]; - v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockWidthC = mode_lib->vba.MicroTileWidthC[k]; - v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeightC = mode_lib->vba.MicroTileHeightC[k]; + v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockWidthY = mode_lib->vba.MacroTileWidthY[k]; + v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeightY = mode_lib->vba.MacroTileHeightY[k]; + v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockWidthC = mode_lib->vba.MacroTileWidthC[k]; + v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].BlockHeightC = mode_lib->vba.MacroTileHeightC[k]; v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].InterlaceEnable = mode_lib->vba.Interlace[k]; v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].HTotal = mode_lib->vba.HTotal[k]; v->dummy_vars.dml32_ModeSupportAndSystemConfigurationFull.SurfParameters[k].DCCEnable = mode_lib->vba.DCCEnable[k];
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +4 -6
@@ -652,10 +652,10 @@ struct vba_vars_st {unsigned int OutputTypeAndRatePerState[DC__VOLTAGE_STATES ][DC__NUM_DPP__MAX ];double RequiredDISPCLKPerSurface[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ]; -unsigned int MicroTileHeightY[DC__NUM_DPP__MAX ]; -unsigned int MicroTileHeightC[DC__NUM_DPP__MAX ]; -unsigned int MicroTileWidthY[DC__NUM_DPP__MAX ]; -unsigned int MicroTileWidthC[DC__NUM_DPP__MAX ]; +unsigned int MacroTileHeightY[DC__NUM_DPP__MAX ]; +unsigned int MacroTileHeightC[DC__NUM_DPP__MAX ]; +unsigned int MacroTileWidthY[DC__NUM_DPP__MAX ]; +unsigned int MacroTileWidthC[DC__NUM_DPP__MAX ];bool ImmediateFlipRequiredFinal;bool DCCProgrammingAssumesScanDirectionUnknownFinal;bool EnoughWritebackUnits;
@@ -801,8 +801,6 @@ struct vba_vars_st {double PSCL_FACTOR [DC__NUM_DPP__MAX ];double PSCL_FACTOR_CHROMA [DC__NUM_DPP__MAX ];double MaximumVStartup[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ]; -unsigned int MacroTileWidthY[DC__NUM_DPP__MAX ]; -unsigned int MacroTileWidthC[DC__NUM_DPP__MAX ];double AlignedDCCMetaPitch[DC__NUM_DPP__MAX ];double AlignedYPitch[DC__NUM_DPP__MAX ];double AlignedCPitch[DC__NUM_DPP__MAX ];
Signature · 1 line
2.34.1
PATCH 6/21 drm/amd/display: Fix compilation errors on DCN314
In reply to Pavle KotaracFrom: Rodrigo Siqueira <[email protected]>
We have some compilation errors in some DML files from DCN314 that we never noticed because we were not compiling some of the DML files. This commit fixes those syntax errors before we enable the compilation.
--- .../drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +5 -4
@@ -61,7 +61,7 @@// fudge factor for min dcfclk calclation #define __DML_MIN_DCFCLK_FACTOR__ 1.15 -struct { +typedef struct { double DPPCLK; double DISPCLK; double PixelClock;
@@ -1599,7 +1599,7 @@ static void CalculateDCCConfiguration(int segment_order_vert_contiguous_luma;int segment_order_vert_contiguous_chroma; -enum { +typedef enum { REQ_256Bytes, REQ_128BytesNonContiguous, REQ_128BytesContiguous,REQ_NA }RequestType ;RequestType RequestLuma;
@@ -7159,12 +7159,13 @@ static double CalculateExtraLatencyBytes( HostVMDynamicLevels =dml_max (0 , (int ) HostVMMaxNonCachedPageTableLevels -1 ); else HostVMDynamicLevels =dml_max (0 , (int ) HostVMMaxNonCachedPageTableLevels -2 ); - else + }else { HostVMDynamicLevels =0 ; + } ret = ReorderingBytes + (TotalNumberOfActiveDPP * PixelChunkSizeInKByte + TotalNumberOfDCCActiveDPP * MetaChunkSize) *1024.0 ; -if (GPUVMEnable == true) +if (GPUVMEnable == true) {for (k =0 ; k < NumberOfActivePlanes; ++k) ret = ret + NumberOfDPP[k] * dpte_group_bytes[k] * (1 +8 * HostVMDynamicLevels) * HostVMInefficiencyFactor; }
Signature · 1 line
2.34.1
PATCH 7/21 drm/amd/display: Enable dlg and vba compilation for dcn314
In reply to Pavle KotaracFrom: Rodrigo Siqueira <[email protected]>
We were not using the VBA and DLG files for DCN314, but the next sequence of changes for DCN314 will require those files. This commit adds the necessary files to the Makefile.
--- drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/Makefile +3 -0
@@ -70,6 +70,8 @@ CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) $(fram CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o := $(dml_ccflags) +CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/display_mode_vba_314.o := $(dml_ccflags) $(frame_warn_flag) +CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/display_rq_dlg_calc_314.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/dcn314_fpu.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/dcn30_fpu.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn32/dcn32_fpu.o := $(dml_ccflags)
@@ -123,6 +125,7 @@ DML += dcn20/display_rq_dlg_calc_20v2.o dcn20/display_mode_vba_20v2.o DML += dcn21/display_rq_dlg_calc_21.o dcn21/display_mode_vba_21.o DML += dcn30/dcn30_fpu.o dcn30/display_mode_vba_30.o dcn30/display_rq_dlg_calc_30.o DML += dcn31/display_mode_vba_31.o dcn31/display_rq_dlg_calc_31.o +DML += dcn314/display_mode_vba_314.o dcn314/display_rq_dlg_calc_314.o DML += dcn32/display_mode_vba_32.o dcn32/display_rq_dlg_calc_32.o dcn32/display_mode_vba_util_32.o DML += dcn31/dcn31_fpu.o DML += dcn32/dcn32_fpu.o
Signature · 1 line
2.34.1
RE: [PATCH 07/21] drm/amd/display: Enable dlg and vba compilation for dcn314
[Public]
Quoted 62 lines
-----Original Message-----
From: Kotarac, Pavle <[email protected]>
Sent: Wednesday, September 7, 2022 2:12 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Zhuo, Qingqing (Lillian) <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Wang, Chao-kai (Stylon) <[email protected]>; Chiu, Solomon <[email protected]>; Kotarac, Pavle <[email protected]>; Gutierrez, Agustin <[email protected]>
Subject: [PATCH 07/21] drm/amd/display: Enable dlg and vba compilation for dcn314From: Rodrigo Siqueira <[email protected]>
We were not using the VBA and DLG files for DCN314, but the next sequence of changes for DCN314 will require those files. This commit adds the necessary files to the
Makefile.Cc Roman Li <[email protected]>Signed-off-by Rodrigo Siqueira <[email protected]>--- drivers/gpu/drm/amd/display/dc/dml/Makefile | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/display/dc/dml/Makefile +0
-0@@ -70,6 +70,8 @@CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) $(fram CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o := $(dml_ccflags)
drivers/gpu/drm/amd/display/dc/dml/Makefile +4
-0+CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/display_mode_vba_314.o := +$(dml_ccflags) $(frame_warn_flag) +CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/display_rq_dlg_calc_314.o := +$(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn314/dcn314_fpu.o := $(dml_ccflags)CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/dcn30_fpu.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn32/dcn32_fpu.o := $(dml_ccflags) @@ -123,6 +125,7 @@ DML +=
dcn20/display_rq_dlg_calc_20v2.odcn20/display_mode_vba_20v2.oDML +=dcn21/display_rq_dlg_calc_21.odcn21/display_mode_vba_21.oDML +=dcn30/dcn30_fpu.odcn30/display_mode_vba_30.odcn30/display_rq_dlg_calc_30.oDML +=dcn31/display_mode_vba_31.odcn31/display_rq_dlg_calc_31.o+DML +=dcn314/display_mode_vba_314.odcn314/display_rq_dlg_calc_314.o
DML +=dcn32/display_mode_vba_32.odcn32/display_rq_dlg_calc_32.odcn32/display_mode_vba_util_32.oDML +=dcn31/dcn31_fpu.oDML +=dcn32/dcn32_fpu.o
--
2.34.1
PATCH 8/21 drm/amd/display: Hook up DCN314 specific dml implementation
In reply to Pavle KotaracFrom: Nicholas Kazlauskas <[email protected]>
[Why & How]
Add support for the DML314 functions and hook up DCN314 to use them.
This has some necessary additions for calculating Max VSTARTUP for future features, but there's also some changes that we have to make for pixel format/swizzle support.
That will come in a following patch to make this transition easier to bisect.
--- .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 2 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 12 ++++++++++++ .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +1 -1
@@ -262,7 +262,7 @@ void dcn314_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_p }if (!IS_FPGA_MAXIMUS_DC (dc->ctx->dce_environment)) -dml_init_instance (&dc->dml, &dcn3_14_soc, &dcn3_14_ip,DML_PROJECT_DCN31 ); +dml_init_instance (&dc->dml, &dcn3_14_soc, &dcn3_14_ip,DML_PROJECT_DCN314 );else dml_init_instance (&dc->dml, &dcn3_14_soc, &dcn3_14_ip,DML_PROJECT_DCN31_FPGA ); }
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c +12 -0
@@ -35,6 +35,8 @@#include "dcn30/display_rq_dlg_calc_30.h" #include "dcn31/display_mode_vba_31.h" #include "dcn31/display_rq_dlg_calc_31.h" +#include "dcn314/display_mode_vba_314.h" +#include "dcn314/display_rq_dlg_calc_314.h" #include "dcn32/display_mode_vba_32.h" #include "dcn32/display_rq_dlg_calc_32.h" #include "dml_logger.h"
@@ -74,6 +76,13 @@ const struct dml_funcs dml31_funcs = { .rq_dlg_get_rq_reg = dml31_rq_dlg_get_rq_reg }; +const struct dml_funcs dml314_funcs = { + .validate = dml314_ModeSupportAndSystemConfigurationFull, + .recalculate = dml314_recalculate, + .rq_dlg_get_dlg_reg = dml314_rq_dlg_get_dlg_reg, + .rq_dlg_get_rq_reg = dml314_rq_dlg_get_rq_reg +}; +const struct dml_funcs dml32_funcs = { .validate = dml32_ModeSupportAndSystemConfigurationFull, .recalculate = dml32_recalculate,
@@ -107,6 +116,9 @@ void dml_init_instance(struct display_mode_lib *lib,case DML_PROJECT_DCN31_FPGA : lib->funcs = dml31_funcs;break ; +case DML_PROJECT_DCN314 : + lib->funcs = dml314_funcs; +break ;case DML_PROJECT_DCN32 : lib->funcs = dml32_funcs;break ;
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h +1 -0
@@ -41,6 +41,7 @@ enum dml_project {DML_PROJECT_DCN30 ,DML_PROJECT_DCN31 ,DML_PROJECT_DCN31_FPGA , +DML_PROJECT_DCN314 , DML_PROJECT_DCN32, };
Signature · 1 line
2.34.1
PATCH 9/21 drm/amd/display: Relax swizzle checks for video non-RGB formats on DCN314
In reply to Pavle KotaracFrom: Nicholas Kazlauskas <[email protected]>
[Why]
HW can support the display swizzle modes for video, and those are preferable over standard or linear for decode use.
[How]
Remove the check for DCN314.
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +1 -3
@@ -4071,9 +4071,7 @@ void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_ v->SourceFormatPixelAndScanSupport = true;for (k =0 ; k < v->NumberOfActivePlanes; k++) { -if ((v->SurfaceTiling[k] == dm_sw_linear && (!(v->SourceScan[k] != dm_vert) || v->DCCEnable[k] == true)) - || ((v->SurfaceTiling[k] == dm_sw_64kb_d || v->SurfaceTiling[k] == dm_sw_64kb_d_t - || v->SurfaceTiling[k] == dm_sw_64kb_d_x) && !(v->SourcePixelFormat[k] == dm_444_64))) { +if (v->SurfaceTiling[k] == dm_sw_linear && (!(v->SourceScan[k] != dm_vert) || v->DCCEnable[k] == true)) { v->SourceFormatPixelAndScanSupport = false; } }
Signature · 1 line
2.34.1
PATCH 10/21 drm/amd/display: Correct dram channel width for dcn314
In reply to Pavle KotaracFrom: Duncan Ma <[email protected]>
[Why]
The interpretation of the number of memory channels differ by memory type, and this affects channel width for the DML input.
[How]
Set dram channel width according to memory type for dcn314.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + 3 files changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +2 -0
@@ -677,6 +677,8 @@ static void dcn314_clk_mgr_helper_populate_bw_params(struct clk_mgr_internal *cl }ASSERT (bw_params->clk_table.entries[i-1 ].dcfclk_mhz); bw_params->vram_type = bios_info->memory_type; + + bw_params->dram_channel_width_bytes = bios_info->memory_type ==0x22 ?8 :4 ; bw_params->num_channels = bios_info->ma_channel_number ? bios_info->ma_channel_number :4 ;for (i =0 ; i <WM_SET_COUNT ; i++) {
drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +3 -0
@@ -194,6 +194,9 @@ void dcn314_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_p dcn3_14_ip.max_num_otg = dc->res_pool->res_cap->num_timing_generator; dcn3_14_ip.max_num_dpp = dc->res_pool->pipe_count; +if (bw_params->dram_channel_width_bytes >0 ) + dcn3_14_soc.dram_channel_width_bytes = bw_params->dram_channel_width_bytes; +if (bw_params->num_channels >0 ) dcn3_14_soc.num_chans = bw_params->num_channels;
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h +1 -0
@@ -214,6 +214,7 @@ struct dummy_pstate_entry {struct clk_bw_params {unsigned int vram_type;unsigned int num_channels; +unsigned int dram_channel_width_bytes;unsigned int dispclk_vco_khz;unsigned int dc_mode_softmax_memclk;struct clk_limit_table clk_table;
Signature · 1 line
2.34.1
PATCH 11/21 drm/amd/display: Round cursor width up for MALL allocation
In reply to Pavle KotaracFrom: Taimur Hassan <[email protected]>
[Why & How]
When calculating cursor size for MALL allocation, the cursor width should be the actual width rounded up to 64 alignment. Additionally, the bit depth should vary depending on color format.
--- .../gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 24 ++++++++++++++++++- .../drm/amd/display/dc/dcn32/dcn32_hwseq.c | 24 ++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c +23 -1
@@ -103,6 +103,11 @@ void hubp32_cursor_set_attributes(enum cursor_lines_per_chunk lpc =hubp2_get_lines_per_chunk ( attr->width, attr->color_format); +//Round cursor width up to next multiple of 64 +uint32_t cursor_width = ((attr->width +63 ) /64 ) *64 ; +uint32_t cursor_height = attr->height; +uint32_t cursor_size = cursor_width * cursor_height; + hubp->curs_attr = *attr; REG_UPDATE(CURSOR_SURFACE_ADDRESS_HIGH,
@@ -126,7 +131,24 @@ void hubp32_cursor_set_attributes(/* used to shift the cursor chunk request deadline */ CURSOR0_CHUNK_HDL_ADJUST, 3); -if (attr->width * attr->height *4 >16384 ) +switch (attr->color_format) { +case CURSOR_MODE_MONO : + cursor_size /=2 ; +break ; +case CURSOR_MODE_COLOR_1BIT_AND : +case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA : +case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA : + cursor_size *=4 ; +break ; + +case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED : +case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED : +default : + cursor_size *=8 ; +break ; + } + +if (cursor_size >16384 )REG_UPDATE (DCHUBP_MALL_CONFIG ,USE_MALL_FOR_CURSOR , true);else REG_UPDATE (DCHUBP_MALL_CONFIG ,USE_MALL_FOR_CURSOR , false);
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +23 -1
@@ -741,7 +741,29 @@ void dcn32_update_mall_sel(struct dc *dc, struct dc_state *context)struct hubp *hubp = pipe->plane_res.hubp;if (pipe->stream && pipe->plane_state && hubp && hubp->funcs->hubp_update_mall_sel) { -if (hubp->curs_attr.width * hubp->curs_attr.height *4 >16384 ) +//Round cursor width up to next multiple of 64 +int cursor_width = ((hubp->curs_attr.width +63 ) /64 ) *64 ; +int cursor_height = hubp->curs_attr.height; +int cursor_size = cursor_width * cursor_height; + +switch (hubp->curs_attr.color_format) { +case CURSOR_MODE_MONO : + cursor_size /=2 ; +break ; +case CURSOR_MODE_COLOR_1BIT_AND : +case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA : +case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA : + cursor_size *=4 ; +break ; + +case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED : +case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED : +default : + cursor_size *=8 ; +break ; + } + +if (cursor_size >16384 ) cache_cursor = true;if (pipe->stream->mall_stream_config.type ==SUBVP_PHANTOM ) {
Signature · 1 line
2.34.1
Christian König
maintainerRe: [PATCH 11/21] drm/amd/display: Round cursor width up for MALL allocation
Am 07.09.22 um 20:11 schrieb Pavle Kotarac:
Quoted 20 lines
From: Taimur Hassan <[email protected]>
[Why & How]
When calculating cursor size for MALL allocation, the cursor width should be the actual width rounded up to 64 alignment. Additionally, the bit depth should vary depending on color format.Reviewed-by Alvin Lee <[email protected]>Acked-by Pavle Kotarac <[email protected]>Signed-off-by Taimur Hassan <[email protected]>--- .../gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c | 24 ++++++++++++++++++- .../drm/amd/display/dc/dcn32/dcn32_hwseq.c | 24 ++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c +0
-0
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c void hubp32_cursor_set_attributes( · line 106
Quoted 4 lines
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c +1
-0@@ -103,6 +103,11 @@ void hubp32_cursor_set_attributes(enum cursor_lines_per_chunk lpc =hubp2_get_lines_per_chunk ( attr->width, attr->color_format); +//Round cursor width up to next multiple of 64
Please no // style comments in kernel code.
Regards,
Christian.
Quoted 68 lines
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubp.c +22
-1+uint32_t cursor_width = ((attr->width +63 ) /64 ) *64 ; +uint32_t cursor_height = attr->height; +uint32_t cursor_size = cursor_width * cursor_height; + hubp->curs_attr = *attr; REG_UPDATE(CURSOR_SURFACE_ADDRESS_HIGH,@@ -126,7 +131,24 @@ void hubp32_cursor_set_attributes(/* used to shift the cursor chunk request deadline */ CURSOR0_CHUNK_HDL_ADJUST, 3); -if (attr->width * attr->height *4 >16384 ) +switch (attr->color_format) { +case CURSOR_MODE_MONO : + cursor_size /=2 ; +break ; +case CURSOR_MODE_COLOR_1BIT_AND : +case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA : +case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA : + cursor_size *=4 ; +break ; + +case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED : +case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED : +default : + cursor_size *=8 ; +break ; + } + +if (cursor_size >16384 )REG_UPDATE (DCHUBP_MALL_CONFIG ,USE_MALL_FOR_CURSOR , true);else REG_UPDATE (DCHUBP_MALL_CONFIG ,USE_MALL_FOR_CURSOR , false);drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +23
-1@@ -741,7 +741,29 @@ void dcn32_update_mall_sel(struct dc *dc, struct dc_state *context)struct hubp *hubp = pipe->plane_res.hubp;if (pipe->stream && pipe->plane_state && hubp && hubp->funcs->hubp_update_mall_sel) { -if (hubp->curs_attr.width * hubp->curs_attr.height *4 >16384 ) +//Round cursor width up to next multiple of 64 +int cursor_width = ((hubp->curs_attr.width +63 ) /64 ) *64 ; +int cursor_height = hubp->curs_attr.height; +int cursor_size = cursor_width * cursor_height; + +switch (hubp->curs_attr.color_format) { +case CURSOR_MODE_MONO : + cursor_size /=2 ; +break ; +case CURSOR_MODE_COLOR_1BIT_AND : +case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA : +case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA : + cursor_size *=4 ; +break ; + +case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED : +case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED : +default : + cursor_size *=8 ; +break ; + } + +if (cursor_size >16384 ) cache_cursor = true;if (pipe->stream->mall_stream_config.type ==SUBVP_PHANTOM ) {
PATCH 12/21 drm/amd/display: Update viewport position for phantom pipes
In reply to Pavle KotaracFrom: "Lee, Alvin" <[email protected]>
[Description]
In some cases the viewport position of the
main pipes can change without triggering a full update.
In this case the subvp phantom viewports must be updated accordingly.
--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 7 ++-- .../drm/amd/display/dc/dcn32/dcn32_hwseq.c | 32 +++++++++++++++++++ .../drm/amd/display/dc/dcn32/dcn32_hwseq.h | 4 +++ .../gpu/drm/amd/display/dc/dcn32/dcn32_init.c | 1 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 +++ 5 files changed, 47 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +5 -2
@@ -1898,8 +1898,11 @@ void dcn20_post_unlock_program_front_end(* can underflow due to HUBP_VTG_SEL programming if done in the regular front end * programming sequence). */ -if (pipe->stream && pipe->stream->mall_stream_config.type ==SUBVP_PHANTOM ) -dcn20_program_pipe (dc, pipe, context); +if (pipe->stream && pipe->stream->mall_stream_config.type ==SUBVP_PHANTOM ) { +if (dc->hwss.update_phantom_vp_position) + dc->hwss.update_phantom_vp_position (dc, context, pipe); +dcn20_program_pipe (dc, pipe, context); + } } }
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +32 -0
@@ -1301,3 +1301,35 @@ void dcn32_update_phy_state(struct dc_state *state, struct pipe_ctx *pipe_ctx, }else BREAK_TO_DEBUGGER (); } + +/* For SubVP the main pipe can have a viewport position change +* without a full update. In this case we must also update the +* viewport positions for the phantom pipe accordingly. +*/ +void dcn32_update_phantom_vp_position (struct dc *dc, +struct dc_state *context, +struct pipe_ctx *phantom_pipe) +{ +uint8_t i; +struct dc_plane_state *phantom_plane = phantom_pipe->plane_state; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; + +if (pipe->stream && pipe->stream->mall_stream_config.type ==SUBVP_MAIN && + pipe->stream->mall_stream_config.paired_stream == phantom_pipe->stream) { +if (pipe->plane_state && pipe->plane_state->update_flags.bits.position_change) { + + phantom_plane->src_rect.x = pipe->plane_state->src_rect.x; + phantom_plane->src_rect.y = pipe->plane_state->src_rect.y; + phantom_plane->clip_rect.x = pipe->plane_state->clip_rect.x; + phantom_plane->dst_rect.x = pipe->plane_state->dst_rect.x; + phantom_plane->dst_rect.y = pipe->plane_state->dst_rect.y; + + phantom_pipe->plane_state->update_flags.bits.position_change =1 ; +resource_build_scaling_params (phantom_pipe); +return ; + } + } + } +}
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h +4 -0
@@ -87,4 +87,8 @@ bool dcn32_is_dp_dig_pixel_rate_div_policy(struct pipe_ctx *pipe_ctx);void dcn32_update_phy_state (struct dc_state *state,struct pipe_ctx *pipe_ctx,enum phy_state target_state); +void dcn32_update_phantom_vp_position (struct dc *dc, +struct dc_state *context, +struct pipe_ctx *phantom_pipe); +#endif /* __DC_HWSS_DCN32_H__ */
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c +1 -0
@@ -105,6 +105,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = { .subvp_pipe_control_lock = dcn32_subvp_pipe_control_lock, .update_visual_confirm_color = dcn20_update_visual_confirm_color, .update_phy_state = dcn32_update_phy_state, + .update_phantom_vp_position = dcn32_update_phantom_vp_position, };static const struct hwseq_private_funcs dcn32_private_funcs = {
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +5 -0
@@ -247,6 +247,11 @@ struct hw_sequencer_funcs {void (*update_phy_state)(struct dc_state *state,struct pipe_ctx *pipe_ctx,enum phy_state target_state); + +void (*update_phantom_vp_position)(struct dc *dc, +struct dc_state *context, +struct pipe_ctx *phantom_pipe); +void (*commit_subvp_config)(struct dc *dc,struct dc_state *context); void (*subvp_pipe_control_lock)(struct dc *dc, struct dc_state *context,
Signature · 1 line
2.34.1
PATCH 13/21 drm/amd/display: Added debug option for forcing subvp num ways
In reply to Pavle KotaracFrom: "Lee, Alvin" <[email protected]>
[Description]
Regkey option for forcing num ways for subvp for debug purposes
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -831,6 +831,7 @@ struct dc_debug_options {bool force_disable_subvp;bool force_subvp_mclk_switch;bool allow_sw_cursor_fallback; +unsigned int force_subvp_num_ways;bool force_usr_allow;/* uses value at boot and disables switch */ bool disable_dtb_ref_clk_switch;
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +8 -3
@@ -54,13 +54,14 @@ uint32_t dcn32_helper_calculate_num_ways_for_subvp(struct dc *dc, struct dc_statuint32_t num_mblks =0 ;uint32_t cache_lines_per_plane =0 ;uint32_t i =0 , j =0 ; -uint32_t mblk_width =0 ; -uint32_t mblk_height =0 ; +uint16_t mblk_width =0 ; +uint16_t mblk_height =0 ;uint32_t full_vp_width_blk_aligned =0 ;uint32_t full_vp_height_blk_aligned =0 ;uint32_t mall_alloc_width_blk_aligned =0 ;uint32_t mall_alloc_height_blk_aligned =0 ; -uint32_t full_vp_height =0 ; +uint16_t full_vp_height =0 ; +bool subvp_in_use = false;for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
@@ -70,6 +71,7 @@ uint32_t dcn32_helper_calculate_num_ways_for_subvp(struct dc *dc, struct dc_stat pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) {struct pipe_ctx *main_pipe =NULL ; + subvp_in_use = true;/* Get full viewport height from main pipe (required for MBLK calculation) */ for (j =0 ; j < dc->res_pool->pipe_count; j++) { main_pipe = &context->res_ctx.pipe_ctx[j];
@@ -129,6 +131,9 @@ uint32_t dcn32_helper_calculate_num_ways_for_subvp(struct dc *dc, struct dc_statif (cache_lines_used % lines_per_way >0 ) num_ways++; +if (subvp_in_use && dc->debug.force_subvp_num_ways >0 ) + num_ways = dc->debug.force_subvp_num_ways; +return num_ways; }
Signature · 1 line
2.34.1
PATCH 14/21 drm/amd/display: add workaround for subvp cursor corruption for DCN32/321
In reply to Pavle KotaracFrom: Aurabindo Pillai <[email protected]>
[Why&How]
Kernel does not have a means to tell the userspace to use software cursor. Due to lack of this functionality, reducing the max cursor size is the only way to ensure that power savings of Subview port feature is utilized for asics that support it. The workaround could be removed after cursor caching is fixed while a subviewport config is active.
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +2 -1
@@ -2116,7 +2116,8 @@ static bool dcn32_resource_construct( dc->caps.max_downscale_ratio =600 ; dc->caps.i2c_speed_in_khz =100 ; dc->caps.i2c_speed_in_khz_hdcp =100 ;/*1.4 w/a applied by default*/ - dc->caps.max_cursor_size =256 ; +/* TODO: Bring max_cursor_size back to 256 after subvp cursor corruption is fixed*/ + dc->caps.max_cursor_size =64 ; dc->caps.min_horizontal_blanking_period =80 ; dc->caps.dmdata_alloc_size =2048 ; dc->caps.mall_size_per_mem_channel =0 ;
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +2 -1
@@ -1721,7 +1721,8 @@ static bool dcn321_resource_construct( dc->caps.max_downscale_ratio =600 ; dc->caps.i2c_speed_in_khz =100 ; dc->caps.i2c_speed_in_khz_hdcp =100 ;/*1.4 w/a applied by default*/ - dc->caps.max_cursor_size =256 ; +/* TODO: Bring max cursor size back to 256 after subvp cursor corruption is fixed*/ + dc->caps.max_cursor_size =64 ; dc->caps.min_horizontal_blanking_period =80 ; dc->caps.dmdata_alloc_size =2048 ; dc->caps.mall_size_per_mem_channel =0 ;
Signature · 1 line
2.34.1
PATCH 15/21 drm/amd/display: Limit user regamma to a valid value
In reply to Pavle KotaracFrom: Yao Wang1 <[email protected]>
[Why]
For HDR mode, we get total 512 tf_point and after switching to SDR mode we actually get 400 tf_point and the rest of points(401~512) still use dirty value from HDR mode. We should limit the rest of the points to max value.
[How]
Limit the value when coordinates_x.x > 1, just like what we do in translate_from_linear_space for other re-gamma build paths.
--- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +4 -0
@@ -1600,6 +1600,7 @@ static void interpolate_user_regamma(uint32_t hw_points_num,struct fixed31_32 lut2;struct fixed31_32 delta_lut;struct fixed31_32 delta_index; +const struct fixed31_32 one =dc_fixpt_from_int (1 ); i =0 ;/* fixed_pt library has problems handling too small values */
@@ -1628,6 +1629,9 @@ static void interpolate_user_regamma(uint32_t hw_points_num, }else hw_x = coordinates_x[i].x; +if (dc_fixpt_le (one, hw_x)) + hw_x = one; + norm_x =dc_fixpt_mul (norm_factor, hw_x); index =dc_fixpt_floor (norm_x);if (index <0 || index >255 )
Signature · 1 line
2.34.1
PATCH 16/21 drm/amd/display: Adding log for spread_spectrum_info
In reply to Pavle KotaracFrom: "Chen, Leo" <[email protected]>
[Why & How]
Enable logging for spread_spectrum_percentage in spread_spectrum_info to facilitate debugging for audio compliance issues
--- .../drm/amd/display/dc/bios/bios_parser2.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +20 -0
@@ -849,6 +849,8 @@ static enum bp_result get_ss_info_v4_1( disp_cntl_tbl->dvi_ss_rate_10hz *10 ;if (disp_cntl_tbl->dvi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DVI: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_HDMI : ss_info->spread_spectrum_percentage =
@@ -857,6 +859,8 @@ static enum bp_result get_ss_info_v4_1( disp_cntl_tbl->hdmi_ss_rate_10hz *10 ;if (disp_cntl_tbl->hdmi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_HDMI: %d\n" , ss_info->spread_spectrum_percentage);break ;/* TODO LVDS not support anymore? */ case AS_SIGNAL_TYPE_DISPLAY_PORT :
@@ -866,6 +870,8 @@ static enum bp_result get_ss_info_v4_1( disp_cntl_tbl->dp_ss_rate_10hz *10 ;if (disp_cntl_tbl->dp_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_GPU_PLL :/* atom_firmware: DAL only get data from dce_info table.
@@ -886,6 +892,8 @@ static enum bp_result get_ss_info_v4_1( smu_info->gpuclk_ss_rate_10hz *10 ;if (smu_info->waflclk_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_XGMI: %d\n" , ss_info->spread_spectrum_percentage);break ;default : result =BP_RESULT_UNSUPPORTED ;
@@ -935,6 +943,8 @@ static enum bp_result get_ss_info_v4_2( disp_cntl_tbl->dvi_ss_rate_10hz *10 ;if (disp_cntl_tbl->dvi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DVI: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_HDMI : ss_info->spread_spectrum_percentage =
@@ -943,6 +953,8 @@ static enum bp_result get_ss_info_v4_2( disp_cntl_tbl->hdmi_ss_rate_10hz *10 ;if (disp_cntl_tbl->hdmi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_HDMI: %d\n" , ss_info->spread_spectrum_percentage);break ;/* TODO LVDS not support anymore? */ case AS_SIGNAL_TYPE_DISPLAY_PORT :
@@ -952,6 +964,8 @@ static enum bp_result get_ss_info_v4_2( smu_info->gpuclk_ss_rate_10hz *10 ;if (smu_info->gpuclk_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_GPU_PLL :/* atom_firmware: DAL only get data from dce_info table.
@@ -1000,6 +1014,8 @@ static enum bp_result get_ss_info_v4_5( disp_cntl_tbl->dvi_ss_rate_10hz *10 ;if (disp_cntl_tbl->dvi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DVI: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_HDMI : ss_info->spread_spectrum_percentage =
@@ -1008,6 +1024,8 @@ static enum bp_result get_ss_info_v4_5( disp_cntl_tbl->hdmi_ss_rate_10hz *10 ;if (disp_cntl_tbl->hdmi_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_HDMI: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_DISPLAY_PORT : ss_info->spread_spectrum_percentage =
@@ -1016,6 +1034,8 @@ static enum bp_result get_ss_info_v4_5( disp_cntl_tbl->dp_ss_rate_10hz *10 ;if (disp_cntl_tbl->dp_ss_mode &ATOM_SS_CENTRE_SPREAD_MODE ) ss_info->type.CENTER_MODE = true; + +DC_LOG_BIOS ("AS_SIGNAL_TYPE_DISPLAY_PORT: %d\n" , ss_info->spread_spectrum_percentage);break ;case AS_SIGNAL_TYPE_GPU_PLL :/* atom_smu_info_v4_0 does not have fields for SS for SMU Display PLL anymore.
Signature · 1 line
2.34.1
PATCH 17/21 drm/amd/display: Don't adjust VRR unnecessarily
In reply to Pavle KotaracFrom: "Cyr, Aric" <[email protected]>
[why]
Do not need to spend time reprogramming DRR if there were no updates to the parameters.
[how]
Compare the current stream state to the requested one to determine if an update is required.
In amdgpu_dm the timing_changed flag is set but never used so can remove it. Similarly, the stream update for VRR is done after dc_commit and should not update its adjust field until after the update is completed. The adjust field is managed by dc_stream_adjust_vmin_vmax and should not be manually updated in amdgpu_dm.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ---------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 3 files changed, 3 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -10
@@ -7385,11 +7385,6 @@ static void update_freesync_state_on_stream( &vrr_infopacket, pack_sdp_v1_3); - new_crtc_state->freesync_timing_changed |= - (memcmp (&acrtc->dm_irq_params.vrr_params.adjust, - &vrr_params.adjust, -sizeof (vrr_params.adjust)) !=0 ); - new_crtc_state->freesync_vrr_info_changed |= (memcmp(&new_crtc_state->vrr_infopacket, &vrr_infopacket,
@@ -7398,7 +7393,6 @@ static void update_freesync_state_on_stream( acrtc->dm_irq_params.vrr_params = vrr_params; new_crtc_state->vrr_infopacket = vrr_infopacket; - new_stream->adjust = acrtc->dm_irq_params.vrr_params.adjust; new_stream->vrr_infopacket = vrr_infopacket;if (new_crtc_state->freesync_vrr_info_changed)
@@ -7461,10 +7455,6 @@ static void update_stream_irq_parameters( new_stream, &config, &vrr_params); - new_crtc_state->freesync_timing_changed |= - (memcmp (&acrtc->dm_irq_params.vrr_params.adjust, - &vrr_params.adjust,sizeof (vrr_params.adjust)) !=0 ); - new_crtc_state->freesync_config = config;/* Copy state for access from DM IRQ handler */ acrtc->dm_irq_params.freesync_config = config;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 -1
@@ -681,7 +681,6 @@ struct dm_crtc_state {int crc_skip_count; -bool freesync_timing_changed;bool freesync_vrr_info_changed;bool dsc_force_changed;
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
@@ -401,6 +401,9 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc, {int i; +if (memcmp (adjust, &stream->adjust,sizeof (struct dc_crtc_timing_adjust )) ==0 ) +return true; + stream->adjust.v_total_max = adjust->v_total_max; stream->adjust.v_total_mid = adjust->v_total_mid; stream->adjust.v_total_mid_frame_num = adjust->v_total_mid_frame_num;
Signature · 1 line
2.34.1
PATCH 18/21 drm/amd/display: Avoid force minimal transaction in case of surface_count equal to 0.
In reply to Pavle KotaracFrom: JeromeHong <[email protected]>
[why]
Call commit_minimal_transition_state wrongly in case of surface_count equal to 0.
[how]
Add a condition to filter case of surface_count equal to 0.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -5
@@ -3625,11 +3625,13 @@ bool dc_update_planes_and_stream(struct dc *dc, dc->current_state->stream_count > 0 && dc->debug.pipe_split_policy != MPC_SPLIT_AVOID) {/* determine if minimal transition is required */ -if (cur_stream_status->plane_count > surface_count) { - force_minimal_pipe_splitting = true; - }else if (cur_stream_status->plane_count < surface_count) { - force_minimal_pipe_splitting = true; - is_plane_addition = true; +if (surface_count >0 ) { +if (cur_stream_status->plane_count > surface_count) { + force_minimal_pipe_splitting = true; + }else if (cur_stream_status->plane_count < surface_count) { + force_minimal_pipe_splitting = true; + is_plane_addition = true; + } } }
Signature · 1 line
2.34.1
PATCH 19/21 drm/amd/display: Refactor SubVP calculation to remove FPU
In reply to Pavle KotaracFrom: Alvin Lee <[email protected]>
Refactor calculation to remove floating point operations from dmub_srv. To ensure that 32-bit compilation works well, we use the div64 family of macros to do integer division for SubVP-related timing parameters.
--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 89 ++++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +44 -45
@@ -450,44 +450,42 @@ static void populate_subvp_cmd_drr_info(struct dc *dc,struct dc_crtc_timing *main_timing = &subvp_pipe->stream->timing;struct dc_crtc_timing *phantom_timing = &subvp_pipe->stream->mall_stream_config.paired_stream->timing;struct dc_crtc_timing *drr_timing = &vblank_pipe->stream->timing; -int16_t drr_frame_us =0 ; -int16_t min_drr_supported_us =0 ; -int16_t max_drr_supported_us =0 ; -int16_t max_drr_vblank_us =0 ; -int16_t max_drr_mallregion_us =0 ; -int16_t mall_region_us =0 ; -int16_t prefetch_us =0 ; -int16_t subvp_active_us =0 ; -int16_t drr_active_us =0 ; -int16_t min_vtotal_supported =0 ; -int16_t max_vtotal_supported =0 ; +uint16_t drr_frame_us =0 ; +uint16_t min_drr_supported_us =0 ; +uint16_t max_drr_supported_us =0 ; +uint16_t max_drr_vblank_us =0 ; +uint16_t max_drr_mallregion_us =0 ; +uint16_t mall_region_us =0 ; +uint16_t prefetch_us =0 ; +uint16_t subvp_active_us =0 ; +uint16_t drr_active_us =0 ; +uint16_t min_vtotal_supported =0 ; +uint16_t max_vtotal_supported =0 ; pipe_data->pipe_config.vblank_data.drr_info.drr_in_use = true; pipe_data->pipe_config.vblank_data.drr_info.use_ramping = false;// for now don't use ramping pipe_data->pipe_config.vblank_data.drr_info.drr_window_size_ms =4 ;// hardcode 4ms DRR window for now - drr_frame_us =div64_s64 (drr_timing->v_total * drr_timing->h_total, - (int64_t )(drr_timing->pix_clk_100hz *100 ) *1000000 ); + drr_frame_us =div64_u64 (((uint64_t )drr_timing->v_total * drr_timing->h_total *1000000 ), + (((uint64_t )drr_timing->pix_clk_100hz *100 )));// P-State allow width and FW delays already included phantom_timing->v_addressable - mall_region_us =div64_s64 (phantom_timing->v_addressable * phantom_timing->h_total, - (int64_t )(phantom_timing->pix_clk_100hz *100 ) *1000000 ); + mall_region_us =div64_u64 (((uint64_t )phantom_timing->v_addressable * phantom_timing->h_total *1000000 ), + (((uint64_t )phantom_timing->pix_clk_100hz *100 ))); min_drr_supported_us = drr_frame_us + mall_region_us +SUBVP_DRR_MARGIN_US ; - min_vtotal_supported =div64_s64 (drr_timing->pix_clk_100hz *100 * - (div64_s64 ((int64_t )min_drr_supported_us,1000000 )), - (int64_t )drr_timing->h_total); - - prefetch_us =div64_s64 ((phantom_timing->v_total - phantom_timing->v_front_porch) * phantom_timing->h_total, - (int64_t )(phantom_timing->pix_clk_100hz *100 ) *1000000 + - dc->caps.subvp_prefetch_end_to_mall_start_us); - subvp_active_us =div64_s64 (main_timing->v_addressable * main_timing->h_total, - (int64_t )(main_timing->pix_clk_100hz *100 ) *1000000 ); - drr_active_us =div64_s64 (drr_timing->v_addressable * drr_timing->h_total, - (int64_t )(drr_timing->pix_clk_100hz *100 ) *1000000 ); - max_drr_vblank_us =div64_s64 ((int64_t )(subvp_active_us - prefetch_us - drr_active_us),2 ) + drr_active_us; + min_vtotal_supported =div64_u64 (((uint64_t )drr_timing->pix_clk_100hz *100 * min_drr_supported_us), + (((uint64_t )drr_timing->h_total *1000000 ))); + + prefetch_us = ((uint64_t )(phantom_timing->v_total - phantom_timing->v_front_porch) * phantom_timing->h_total *1000000 ) + / (((uint64_t )phantom_timing->pix_clk_100hz *100 ) + dc->caps.subvp_prefetch_end_to_mall_start_us); + subvp_active_us =div64_u64 (((uint64_t )main_timing->v_addressable * main_timing->h_total *1000000 ), + (((uint64_t )main_timing->pix_clk_100hz *100 ))); + drr_active_us =div64_u64 (((uint64_t )drr_timing->v_addressable * drr_timing->h_total *1000000 ), + (((uint64_t )drr_timing->pix_clk_100hz *100 ))); + max_drr_vblank_us =div64_u64 ((subvp_active_us - prefetch_us - drr_active_us),2 ) + drr_active_us; max_drr_mallregion_us = subvp_active_us - prefetch_us - mall_region_us; max_drr_supported_us = max_drr_vblank_us > max_drr_mallregion_us ? max_drr_vblank_us : max_drr_mallregion_us; - max_vtotal_supported =div64_s64 (drr_timing->pix_clk_100hz *100 * (div64_s64 ((int64_t )max_drr_supported_us,1000000 )), - (int64_t )drr_timing->h_total); + max_vtotal_supported =div64_u64 (((uint64_t )drr_timing->pix_clk_100hz *100 * max_drr_supported_us), + (((uint64_t )drr_timing->h_total *1000000 ))); pipe_data->pipe_config.vblank_data.drr_info.min_vtotal_supported = min_vtotal_supported; pipe_data->pipe_config.vblank_data.drr_info.max_vtotal_supported = max_vtotal_supported;
@@ -581,10 +579,12 @@ static void update_subvp_prefetch_end_to_mall_start(struct dc *dc,struct dc_crtc_timing *phantom_timing1 = &subvp_pipes[1 ]->stream->mall_stream_config.paired_stream->timing;struct dmub_cmd_fw_assisted_mclk_switch_pipe_data_v2 *pipe_data =NULL ; - subvp0_prefetch_us =div64_s64 ((phantom_timing0->v_total - phantom_timing0->v_front_porch) * phantom_timing0->h_total, - (int64_t )(phantom_timing0->pix_clk_100hz *100 ) *1000000 + dc->caps.subvp_prefetch_end_to_mall_start_us); - subvp1_prefetch_us =div64_s64 ((phantom_timing1->v_total - phantom_timing1->v_front_porch) * phantom_timing1->h_total, - (int64_t )(phantom_timing1->pix_clk_100hz *100 ) *1000000 + dc->caps.subvp_prefetch_end_to_mall_start_us); + subvp0_prefetch_us =div64_u64 (((uint64_t )(phantom_timing0->v_total - phantom_timing0->v_front_porch) * + (uint64_t )phantom_timing0->h_total *1000000 ), + (((uint64_t )phantom_timing0->pix_clk_100hz *100 ) + dc->caps.subvp_prefetch_end_to_mall_start_us)); + subvp1_prefetch_us =div64_u64 (((uint64_t )(phantom_timing1->v_total - phantom_timing1->v_front_porch) * + (uint64_t )phantom_timing1->h_total *1000000 ), + (((uint64_t )phantom_timing1->pix_clk_100hz *100 ) + dc->caps.subvp_prefetch_end_to_mall_start_us));// Whichever SubVP PIPE has the smaller prefetch (including the prefetch end to mall start time) // should increase it's prefetch time to match the other
@@ -592,16 +592,17 @@ static void update_subvp_prefetch_end_to_mall_start(struct dc *dc, pipe_data = &cmd->fw_assisted_mclk_switch_v2.config_data.pipe_data[1 ]; prefetch_delta_us = subvp0_prefetch_us - subvp1_prefetch_us; pipe_data->pipe_config.subvp_data.prefetch_to_mall_start_lines = -div64_s64 (((div64_s64 ((int64_t )(dc->caps.subvp_prefetch_end_to_mall_start_us + prefetch_delta_us),1000000 )) * - (phantom_timing1->pix_clk_100hz *100 ) + phantom_timing1->h_total -1 ), - (int64_t )phantom_timing1->h_total); +div64_u64 (((uint64_t )(dc->caps.subvp_prefetch_end_to_mall_start_us + prefetch_delta_us) * + ((uint64_t )phantom_timing1->pix_clk_100hz *100 ) + ((uint64_t )phantom_timing1->h_total *1000000 -1 )), + ((uint64_t )phantom_timing1->h_total *1000000 )); + }else if (subvp1_prefetch_us > subvp0_prefetch_us) { pipe_data = &cmd->fw_assisted_mclk_switch_v2.config_data.pipe_data[0 ]; prefetch_delta_us = subvp1_prefetch_us - subvp0_prefetch_us; pipe_data->pipe_config.subvp_data.prefetch_to_mall_start_lines = -div64_s64 (((div64_s64 ((int64_t )(dc->caps.subvp_prefetch_end_to_mall_start_us + prefetch_delta_us),1000000 )) * - (phantom_timing0->pix_clk_100hz *100 ) + phantom_timing0->h_total -1 ), - (int64_t )phantom_timing0->h_total); +div64_u64 (((uint64_t )(dc->caps.subvp_prefetch_end_to_mall_start_us + prefetch_delta_us) * + ((uint64_t )phantom_timing0->pix_clk_100hz *100 ) + ((uint64_t )phantom_timing0->h_total *1000000 -1 )), + ((uint64_t )phantom_timing0->h_total *1000000 )); } }
@@ -668,13 +669,11 @@ static void populate_subvp_cmd_pipe_info(struct dc *dc,// Round up pipe_data->pipe_config.subvp_data.prefetch_to_mall_start_lines = -div64_s64 (((div64_s64 ((int64_t )dc->caps.subvp_prefetch_end_to_mall_start_us,1000000 )) * - (phantom_timing->pix_clk_100hz *100 ) + phantom_timing->h_total -1 ), - (int64_t )phantom_timing->h_total); +div64_u64 (((uint64_t )dc->caps.subvp_prefetch_end_to_mall_start_us * ((uint64_t )phantom_timing->pix_clk_100hz *100 ) + + ((uint64_t )phantom_timing->h_total *1000000 -1 )), ((uint64_t )phantom_timing->h_total *1000000 )); pipe_data->pipe_config.subvp_data.processing_delay_lines = -div64_s64 (((div64_s64 ((int64_t )dc->caps.subvp_fw_processing_delay_us,1000000 )) * - (phantom_timing->pix_clk_100hz *100 ) + phantom_timing->h_total -1 ), - (int64_t )phantom_timing->h_total); +div64_u64 (((uint64_t )(dc->caps.subvp_fw_processing_delay_us) * ((uint64_t )phantom_timing->pix_clk_100hz *100 ) + + ((uint64_t )phantom_timing->h_total *1000000 -1 )), ((uint64_t )phantom_timing->h_total *1000000 ));// Find phantom pipe index based on phantom stream for (j =0 ; j < dc->res_pool->pipe_count; j++) {struct pipe_ctx *phantom_pipe = &context->res_ctx.pipe_ctx[j];
Signature · 1 line
2.34.1
PATCH 20/21 drm/amd/display: Fix register definitions for DCN32/321
In reply to Pavle KotaracFrom: Aurabindo Pillai <[email protected]>
[Why & How]
Fix the instatiation sequence for MPC registers and add a few other missing register definitions that were ommited erroneously when copying them over to enable runtime initialization of reigster offsets for DCN32/321
--- .../drm/amd/display/dc/dcn32/dcn32_resource.c | 27 +-- .../drm/amd/display/dc/dcn32/dcn32_resource.h | 216 ++++++++++++------ .../amd/display/dc/dcn321/dcn321_resource.c | 24 +- 3 files changed, 166 insertions(+), 101 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +11 -16
@@ -468,22 +468,17 @@ static const struct dcn20_dsc_mask dsc_mask = { };static struct dcn30_mpc_registers mpc_regs; -#define dcn_mpc_regs_init ()\ - ( \ - MPC_REG_LIST_DCN3_0_RI(0),\ - MPC_REG_LIST_DCN3_0_RI(1),\ - MPC_REG_LIST_DCN3_0_RI(2),\ - MPC_REG_LIST_DCN3_0_RI(3),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(0),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(1),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(2),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(3),\ - MPC_MCM_REG_LIST_DCN32_RI(0),\ - MPC_MCM_REG_LIST_DCN32_RI(1),\ - MPC_MCM_REG_LIST_DCN32_RI(2),\ - MPC_MCM_REG_LIST_DCN32_RI(3),\ - MPC_DWB_MUX_REG_LIST_DCN3_0_RI(0)\ - ) + +#define dcn_mpc_regs_init () \ + MPC_REG_LIST_DCN3_2_RI(0),\ + MPC_REG_LIST_DCN3_2_RI(1),\ + MPC_REG_LIST_DCN3_2_RI(2),\ + MPC_REG_LIST_DCN3_2_RI(3),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(0),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(1),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(2),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(3),\ + MPC_DWB_MUX_REG_LIST_DCN3_0_RI(0)static const struct dcn30_mpc_shift mpc_shift = {MPC_COMMON_MASK_SH_LIST_DCN32 (__SHIFT)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h +146 -70
240 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +9 -15
@@ -473,21 +473,15 @@ static const struct dcn20_dsc_mask dsc_mask = {static struct dcn30_mpc_registers mpc_regs;#define dcn_mpc_regs_init ()\ - ( \ - MPC_REG_LIST_DCN3_0_RI(0),\ - MPC_REG_LIST_DCN3_0_RI(1),\ - MPC_REG_LIST_DCN3_0_RI(2),\ - MPC_REG_LIST_DCN3_0_RI(3),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(0),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(1),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(2),\ - MPC_OUT_MUX_REG_LIST_DCN3_0_RI(3),\ - MPC_MCM_REG_LIST_DCN32_RI(0),\ - MPC_MCM_REG_LIST_DCN32_RI(1),\ - MPC_MCM_REG_LIST_DCN32_RI(2),\ - MPC_MCM_REG_LIST_DCN32_RI(3),\ - MPC_DWB_MUX_REG_LIST_DCN3_0_RI(0)\ - ) + MPC_REG_LIST_DCN3_2_RI(0),\ + MPC_REG_LIST_DCN3_2_RI(1),\ + MPC_REG_LIST_DCN3_2_RI(2),\ + MPC_REG_LIST_DCN3_2_RI(3),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(0),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(1),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(2),\ + MPC_OUT_MUX_REG_LIST_DCN3_0_RI(3),\ + MPC_DWB_MUX_REG_LIST_DCN3_0_RI(0)static const struct dcn30_mpc_shift mpc_shift = {MPC_COMMON_MASK_SH_LIST_DCN32 (__SHIFT)
Signature · 1 line
2.34.1
PATCH 21/21 drm/amd/display: 3.2.202
In reply to Pavle KotaracFrom: Aric Cyr <[email protected]>
This version brings along following fixes:
*Fixed register definitions for DCN32/321
*Adding log for spread_spectrum_info
*Reverted DSC programming sequence change
*Correct I2C register offset *Updated DCN30 header files, viewport position for phantom pipes *Enable dlg and vba compilation for dcn314
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -47,7 +47,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.201" +#define DC_VER "3.2.202"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.34.1