drm/i915: PCH detection cleanup
Subsystems (2)
cover drm/i915: PCH detection cleanup
From: Ville Syrjälä <[email protected]>
During the recent discusison on the PCH detection details it was suggested that we should just always use the top 9 bits of the ISA/LPC bridge device ID to detect the PCH type. Currently we use either 8 or 9 bits depending on the PCH type.
Series available here:git://github.com/vsyrjala/linux.git pch_id_9bits
Ville Syrjälä (5):
drm/i915: Use HAS_PCH_CPT() everywhere
drm/i915: s/Couar/Cougar/
drm/i915: Document that PPT==CPT and WPT==LPT drm/i915: Clean up some expressions
drm/i915: Always use 9 bits of the LPC bridge device ID for PCH
detection
drivers/gpu/drm/i915/i915_drv.c | 51 ++++++++++++++++++-------------- drivers/gpu/drm/i915/i915_drv.h | 19 +++++++----- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 4 files changed, 41 insertions(+), 33 deletions(-)
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/5 drm/i915: Use HAS_PCH_CPT() everywhere
From: Ville Syrjälä <[email protected]>
We have a few cases comparing pch_type directly. Let's just replace them with HAS_PCH_CPT() since CPT/PPT is what they're looking for.
--- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_device_info.c +1 -1
@@ -363,7 +363,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)*/ if (fuse_strap &ILK_INTERNAL_DISPLAY_DISABLE || sfuse_strap &SFUSE_STRAP_DISPLAY_DISABLED || - (dev_priv->pch_type ==PCH_CPT && + (HAS_PCH_CPT (dev_priv) && !(sfuse_strap &SFUSE_STRAP_FUSE_LOCK ))) {DRM_INFO ("Display fused off, disabling\n" ); info->num_pipes =0 ;
drivers/gpu/drm/i915/intel_sdvo.c +1 -1
@@ -1343,7 +1343,7 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder, sdvox |= (9 <<19 ) |SDVO_BORDER_ENABLE ; } -if (INTEL_PCH_TYPE (dev_priv) >=PCH_CPT ) +if (HAS_PCH_CPT (dev_priv)) sdvox |=SDVO_PIPE_SEL_CPT (crtc->pipe);else sdvox |=SDVO_PIPE_SEL (crtc->pipe);
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/5 drm/i915: s/Couar/Cougar/
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Fix a typo in the PCH type debug message.
--- drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +1 -1
@@ -132,7 +132,7 @@ static enum intel_pch intel_virt_detect_pch(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Assuming Ibex Peak PCH\n" ); }else if (IS_GEN6 (dev_priv) ||IS_IVYBRIDGE (dev_priv)) { ret =PCH_CPT ; -DRM_DEBUG_KMS ("Assuming CouarPoint PCH\n" ); +DRM_DEBUG_KMS ("Assuming CougarPoint PCH\n" ); }else if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv)) { ret =PCH_LPT ;DRM_DEBUG_KMS ("Assuming LynxPoint PCH\n" );
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/5 drm/i915: Document that PPT==CPT and WPT==LPT
In reply to [email protected]From: Ville Syrjälä <[email protected]>
For our purposes PPT is equivalent to CPT, and WPT is equivalent to LPT. Document that fact.
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -2
@@ -1149,8 +1149,8 @@ struct i915_psr {enum intel_pch {PCH_NONE =0 ,/* No PCH present */ PCH_IBX ,/* Ibexpeak PCH */ -PCH_CPT ,/* Cougarpoint PCH */ -PCH_LPT ,/* Lynxpoint PCH */ +PCH_CPT ,/* Cougarpoint/Pantherpoint PCH */ +PCH_LPT ,/* Lynxpoint/Wildcatpoint PCH */ PCH_SPT ,/* Sunrisepoint PCH */ PCH_KBP ,/* Kabypoint PCH */ PCH_CNP ,/* Cannonpoint PCH */
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/5 drm/i915: Clean up some expressions
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Write the '!(SNB||IVB)' checks in the CPT/PPT detections as '!SNB && !IVB' to make it less messy looking, and clear out some useless parens the from the virtualization PCH detection case.
--- drivers/gpu/drm/i915/i915_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +7 -7
@@ -185,15 +185,15 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" ); -WARN_ON (!(IS_GEN6 (dev_priv) || -IS_IVYBRIDGE (dev_priv))); +WARN_ON (!IS_GEN6 (dev_priv) && + !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" ); -WARN_ON (!(IS_GEN6 (dev_priv) || -IS_IVYBRIDGE (dev_priv))); +WARN_ON (!IS_GEN6 (dev_priv) && + !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;
@@ -240,9 +240,9 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) || - (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) || - ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) && + } else if (id == INTEL_PCH_P2X_DEVICE_ID_TYPE || + id == INTEL_PCH_P3X_DEVICE_ID_TYPE || + (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE && pch->subsystem_vendor == PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device ==
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/5] drm/i915: Clean up some expressions
Quoted 7 lines · On Tue, 20 Jun 2017, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Write the '!(SNB||IVB)' checks in the CPT/PPT detections as '!SNB && !IVB' to make it less messy looking, and clear out some useless parens the from the virtualization PCH detection case.
Signed-off-by Ville Syrjälä <[email protected]>
Patches 1-4
Quoted 41 lines
--- drivers/gpu/drm/i915/i915_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_drv.c +7
-7@@ -185,15 +185,15 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" ); -WARN_ON (!(IS_GEN6 (dev_priv) || -IS_IVYBRIDGE (dev_priv))); +WARN_ON (!IS_GEN6 (dev_priv) && + !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" ); -WARN_ON (!(IS_GEN6 (dev_priv) || -IS_IVYBRIDGE (dev_priv))); +WARN_ON (!IS_GEN6 (dev_priv) && + !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;@@ -240,9 +240,9 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) || - (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) || - ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) && + } else if (id == INTEL_PCH_P2X_DEVICE_ID_TYPE || + id == INTEL_PCH_P3X_DEVICE_ID_TYPE || + (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE && pch->subsystem_vendor == PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device ==
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/5 drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
The CNP ID I guessed based on the KBP + CNP LP IDs. But someone else should really verify this.
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is 0x2918 which is fine with 9 bits.
--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +20 -15
@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&
@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&
@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } else
drivers/gpu/drm/i915/i915_drv.h +9 -6
@@ -2996,17 +2996,18 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 -#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280 +#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA380#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100#define INTEL_PCH_P3X_DEVICE_ID_TYPE 0x7000
@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/5] drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
Quoted 6 lines · On Tue, 20 Jun 2017, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
Seems to me this fixes a (theoretical?) bug with KBP matching some Lewisburg parts (a2xx).
Quoted 2 lines
The CNP ID I guessed based on the KBP + CNP LP IDs. But someone else should really verify this.
Sorry, couldn't find definite info on this.
Quoted 4 lines
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is
0x2918which is fine with 9 bits.
Nor this. This starts ignoring some 71xx device ids, but I'm guessing they're not relevant.
Not as strong confidence as I'd like, but
PS. I thought about switching this to array based matching. It could define the mask for each id to be matched, so you could e.g. add qemu as 0x2918. And you could have the debug strings there too. But I couldn't think of a neat way to do the platform/pch cross checks (callbacks don't count as neat). So I guess this is good enough for now.
Quoted 12 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 21 deletions(-)drivers/gpu/drm/i915/i915_drv.c +0
-0
drivers/gpu/drm/i915/i915_drv.c static void intel_detect_pch(struct drm_i915_private *dev_priv) · line 174
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {
Someone should switch this to "if (vendor != intel) continue" when the dust has settled, and free up some horizontal screen real estate.
Quoted 136 lines
drivers/gpu/drm/i915/i915_drv.c +20
-15unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } elsedrivers/gpu/drm/i915/i915_drv.h +9
-6@@ -2996,17 +2996,18 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 -#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280 +#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA380#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100#define INTEL_PCH_P3X_DEVICE_ID_TYPE 0x7000@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/5] drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
Quoted 10 lines · Jani Nikula
Quoted 6 lines · On Tue, 20 Jun 2017, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
Seems to me this fixes a (theoretical?) bug with KBP matching some Lewisburg parts (a2xx).
I presume those things wouldn't have a GPU anyway, so can't happen I suppose.
Quoted 6 lines
Quoted 3 lines
The CNP ID I guessed based on the KBP + CNP LP IDs. But someone else should really verify this.
Sorry, couldn't find definite info on this.
Quoted 7 lines
Quoted 4 lines
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is
0x2918which is fine with 9 bits.Nor this. This starts ignoring some 71xx device ids, but I'm guessing they're not relevant.
The 440MX I guess. Not sure why any virtual machine would present the mobile variant rather than the desktop 440BX. So I wouldn't worry about it, and if it turns out that I'm wrong we can always add the extra ID.
Quoted 11 lines
Not as strong confidence as I'd like, but
Reviewed-by Jani Nikula <[email protected]>PS. I thought about switching this to array based matching. It could define the mask for each id to be matched, so you could e.g. add qemu as
0x2918. And you could have the debug strings there too. But I couldn't think of a neat way to do the platform/pch cross checks (callbacks don't count as neat). So I guess this is good enough for now.
My brain went through the same exercise, and came up with the same result unfortunately.
Quoted 159 lines
Quoted 14 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 21 deletions(-)drivers/gpu/drm/i915/i915_drv.c +0
-0drivers/gpu/drm/i915/i915_drv.c static void intel_detect_pch(struct drm_i915_private *dev_priv) · line 174
Quoted 2 lines
drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {Someone should switch this to "if (vendor != intel) continue" when the dust has settled, and free up some horizontal screen real estate.
Quoted 136 lines
drivers/gpu/drm/i915/i915_drv.c +20
-15unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } elsedrivers/gpu/drm/i915/i915_drv.h +9
-6@@ -2996,17 +2996,18 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 -#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280 +#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA380#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100#define INTEL_PCH_P3X_DEVICE_ID_TYPE 0x7000@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/5] drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
In reply to [email protected]Quoted 6 lines · On Tue, 2017-06-20 at 16:03 +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
I had a similar patch written but dropped it because I could not ascertain the nature of support for WPT and the full Dev ID's for P2X and P3X. Still cannot verify if the changes for P2X and P3X are correct, but thanks for doing this.
Curious if LPC is the same as ISA, which iirc the code refers to.
Quoted 4 lines
The CNP ID I guessed based on the KBP + CNP LP IDs. But someone else should really verify this.
The previous version was correct.
the CNP change reverted.
Quoted 127 lines
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is
0x2918which is fine with 9 bits.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 21 deletions(-)drivers/gpu/drm/i915/i915_drv.c +20
-15@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } elsedrivers/gpu/drm/i915/i915_drv.h +1
-2@@ -2996,17 +2996,18 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00
drivers/gpu/drm/i915/i915_drv.h intel_info(const struct drm_i915_private *dev_priv) · line 3010
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-2#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 -#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280 +#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA380
0xA300
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +0
-0#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100#define INTEL_PCH_P3X_DEVICE_ID_TYPE 0x7000@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \
drivers/gpu/drm/i915/i915_drv.h intel_info(const struct drm_i915_private *dev_priv) · line 3031
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-2- ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/5] drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
Quoted 11 lines · Dhinakaran
Quoted 6 lines · On Tue, 2017-06-20 at 16:03 +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
Quoted 6 lines
I had a similar patch written but dropped it because I could not ascertain the nature of support for WPT and the full Dev ID's for P2X and P3X. Still cannot verify if the changes for P2X and P3X are correct, but thanks for doing this.
Curious if LPC is the same as ISA, which iirc the code refers to.
LPC is the stripped down to the bone remnants of ISA.
Quoted 8 lines
Quoted 6 lines
The CNP ID I guessed based on the KBP + CNP LP IDs. But someone else should really verify this.
The previous version was correct.
Dang. Apparently my crystal ball wasn't quite good enough.
Quoted 162 lines
Reviewed-by Dhinakaran Pandiyan <[email protected]> withthe CNP change reverted.
Quoted 127 lines
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is
0x2918which is fine with 9 bits.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++------ 2 files changed, 29 insertions(+), 21 deletions(-)drivers/gpu/drm/i915/i915_drv.c +20
-15@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } elsedrivers/gpu/drm/i915/i915_drv.h +1
-2@@ -2996,17 +2996,18 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00drivers/gpu/drm/i915/i915_drv.h intel_info(const struct drm_i915_private *dev_priv) · line 3010
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-2#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 -#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280 +#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA380
0xA300Quoted 17 lines
drivers/gpu/drm/i915/i915_drv.h +4
-2#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100#define INTEL_PCH_P3X_DEVICE_ID_TYPE 0x7000@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 5/5 drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Make the code less confusiong by always using the top 9 bits of the LPC bridge device ID to detect the PCH type. We need to add a bit of new code for WPT, and we need to adjust the KBP ID as well. All the other pre-CNP IDs are fine as is.
The virtualization cases I think are fine. These P2X and P3X IDs actually just look like the old PIIX4 and PIIX3 IDs to me. Not sure why they're not called PIIX3/4 though. The qemu one has a comment saying the full ID is 0x2918 which is fine with 9 bits.
v2: Keep the CNP ID as 0xa300 (DK)
--- drivers/gpu/drm/i915/i915_drv.c | 35 ++++++++++++++++++++--------------- drivers/gpu/drm/i915/i915_drv.h | 13 ++++++++----- 2 files changed, 28 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +20 -15
@@ -173,29 +173,25 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)while ((pch =pci_get_class (PCI_CLASS_BRIDGE_ISA <<8 , pch))) {if (pch->vendor ==PCI_VENDOR_ID_INTEL ) {unsigned short id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -unsigned short id_ext = pch->device & -INTEL_PCH_DEVICE_ID_MASK_EXT ; + + dev_priv->pch_id = id;if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_IBX ;DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" );WARN_ON (!IS_GEN5 (dev_priv)); }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {/* PantherPoint is CPT compatible */ - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found PantherPoint PCH\n" );WARN_ON (!IS_GEN6 (dev_priv) && !IS_IVYBRIDGE (dev_priv)); }else if (id ==INTEL_PCH_LPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint PCH\n" ); WARN_ON(!IS_HASWELL(dev_priv) &&
@@ -203,39 +199,49 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)WARN_ON (IS_HSW_ULT (dev_priv) ||IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_LPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_LPT ;DRM_DEBUG_KMS ("Found LynxPoint LP PCH\n" );WARN_ON (!IS_HASWELL (dev_priv) && !IS_BROADWELL (dev_priv));WARN_ON (!IS_HSW_ULT (dev_priv) && !IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (IS_HSW_ULT (dev_priv) || +IS_BDW_ULT (dev_priv)); + }else if (id ==INTEL_PCH_WPT_LP_DEVICE_ID_TYPE ) { +/* WildcatPoint is LPT compatible */ + dev_priv->pch_type =PCH_LPT ; +DRM_DEBUG_KMS ("Found WildcatPoint LP PCH\n" ); +WARN_ON (!IS_HASWELL (dev_priv) && + !IS_BROADWELL (dev_priv)); +WARN_ON (!IS_HSW_ULT (dev_priv) && + !IS_BDW_ULT (dev_priv)); }else if (id ==INTEL_PCH_SPT_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_SPT_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_KBP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_KBP ;DRM_DEBUG_KMS ("Found KabyPoint PCH\n" );WARN_ON (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv)); }else if (id ==INTEL_PCH_CNP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id; dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint PCH\n" );WARN_ON (!IS_CANNONLAKE (dev_priv) && !IS_COFFEELAKE (dev_priv)); - }else if (id_ext ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { - dev_priv->pch_id = id_ext; + }else if (id ==INTEL_PCH_CNP_LP_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CNP ;DRM_DEBUG_KMS ("Found CannonPoint LP PCH\n" ); WARN_ON(!IS_CANNONLAKE(dev_priv) &&
@@ -247,7 +253,6 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv) PCI_SUBVENDOR_ID_REDHAT_QUMRANET && pch->subsystem_device == PCI_SUBDEVICE_ID_QEMU)) { - dev_priv->pch_id = id; dev_priv->pch_type =intel_virt_detect_pch (dev_priv); } else
drivers/gpu/drm/i915/i915_drv.h +8 -5
@@ -2996,16 +2996,17 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_POOLED_EU (dev_priv) ((dev_priv)->info.has_pooled_eu) -#define INTEL_PCH_DEVICE_ID_MASK 0xff00 -#define INTEL_PCH_DEVICE_ID_MASK_EXT 0xff80 +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00#define INTEL_PCH_LPT_DEVICE_ID_TYPE 0x8c00#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE 0x9c00 +#define INTEL_PCH_WPT_DEVICE_ID_TYPE 0x8c80 +#define INTEL_PCH_WPT_LP_DEVICE_ID_TYPE 0x9c80#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00 -#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA200 +#define INTEL_PCH_KBP_DEVICE_ID_TYPE 0xA280#define INTEL_PCH_CNP_DEVICE_ID_TYPE 0xA300#define INTEL_PCH_CNP_LP_DEVICE_ID_TYPE 0x9D80#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100
@@ -3020,9 +3021,11 @@ intel_info(const struct drm_i915_private *dev_priv)#define HAS_PCH_SPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_SPT)#define HAS_PCH_LPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_LPT)#define HAS_PCH_LPT_LP (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_LP_DEVICE_ID_TYPE)#define HAS_PCH_LPT_H (dev_priv) \ - ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE) + ((dev_priv)->pch_id == INTEL_PCH_LPT_DEVICE_ID_TYPE || \ + (dev_priv)->pch_id == INTEL_PCH_WPT_DEVICE_ID_TYPE)#define HAS_PCH_CPT (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_CPT)#define HAS_PCH_IBX (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_IBX)#define HAS_PCH_NOP (dev_priv) (INTEL_PCH_TYPE(dev_priv) == PCH_NOP)
Signature · 6 lines
2.13.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: PCH detection cleanup
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915: PCH detection cleanup
URL : https://patchwork.freedesktop.org/series/26046/
State : warning
== Summary ==
Series 26046v1 drm/i915: PCH detection cleanup
https://patchwork.freedesktop.org/api/1.0/series/26046/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-r) fdo#100125
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-j1900) fdo#101516
Test drv_module_reload:
Subgroup basic-reload:
pass -> DMESG-WARN (fi-skl-6700hq)fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#101516 https://bugs.freedesktop.org/show_bug.cgi?id=101516
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:448s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:427s fi-bsw-n3050 total:278 pass:241 dwarn:1 dfail:0 fail:0 skip:36 time:530s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:506s fi-byt-j1900 total:278 pass:252 dwarn:2 dfail:0 fail:0 skip:24 time:495s fi-byt-n2820 total:278 pass:248 dwarn:2 dfail:0 fail:0 skip:28 time:484s fi-glk-2a total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:589s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:434s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:415s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:423s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:494s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:469s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:469s fi-kbl-7560u total:278 pass:267 dwarn:1 dfail:0 fail:0 skip:10 time:569s fi-kbl-r total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:575s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:456s fi-skl-6700hq total:278 pass:220 dwarn:3 dfail:0 fail:30 skip:24 time:338s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:473s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:472s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:431s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:538s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:407s
3e0add868ae0aa06f3203e3862ea74ab94cab013 drm-tip: 2017y-06m-20d-11h-42m-47s UTC integration manifest 0ccd16a drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection 78ec2a2 drm/i915: Clean up some expressions
34ed642 drm/i915: Document that PPT==CPT and WPT==LPT
8cdafaf drm/i915: s/Couar/Cougar/
046ff25 drm/i915: Use HAS_PCH_CPT() everywhere
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4997/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: PCH detection cleanup (rev2)
In reply to [email protected]== Series Details ==
== Series Details ==
Series: drm/i915: PCH detection cleanup (rev2)
URL : https://patchwork.freedesktop.org/series/26046/
State : success
== Summary ==
Series 26046v2 drm/i915: PCH detection cleanup
https://patchwork.freedesktop.org/api/1.0/series/26046/revisions/2/mbox/
Test prime_busy:
Subgroup basic-wait-after-default:
pass -> DMESG-WARN (fi-skl-6700hq) fdo#101515 +1fdo#101515 https://bugs.freedesktop.org/show_bug.cgi?id=101515
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:437s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:437s fi-bsw-n3050 total:278 pass:241 dwarn:1 dfail:0 fail:0 skip:36 time:527s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:513s fi-byt-j1900 total:278 pass:252 dwarn:2 dfail:0 fail:0 skip:24 time:491s fi-byt-n2820 total:278 pass:248 dwarn:2 dfail:0 fail:0 skip:28 time:481s fi-glk-2a total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:587s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:434s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:409s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:416s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:493s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:475s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:466s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:570s fi-kbl-r total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 time:578s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:465s fi-skl-6700hq total:278 pass:220 dwarn:3 dfail:0 fail:30 skip:24 time:341s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:464s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:477s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:437s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:547s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:403s
0a9fd1712c87aac1b6065a58cb46582a6a117cee drm-tip: 2017y-06m-21d-15h-44m-13s UTC integration manifest d6a02ef drm/i915: Always use 9 bits of the LPC bridge device ID for PCH detection 3079363 drm/i915: Clean up some expressions
e0580ac drm/i915: Document that PPT==CPT and WPT==LPT
a468727 drm/i915: s/Couar/Cougar/
bda1c29 drm/i915: Use HAS_PCH_CPT() everywhere
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5017/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · On Tue, Jun 20, 2017 at 04:03:05PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
During the recent discusison on the PCH detection details it was suggested that we should just always use the top 9 bits of the ISA/LPC bridge device ID to detect the PCH type. Currently we use either 8 or 9 bits depending on the PCH type.
Series available here:
git://github.com/vsyrjala/linux.gitpch_id_9bits
Quoted 7 lines
Ville Syrjälä (5):
drm/i915: UseHAS_PCH_CPT()everywhere
drm/i915: s/Couar/Cougar/
drm/i915: Document that PPT==CPT and WPT==LPT drm/i915: Clean up some expressions
drm/i915: Always use 9 bits of the LPC bridge device ID for PCH
detection
Series pushed to dinq. Thanks for the review.
Quoted 9 lines
drivers/gpu/drm/i915/i915_drv.c | 51 ++++++++++++++++++-------------- drivers/gpu/drm/i915/i915_drv.h | 19 +++++++----- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 4 files changed, 41 insertions(+), 33 deletions(-)Signature · 1 line
2.13.0
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx