aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosip Pavic <Josip.Pavic@amd.com>2019-01-08 14:43:10 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-01-25 16:15:36 -0500
commit07772b0715122222d5a3669fd794ac817ee1617c (patch)
tree79c318ad3b32c8d5c4620499350922083dd1b75f
parentb2e85302494a6b7d3a3006c8d80a729377600628 (diff)
drm/amd/display: Update DMCU versioning mechanism
[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>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c6
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h6
-rw-r--r--drivers/gpu/drm/amd/display/modules/power/power_helpers.c9
3 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
index e927c8934681..c2926cf19dee 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
@@ -331,10 +331,10 @@ static void dcn10_get_dmcu_version(struct dmcu *dmcu)
331 /* Write address to IRAM_RD_ADDR and read from DATA register */ 331 /* Write address to IRAM_RD_ADDR and read from DATA register */
332 REG_WRITE(DMCU_IRAM_RD_CTRL, dmcu_version_offset); 332 REG_WRITE(DMCU_IRAM_RD_CTRL, dmcu_version_offset);
333 dmcu->dmcu_version.interface_version = REG_READ(DMCU_IRAM_RD_DATA); 333 dmcu->dmcu_version.interface_version = REG_READ(DMCU_IRAM_RD_DATA);
334 dmcu->dmcu_version.year = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) | 334 dmcu->dmcu_version.abm_version = REG_READ(DMCU_IRAM_RD_DATA);
335 dmcu->dmcu_version.psr_version = REG_READ(DMCU_IRAM_RD_DATA);
336 dmcu->dmcu_version.build_version = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) |
335 REG_READ(DMCU_IRAM_RD_DATA)); 337 REG_READ(DMCU_IRAM_RD_DATA));
336 dmcu->dmcu_version.month = REG_READ(DMCU_IRAM_RD_DATA);
337 dmcu->dmcu_version.date = REG_READ(DMCU_IRAM_RD_DATA);
338 338
339 /* Disable write access to IRAM to allow dynamic sleep state */ 339 /* Disable write access to IRAM to allow dynamic sleep state */
340 REG_UPDATE_2(DMCU_RAM_ACCESS_CTRL, 340 REG_UPDATE_2(DMCU_RAM_ACCESS_CTRL,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
index ed32a7503684..cbaa43853611 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
@@ -39,10 +39,10 @@ enum dmcu_state {
39}; 39};
40 40
41struct dmcu_version { 41struct dmcu_version {
42 unsigned int date;
43 unsigned int month;
44 unsigned int year;
45 unsigned int interface_version; 42 unsigned int interface_version;
43 unsigned int abm_version;
44 unsigned int psr_version;
45 unsigned int build_version;
46}; 46};
47 47
48struct dmcu { 48struct dmcu {
diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
index 89b082b5d107..5432183d9db0 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
@@ -87,11 +87,10 @@ struct iram_table_v_2 {
87 87
88 /* For reading PSR State directly from IRAM */ 88 /* For reading PSR State directly from IRAM */
89 uint8_t psr_state; /* 0xf0 */ 89 uint8_t psr_state; /* 0xf0 */
90 uint8_t dmcu_interface_version; /* 0xf1 */ 90 uint8_t dmcu_mcp_interface_version; /* 0xf1 */
91 uint8_t dmcu_date_version_year_b0; /* 0xf2 */ 91 uint8_t dmcu_abm_feature_version; /* 0xf2 */
92 uint8_t dmcu_date_version_year_b1; /* 0xf3 */ 92 uint8_t dmcu_psr_feature_version; /* 0xf3 */
93 uint8_t dmcu_date_version_month; /* 0xf4 */ 93 uint16_t dmcu_version; /* 0xf4 */
94 uint8_t dmcu_date_version_day; /* 0xf5 */
95 uint8_t dmcu_state; /* 0xf6 */ 94 uint8_t dmcu_state; /* 0xf6 */
96 95
97 uint16_t blRampReduction; /* 0xf7 */ 96 uint16_t blRampReduction; /* 0xf7 */