Skip to contentSkip to conversation

drm/i915: Make intel_detect_preproduction_hw easier to extend

PATCH In review Chris Wilson 4 participants 11 messages Jan 30, 2017 – Jan 31, 2017

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

PATCH v2 1/3 drm/i915: Make intel_detect_preproduction_hw easier to extend

As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations.

v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +6 -2
index 008fc1e62a69..b55ad5199967 100644
@@ -782,8 +782,12 @@ static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv)
  */
 static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 {
-	if (IS_HSW_EARLY_SDV(dev_priv) ||
-	    IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0))
+	bool pre = false;
+
+	pre |= IS_HSW_EARLY_SDV(dev_priv);
+	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);
+
+	if (pre)
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
 }
Signature · 6 lines
2.11.0

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

PATCH v2 2/3 drm/i915: Mark the kernel as tainted if we fail the preproduction check

Preproduction sdv are not supported beyond the release of production hardware, and continued use is ill-advised. Mark the kernel as tainted to reinforce the error.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
index b55ad5199967..5ae5b190241c 100644
@@ -787,9 +787,11 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 	pre |= IS_HSW_EARLY_SDV(dev_priv);
 	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);
 
-	if (pre)
+	if (pre) {
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
+		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
+	}
 }
 
 /**
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] drm/i915: Mark the kernel as tainted if we fail the preproduction check

Quoted 10 lines · Chris Wilson

Preproduction sdv are not supported beyond the release of production hardware, and continued use is ill-advised. Mark the kernel as tainted to reinforce the error.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>

Correct use of taint flags. I think CPU_OUT_OF_SPEC could be more correct flag, though?

Regards, Joonas

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH v2 2/3] drm/i915: Mark the kernel as tainted if we fail the preproduction check

Quoted 12 lines · Joonas Lahtinen
Quoted 10 lines · Chris Wilson

Preproduction sdv are not supported beyond the release of production hardware, and continued use is ill-advised. Mark the kernel as tainted to reinforce the error.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>
Quoted 2 lines

Correct use of taint flags. I think CPU_OUT_OF_SPEC could be more correct flag, though?

No idea. I figure that our usage will be spotted one day and we will be told which one to use, maybe even a new taint.

On x86 CPU_OUT_OF_SPEC is used if the user forces pae, sounds reasonable but I wanted not to imply that this was a CPU issue itself, but relates to out-of-spec GPU. MCE was broader and can be triggered by other components failing.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH v2 3/3 drm/i915: Add early BXT sdv to the list of preproduction machines

In reply to Chris Wilson

Extend intel_detect_preproduction_hw() to include BXT A and B steppings.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_drv.c +1 -0
index 5ae5b190241c..ac10e2f98f72 100644
@@ -786,6 +786,7 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 
 	pre |= IS_HSW_EARLY_SDV(dev_priv);
 	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);
+	pre |= IS_BXT_REVID(dev_priv, 0, BXT_REVID_B_LAST);
 
 	if (pre) {
 		DRM_ERROR("This is a pre-production stepping. "
Signature · 6 lines
2.11.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v2 3/3
#5 lore raw

Re: [PATCH v2 3/3] drm/i915: Add early BXT sdv to the list of preproduction machines

Quoted 7 lines · Chris Wilson

Extend intel_detect_preproduction_hw() to include BXT A and B steppings.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>

Regards, Joonas

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v2 1/3
#6 lore raw
In reply to Chris Wilson
Quoted 14 lines · Chris Wilson

As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations.

v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>

<SNIP>

drivers/gpu/drm/i915/i915_drv.c static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv) · line 788

Quoted 8 lines

 static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) {

drivers/gpu/drm/i915/i915_drv.c +4 -2
-	if (IS_HSW_EARLY_SDV(dev_priv) ||
-	    IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0))
+	bool pre = false;
+
+	pre |= IS_HSW_EARLY_SDV(dev_priv);
+	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);

Did you compare the asm with "pre = pre || ..."?

Regards, Joonas

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Acked-by
#7 lore raw
Quoted 18 lines · Joonas Lahtinen
Quoted 14 lines · Chris Wilson

As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations.

v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>

<SNIP>

Quoted 10 lines

drivers/gpu/drm/i915/i915_drv.c static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv) · line 788

Quoted 8 lines

 static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) {

drivers/gpu/drm/i915/i915_drv.c +4 -2
-	if (IS_HSW_EARLY_SDV(dev_priv) ||
-	    IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0))
+	bool pre = false;
+
+	pre |= IS_HSW_EARLY_SDV(dev_priv);
+	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);

Did you compare the asm with "pre = pre || ..."?

Yeah, this definitely needs to be optimized. :p

on the series.

Quoted 4 lines

Regards, Joonas

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw
Quoted 30 lines · Jani Nikula
Quoted 18 lines · Joonas Lahtinen
Quoted 14 lines · Chris Wilson

As we add new generations, we should keep detecting new pre-production system development platforms that were temporarily enabled to facilitate initial development and now superseded by production systems. To make it easier to add more platforms, split the if into a series of logical operations.

v2: s/sdv/pre/ - not all system development vehicles are for preproduction usage.

Cc "Zanoni, Paulo R" <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Ville Syrjälä <[email protected]>

<SNIP>

Quoted 10 lines

drivers/gpu/drm/i915/i915_drv.c static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv) · line 788

Quoted 8 lines

 static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv) {

drivers/gpu/drm/i915/i915_drv.c +4 -2
-	if (IS_HSW_EARLY_SDV(dev_priv) ||
-	    IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0))
+	bool pre = false;
+
+	pre |= IS_HSW_EARLY_SDV(dev_priv);
+	pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);

Did you compare the asm with "pre = pre || ..."?

Quoted 1 line

Yeah, this definitely needs to be optimized. :p

Thank goodness it makes no difference!
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Make intel_detect_preproduction_hw easier to extend

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/3] drm/i915: Make intel_detect_preproduction_hw easier to extend
URL : https://patchwork.freedesktop.org/series/18758/
State : success

== Summary ==

Series 18758v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/18758/revisions/1/mbox/

fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:78   pass:65   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:221  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

e1cc28133f0474a85da1fc4017686c701b564312 drm-tip: 2017y-01m-30d-15h-50m-59s UTC integration manifest 9d64070 drm/i915: Add early BXT sdv to the list of preproduction machines
a8e683a drm/i915: Mark the kernel as tainted if we fail the preproduction check e84a3d0 drm/i915: Make intel_detect_preproduction_hw easier to extend

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3641/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author Applied
#10 lore raw

Re: ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Make intel_detect_preproduction_hw easier to extend

Quoted 12 lines · Patchwork

== Series Details ==

Series: series starting with [v2,1/3] drm/i915: Make intel_detect_preproduction_hw easier to extend
URL : https://patchwork.freedesktop.org/series/18758/
State : success

== Summary ==

Series 18758v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/18758/revisions/1/mbox/

Quoted 16 lines
fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:78   pass:65   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:221  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

Applied in spite of some late background noise about bxt-a0 support, a bit late now.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx