Skip to contentSkip to conversation

drm/i915/guc: Sanitory checks for platform that dont have GuC

PATCH In review Anusha Srivatsa 5 participants 5 messages Oct 11, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/guc: Sanitory checks for platform that dont have GuC

i915.enable_guc_loading/submission=2 forces the usage of GuC. For platforms that do not have a GuC, asking the kernel to use a GuC should not result in an error state. Do extra checks to see if the platform even has a GuC or not, regardless of the kernel parameter.

Based on Rodriogo's <[email protected]> patch. Have considered Paulo Zanoni's<[email protected]> suggestions on the implementation.

take on the implemenation.

---
 drivers/gpu/drm/i915/intel_guc_loader.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_guc_loader.c +5 -0
index 7ace96b..98718db 100644
@@ -718,12 +718,17 @@ void intel_guc_init(struct drm_device *dev)
 	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
 	const char *fw_path;
 
+	if (!HAS_GUC(dev)) {
+		i915.enable_guc_loading = 0;
+		i915.enable_guc_submission = 0;
+        } else {
 	/* A negative value means "use platform default" */
 	if (i915.enable_guc_loading < 0)
 		i915.enable_guc_loading = HAS_GUC_UCODE(dev);
 	if (i915.enable_guc_submission < 0)
 		i915.enable_guc_submission = HAS_GUC_SCHED(dev);
 
+	}
 	if (!HAS_GUC_UCODE(dev)) {
 		fw_path = NULL;
 	} else if (IS_SKYLAKE(dev)) {
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: warning for drm/i915/guc: Sanitory checks for platform that dont have GuC (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915/guc: Sanitory checks for platform that dont have GuC (rev2)
URL : https://patchwork.freedesktop.org/series/13358/
State : warning

== Summary ==

Series 13358v2 drm/i915/guc: Sanitory checks for platform that dont have GuC
https://patchwork.freedesktop.org/api/1.0/series/13358/revisions/2/mbox/

Test kms_pipe_crc_basic:

        Subgroup bad-nb-words-3:
                pass       -> DMESG-WARN (fi-ilk-650)
fi-bdw-5557u     total:248  pass:231  dwarn:0   dfail:0   fail:0   skip:17 
fi-bsw-n3050     total:248  pass:204  dwarn:0   dfail:0   fail:0   skip:44 
fi-bxt-t5700     total:248  pass:217  dwarn:0   dfail:0   fail:0   skip:31 
fi-byt-j1900     total:248  pass:214  dwarn:1   dfail:0   fail:1   skip:32 
fi-hsw-4770      total:248  pass:224  dwarn:0   dfail:0   fail:0   skip:24 
fi-hsw-4770r     total:248  pass:224  dwarn:0   dfail:0   fail:0   skip:24 
fi-ilk-650       total:248  pass:184  dwarn:1   dfail:0   fail:2   skip:61 
fi-ivb-3520m     total:248  pass:221  dwarn:0   dfail:0   fail:0   skip:27 
fi-ivb-3770      total:248  pass:207  dwarn:0   dfail:0   fail:0   skip:41 
fi-kbl-7200u     total:248  pass:222  dwarn:0   dfail:0   fail:0   skip:26 
fi-skl-6260u     total:248  pass:232  dwarn:0   dfail:0   fail:0   skip:16 
fi-skl-6700hq    total:248  pass:224  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6700k     total:248  pass:221  dwarn:1   dfail:0   fail:0   skip:26 
fi-skl-6770hq    total:248  pass:231  dwarn:1   dfail:0   fail:1   skip:15 
fi-snb-2520m     total:248  pass:211  dwarn:0   dfail:0   fail:0   skip:37 
fi-snb-2600      total:248  pass:209  dwarn:0   dfail:0   fail:0   skip:39 

Results at /archive/results/CI_IGT_test/Patchwork_2668/

e37a15c8d775e79dddc8345a0f6afdcfe1f607d9 drm-intel-nightly: 2016y-10m-10d-14h-33m-29s UTC integration manifest 79c7ff7 drm/i915/guc: Sanitory checks for platform that dont have GuC

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915/guc: Sanitory checks for platform that dont have GuC (rev2)

Quoted 11 lines

== Summary ==

Series 13358v2 drm/i915/guc: Sanitory checks for platform that dont have GuC
https://patchwork.freedesktop.org/api/1.0/series/13358/revisions/2/mbox/

Test kms_pipe_crc_basic:

        Subgroup bad-nb-words-3:
                pass       -> DMESG-WARN (fi-ilk-650)

Stdout
IGT-Version: 1.16-g48a9e1e (x86_64) (Linux: 4.8.0-CI-Patchwork_2668+ x86_64) Subtest bad-nb-words-3: SUCCESS (0.000s)

Stderr

Environment
PIGLIT_SOURCE_DIR="/opt/igt/piglit" PIGLIT_PLATFORM="mixed_glx_egl"

Command /opt/igt/tests/kms_pipe_crc_basic --run-subtest bad-nb-words-3

dmesg

[  401.433161] [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder B FIFO underrun
[  401.433188] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Quoted 1 line

fi-ilk-650 total:248 pass:184 dwarn:1 dfail:0 fail:2 skip:61

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#3 lore raw
In reply to Anusha Srivatsa
Quoted 9 lines · Anusha Srivatsa

i915.enable_guc_loading/submission=2 forces the usage of GuC. For platforms that do not have a GuC, asking the kernel to use a GuC should not result in an error state. Do extra checks to see if the platform even has a GuC or not, regardless of the kernel parameter.

Based on Rodriogo's <[email protected]> patch. Have considered Paulo Zanoni's<[email protected]> suggestions on the implementation.

There's a bug for this, please find it and reference it.

Quoted 16 lines

take on the implemenation.

---
 drivers/gpu/drm/i915/intel_guc_loader.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_guc_loader.c +1 -0
index 7ace96b..98718db 100644
@@ -718,12 +718,17 @@ void intel_guc_init(struct drm_device *dev)
 	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
 	const char *fw_path;
 
+	if (!HAS_GUC(dev)) {

drivers/gpu/drm/i915/intel_guc_loader.c void intel_guc_init(struct drm_device *dev) · line 731

Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_loader.c +4 -0
+		i915.enable_guc_loading = 0;
+		i915.enable_guc_submission = 0;
+        } else {
 	/* A negative value means "use platform default" */
 	if (i915.enable_guc_loading < 0)
 		i915.enable_guc_loading = HAS_GUC_UCODE(dev);
 	if (i915.enable_guc_submission < 0)
 		i915.enable_guc_submission = HAS_GUC_SCHED(dev);
 
+	}

Indentation?

BR,
Jani.

Quoted 3 lines
drivers/gpu/drm/i915/intel_guc_loader.c +0 -0
 	if (!HAS_GUC_UCODE(dev)) {
 		fw_path = NULL;
 	} else if (IS_SKYLAKE(dev)) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Em Ter, 2016-10-11 às 10:36 +0300, Jani Nikula escreveu:

Quoted 9 lines
Quoted 7 lines · Anusha Srivatsa

i915.enable_guc_loading/submission=2 forces the usage of GuC. For platforms that do not have a GuC, asking the kernel to use a GuC should not result in an error state. Do extra checks to see if the platform even has a GuC or not, regardless of the kernel parameter.

Quoted 3 lines
Quoted 3 lines

Based on Rodriogo's <[email protected]> patch. Have considered Paulo Zanoni's<[email protected]> suggestions on the implementation.

The correct way to give credit to reviewers is by adding a patch version changelog, and later including any reviewed-by tags that the reviewer may give. No need for a sentence like the one above. Just take a small look at the git log and see how people do the changelogs. Yours would be something like:

v2: change indentation, add back blank lines (Paulo)

(but I do have to add that the way you changed it was not the way I had in mind, please see below)

Quoted 23 lines

There's a bug for this, please find it and reference it.

Quoted 20 lines

take on the implemenation.

---
 drivers/gpu/drm/i915/intel_guc_loader.c | 5 +++++

 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_guc_loader.c +0 -0
index 7ace96b..98718db 100644
@@ -718,12 +718,17 @@ void intel_guc_init(struct drm_device *dev)
  	struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
  	const char *fw_path;

drivers/gpu/drm/i915/intel_guc_loader.c +3 -0
+	if (!HAS_GUC(dev)) {
+		i915.enable_guc_loading = 0;
+		i915.enable_guc_submission = 0;
Quoted 8 lines

drivers/gpu/drm/i915/intel_guc_loader.c void intel_guc_init(struct drm_device *dev) · line 731

Quoted 8 lines

+        } else {
  /* A negative value means "use platform default" */ if (i915.enable_guc_loading < 0) i915.enable_guc_loading = HAS_GUC_UCODE(dev); if (i915.enable_guc_submission < 0) i915.enable_guc_submission = HAS_GUC_SCHED(dev);

drivers/gpu/drm/i915/intel_guc_loader.c +1 -0
+	}

The blank line is usually inserted _after_ the line containing the closing bracket char. Please see the many examples in the rest of our code.

Quoted 2 lines

Indentation?

I had already complained about indentation before. It's different now, but it's still not exactly what I was expecting... The idea was indeed to align the comment indentation with the rest of the "else" case, but not the way it was done here. Please see the many examples in the rest of our code.......

Quoted 9 lines

BR,
Jani.

Quoted 4 lines

  if (!HAS_GUC_UCODE(dev)) {
  fw_path = NULL;
  } else if (IS_SKYLAKE(dev)) {

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx