Skip to content

Commit

Permalink
drm/amd/display: Add dpia debug options
Browse files Browse the repository at this point in the history
[Why & How]
To add support for dpia debug options.

Reviewed-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Meenakshikumar Somasundaram authored and Alex Deucher committed Oct 6, 2021
1 parent e853680 commit b0ce627
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dc.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,14 @@ union root_clock_optimization_options {
uint32_t u32All;
};

union dpia_debug_options {
struct {
uint32_t disable_dpia:1;
uint32_t reserved:31;
} bits;
uint32_t raw;
};

struct dc_debug_data {
uint32_t ltFailCount;
uint32_t i2cErrorCount;
Expand Down Expand Up @@ -668,6 +676,7 @@ struct dc_debug_options {
#if defined(CONFIG_DRM_AMD_DC_DCN)
bool disable_z10;
bool enable_sw_cntl_psr;
union dpia_debug_options dpia_debug;
#endif
};

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -2428,7 +2428,8 @@ static bool dcn31_resource_construct(
}

if (dc->ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0 &&
!dc->debug.dpia_debug.bits.disable_dpia) {
/* YELLOW CARP B0 has 4 DPIA's */
pool->base.usb4_dpia_count = 4;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dmub/dmub_srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ struct dmub_srv_hw_params {
bool load_inst_const;
bool skip_panel_power_sequence;
bool disable_z10;
bool disable_dpia;
};

/**
Expand Down
3 changes: 1 addition & 2 deletions drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ union dmub_fw_boot_options {
uint32_t disable_clk_gate: 1; /**< 1 if clock gating should be disabled */
uint32_t skip_phy_init_panel_sequence: 1; /**< 1 to skip panel init seq */
uint32_t z10_disable: 1; /**< 1 to disable z10 */
uint32_t reserved2: 1; /**< reserved for an unreleased feature */
uint32_t reserved_unreleased1: 1; /**< reserved for an unreleased feature */
uint32_t enable_dpia: 1; /**< 1 if DPIA should be enabled */
uint32_t invalid_vbios_data: 1; /**< 1 if VBIOS data table is invalid */
uint32_t reserved_unreleased2: 1; /**< reserved for an unreleased feature */
uint32_t reserved : 22; /**< reserved */
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
union dmub_fw_boot_options boot_options = {0};

boot_options.bits.z10_disable = params->disable_z10;
boot_options.bits.enable_dpia = params->disable_dpia ? 0 : 1;

REG_WRITE(DMCUB_SCRATCH14, boot_options.all);
}
Expand Down

0 comments on commit b0ce627

Please sign in to comment.