Skip to contentSkip to conversation

drm/i915: Fix and clean BDW PCH identification

PATCH In review Rodrigo Vivi 5 participants 9 messages Jan 20, 2015 – Jan 22, 2015

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: Fix and clean BDW PCH identification

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -7
index 308774f..1d14311 100644
@@ -462,14 +462,9 @@ void intel_detect_pch(struct drm_device *dev)
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
 				WARN_ON(IS_HSW_ULT(dev));
-			} else if (IS_BROADWELL(dev)) {
-				dev_priv->pch_type = PCH_LPT;
-				dev_priv->pch_id =
-					INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
-				DRM_DEBUG_KMS("This is Broadwell, assuming "
-					      "LynxPoint LP PCH\n");
+				WARN_ON(IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#1 lore raw

Task id: 5616 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -2 353/353 351/353

ILK                                  200/200              200/200
SNB                                  400/422              400/422
IVB                                  487/487              487/487
BYT                                  296/296              296/296
HSW                                  508/508              508/508
BDW                                  401/402              401/402

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*PNV igt_gen3_render_linear_blits PASS(2, M25M23) NRUN(1, M23)
*PNV igt_gen3_render_mixed_blits PASS(2, M25M23) CRASH(1, M23)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Rodrigo Vivi
Quoted 28 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -1
index 308774f..1d14311 100644
@@ -462,14 +462,9 @@ void intel_detect_pch(struct drm_device *dev)
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
 				WARN_ON(IS_HSW_ULT(dev));

drivers/gpu/drm/i915/i915_drv.c void intel_detect_pch(struct drm_device *dev) · line 470

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +1 -6
-			} else if (IS_BROADWELL(dev)) {
-				dev_priv->pch_type = PCH_LPT;
-				dev_priv->pch_id =
-					INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
-				DRM_DEBUG_KMS("This is Broadwell, assuming "
-					      "LynxPoint LP PCH\n");
+				WARN_ON(IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");

This will now produce a warn with the BDW ULT & LPT LP combo.

BR,
Jani.

Quoted 3 lines
Signature · 1 line
2.1.0
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 33 lines · Jani Nikula
Quoted 32 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -5
index 308774f..1d14311 100644
@@ -462,14 +462,9 @@ void intel_detect_pch(struct drm_device *dev)
                      } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
                              dev_priv->pch_type = PCH_LPT;
                              DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-                             WARN_ON(!IS_HASWELL(dev));
+                             WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
                              WARN_ON(IS_HSW_ULT(dev));
-                     } else if (IS_BROADWELL(dev)) {
-                             dev_priv->pch_type = PCH_LPT;
-                             dev_priv->pch_id =
-                                     INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
Quoted 8 lines

drivers/gpu/drm/i915/i915_drv.c void intel_detect_pch(struct drm_device *dev) · line 470

Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.c +1 -2
-                             DRM_DEBUG_KMS("This is Broadwell, assuming "
-                                           "LynxPoint LP PCH\n");
+                             WARN_ON(IS_BDW_ULT(dev));
                      } else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
                              dev_priv->pch_type = PCH_LPT;
                              DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");

This will now produce a warn with the BDW ULT & LPT LP combo.

No it wont. The LPT_LP identification is on the following block while the WARN is on LPT (non LP) block.

Quoted 14 lines

BR,
Jani.

Quoted 3 lines

--
2.1.0

--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 43 lines · Rodrigo Vivi
Quoted 33 lines · Jani Nikula
Quoted 32 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -5
index 308774f..1d14311 100644
@@ -462,14 +462,9 @@ void intel_detect_pch(struct drm_device *dev)
                      } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
                              dev_priv->pch_type = PCH_LPT;
                              DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-                             WARN_ON(!IS_HASWELL(dev));
+                             WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
                              WARN_ON(IS_HSW_ULT(dev));
-                     } else if (IS_BROADWELL(dev)) {
-                             dev_priv->pch_type = PCH_LPT;
-                             dev_priv->pch_id =
-                                     INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
Quoted 8 lines

drivers/gpu/drm/i915/i915_drv.c void intel_detect_pch(struct drm_device *dev) · line 470

Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.c +1 -2
-                             DRM_DEBUG_KMS("This is Broadwell, assuming "
-                                           "LynxPoint LP PCH\n");
+                             WARN_ON(IS_BDW_ULT(dev));
                      } else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
                              dev_priv->pch_type = PCH_LPT;
                              DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");

This will now produce a warn with the BDW ULT & LPT LP combo.

Quoted 2 lines

No it wont. The LPT_LP identification is on the following block while the WARN is on LPT (non LP) block.

I meant that the LPT LP block has

				WARN_ON(!IS_HASWELL(dev));
				WARN_ON(!IS_HSW_ULT(dev));

which will now warn on BDW.

BR,
Jani.

Quoted 21 lines
Quoted 15 lines

BR,
Jani.

Quoted 3 lines

--
2.1.0

--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 2 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#5 lore raw

PATCH 1/1 drm/i915: Fix and clean BDW PCH identification

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

v2: Fix LPT_LP WARNs to avoid wrong warns on BDW_ULT (By Jani).

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -10
index 6484229..66c72bd 100644
@@ -462,19 +462,13 @@ void intel_detect_pch(struct drm_device *dev)
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(IS_HSW_ULT(dev));
-			} else if (IS_BROADWELL(dev)) {
-				dev_priv->pch_type = PCH_LPT;
-				dev_priv->pch_id =
-					INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
-				DRM_DEBUG_KMS("This is Broadwell, assuming "
-					      "LynxPoint LP PCH\n");
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(IS_HSW_ULT(dev) || IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(!IS_HSW_ULT(dev));
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(!IS_HSW_ULT(dev) && !IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_SPT;
 				DRM_DEBUG_KMS("Found SunrisePoint PCH\n");
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#6 lore raw
Quoted 7 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Quoted 8 lines

v2: Fix LPT_LP WARNs to avoid wrong warns on BDW_ULT (By Jani).

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>

With the caveat that I have no idea how common the early pre-release Broadwells that do *not* have proper pch identification are,

Quoted 35 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -10
index 6484229..66c72bd 100644
@@ -462,19 +462,13 @@ void intel_detect_pch(struct drm_device *dev)
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(IS_HSW_ULT(dev));
-			} else if (IS_BROADWELL(dev)) {
-				dev_priv->pch_type = PCH_LPT;
-				dev_priv->pch_id =
-					INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
-				DRM_DEBUG_KMS("This is Broadwell, assuming "
-					      "LynxPoint LP PCH\n");
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(IS_HSW_ULT(dev) || IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(!IS_HSW_ULT(dev));
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(!IS_HSW_ULT(dev) && !IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_SPT;
 				DRM_DEBUG_KMS("Found SunrisePoint PCH\n");
Signature · 1 line
2.1.0
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
Quoted 12 lines · Jani Nikula
Quoted 11 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

v2: Fix LPT_LP WARNs to avoid wrong warns on BDW_ULT (By Jani).

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Quoted 7 lines
Quoted 4 lines
Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>

With the caveat that I have no idea how common the early pre-release Broadwells that do *not* have proper pch identification are,

Generally we throw out all preproduction hacks once production machines are widely available. Which is the case now for bdw, so imo no concern. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Applied
#8 lore raw
In reply to Rodrigo Vivi
Quoted 7 lines · Rodrigo Vivi

It seems in the past we have BDW with PCH not been propperly identified and we force it to be LPT and we were warning !IS_HASWELL on propper identification.

Now that products are out there we are receiveing logs with this incorrect WARN. And also according to local tests on all production BDW here ULT or HALO we don't need this force anymore. So let's clean this block for real.

Quoted 8 lines

v2: Fix LPT_LP WARNs to avoid wrong warns on BDW_ULT (By Jani).

Reference: https://bugs.freedesktop.org/attachment.cgi?id=110972

Cc Jani Nikula <[email protected]>
Cc Paulo Zanoni <[email protected]>
Cc Xion Zhang <[email protected]>

Pushed to drm-intel-fixes with cc: stable, thanks for the patch.

BR,
Jani.

Quoted 35 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -10
index 6484229..66c72bd 100644
@@ -462,19 +462,13 @@ void intel_detect_pch(struct drm_device *dev)
 			} else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(IS_HSW_ULT(dev));
-			} else if (IS_BROADWELL(dev)) {
-				dev_priv->pch_type = PCH_LPT;
-				dev_priv->pch_id =
-					INTEL_PCH_LPT_LP_DEVICE_ID_TYPE;
-				DRM_DEBUG_KMS("This is Broadwell, assuming "
-					      "LynxPoint LP PCH\n");
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(IS_HSW_ULT(dev) || IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_LPT;
 				DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
-				WARN_ON(!IS_HASWELL(dev));
-				WARN_ON(!IS_HSW_ULT(dev));
+				WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev));
+				WARN_ON(!IS_HSW_ULT(dev) && !IS_BDW_ULT(dev));
 			} else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) {
 				dev_priv->pch_type = PCH_SPT;
 				DRM_DEBUG_KMS("Found SunrisePoint PCH\n");
Signature · 1 line
2.1.0
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx