drm/i915/skl: Store and print the DMC firmware version we load
Subsystems (2)
PATCH 1/7 drm/i915/skl: Store and print the DMC firmware version we load
From: Damien Lespiau <[email protected]>
That can be handy later on to tell which DMC firmware version the user has, by just looking at the dmesg.
v2: use DRM_DEBUG_DRIVER (Chris)
v3: use DRM_INFO (Marc Herbert)
--- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/intel_csr.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -734,6 +734,10 @@ struct intel_uncore {#define for_each_fw_domain (domain__, dev_priv__, i__) \ for_each_fw_domain_mask(domain__, FORCEWAKE_ALL, dev_priv__, i__) +#define CSR_VERSION (major, minor) ((major) << 16 | (minor)) +#define CSR_VERSION_MAJOR (version) ((version) >> 16) +#define CSR_VERSION_MINOR (version) ((version) & 0xffff) +enum csr_state {FW_UNINITIALIZED =0 ,FW_LOADED ,
@@ -744,6 +748,7 @@ struct intel_csr {const char *fw_path;uint32_t *dmc_payload;uint32_t dmc_fw_size; +uint32_t version;uint32_t mmio_count;uint32_t mmioaddr[8 ];uint32_t mmiodata[8 ];
drivers/gpu/drm/i915/intel_csr.c +8 -1
@@ -321,6 +321,9 @@ static void finish_csr_load(const struct firmware *fw, void *context) (css_header->header_len * 4)); goto out; } + + csr->version = css_header->version; + readcount +=sizeof (struct intel_css_header );/* Extract Package Header information*/
@@ -402,7 +405,11 @@ static void finish_csr_load(const struct firmware *fw, void *context)intel_csr_load_program (dev); fw_loaded = true; -DRM_DEBUG_KMS ("Finished loading %s\n" , dev_priv->csr.fw_path); +DRM_INFO ("Finished loading %s (v%u.%u)\n" , + dev_priv->csr.fw_path, +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + out:if (fw_loaded)intel_runtime_pm_put (dev_priv);
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/7 drm/i915/skl: Refuse to load outdated dmc firmware
There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear.
As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability.
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
v2: Refuse to load fw instead of notifying the user
v3: Rebase on header version changes
v4: Refuse to load anything less than 1.23
v5: Give enough information for user for finding correct fw (Chris)
v6: better url and formatting (Chris)
v7: move error log for each fail path (Mika)
bail out earlier in load path (Imre)
Cc: Animesh Manna <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Dave Gordon <[email protected]>
Cc: Arun Siluvery <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Patrik Jakobsson <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Chris Wilson <[email protected]>
References: https://01.org/linuxgraphics/downloads/skldmcver121
References: https://01.org/linuxgraphics/downloads/skylake-dmc-1.23
Testcase: igt/gem_exec_nop
--- drivers/gpu/drm/i915/intel_csr.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_csr.c +27 -10
@@ -47,6 +47,9 @@MODULE_FIRMWARE (I915_CSR_SKL );MODULE_FIRMWARE (I915_CSR_BXT ); +#define SKL_REQUIRED_FW_MAJOR 1 +#define SKL_REQUIRED_FW_MINOR 23 +/* * SKL CSR registers for DC5 and DC6 */
@@ -303,10 +306,8 @@ static void finish_csr_load(const struct firmware *fw, void *context)uint32_t *dmc_payload;bool fw_loaded = false; -if (!fw) { -i915_firmware_load_error_print (csr->fw_path,0 ); +if (!fw) goto out; - }if ((stepping == -ENODATA ) || (substepping == -ENODATA )) {DRM_ERROR ("Unknown stepping info, firmware loading failed\n" );
@@ -324,6 +325,19 @@ static void finish_csr_load(const struct firmware *fw, void *context) csr->version = css_header->version; +if (IS_SKYLAKE (dev) && + (CSR_VERSION_MAJOR (csr->version) <SKL_REQUIRED_FW_MAJOR || +CSR_VERSION_MINOR (csr->version) <SKL_REQUIRED_FW_MINOR )) { +DRM_INFO ("Refusing to load old Skylake DMC firmware v%u.%u," +" please upgrade to v%u.%u or later" +" [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].\n" , +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version), +SKL_REQUIRED_FW_MAJOR , +SKL_REQUIRED_FW_MINOR ); + goto out; + } + readcount +=sizeof (struct intel_css_header );/* Extract Package Header information*/
@@ -405,17 +419,20 @@ static void finish_csr_load(const struct firmware *fw, void *context)intel_csr_load_program (dev); fw_loaded = true; -DRM_INFO ("Finished loading %s (v%u.%u)\n" , - dev_priv->csr.fw_path, -CSR_VERSION_MAJOR (csr->version), -CSR_VERSION_MINOR (csr->version)); - out: -if (fw_loaded) +if (fw_loaded) {intel_runtime_pm_put (dev_priv); -else + +DRM_INFO ("Finished loading %s (v%u.%u)\n" , + dev_priv->csr.fw_path, +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + }else {intel_csr_load_status_set (dev_priv,FW_FAILED ); +i915_firmware_load_error_print (csr->fw_path,0 ); + } +release_firmware (fw); }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware
Quoted 65 lines · Mika Kuoppala
There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear.
As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability.
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
v2: Refuse to load fw instead of notifying the user
v3: Rebase on header version changes
v4: Refuse to load anything less than 1.23
v5: Give enough information for user for finding correct fw (Chris)
v6: better url and formatting (Chris)
v7: move error log for each fail path (Mika)
bail out earlier in load path (Imre)Cc: Animesh Manna <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Dave Gordon <[email protected]>
Cc: Arun Siluvery <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Patrik Jakobsson <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Chris Wilson <[email protected]>
References: https://01.org/linuxgraphics/downloads/skldmcver121
References: https://01.org/linuxgraphics/downloads/skylake-dmc-1.23
Testcase: igt/gem_exec_nopSigned-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_csr.c +4
-3@@ -47,6 +47,9 @@MODULE_FIRMWARE (I915_CSR_SKL );MODULE_FIRMWARE (I915_CSR_BXT ); +#define SKL_REQUIRED_FW_MAJOR 1 +#define SKL_REQUIRED_FW_MINOR 23 +/* * SKL CSR registers for DC5 and DC6 */ @@ -303,10 +306,8 @@ static void finish_csr_load(const struct firmware *fw, void *context)uint32_t *dmc_payload;bool fw_loaded = false; -if (!fw) { -i915_firmware_load_error_print (csr->fw_path,0 ); +if (!fw) goto out; - }if ((stepping == -ENODATA ) || (substepping == -ENODATA )) {DRM_ERROR ("Unknown stepping info, firmware loading failed\n" );
drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 330
Quoted 6 lines
drivers/gpu/drm/i915/intel_csr.c +3
-0@@ -324,6 +325,19 @@ static void finish_csr_load(const struct firmware *fw, void *context) csr->version = css_header->version; +if (IS_SKYLAKE (dev) && + (CSR_VERSION_MAJOR (csr->version) <SKL_REQUIRED_FW_MAJOR || +CSR_VERSION_MINOR (csr->version) <SKL_REQUIRED_FW_MINOR )) {
This would also reject 2.22 too for example, isn't that a problem? If so, after fixing that:
Quoted 31 lines
drivers/gpu/drm/i915/intel_csr.c +15
-7+DRM_INFO ("Refusing to load old Skylake DMC firmware v%u.%u," +" please upgrade to v%u.%u or later" +" [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].\n" , +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version), +SKL_REQUIRED_FW_MAJOR , +SKL_REQUIRED_FW_MINOR ); + goto out; + } + readcount +=sizeof (struct intel_css_header );/* Extract Package Header information*/ @@ -405,17 +419,20 @@ static void finish_csr_load(const struct firmware *fw, void *context)intel_csr_load_program (dev); fw_loaded = true; -DRM_INFO ("Finished loading %s (v%u.%u)\n" , - dev_priv->csr.fw_path, -CSR_VERSION_MAJOR (csr->version), -CSR_VERSION_MINOR (csr->version)); - out: -if (fw_loaded) +if (fw_loaded) {intel_runtime_pm_put (dev_priv); -else + + DRM_INFO("Finished loading %s (v%u.%u)\n", + dev_priv->csr.fw_path, + CSR_VERSION_MAJOR(csr->version),
drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 438
Quoted 10 lines
drivers/gpu/drm/i915/intel_csr.c +5
-0+ CSR_VERSION_MINOR(csr->version)); + }else {intel_csr_load_status_set (dev_priv,FW_FAILED ); +i915_firmware_load_error_print (csr->fw_path,0 ); + } +release_firmware (fw); }
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/7 drm/i915/skl: Refuse to load outdated dmc firmware
There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear.
As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability.
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
v2: Refuse to load fw instead of notifying the user
v3: Rebase on header version changes
v4: Refuse to load anything less than 1.23
v5: Give enough information for user for finding correct fw (Chris)
v6: better url and formatting (Chris)
v7: move error log for each fail path (Mika)
bail out earlier in load path (Imre)
v8: Fix the version check (Imre)
Cc: Animesh Manna <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Dave Gordon <[email protected]>
Cc: Arun Siluvery <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Patrik Jakobsson <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Chris Wilson <[email protected]>
References: https://01.org/linuxgraphics/downloads/skldmcver121
References: https://01.org/linuxgraphics/downloads/skylake-dmc-1.23
Testcase: igt/gem_exec_nop
--- drivers/gpu/drm/i915/intel_csr.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_csr.c +24 -10
@@ -47,6 +47,8 @@MODULE_FIRMWARE (I915_CSR_SKL );MODULE_FIRMWARE (I915_CSR_BXT ); +#define SKL_CSR_VERSION_REQUIRED CSR_VERSION(1, 23) +/* * SKL CSR registers for DC5 and DC6 */
@@ -303,10 +305,8 @@ static void finish_csr_load(const struct firmware *fw, void *context)uint32_t *dmc_payload;bool fw_loaded = false; -if (!fw) { -i915_firmware_load_error_print (csr->fw_path,0 ); +if (!fw) goto out; - }if ((stepping == -ENODATA ) || (substepping == -ENODATA )) {DRM_ERROR ("Unknown stepping info, firmware loading failed\n" );
@@ -324,6 +324,17 @@ static void finish_csr_load(const struct firmware *fw, void *context) csr->version = css_header->version; +if (IS_SKYLAKE (dev) && csr->version <SKL_CSR_VERSION_REQUIRED ) { +DRM_INFO ("Refusing to load old Skylake DMC firmware v%u.%u," +" please upgrade to v%u.%u or later" +" [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].\n" , +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version), +CSR_VERSION_MAJOR (SKL_CSR_VERSION_REQUIRED ), +CSR_VERSION_MINOR (SKL_CSR_VERSION_REQUIRED )); + goto out; + } + readcount +=sizeof (struct intel_css_header );/* Extract Package Header information*/
@@ -405,17 +416,20 @@ static void finish_csr_load(const struct firmware *fw, void *context)intel_csr_load_program (dev); fw_loaded = true; -DRM_INFO ("Finished loading %s (v%u.%u)\n" , - dev_priv->csr.fw_path, -CSR_VERSION_MAJOR (csr->version), -CSR_VERSION_MINOR (csr->version)); - out: -if (fw_loaded) +if (fw_loaded) {intel_runtime_pm_put (dev_priv); -else + +DRM_INFO ("Finished loading %s (v%u.%u)\n" , + dev_priv->csr.fw_path, +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + }else {intel_csr_load_status_set (dev_priv,FW_FAILED ); +i915_firmware_load_error_print (csr->fw_path,0 ); + } +release_firmware (fw); }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware
Hi Mika,
Quoted 6 lines · Mika Kuoppala
There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear.
Quoted 7 lines
As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability.
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
Unfortunately 1.23 is only available from 01.org, and doesn't appear to have been submitted to linux-firmware. Rodrigo, is this going to be submitted soon, or?
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerRe: [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware
Quoted 15 lines · Daniel Stone
Hi Mika,
Quoted 11 lines · Mika Kuoppala
There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear.
As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability.
Quoted 7 lines
Quoted 2 lines
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
Unfortunately 1.23 is only available from 01.org, and doesn't appear to have been submitted to linux-firmware. Rodrigo, is this going to be
submitted soon, or?
I submit along with the release at 01.org.
It just got pulled and merged there.
Quoted 2 lines
Cheers,
Daniel
Thanks,
Rodrigo.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware
Hi Rodrigo,
Quoted 6 lines · Rodrigo
Quoted 5 lines · Daniel Stone
Quoted 2 lines · Mika Kuoppala
With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that.
Quoted 7 lines
Quoted 4 lines
Unfortunately 1.23 is only available from 01.org, and doesn't appear to have been submitted to linux-firmware. Rodrigo, is this going to be
submitted soon, or?I submit along with the release at 01.org.
It just got pulled and merged there.
Yes, you're right - the reason I couldn't find the submission anywhere is because linux-firmware@ is just an alias rather than an actual archived list! So yes, it was actually submitted, and got merged last night as well. Sorry about that.
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/7 drm/i915/skl: Print the DMC firmware status in debugfs
In reply to Mika KuoppalaFrom: Damien Lespiau <[email protected]>
Create a new debufs file for it, we'll have a few more things to add there.
v2: Fix checkpatch warning about static const array
v3: use named initializers (Ville)
v4: strip out csr_state as it will be removed in future (Ville, Imre)
--- drivers/gpu/drm/i915/i915_debugfs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +27 -0
@@ -2783,6 +2783,32 @@ static int i915_power_domain_info(struct seq_file *m, void *unused)return 0 ; } +static int i915_dmc_info (struct seq_file *m,void *unused) +{ +struct drm_info_node *node = m->private; +struct drm_device *dev = node->minor->dev; +struct drm_i915_private *dev_priv = dev->dev_private; +struct intel_csr *csr; + +if (!HAS_CSR (dev)) { +seq_puts (m,"not supported\n" ); +return 0 ; + } + + csr = &dev_priv->csr; + +seq_printf (m,"fw loaded: %s\n" ,yesno (csr->dmc_payload !=NULL )); +seq_printf (m,"path: %s\n" , csr->fw_path); + +if (!csr->dmc_payload) +return 0 ; + +seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + +return 0 ; +} +static void intel_seq_print_mode (struct seq_file *m,int tabs,struct drm_display_mode *mode) {
@@ -5242,6 +5268,7 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_energy_uJ", i915_energy_uJ, 0}, {"i915_runtime_pm_status", i915_runtime_pm_status, 0}, {"i915_power_domain_info", i915_power_domain_info, 0}, + {"i915_dmc_info", i915_dmc_info, 0}, {"i915_display_info", i915_display_info, 0}, {"i915_semaphore_status", i915_semaphore_status, 0}, {"i915_shared_dplls_info", i915_shared_dplls_info, 0},
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/7] drm/i915/skl: Print the DMC firmware status in debugfs
Quoted 11 lines · Mika Kuoppala
From: Damien Lespiau <[email protected]>
Create a new debufs file for it, we'll have a few more things to add there.
v2: Fix checkpatch warning about static const array
v3: use named initializers (Ville)
v4: strip outcsr_stateas it will be removed in future (Ville, Imre)Signed-off-by Damien Lespiau <[email protected]> (v1)Signed-off-by Mika Kuoppala <[email protected]>
Quoted 42 lines
--- drivers/gpu/drm/i915/i915_debugfs.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)drivers/gpu/drm/i915/i915_debugfs.c +26
-0@@ -2783,6 +2783,32 @@ static int i915_power_domain_info(struct seq_file *m, void *unused)return 0 ; } +static int i915_dmc_info (struct seq_file *m,void *unused) +{ +struct drm_info_node *node = m->private; +struct drm_device *dev = node->minor->dev; +struct drm_i915_private *dev_priv = dev->dev_private; +struct intel_csr *csr; + +if (!HAS_CSR (dev)) { +seq_puts (m,"not supported\n" ); +return 0 ; + } + + csr = &dev_priv->csr; + +seq_printf (m,"fw loaded: %s\n" ,yesno (csr->dmc_payload !=NULL )); +seq_printf (m,"path: %s\n" , csr->fw_path); + +if (!csr->dmc_payload) +return 0 ; + +seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + +return 0 ; +} +static void intel_seq_print_mode (struct seq_file *m,int tabs,struct drm_display_mode *mode) {
drivers/gpu/drm/i915/i915_debugfs.c static const struct drm_info_list i915_debugfs_list[] = { · line 5274
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -5242,6 +5268,7 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_energy_uJ", i915_energy_uJ, 0}, {"i915_runtime_pm_status", i915_runtime_pm_status, 0}, {"i915_power_domain_info", i915_power_domain_info, 0}, + {"i915_dmc_info", i915_dmc_info, 0}, {"i915_display_info", i915_display_info, 0}, {"i915_semaphore_status", i915_semaphore_status, 0}, {"i915_shared_dplls_info", i915_shared_dplls_info, 0},
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/7 drm/i915/skl: Expose DC5/DC6 entry counts
In reply to Mika KuoppalaFrom: Damien Lespiau <[email protected]>
The CSR firmware expose two counters, handy to check if we are indeed entering DC5/DC6.
v2: Rebase
--- drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++ drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +7 -0
@@ -2806,6 +2806,13 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); +if (IS_SKYLAKE (dev) && csr->version >=CSR_VERSION (1 ,6 )) { +seq_printf (m,"DC3 -> DC5 count: %d\n" , +I915_READ (SKL_CSR_DC3_DC5_COUNT )); +seq_printf (m,"DC5 -> DC6 count: %d\n" , +I915_READ (SKL_CSR_DC5_DC6_COUNT )); + } +return 0 ; }
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -5696,6 +5696,10 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_12BIT (2 << 0)#define GAMMA_MODE_MODE_SPLIT (3 << 0) +/* DMC/CSR */ +#define SKL_CSR_DC3_DC5_COUNT 0x80030 +#define SKL_CSR_DC5_DC6_COUNT 0x8002C +/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)#define DE_SPRITEB_FLIP_DONE (1 << 29)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/7] drm/i915/skl: Expose DC5/DC6 entry counts
Quoted 20 lines · Mika Kuoppala
From: Damien Lespiau <[email protected]>
The CSR firmware expose two counters, handy to check if we are indeed entering DC5/DC6.
v2: Rebase
Signed-off-by Damien Lespiau <[email protected]>Reviewed-by Rodrigo Vivi <[email protected]> (v1)Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++ drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 11 insertions(+)drivers/gpu/drm/i915/i915_debugfs.c +0
-0
drivers/gpu/drm/i915/i915_debugfs.c static int i915_dmc_info(struct seq_file *m, void *unused) · line 2815
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +7
-0@@ -2806,6 +2806,13 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); +if (IS_SKYLAKE (dev) && csr->version >=CSR_VERSION (1 ,6 )) { +seq_printf (m,"DC3 -> DC5 count: %d\n" , +I915_READ (SKL_CSR_DC3_DC5_COUNT )); +seq_printf (m,"DC5 -> DC6 count: %d\n" , +I915_READ (SKL_CSR_DC5_DC6_COUNT )); + } +
These registers return all 0xFF without an RPM ref.
Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-0return 0 ; }drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 5705
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +4
-0@@ -5696,6 +5696,10 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_12BIT (2 << 0)#define GAMMA_MODE_MODE_SPLIT (3 << 0) +/* DMC/CSR */ +#define SKL_CSR_DC3_DC5_COUNT 0x80030 +#define SKL_CSR_DC5_DC6_COUNT 0x8002C +/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)#define DE_SPRITEB_FLIP_DONE (1 << 29)
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/7 drm/i915/skl: Expose DC5/DC6 entry counts
From: Damien Lespiau <[email protected]>
The CSR firmware expose two counters, handy to check if we are indeed entering DC5/DC6.
v2: Rebase
v3: Take RPM ref before reading (Imre)
--- drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++++ drivers/gpu/drm/i915/i915_reg.h | 4 ++++ 2 files changed, 15 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +11 -0
@@ -2810,6 +2810,17 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); +intel_runtime_pm_get (dev_priv); + +if (IS_SKYLAKE (dev) && csr->version >=CSR_VERSION (1 ,6 )) { +seq_printf (m,"DC3 -> DC5 count: %d\n" , +I915_READ (SKL_CSR_DC3_DC5_COUNT )); +seq_printf (m,"DC5 -> DC6 count: %d\n" , +I915_READ (SKL_CSR_DC5_DC6_COUNT )); + } + +intel_runtime_pm_put (dev_priv); +return 0 ; }
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -5696,6 +5696,10 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_12BIT (2 << 0)#define GAMMA_MODE_MODE_SPLIT (3 << 0) +/* DMC/CSR */ +#define SKL_CSR_DC3_DC5_COUNT 0x80030 +#define SKL_CSR_DC5_DC6_COUNT 0x8002C +/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)#define DE_SPRITEB_FLIP_DONE (1 << 29)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/7 drm/i915/bxt: Expose DC5 entry count
In reply to Mika KuoppalaFor bxt CSR firmware exposes a count of dc5 entries. Expose it through debugs
--- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +3 -0
@@ -2811,6 +2811,9 @@ static int i915_dmc_info(struct seq_file *m, void *unused) I915_READ(SKL_CSR_DC3_DC5_COUNT));seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (SKL_CSR_DC5_DC6_COUNT )); + }else if (IS_BROXTON (dev) && csr->version >=CSR_VERSION (1 ,4 )) { +seq_printf (m,"DC3 -> DC5 count: %d\n" , +I915_READ (BXT_CSR_DC3_DC5_COUNT )); }return 0 ;
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -5699,6 +5699,7 @@ enum skl_disp_power_wells {/* DMC/CSR */ #define SKL_CSR_DC3_DC5_COUNT 0x80030#define SKL_CSR_DC5_DC6_COUNT 0x8002C +#define BXT_CSR_DC3_DC5_COUNT 0x80038/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/7] drm/i915/bxt: Expose DC5 entry count
Quoted 4 lines · Mika Kuoppala
For bxt CSR firmware exposes a count of dc5 entries. Expose it through debugs
Signed-off-by Mika Kuoppala <[email protected]>
Quoted 24 lines
--- drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 4 insertions(+)drivers/gpu/drm/i915/i915_debugfs.c +3
-0@@ -2811,6 +2811,9 @@ static int i915_dmc_info(struct seq_file *m, void *unused) I915_READ(SKL_CSR_DC3_DC5_COUNT));seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (SKL_CSR_DC5_DC6_COUNT )); + }else if (IS_BROXTON (dev) && csr->version >=CSR_VERSION (1 ,4 )) { +seq_printf (m,"DC3 -> DC5 count: %d\n" , +I915_READ (BXT_CSR_DC3_DC5_COUNT )); }return 0 ;drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 5705
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -5699,6 +5699,7 @@ enum skl_disp_power_wells {/* DMC/CSR */ #define SKL_CSR_DC3_DC5_COUNT 0x80030#define SKL_CSR_DC5_DC6_COUNT 0x8002C +#define BXT_CSR_DC3_DC5_COUNT 0x80038/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/7 drm/i915: Add csr programming registers to dmc debugfs entry
In reply to Mika KuoppalaWe check these to determine firmware loading status. Include them to help to debug causes of firmware loading fails.
v2: Move all CSR specific registers to i915_reg.h (Ville)
v3: Rebase
--- drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++- drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++ drivers/gpu/drm/i915/intel_csr.c | 13 ------------- 3 files changed, 16 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +6 -1
@@ -2801,7 +2801,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"path: %s\n" , csr->fw_path);if (!csr->dmc_payload) -return 0 ; + goto out;seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version));
@@ -2816,6 +2816,11 @@ static int i915_dmc_info(struct seq_file *m, void *unused) I915_READ(BXT_CSR_DC3_DC5_COUNT)); } +out: +seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 ))); +seq_printf (m,"ssp base: 0x%08x\n" ,I915_READ (CSR_SSP_BASE )); +seq_printf (m,"htp: 0x%08x\n" ,I915_READ (CSR_HTP_SKL )); +return 0 ; }
drivers/gpu/drm/i915/i915_reg.h +10 -0
@@ -5697,6 +5697,16 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_SPLIT (3 << 0)/* DMC/CSR */ +#define CSR_PROGRAM (i) (0x80000 + (i) * 4) +#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 +#define CSR_HTP_ADDR_SKL 0x00500034 +#define CSR_SSP_BASE 0x8F074 +#define CSR_HTP_SKL 0x8F004 +#define CSR_LAST_WRITE 0x8F034 +#define CSR_LAST_WRITE_VALUE 0xc003b400 +/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ +#define CSR_MMIO_START_RANGE 0x80000 +#define CSR_MMIO_END_RANGE 0x8FFFF#define SKL_CSR_DC3_DC5_COUNT 0x80030#define SKL_CSR_DC5_DC6_COUNT 0x8002C#define BXT_CSR_DC3_DC5_COUNT 0x80038
drivers/gpu/drm/i915/intel_csr.c +0 -13
@@ -50,21 +50,8 @@ MODULE_FIRMWARE(I915_CSR_BXT);#define SKL_REQUIRED_FW_MAJOR 1#define SKL_REQUIRED_FW_MINOR 23 -/* -* SKL CSR registers for DC5 and DC6 -*/ -#define CSR_PROGRAM (i) (0x80000 + (i) * 4) -#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 -#define CSR_HTP_ADDR_SKL 0x00500034 -#define CSR_SSP_BASE 0x8F074 -#define CSR_HTP_SKL 0x8F004 -#define CSR_LAST_WRITE 0x8F034 -#define CSR_LAST_WRITE_VALUE 0xc003b400 -/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ #define CSR_MAX_FW_SIZE 0x2FFF#define CSR_DEFAULT_FW_OFFSET 0xFFFFFFFF -#define CSR_MMIO_START_RANGE 0x80000 -#define CSR_MMIO_END_RANGE 0x8FFFFstruct intel_css_header {/* 0x09 for DMC */
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/7] drm/i915: Add csr programming registers to dmc debugfs entry
Quoted 7 lines · Mika Kuoppala
We check these to determine firmware loading status. Include them to help to debug causes of firmware loading fails.
v2: Move all CSR specific registers to
i915_reg.h(Ville)
v3: RebaseSigned-off-by Mika Kuoppala <[email protected]>
Quoted 68 lines
--- drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++- drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++ drivers/gpu/drm/i915/intel_csr.c | 13 ------------- 3 files changed, 16 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +6
-1@@ -2801,7 +2801,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"path: %s\n" , csr->fw_path);if (!csr->dmc_payload) -return 0 ; + goto out;seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version));@@ -2816,6 +2816,11 @@ static int i915_dmc_info(struct seq_file *m, void *unused) I915_READ(BXT_CSR_DC3_DC5_COUNT)); } +out: +seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 ))); +seq_printf (m,"ssp base: 0x%08x\n" ,I915_READ (CSR_SSP_BASE )); +seq_printf (m,"htp: 0x%08x\n" ,I915_READ (CSR_HTP_SKL )); +return 0 ; }drivers/gpu/drm/i915/i915_reg.h +10
-0@@ -5697,6 +5697,16 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_SPLIT (3 << 0)/* DMC/CSR */ +#define CSR_PROGRAM (i) (0x80000 + (i) * 4) +#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 +#define CSR_HTP_ADDR_SKL 0x00500034 +#define CSR_SSP_BASE 0x8F074 +#define CSR_HTP_SKL 0x8F004 +#define CSR_LAST_WRITE 0x8F034 +#define CSR_LAST_WRITE_VALUE 0xc003b400 +/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ +#define CSR_MMIO_START_RANGE 0x80000 +#define CSR_MMIO_END_RANGE 0x8FFFF#define SKL_CSR_DC3_DC5_COUNT 0x80030#define SKL_CSR_DC5_DC6_COUNT 0x8002C#define BXT_CSR_DC3_DC5_COUNT 0x80038drivers/gpu/drm/i915/intel_csr.c +0
-8@@ -50,21 +50,8 @@ MODULE_FIRMWARE(I915_CSR_BXT);#define SKL_REQUIRED_FW_MAJOR 1#define SKL_REQUIRED_FW_MINOR 23 -/* -* SKL CSR registers for DC5 and DC6 -*/ -#define CSR_PROGRAM (i) (0x80000 + (i) * 4) -#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 -#define CSR_HTP_ADDR_SKL 0x00500034 -#define CSR_SSP_BASE 0x8F074 -#define CSR_HTP_SKL 0x8F004
drivers/gpu/drm/i915/intel_csr.c MODULE_FIRMWARE(I915_CSR_BXT); · line 57
Quoted 10 lines
drivers/gpu/drm/i915/intel_csr.c +0
-5-#define CSR_LAST_WRITE 0x8F034 -#define CSR_LAST_WRITE_VALUE 0xc003b400 -/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ #define CSR_MAX_FW_SIZE 0x2FFF#define CSR_DEFAULT_FW_OFFSET 0xFFFFFFFF -#define CSR_MMIO_START_RANGE 0x80000 -#define CSR_MMIO_END_RANGE 0x8FFFFstruct intel_css_header {/* 0x09 for DMC */
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/7 drm/i915: Add csr programming registers to dmc debugfs entry
We check these to determine firmware loading status. Include them to help to debug causes of firmware loading fails.
v2: Move all CSR specific registers to i915_reg.h (Ville)
v3: Rebase
v4: Rebase (RPM ref)
--- drivers/gpu/drm/i915/i915_debugfs.c | 11 ++++++++--- drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++ drivers/gpu/drm/i915/intel_csr.c | 13 ------------- 3 files changed, 18 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +8 -3
@@ -2801,17 +2801,17 @@ static int i915_dmc_info(struct seq_file *m, void *unused) csr = &dev_priv->csr; +intel_runtime_pm_get (dev_priv); +seq_printf (m,"fw loaded: %s\n" ,yesno (csr->dmc_payload !=NULL ));seq_printf (m,"path: %s\n" , csr->fw_path);if (!csr->dmc_payload) -return 0 ; + goto out;seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); -intel_runtime_pm_get (dev_priv); -if (IS_SKYLAKE (dev) && csr->version >=CSR_VERSION (1 ,6 )) {seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (SKL_CSR_DC3_DC5_COUNT ));
@@ -2822,6 +2822,11 @@ static int i915_dmc_info(struct seq_file *m, void *unused) I915_READ(BXT_CSR_DC3_DC5_COUNT)); } +out: +seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 ))); +seq_printf (m,"ssp base: 0x%08x\n" ,I915_READ (CSR_SSP_BASE )); +seq_printf (m,"htp: 0x%08x\n" ,I915_READ (CSR_HTP_SKL )); +intel_runtime_pm_put (dev_priv);return 0 ;
drivers/gpu/drm/i915/i915_reg.h +10 -0
@@ -5697,6 +5697,16 @@ enum skl_disp_power_wells {#define GAMMA_MODE_MODE_SPLIT (3 << 0)/* DMC/CSR */ +#define CSR_PROGRAM (i) (0x80000 + (i) * 4) +#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 +#define CSR_HTP_ADDR_SKL 0x00500034 +#define CSR_SSP_BASE 0x8F074 +#define CSR_HTP_SKL 0x8F004 +#define CSR_LAST_WRITE 0x8F034 +#define CSR_LAST_WRITE_VALUE 0xc003b400 +/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ +#define CSR_MMIO_START_RANGE 0x80000 +#define CSR_MMIO_END_RANGE 0x8FFFF#define SKL_CSR_DC3_DC5_COUNT 0x80030#define SKL_CSR_DC5_DC6_COUNT 0x8002C#define BXT_CSR_DC3_DC5_COUNT 0x80038
drivers/gpu/drm/i915/intel_csr.c +0 -13
@@ -49,21 +49,8 @@ MODULE_FIRMWARE(I915_CSR_BXT);#define SKL_CSR_VERSION_REQUIRED CSR_VERSION(1, 23) -/* -* SKL CSR registers for DC5 and DC6 -*/ -#define CSR_PROGRAM (i) (0x80000 + (i) * 4) -#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0 -#define CSR_HTP_ADDR_SKL 0x00500034 -#define CSR_SSP_BASE 0x8F074 -#define CSR_HTP_SKL 0x8F004 -#define CSR_LAST_WRITE 0x8F034 -#define CSR_LAST_WRITE_VALUE 0xc003b400 -/* MMIO address range for CSR program (0x80000 - 0x82FFF) */ #define CSR_MAX_FW_SIZE 0x2FFF#define CSR_DEFAULT_FW_OFFSET 0xFFFFFFFF -#define CSR_MMIO_START_RANGE 0x80000 -#define CSR_MMIO_END_RANGE 0x8FFFFstruct intel_css_header {/* 0x09 for DMC */
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/7 drm/i915: Add dmc firmware load state and version to error state
In reply to Mika KuoppalaWe have had one case where buggy csr/dmc firmware version influenced gt side and caused a hang. Add dmc firmware loading state and version to error state.
v2: - Rebased on top of Damien's patches
- included fw load state
v3: include dmc info only if platform supports it (Chris)
v4: move *csr to branch scope (Chris)
--- drivers/gpu/drm/i915/i915_gpu_error.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/i915/i915_gpu_error.c +10 -0
@@ -366,6 +366,16 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,err_printf (m,"Suspend count: %u\n" , error->suspend_count);err_printf (m,"PCI ID: 0x%04x\n" , dev->pdev->device);err_printf (m,"IOMMU enabled?: %d\n" , error->iommu); + +if (HAS_CSR (dev)) { +struct intel_csr *csr = &dev_priv->csr; + +err_printf (m,"DMC load state: %d\n" , csr->state); +err_printf (m,"DMC fw version: %d.%d\n" , +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + } +err_printf (m,"EIR: 0x%08x\n" , error->eir);err_printf (m,"IER: 0x%08x\n" , error->ier);if (INTEL_INFO (dev)->gen >=8 ) {
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/7 drm/i915: Add dmc firmware load state and version to error state
We have had one case where buggy csr/dmc firmware version influenced gt side and caused a hang. Add dmc firmware loading state and version to error state.
v2: - Rebased on top of Damien's patches
- included fw load state
v3: include dmc info only if platform supports it (Chris)
v4: move *csr to branch scope (Chris)
v5: remove dependency to csr_state
--- drivers/gpu/drm/i915/i915_gpu_error.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_gpu_error.c +11 -0
@@ -366,6 +366,17 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,err_printf (m,"Suspend count: %u\n" , error->suspend_count);err_printf (m,"PCI ID: 0x%04x\n" , dev->pdev->device);err_printf (m,"IOMMU enabled?: %d\n" , error->iommu); + +if (HAS_CSR (dev)) { +struct intel_csr *csr = &dev_priv->csr; + +err_printf (m,"DMC loaded: %s\n" , +yesno (csr->dmc_payload !=NULL )); +err_printf (m,"DMC fw version: %d.%d\n" , +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + } +err_printf (m,"EIR: 0x%08x\n" , error->eir);err_printf (m,"IER: 0x%08x\n" , error->ier);if (INTEL_INFO (dev)->gen >=8 ) {
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Mika Kuoppala
From: Damien Lespiau <[email protected]>
That can be handy later on to tell which DMC firmware version the user has, by just looking at the dmesg.
v2: use
DRM_DEBUG_DRIVER(Chris)
v3: useDRM_INFO(Marc Herbert)Cc Marc Herbert <[email protected]>Signed-off-by Damien Lespiau <[email protected]> (v1)Signed-off-by Mika Kuoppala <[email protected]>
Quoted 45 lines
--- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ drivers/gpu/drm/i915/intel_csr.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_drv.h +5
-0@@ -734,6 +734,10 @@ struct intel_uncore {#define for_each_fw_domain (domain__, dev_priv__, i__) \ for_each_fw_domain_mask(domain__, FORCEWAKE_ALL, dev_priv__, i__) +#define CSR_VERSION (major, minor) ((major) << 16 | (minor)) +#define CSR_VERSION_MAJOR (version) ((version) >> 16) +#define CSR_VERSION_MINOR (version) ((version) & 0xffff) +enum csr_state {FW_UNINITIALIZED =0 ,FW_LOADED ,@@ -744,6 +748,7 @@ struct intel_csr {const char *fw_path;uint32_t *dmc_payload;uint32_t dmc_fw_size; +uint32_t version;uint32_t mmio_count;uint32_t mmioaddr[8 ];uint32_t mmiodata[8 ];drivers/gpu/drm/i915/intel_csr.c +3
-0@@ -321,6 +321,9 @@ static void finish_csr_load(const struct firmware *fw, void *context) (css_header->header_len * 4)); goto out; } + + csr->version = css_header->version; + readcount +=sizeof (struct intel_css_header );/* Extract Package Header information*/ @@ -402,7 +405,11 @@ static void finish_csr_load(const struct firmware *fw, void *context)intel_csr_load_program (dev); fw_loaded = true;
drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 415
Quoted 10 lines
drivers/gpu/drm/i915/intel_csr.c +5
-1-DRM_DEBUG_KMS ("Finished loading %s\n" , dev_priv->csr.fw_path); +DRM_INFO ("Finished loading %s (v%u.%u)\n" , + dev_priv->csr.fw_path, +CSR_VERSION_MAJOR (csr->version), +CSR_VERSION_MINOR (csr->version)); + out:if (fw_loaded)intel_runtime_pm_put (dev_priv);
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi,
Quoted 7 lines · Mika Kuoppala
From: Damien Lespiau <[email protected]>
That can be handy later on to tell which DMC firmware version the user has, by just looking at the dmesg.
v2: use
DRM_DEBUG_DRIVER(Chris)
v3: useDRM_INFO(Marc Herbert)
For the series (all 7):
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Daniel Stone
Hi,
Quoted 2 lines · Mika Kuoppala
From: Damien Lespiau <[email protected]>
Quoted 8 lines
Quoted 5 lines
That can be handy later on to tell which DMC firmware version the user has, by just looking at the dmesg.
v2: use
DRM_DEBUG_DRIVER(Chris)
v3: useDRM_INFO(Marc Herbert)For the series (all 7):
Tested-by Daniel Stone <[email protected]> # SKL
Entire series merged. Thanks for patches, reviews and testing.
There was no trace on the mailing list where Imre's r-b on patch 4/7 came from, but I confirmed with Imre that it was given on irc.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx