Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/hwmon: Silence "mailbox access failed" warning in snb_pcode_read
@ 2022-12-03  3:14 Ashutosh Dixit
  2022-12-03  3:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ashutosh Dixit @ 2022-12-03  3:14 UTC (permalink / raw)
  To: intel-gfx

hwm_pcode_read_i1 is called during i915 load. This results in the following
warning from snb_pcode_read because POWER_SETUP_SUBCOMMAND_READ_I1 is
unsupported on DG1/DG2.

[drm:snb_pcode_read [i915]] warning: pcode (read from mbox 47c) \
				mailbox access failed for snb_pcode_read_p [i915]: -6

The code handles the unsupported command but the warning in dmesg is a red
herring which has resulted in a couple of bugs being filed. Therefore silence
the warning by avoiding calling snb_pcode_read_p for DG1/DG2.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/i915/i915_hwmon.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index c588a17f97e98..cca7a4350ec8f 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -293,6 +293,10 @@ static const struct hwmon_channel_info *hwm_gt_info[] = {
 /* I1 is exposed as power_crit or as curr_crit depending on bit 31 */
 static int hwm_pcode_read_i1(struct drm_i915_private *i915, u32 *uval)
 {
+	/* Avoid ILLEGAL_SUBCOMMAND "mailbox access failed" warning in snb_pcode_read */
+	if (IS_DG1(i915) || IS_DG2(i915))
+		return -ENXIO;
+
 	return snb_pcode_read_p(&i915->uncore, PCODE_POWER_SETUP,
 				POWER_SETUP_SUBCOMMAND_READ_I1, 0, uval);
 }
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-12-07  5:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-03  3:14 [Intel-gfx] [PATCH] drm/i915/hwmon: Silence "mailbox access failed" warning in snb_pcode_read Ashutosh Dixit
2022-12-03  3:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-12-03  4:18 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-12-03  9:43 ` [Intel-gfx] [PATCH] " Gupta, Anshuman
2022-12-03  9:47   ` Gupta, Anshuman
2022-12-05  1:40     ` Dixit, Ashutosh
2022-12-05  3:58       ` Gupta, Anshuman
2022-12-05 16:55 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/hwmon: Silence "mailbox access failed" warning in snb_pcode_read (rev2) Patchwork
2022-12-05 17:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-12-05 19:30 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-12-07  5:23   ` Gupta, Anshuman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox