Skip to content

Commit

Permalink
drm/amd/display: Update DMCU versioning mechanism
Browse files Browse the repository at this point in the history
[Why]
Current date based versioning doesn't tell us about feature version
and build version, and is not useful for debug.

[How]
Add versioning based on feature and build

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Josip Pavic authored and Alex Deucher committed Jan 25, 2019
1 parent b2e8530 commit 07772b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ static void dcn10_get_dmcu_version(struct dmcu *dmcu)
/* Write address to IRAM_RD_ADDR and read from DATA register */
REG_WRITE(DMCU_IRAM_RD_CTRL, dmcu_version_offset);
dmcu->dmcu_version.interface_version = REG_READ(DMCU_IRAM_RD_DATA);
dmcu->dmcu_version.year = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) |
dmcu->dmcu_version.abm_version = REG_READ(DMCU_IRAM_RD_DATA);
dmcu->dmcu_version.psr_version = REG_READ(DMCU_IRAM_RD_DATA);
dmcu->dmcu_version.build_version = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) |
REG_READ(DMCU_IRAM_RD_DATA));
dmcu->dmcu_version.month = REG_READ(DMCU_IRAM_RD_DATA);
dmcu->dmcu_version.date = REG_READ(DMCU_IRAM_RD_DATA);

/* Disable write access to IRAM to allow dynamic sleep state */
REG_UPDATE_2(DMCU_RAM_ACCESS_CTRL,
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ enum dmcu_state {
};

struct dmcu_version {
unsigned int date;
unsigned int month;
unsigned int year;
unsigned int interface_version;
unsigned int abm_version;
unsigned int psr_version;
unsigned int build_version;
};

struct dmcu {
Expand Down
9 changes: 4 additions & 5 deletions drivers/gpu/drm/amd/display/modules/power/power_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ struct iram_table_v_2 {

/* For reading PSR State directly from IRAM */
uint8_t psr_state; /* 0xf0 */
uint8_t dmcu_interface_version; /* 0xf1 */
uint8_t dmcu_date_version_year_b0; /* 0xf2 */
uint8_t dmcu_date_version_year_b1; /* 0xf3 */
uint8_t dmcu_date_version_month; /* 0xf4 */
uint8_t dmcu_date_version_day; /* 0xf5 */
uint8_t dmcu_mcp_interface_version; /* 0xf1 */
uint8_t dmcu_abm_feature_version; /* 0xf2 */
uint8_t dmcu_psr_feature_version; /* 0xf3 */
uint16_t dmcu_version; /* 0xf4 */
uint8_t dmcu_state; /* 0xf6 */

uint16_t blRampReduction; /* 0xf7 */
Expand Down

0 comments on commit 07772b0

Please sign in to comment.