Skip to contentSkip to conversation

drm/i915: Store first production revid into device info

PATCH In review Mika Kuoppala 3 participants 14 messages Jun 7, 2018 – Jun 8, 2018

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

PATCH 1/6 drm/i915: Store first production revid into device info

Store first known production revid into the device info.

By doing this we then can do preliminary hardware checks in code and also prepare to complain automatically on outdated workarounds etc.

Uninitialized (zero) product revision id means that there are no known preliminary hardware for this platform, or that the platform is of gen that we don't care. This is all pre gen9 platforms.

Unknown product revision maps to REVID_FOREVER on a gen9+ platforms on default. When the platform gets the first production revision and our testing infra is cleaned from preproduction hardware, we can set a first production revid. At that point we start to complain about running driver on preliminary hardware.

Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Tomi Sarvela <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c          |  6 +++---
 drivers/gpu/drm/i915/i915_drv.h          |  7 +++++++
 drivers/gpu/drm/i915/i915_pci.c          |  9 +++++++--
 drivers/gpu/drm/i915/intel_device_info.h | 11 +++++++++++
 4 files changed, 28 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +3 -3
index be71fdf8d92e..92f244c12f1e 100644
@@ -855,10 +855,10 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 	bool pre = false;
 
 	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);
+	pre |= IS_PREPRODUCTION_HW(dev_priv);
 
-	if (pre) {
+	if (pre && FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv))
+	    != PRODUCT_REVID_UNKNOWN) {
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
 		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
drivers/gpu/drm/i915/i915_drv.h +7 -0
index c4073666f1ca..abca814ad758 100644
@@ -2430,6 +2430,10 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
 
+#define PRODUCT_REVID_UNKNOWN	REVID_FOREVER
+#define FIRST_PRODUCT_REVID(intel_info) ((intel_info)->first_product_revid)
+#define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))
+
 #define SKL_REVID_A0		0x0
 #define SKL_REVID_B0		0x1
 #define SKL_REVID_C0		0x2
@@ -2461,6 +2465,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define GLK_REVID_A0		0x0
 #define GLK_REVID_A1		0x1
+#define GLK_REVID_B0		0x3
 
 #define IS_GLK_REVID(dev_priv, since, until) \
 	(IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
@@ -2468,6 +2473,8 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
 #define CNL_REVID_C0		0x2
+#define CNL_REVID_D0		0x4
+#define CNL_REVID_G0		0x5
 
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
drivers/gpu/drm/i915/i915_pci.c +7 -2
index 97a91e6af7e3..823668e35f41 100644
@@ -465,6 +465,7 @@ static const struct intel_device_info intel_cherryview_info = {
 
 #define SKL_PLATFORM \
 	GEN9_FEATURES, \
+	.first_product_revid = SKL_REVID_G0, \
 	PLATFORM(INTEL_SKYLAKE)
 
 static const struct intel_device_info intel_skylake_gt1_info = {
@@ -518,6 +519,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 	.has_reset_engine = 1, \
 	.has_snoop = true, \
 	.has_ipc = 1, \
+	.first_product_revid = PRODUCT_REVID_UNKNOWN, \
 	GEN9_DEFAULT_PAGE_SIZES, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	IVB_CURSOR_OFFSETS, \
@@ -526,6 +528,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 static const struct intel_device_info intel_broxton_info = {
 	GEN9_LP_FEATURES,
 	PLATFORM(INTEL_BROXTON),
+	.first_product_revid = BXT_REVID_C0,
 	.ddb_size = 512,
 };
 
@@ -538,7 +541,8 @@ static const struct intel_device_info intel_geminilake_info = {
 
 #define KBL_PLATFORM \
 	GEN9_FEATURES, \
-	PLATFORM(INTEL_KABYLAKE)
+	PLATFORM(INTEL_KABYLAKE), \
+	.first_product_revid = KBL_REVID_B0
 
 static const struct intel_device_info intel_kabylake_gt1_info = {
 	KBL_PLATFORM,
@@ -558,7 +562,8 @@ static const struct intel_device_info intel_kabylake_gt3_info = {
 
 #define CFL_PLATFORM \
 	GEN9_FEATURES, \
-	PLATFORM(INTEL_COFFEELAKE)
+	PLATFORM(INTEL_COFFEELAKE), \
+	.first_product_revid = KBL_REVID_B0
 
 static const struct intel_device_info intel_coffeelake_gt1_info = {
 	CFL_PLATFORM,
drivers/gpu/drm/i915/intel_device_info.h +11 -0
index 933e31669557..9ae9dc553192 100644
@@ -146,6 +146,17 @@ struct intel_device_info {
 	u16 device_id;
 	u16 gen_mask;
 
+	u8 first_product_revid;
+	/* Set to corresponding first production hardware revision or:
+	 *
+	 * 0x00 == uninitialized == no known preliminary hw (legacy gens)
+	 * 0xff == PRODUCT_REVID_UNKNOWN == no known production hw yet
+	 *
+	 * Do not set first product revid unless you are certain
+	 * that testing infrastructure is already on top of production
+	 * revid machines.
+	 */
+
 	u8 gen;
 	u8 gt; /* GT number, 0 if undefined */
 	u8 num_rings;
Signature · 6 lines
2.17.0

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

PATCH 1/6 drm/i915: Store first production revid into device info

Store first known production revid into the device info.

This enables us to easily see if we are running on a preproduction hardware.

Uninitialized (zero) product revision id means that there are no known preliminary hardware for this platform, or that the platform is of gen that we don't care. This is all pre gen9 platforms.

Unknown product revision maps to REVID_FOREVER on a gen9+ platforms on default. When the platform gets the first production revision and our testing infra is cleaned from preproduction hardware, we can set a first production revid. At that point we start to complain about running driver on preliminary hardware.

v2: initialize GEN9_FEATURES too (CI)

Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Tomi Sarvela <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c          |  6 +++---
 drivers/gpu/drm/i915/i915_drv.h          |  7 +++++++
 drivers/gpu/drm/i915/i915_pci.c          | 10 ++++++++--
 drivers/gpu/drm/i915/intel_device_info.h | 11 +++++++++++
 4 files changed, 29 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +3 -3
index be71fdf8d92e..92f244c12f1e 100644
@@ -855,10 +855,10 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 	bool pre = false;
 
 	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);
+	pre |= IS_PREPRODUCTION_HW(dev_priv);
 
-	if (pre) {
+	if (pre && FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv))
+	    != PRODUCT_REVID_UNKNOWN) {
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
 		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
drivers/gpu/drm/i915/i915_drv.h +7 -0
index c4073666f1ca..abca814ad758 100644
@@ -2430,6 +2430,10 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
 
+#define PRODUCT_REVID_UNKNOWN	REVID_FOREVER
+#define FIRST_PRODUCT_REVID(intel_info) ((intel_info)->first_product_revid)
+#define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))
+
 #define SKL_REVID_A0		0x0
 #define SKL_REVID_B0		0x1
 #define SKL_REVID_C0		0x2
@@ -2461,6 +2465,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define GLK_REVID_A0		0x0
 #define GLK_REVID_A1		0x1
+#define GLK_REVID_B0		0x3
 
 #define IS_GLK_REVID(dev_priv, since, until) \
 	(IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
@@ -2468,6 +2473,8 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
 #define CNL_REVID_C0		0x2
+#define CNL_REVID_D0		0x4
+#define CNL_REVID_G0		0x5
 
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
drivers/gpu/drm/i915/i915_pci.c +8 -2
index 97a91e6af7e3..ae4a5a0b0c28 100644
@@ -461,10 +461,12 @@ static const struct intel_device_info intel_cherryview_info = {
 	.has_csr = 1, \
 	.has_guc = 1, \
 	.has_ipc = 1, \
+	.first_product_revid = PRODUCT_REVID_UNKNOWN, \
 	.ddb_size = 896
 
 #define SKL_PLATFORM \
 	GEN9_FEATURES, \
+	.first_product_revid = SKL_REVID_G0, \
 	PLATFORM(INTEL_SKYLAKE)
 
 static const struct intel_device_info intel_skylake_gt1_info = {
@@ -518,6 +520,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 	.has_reset_engine = 1, \
 	.has_snoop = true, \
 	.has_ipc = 1, \
+	.first_product_revid = PRODUCT_REVID_UNKNOWN, \
 	GEN9_DEFAULT_PAGE_SIZES, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	IVB_CURSOR_OFFSETS, \
@@ -526,6 +529,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 static const struct intel_device_info intel_broxton_info = {
 	GEN9_LP_FEATURES,
 	PLATFORM(INTEL_BROXTON),
+	.first_product_revid = BXT_REVID_C0,
 	.ddb_size = 512,
 };
 
@@ -538,7 +542,8 @@ static const struct intel_device_info intel_geminilake_info = {
 
 #define KBL_PLATFORM \
 	GEN9_FEATURES, \
-	PLATFORM(INTEL_KABYLAKE)
+	PLATFORM(INTEL_KABYLAKE), \
+	.first_product_revid = KBL_REVID_B0
 
 static const struct intel_device_info intel_kabylake_gt1_info = {
 	KBL_PLATFORM,
@@ -558,7 +563,8 @@ static const struct intel_device_info intel_kabylake_gt3_info = {
 
 #define CFL_PLATFORM \
 	GEN9_FEATURES, \
-	PLATFORM(INTEL_COFFEELAKE)
+	PLATFORM(INTEL_COFFEELAKE), \
+	.first_product_revid = KBL_REVID_B0
 
 static const struct intel_device_info intel_coffeelake_gt1_info = {
 	CFL_PLATFORM,
drivers/gpu/drm/i915/intel_device_info.h +11 -0
index 933e31669557..9ae9dc553192 100644
@@ -146,6 +146,17 @@ struct intel_device_info {
 	u16 device_id;
 	u16 gen_mask;
 
+	u8 first_product_revid;
+	/* Set to corresponding first production hardware revision or:
+	 *
+	 * 0x00 == uninitialized == no known preliminary hw (legacy gens)
+	 * 0xff == PRODUCT_REVID_UNKNOWN == no known production hw yet
+	 *
+	 * Do not set first product revid unless you are certain
+	 * that testing infrastructure is already on top of production
+	 * revid machines.
+	 */
+
 	u8 gen;
 	u8 gt; /* GT number, 0 if undefined */
 	u8 num_rings;
Signature · 6 lines
2.17.0

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

Quoting Mika Kuoppala (2018-06-08 09:39:06)

Quoted 40 lines

Store first known production revid into the device info.

This enables us to easily see if we are running on a preproduction hardware.

Uninitialized (zero) product revision id means that there are no known preliminary hardware for this platform, or that the platform is of gen that we don't care. This is all pre gen9 platforms.

Unknown product revision maps to REVID_FOREVER on a gen9+ platforms on default. When the platform gets the first production revision and our testing infra is cleaned from preproduction hardware, we can set a first production revid. At that point we start to complain about running driver on preliminary hardware.

v2: initialize GEN9_FEATURES too (CI)

Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Tomi Sarvela <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c          |  6 +++---
 drivers/gpu/drm/i915/i915_drv.h          |  7 +++++++
 drivers/gpu/drm/i915/i915_pci.c          | 10 ++++++++--
 drivers/gpu/drm/i915/intel_device_info.h | 11 +++++++++++
 4 files changed, 29 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -0
index be71fdf8d92e..92f244c12f1e 100644
@@ -855,10 +855,10 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
        bool pre = false;
 
        pre |= IS_HSW_EARLY_SDV(dev_priv);

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

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +3 -3
-       pre |= IS_SKL_REVID(dev_priv, 0, SKL_REVID_F0);
-       pre |= IS_BXT_REVID(dev_priv, 0, BXT_REVID_B_LAST);
+       pre |= IS_PREPRODUCTION_HW(dev_priv);
 
-       if (pre) {
+       if (pre && FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv))
+           != PRODUCT_REVID_UNKNOWN) {
                DRM_ERROR("This is a pre-production stepping. "
                          "It may not be fully functional.\n");
                add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);

I know this is changed later, but this is not very pleasing on the eye.

	const struct intel_info *info = INTEL_INFO(dev_priv);

	if (IS_PREPRODUCTION_HW(dev_priv) &&
	    FIRST_PRODUCT_REVID(info) != PRODUCT_REVID_UNKNOWN) {

drivers/gpu/drm/i915/intel_device_info.h struct intel_device_info { · line 150

Quoted 10 lines
drivers/gpu/drm/i915/intel_device_info.h +2 -0
index 933e31669557..9ae9dc553192 100644
@@ -146,6 +146,17 @@ struct intel_device_info {
        u16 device_id;
        u16 gen_mask;
 
+       u8 first_product_revid;
+       /* Set to corresponding first production hardware revision or:

/*
* Set to

That's the style we're meant to use. It helps when we mix in kerneldoc comments, e.g.
/**
* Foo:

drivers/gpu/drm/i915/intel_device_info.h struct intel_device_info { · line 158

Quoted 8 lines
drivers/gpu/drm/i915/intel_device_info.h +8 -0
+        *
+        * 0x00 == uninitialized == no known preliminary hw (legacy gens)
+        * 0xff == PRODUCT_REVID_UNKNOWN == no known production hw yet
+        *
+        * Do not set first product revid unless you are certain
+        * that testing infrastructure is already on top of production
+        * revid machines.
+        */

Description block before member or short description on the same line. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

PATCH 2/6 drm/i915: Use unknown production revid as alpha quality flag

In reply to Mika Kuoppala

We don't need to have distinct flag for alpha quality if we agree that setting the first production revid to be the epoch for stepping out from alpha quality on that platform.

Cc Joonas Lahtinen <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Tomi Sarvela <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c          | 3 +--
 drivers/gpu/drm/i915/i915_drv.h          | 3 +--
 drivers/gpu/drm/i915/i915_pci.c          | 1 -
 drivers/gpu/drm/i915/intel_device_info.h | 5 ++++-
 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -2
index 92f244c12f1e..11dc9b6371e3 100644
@@ -857,8 +857,7 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
 	pre |= IS_HSW_EARLY_SDV(dev_priv);
 	pre |= IS_PREPRODUCTION_HW(dev_priv);
 
-	if (pre && FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv))
-	    != PRODUCT_REVID_UNKNOWN) {
+	if (pre && !IS_ALPHA_SUPPORT(INTEL_INFO(dev_priv))) {
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
 		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
drivers/gpu/drm/i915/i915_drv.h +1 -2
index abca814ad758..f7f6aaddba30 100644
@@ -2428,11 +2428,10 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define IS_CNL_WITH_PORT_F(dev_priv)   (IS_CANNONLAKE(dev_priv) && \
 					(INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)
 
-#define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
-
 #define PRODUCT_REVID_UNKNOWN	REVID_FOREVER
 #define FIRST_PRODUCT_REVID(intel_info) ((intel_info)->first_product_revid)
 #define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))
+#define IS_ALPHA_SUPPORT(intel_info)    (FIRST_PRODUCT_REVID(intel_info) == PRODUCT_REVID_UNKNOWN)
 
 #define SKL_REVID_A0		0x0
 #define SKL_REVID_B0		0x1
drivers/gpu/drm/i915/i915_pci.c +0 -1
index 823668e35f41..850ed40724e2 100644
@@ -603,7 +603,6 @@ static const struct intel_device_info intel_cannonlake_info = {
 static const struct intel_device_info intel_icelake_11_info = {
 	GEN11_FEATURES,
 	PLATFORM(INTEL_ICELAKE),
-	.is_alpha_support = 1,
 	.has_resource_streamer = 0,
 	.ring_mask = RENDER_RING | BLT_RING | VEBOX_RING | BSD_RING | BSD3_RING,
 };
drivers/gpu/drm/i915/intel_device_info.h +4 -1
index 9ae9dc553192..3147adf8b070 100644
@@ -77,7 +77,6 @@ enum intel_platform {
 #define DEV_INFO_FOR_EACH_FLAG(func) \
 	func(is_mobile); \
 	func(is_lp); \
-	func(is_alpha_support); \
 	/* Keep has_* in alphabetical order */ \
 	func(has_64bit_reloc); \
 	func(has_aliasing_ppgtt); \
@@ -155,6 +154,10 @@ struct intel_device_info {
 	 * Do not set first product revid unless you are certain
 	 * that testing infrastructure is already on top of production
 	 * revid machines.
+	 *
+	 * When set to an actual released first product revision id,
+	 * IS_ALPHA_SUPPORT macro will start to return false on that
+	 * platform.
 	 */
 
 	u8 gen;
Signature · 6 lines
2.17.0

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

PATCH 3/6 drm/i915: Move chipset definitions to intel_chipset.h

In reply to Mika Kuoppala

Carve out chipset definitions into new intel_chipset.h

---
 drivers/gpu/drm/i915/i915_drv.h      | 200 +-------------------------
 drivers/gpu/drm/i915/intel_chipset.h | 208 +++++++++++++++++++++++++++
 2 files changed, 209 insertions(+), 199 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_chipset.h
drivers/gpu/drm/i915/i915_drv.h +1 -199
index f7f6aaddba30..87de072e44cb 100644
@@ -59,6 +59,7 @@
 
 #include "intel_bios.h"
 #include "intel_device_info.h"
+#include "intel_chipset.h"
 #include "intel_display.h"
 #include "intel_dpll_mgr.h"
 #include "intel_lrc.h"
@@ -2309,205 +2310,6 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define INTEL_INFO(dev_priv)	intel_info((dev_priv))
 
-#define INTEL_GEN(dev_priv)	((dev_priv)->info.gen)
-#define INTEL_DEVID(dev_priv)	((dev_priv)->info.device_id)
-
-#define REVID_FOREVER		0xff
-#define INTEL_REVID(dev_priv)	((dev_priv)->drm.pdev->revision)
-
-#define GEN_FOREVER (0)
-
-#define INTEL_GEN_MASK(s, e) ( \
-	BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
-	BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \
-	GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
-		(s) != GEN_FOREVER ? (s) - 1 : 0) \
-)
-
-/*
- * Returns true if Gen is in inclusive range [Start, End].
- *
- * Use GEN_FOREVER for unbound start and or end.
- */
-#define IS_GEN(dev_priv, s, e) \
-	(!!((dev_priv)->info.gen_mask & INTEL_GEN_MASK((s), (e))))
-
-/*
- * Return true if revision is in range [since,until] inclusive.
- *
- * Use 0 for open-ended since, and REVID_FOREVER for open-ended until.
- */
-#define IS_REVID(p, since, until) \
-	(INTEL_REVID(p) >= (since) && INTEL_REVID(p) <= (until))
-
-#define IS_PLATFORM(dev_priv, p) ((dev_priv)->info.platform_mask & BIT(p))
-
-#define IS_I830(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I830)
-#define IS_I845G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I845G)
-#define IS_I85X(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I85X)
-#define IS_I865G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I865G)
-#define IS_I915G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I915G)
-#define IS_I915GM(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I915GM)
-#define IS_I945G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I945G)
-#define IS_I945GM(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I945GM)
-#define IS_I965G(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I965G)
-#define IS_I965GM(dev_priv)	IS_PLATFORM(dev_priv, INTEL_I965GM)
-#define IS_G45(dev_priv)	IS_PLATFORM(dev_priv, INTEL_G45)
-#define IS_GM45(dev_priv)	IS_PLATFORM(dev_priv, INTEL_GM45)
-#define IS_G4X(dev_priv)	(IS_G45(dev_priv) || IS_GM45(dev_priv))
-#define IS_PINEVIEW_G(dev_priv)	(INTEL_DEVID(dev_priv) == 0xa001)
-#define IS_PINEVIEW_M(dev_priv)	(INTEL_DEVID(dev_priv) == 0xa011)
-#define IS_PINEVIEW(dev_priv)	IS_PLATFORM(dev_priv, INTEL_PINEVIEW)
-#define IS_G33(dev_priv)	IS_PLATFORM(dev_priv, INTEL_G33)
-#define IS_IRONLAKE_M(dev_priv)	(INTEL_DEVID(dev_priv) == 0x0046)
-#define IS_IVYBRIDGE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_IVYBRIDGE)
-#define IS_IVB_GT1(dev_priv)	(IS_IVYBRIDGE(dev_priv) && \
-				 (dev_priv)->info.gt == 1)
-#define IS_VALLEYVIEW(dev_priv)	IS_PLATFORM(dev_priv, INTEL_VALLEYVIEW)
-#define IS_CHERRYVIEW(dev_priv)	IS_PLATFORM(dev_priv, INTEL_CHERRYVIEW)
-#define IS_HASWELL(dev_priv)	IS_PLATFORM(dev_priv, INTEL_HASWELL)
-#define IS_BROADWELL(dev_priv)	IS_PLATFORM(dev_priv, INTEL_BROADWELL)
-#define IS_SKYLAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_SKYLAKE)
-#define IS_BROXTON(dev_priv)	IS_PLATFORM(dev_priv, INTEL_BROXTON)
-#define IS_KABYLAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_KABYLAKE)
-#define IS_GEMINILAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_GEMINILAKE)
-#define IS_COFFEELAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_COFFEELAKE)
-#define IS_CANNONLAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_CANNONLAKE)
-#define IS_ICELAKE(dev_priv)	IS_PLATFORM(dev_priv, INTEL_ICELAKE)
-#define IS_MOBILE(dev_priv)	((dev_priv)->info.is_mobile)
-#define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
-				    (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)
-#define IS_BDW_ULT(dev_priv)	(IS_BROADWELL(dev_priv) && \
-				 ((INTEL_DEVID(dev_priv) & 0xf) == 0x6 ||	\
-				 (INTEL_DEVID(dev_priv) & 0xf) == 0xb ||	\
-				 (INTEL_DEVID(dev_priv) & 0xf) == 0xe))
-/* ULX machines are also considered ULT. */
-#define IS_BDW_ULX(dev_priv)	(IS_BROADWELL(dev_priv) && \
-				 (INTEL_DEVID(dev_priv) & 0xf) == 0xe)
-#define IS_BDW_GT3(dev_priv)	(IS_BROADWELL(dev_priv) && \
-				 (dev_priv)->info.gt == 3)
-#define IS_HSW_ULT(dev_priv)	(IS_HASWELL(dev_priv) && \
-				 (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0A00)
-#define IS_HSW_GT3(dev_priv)	(IS_HASWELL(dev_priv) && \
-				 (dev_priv)->info.gt == 3)
-/* ULX machines are also considered ULT. */
-#define IS_HSW_ULX(dev_priv)	(INTEL_DEVID(dev_priv) == 0x0A0E || \
-				 INTEL_DEVID(dev_priv) == 0x0A1E)
-#define IS_SKL_ULT(dev_priv)	(INTEL_DEVID(dev_priv) == 0x1906 || \
-				 INTEL_DEVID(dev_priv) == 0x1913 || \
-				 INTEL_DEVID(dev_priv) == 0x1916 || \
-				 INTEL_DEVID(dev_priv) == 0x1921 || \
-				 INTEL_DEVID(dev_priv) == 0x1926)
-#define IS_SKL_ULX(dev_priv)	(INTEL_DEVID(dev_priv) == 0x190E || \
-				 INTEL_DEVID(dev_priv) == 0x1915 || \
-				 INTEL_DEVID(dev_priv) == 0x191E)
-#define IS_KBL_ULT(dev_priv)	(INTEL_DEVID(dev_priv) == 0x5906 || \
-				 INTEL_DEVID(dev_priv) == 0x5913 || \
-				 INTEL_DEVID(dev_priv) == 0x5916 || \
-				 INTEL_DEVID(dev_priv) == 0x5921 || \
-				 INTEL_DEVID(dev_priv) == 0x5926)
-#define IS_KBL_ULX(dev_priv)	(INTEL_DEVID(dev_priv) == 0x590E || \
-				 INTEL_DEVID(dev_priv) == 0x5915 || \
-				 INTEL_DEVID(dev_priv) == 0x591E)
-#define IS_SKL_GT2(dev_priv)	(IS_SKYLAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 2)
-#define IS_SKL_GT3(dev_priv)	(IS_SKYLAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 3)
-#define IS_SKL_GT4(dev_priv)	(IS_SKYLAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 4)
-#define IS_KBL_GT2(dev_priv)	(IS_KABYLAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 2)
-#define IS_KBL_GT3(dev_priv)	(IS_KABYLAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 3)
-#define IS_CFL_ULT(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
-				 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x00A0)
-#define IS_CFL_GT2(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 2)
-#define IS_CFL_GT3(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
-				 (dev_priv)->info.gt == 3)
-#define IS_CNL_WITH_PORT_F(dev_priv)   (IS_CANNONLAKE(dev_priv) && \
-					(INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)
-
-#define PRODUCT_REVID_UNKNOWN	REVID_FOREVER
-#define FIRST_PRODUCT_REVID(intel_info) ((intel_info)->first_product_revid)
-#define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))
-#define IS_ALPHA_SUPPORT(intel_info)    (FIRST_PRODUCT_REVID(intel_info) == PRODUCT_REVID_UNKNOWN)
-
-#define SKL_REVID_A0		0x0
-#define SKL_REVID_B0		0x1
-#define SKL_REVID_C0		0x2
-#define SKL_REVID_D0		0x3
-#define SKL_REVID_E0		0x4
-#define SKL_REVID_F0		0x5
-#define SKL_REVID_G0		0x6
-#define SKL_REVID_H0		0x7
-
-#define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))
-
-#define BXT_REVID_A0		0x0
-#define BXT_REVID_A1		0x1
-#define BXT_REVID_B0		0x3
-#define BXT_REVID_B_LAST	0x8
-#define BXT_REVID_C0		0x9
-
-#define IS_BXT_REVID(dev_priv, since, until) \
-	(IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))
-
-#define KBL_REVID_A0		0x0
-#define KBL_REVID_B0		0x1
-#define KBL_REVID_C0		0x2
-#define KBL_REVID_D0		0x3
-#define KBL_REVID_E0		0x4
-
-#define IS_KBL_REVID(dev_priv, since, until) \
-	(IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))
-
-#define GLK_REVID_A0		0x0
-#define GLK_REVID_A1		0x1
-#define GLK_REVID_B0		0x3
-
-#define IS_GLK_REVID(dev_priv, since, until) \
-	(IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
-
-#define CNL_REVID_A0		0x0
-#define CNL_REVID_B0		0x1
-#define CNL_REVID_C0		0x2
-#define CNL_REVID_D0		0x4
-#define CNL_REVID_G0		0x5
-
-#define IS_CNL_REVID(p, since, until) \
-	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
-
-#define ICL_REVID_A0		0x0
-#define ICL_REVID_A2		0x1
-#define ICL_REVID_B0		0x3
-#define ICL_REVID_B2		0x4
-#define ICL_REVID_C0		0x5
-
-#define IS_ICL_REVID(p, since, until) \
-	(IS_ICELAKE(p) && IS_REVID(p, since, until))
-
-/*
- * The genX designation typically refers to the render engine, so render
- * capability related checks should use IS_GEN, while display and other checks
- * have their own (e.g. HAS_PCH_SPLIT for ILK+ display, IS_foo for particular
- * chips, etc.).
- */
-#define IS_GEN2(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(1)))
-#define IS_GEN3(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(2)))
-#define IS_GEN4(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(3)))
-#define IS_GEN5(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(4)))
-#define IS_GEN6(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(5)))
-#define IS_GEN7(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(6)))
-#define IS_GEN8(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(7)))
-#define IS_GEN9(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(8)))
-#define IS_GEN10(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(9)))
-#define IS_GEN11(dev_priv)	(!!((dev_priv)->info.gen_mask & BIT(10)))
-
-#define IS_LP(dev_priv)	(INTEL_INFO(dev_priv)->is_lp)
-#define IS_GEN9_LP(dev_priv)	(IS_GEN9(dev_priv) && IS_LP(dev_priv))
-#define IS_GEN9_BC(dev_priv)	(IS_GEN9(dev_priv) && !IS_LP(dev_priv))
-
 #define ENGINE_MASK(id)	BIT(id)
 #define RENDER_RING	ENGINE_MASK(RCS)
 #define BSD_RING	ENGINE_MASK(VCS)
drivers/gpu/drm/i915/intel_chipset.h new file +208 -0

208 lines not on this page · raw message

Signature · 6 lines
2.17.0

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

PATCH 4/6 drm/i915: Add a define for first production revid

In reply to Mika Kuoppala

Make a new named define for each platform which signifies the first production revid that platform has. Placing it along the revision ids adds clarity.

---
 drivers/gpu/drm/i915/i915_pci.c      | 8 ++++----
 drivers/gpu/drm/i915/intel_chipset.h | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_pci.c +4 -4
index 850ed40724e2..538f05a7014b 100644
@@ -465,7 +465,7 @@ static const struct intel_device_info intel_cherryview_info = {
 
 #define SKL_PLATFORM \
 	GEN9_FEATURES, \
-	.first_product_revid = SKL_REVID_G0, \
+	.first_product_revid = SKL_REVID_PRODUCT, \
 	PLATFORM(INTEL_SKYLAKE)
 
 static const struct intel_device_info intel_skylake_gt1_info = {
@@ -528,7 +528,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 static const struct intel_device_info intel_broxton_info = {
 	GEN9_LP_FEATURES,
 	PLATFORM(INTEL_BROXTON),
-	.first_product_revid = BXT_REVID_C0,
+	.first_product_revid = BXT_REVID_PRODUCT,
 	.ddb_size = 512,
 };
 
@@ -542,7 +542,7 @@ static const struct intel_device_info intel_geminilake_info = {
 #define KBL_PLATFORM \
 	GEN9_FEATURES, \
 	PLATFORM(INTEL_KABYLAKE), \
-	.first_product_revid = KBL_REVID_B0
+	.first_product_revid = KBL_REVID_PRODUCT
 
 static const struct intel_device_info intel_kabylake_gt1_info = {
 	KBL_PLATFORM,
@@ -563,7 +563,7 @@ static const struct intel_device_info intel_kabylake_gt3_info = {
 #define CFL_PLATFORM \
 	GEN9_FEATURES, \
 	PLATFORM(INTEL_COFFEELAKE), \
-	.first_product_revid = KBL_REVID_B0
+	.first_product_revid = KBL_REVID_PRODUCT
 
 static const struct intel_device_info intel_coffeelake_gt1_info = {
 	CFL_PLATFORM,
drivers/gpu/drm/i915/intel_chipset.h +3 -0
index 76b5ff1b7131..d6cd7ba7d669 100644
@@ -137,6 +137,7 @@
 #define SKL_REVID_E0		0x4
 #define SKL_REVID_F0		0x5
 #define SKL_REVID_G0		0x6
+#define SKL_REVID_PRODUCT	SKL_REVID_G0
 #define SKL_REVID_H0		0x7
 
 #define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))
@@ -146,12 +147,14 @@
 #define BXT_REVID_B0		0x3
 #define BXT_REVID_B_LAST	0x8
 #define BXT_REVID_C0		0x9
+#define BXT_REVID_PRODUCT	BXT_REVID_C0
 
 #define IS_BXT_REVID(dev_priv, since, until) \
 	(IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))
 
 #define KBL_REVID_A0		0x0
 #define KBL_REVID_B0		0x1
+#define KBL_REVID_PRODUCT	KBL_REVID_B0
 #define KBL_REVID_C0		0x2
 #define KBL_REVID_D0		0x3
 #define KBL_REVID_E0		0x4
Signature · 6 lines
2.17.0

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

PATCH 5/6 drm/i915: Remove kbl preproduction workarounds

In reply to Mika Kuoppala

We don't need kbl preprod workarounds anymore.

---
 drivers/gpu/drm/i915/intel_lrc.c         | 12 ------------
 drivers/gpu/drm/i915/intel_workarounds.c |  5 -----
 2 files changed, 17 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +0 -12
index 091e28f0e024..ffec91cdb1b4 100644
@@ -1581,18 +1581,6 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)
 			GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE);
 	*batch++ = MI_NOOP;
 
-	/* WaClearSlmSpaceAtContextSwitch:kbl */
-	/* Actual scratch location is at 128 bytes offset */
-	if (IS_KBL_REVID(engine->i915, 0, KBL_REVID_A0)) {
-		batch = gen8_emit_pipe_control(batch,
-					       PIPE_CONTROL_FLUSH_L3 |
-					       PIPE_CONTROL_GLOBAL_GTT_IVB |
-					       PIPE_CONTROL_CS_STALL |
-					       PIPE_CONTROL_QW_WRITE,
-					       i915_ggtt_offset(engine->scratch)
-					       + 2 * CACHELINE_BYTES);
-	}
-
 	/* WaMediaPoolStateCmdInWABB:bxt,glk */
 	if (HAS_POOLED_EU(engine->i915)) {
 		/*
drivers/gpu/drm/i915/intel_workarounds.c +0 -5
index b1ab56a1ec31..9df30d6cff30 100644
@@ -355,11 +355,6 @@ static int kbl_ctx_workarounds_init(struct drm_i915_private *dev_priv)
 	if (ret)
 		return ret;
 
-	/* WaDisableFenceDestinationToSLM:kbl (pre-prod) */
-	if (IS_KBL_REVID(dev_priv, KBL_REVID_A0, KBL_REVID_A0))
-		WA_SET_BIT_MASKED(HDC_CHICKEN0,
-				  HDC_FENCE_DEST_SLM_DISABLE);
-
 	/* WaToEnableHwFixForPushConstHWBug:kbl */
 	if (IS_KBL_REVID(dev_priv, KBL_REVID_C0, REVID_FOREVER))
 		WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,
Signature · 6 lines
2.17.0

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

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915: Store first production revid into device info

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info
URL : https://patchwork.freedesktop.org/series/44429/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
ec78e5bf259c drm/i915: Store first production revid into device info
-:59: WARNING:LONG_LINE: line over 100 characters
#59: FILE: drivers/gpu/drm/i915/i915_drv.h:2435:
+#define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:59: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #59: FILE: drivers/gpu/drm/i915/i915_drv.h:2435:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

total: 0 errors, 1 warnings, 1 checks, 94 lines checked
8100f915cd3b drm/i915: Use unknown production revid as alpha quality flag fb0d40cccdf0 drm/i915: Move chipset definitions to intel_chipset.h
-:231: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #231:
new file mode 100644

-:252: CHECK:MACRO_ARG_REUSE: Macro argument reuse 's' - possible side-effects? #252: FILE: drivers/gpu/drm/i915/intel_chipset.h:17:
+#define INTEL_GEN_MASK(s, e) ( \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \
+ GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
+ (s) != GEN_FOREVER ? (s) - 1 : 0) \
+)

-:252: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'e' - possible side-effects? #252: FILE: drivers/gpu/drm/i915/intel_chipset.h:17:
+#define INTEL_GEN_MASK(s, e) ( \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \
+ GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
+ (s) != GEN_FOREVER ? (s) - 1 : 0) \
+)

-:272: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #272: FILE: drivers/gpu/drm/i915/intel_chipset.h:37:
+#define IS_REVID(p, since, until) \
+ (INTEL_REVID(p) >= (since) && INTEL_REVID(p) <= (until))

-:289: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #289: FILE: drivers/gpu/drm/i915/intel_chipset.h:54:
+#define IS_G4X(dev_priv) (IS_G45(dev_priv) || IS_GM45(dev_priv))

-:296: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #296: FILE: drivers/gpu/drm/i915/intel_chipset.h:61:
+#define IS_IVB_GT1(dev_priv) (IS_IVYBRIDGE(dev_priv) && \
+ (dev_priv)->info.gt == 1)

-:310: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #310: FILE: drivers/gpu/drm/i915/intel_chipset.h:75:
+#define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)

-:312: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #312: FILE: drivers/gpu/drm/i915/intel_chipset.h:77:
+#define IS_BDW_ULT(dev_priv) (IS_BROADWELL(dev_priv) && \
+ ((INTEL_DEVID(dev_priv) & 0xf) == 0x6 || \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xb || \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xe))

-:317: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #317: FILE: drivers/gpu/drm/i915/intel_chipset.h:82:
+#define IS_BDW_ULX(dev_priv) (IS_BROADWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xe)

-:319: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #319: FILE: drivers/gpu/drm/i915/intel_chipset.h:84:
+#define IS_BDW_GT3(dev_priv) (IS_BROADWELL(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:321: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #321: FILE: drivers/gpu/drm/i915/intel_chipset.h:86:
+#define IS_HSW_ULT(dev_priv) (IS_HASWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0A00)

-:323: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #323: FILE: drivers/gpu/drm/i915/intel_chipset.h:88:
+#define IS_HSW_GT3(dev_priv) (IS_HASWELL(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:326: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #326: FILE: drivers/gpu/drm/i915/intel_chipset.h:91:
+#define IS_HSW_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x0A0E || \
+ INTEL_DEVID(dev_priv) == 0x0A1E)

-:328: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #328: FILE: drivers/gpu/drm/i915/intel_chipset.h:93:
+#define IS_SKL_ULT(dev_priv) (INTEL_DEVID(dev_priv) == 0x1906 || \

+				 INTEL_DEVID(dev_priv) == 0x1913 || \
+				 INTEL_DEVID(dev_priv) == 0x1916 || \
+				 INTEL_DEVID(dev_priv) == 0x1921 || \

+ INTEL_DEVID(dev_priv) == 0x1926)

-:333: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #333: FILE: drivers/gpu/drm/i915/intel_chipset.h:98:
+#define IS_SKL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x190E || \
+ INTEL_DEVID(dev_priv) == 0x1915 || \
+ INTEL_DEVID(dev_priv) == 0x191E)

-:336: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #336: FILE: drivers/gpu/drm/i915/intel_chipset.h:101:
+#define IS_KBL_ULT(dev_priv) (INTEL_DEVID(dev_priv) == 0x5906 || \

+				 INTEL_DEVID(dev_priv) == 0x5913 || \
+				 INTEL_DEVID(dev_priv) == 0x5916 || \
+				 INTEL_DEVID(dev_priv) == 0x5921 || \

+ INTEL_DEVID(dev_priv) == 0x5926)

-:341: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #341: FILE: drivers/gpu/drm/i915/intel_chipset.h:106:
+#define IS_KBL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x590E || \
+ INTEL_DEVID(dev_priv) == 0x5915 || \
+ INTEL_DEVID(dev_priv) == 0x591E)

-:344: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #344: FILE: drivers/gpu/drm/i915/intel_chipset.h:109:
+#define IS_SKL_GT2(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:346: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #346: FILE: drivers/gpu/drm/i915/intel_chipset.h:111:
+#define IS_SKL_GT3(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:348: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #348: FILE: drivers/gpu/drm/i915/intel_chipset.h:113:
+#define IS_SKL_GT4(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 4)

-:350: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #350: FILE: drivers/gpu/drm/i915/intel_chipset.h:115:
+#define IS_KBL_GT2(dev_priv) (IS_KABYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:352: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #352: FILE: drivers/gpu/drm/i915/intel_chipset.h:117:
+#define IS_KBL_GT3(dev_priv) (IS_KABYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:354: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #354: FILE: drivers/gpu/drm/i915/intel_chipset.h:119:
+#define IS_CFL_ULT(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0x00F0) == 0x00A0)

-:356: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #356: FILE: drivers/gpu/drm/i915/intel_chipset.h:121:
+#define IS_CFL_GT2(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:358: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #358: FILE: drivers/gpu/drm/i915/intel_chipset.h:123:
+#define IS_CFL_GT3(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:360: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #360: FILE: drivers/gpu/drm/i915/intel_chipset.h:125:
+#define IS_CNL_WITH_PORT_F(dev_priv) (IS_CANNONLAKE(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)

-:365: WARNING:LONG_LINE: line over 100 characters #365: FILE: drivers/gpu/drm/i915/intel_chipset.h:130:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:365: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #365: FILE: drivers/gpu/drm/i915/intel_chipset.h:130:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:377: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #377: FILE: drivers/gpu/drm/i915/intel_chipset.h:142:
+#define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:385: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #385: FILE: drivers/gpu/drm/i915/intel_chipset.h:150:
+#define IS_BXT_REVID(dev_priv, since, until) \
+ (IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))

-:394: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #394: FILE: drivers/gpu/drm/i915/intel_chipset.h:159:
+#define IS_KBL_REVID(dev_priv, since, until) \
+ (IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:401: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #401: FILE: drivers/gpu/drm/i915/intel_chipset.h:166:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:410: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #410: FILE: drivers/gpu/drm/i915/intel_chipset.h:175:
+#define IS_CNL_REVID(p, since, until) \
+ (IS_CANNONLAKE(p) && IS_REVID(p, since, until))

-:419: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #419: FILE: drivers/gpu/drm/i915/intel_chipset.h:184:
+#define IS_ICL_REVID(p, since, until) \
+ (IS_ICELAKE(p) && IS_REVID(p, since, until))

-:440: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #440: FILE: drivers/gpu/drm/i915/intel_chipset.h:205:
+#define IS_GEN9_LP(dev_priv) (IS_GEN9(dev_priv) && IS_LP(dev_priv))

-:441: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #441: FILE: drivers/gpu/drm/i915/intel_chipset.h:206:
+#define IS_GEN9_BC(dev_priv) (IS_GEN9(dev_priv) && !IS_LP(dev_priv))

total: 0 errors, 2 warnings, 34 checks, 420 lines checked
819a0e8a100a drm/i915: Add a define for first production revid
97c198d6616d drm/i915: Remove kbl preproduction workarounds
72eee4b969e9 drm/i915: Warn on obsolete revision checks
-:20: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'production_revid' - possible side-effects? #20: FILE: drivers/gpu/drm/i915/intel_chipset.h:133:
+#define BUILD_BUG_ON_REVID_LT(revid, production_revid) ({ \
+ BUILD_BUG_ON((production_revid) != PRODUCT_REVID_UNKNOWN && \
+ (revid) < (production_revid)); \
+ 1; \
+ })

-:34: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #34: FILE: drivers/gpu/drm/i915/intel_chipset.h:149:
+#define IS_SKL_REVID(p, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, SKL_REVID_PRODUCT) && \
+ IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:34: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'until' - possible side-effects? #34: FILE: drivers/gpu/drm/i915/intel_chipset.h:149:
+#define IS_SKL_REVID(p, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, SKL_REVID_PRODUCT) && \
+ IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #65: FILE: drivers/gpu/drm/i915/intel_chipset.h:180:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, GLK_REVID_PRODUCT) && \
+ IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'until' - possible side-effects? #65: FILE: drivers/gpu/drm/i915/intel_chipset.h:180:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, GLK_REVID_PRODUCT) && \
+ IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

total: 0 errors, 0 warnings, 5 checks, 75 lines checked

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

#8 lore raw

✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915: Store first production revid into device info

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info
URL : https://patchwork.freedesktop.org/series/44429/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915: Store first production revid into device info
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3669:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3676:16: warning: expression using sizeof(void)

Commit: drm/i915: Use unknown production revid as alpha quality flag -drivers/gpu/drm/i915/selftests/../i915_drv.h:3676:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)

Commit: drm/i915: Move chipset definitions to intel_chipset.h -drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3477:16: warning: expression using sizeof(void)

Commit: drm/i915: Add a define for first production revid Okay!

Commit: drm/i915: Remove kbl preproduction workarounds Okay!

Commit: drm/i915: Warn on obsolete revision checks Okay!

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

#9 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Store first production revid into device info

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info
URL : https://patchwork.freedesktop.org/series/44429/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4290 -> Patchwork_9234 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9234 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9234, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/44429/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_9234:

=== IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-no-display:
      fi-cfl-s3:          PASS -> DMESG-WARN +2

    igt@drv_module_reload@basic-reload:
      fi-cfl-8700k:       PASS -> DMESG-WARN +2
      fi-cfl-guc:         PASS -> DMESG-WARN +2

    igt@drv_module_reload@basic-reload-inject:
      fi-cfl-u2:          PASS -> DMESG-WARN +2

== Known issues ==

Here are the changes found in Patchwork_9234 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106097)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       DMESG-WARN (fdo#105128) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-c:
      fi-glk-j4005:       DMESG-WARN (fdo#106097) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cnl-psr:         DMESG-WARN (fdo#104951) -> PASS

fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097

== Participating hosts (38 -> 36) ==

Additional (1): fi-bdw-5557u
Missing (3): fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4290 -> Patchwork_9234

CI_DRM_4290: fb7bd7a9480b64dd46964ef5a00aeef33410376d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4510: d1a93aa7e1507de76c6c71be15931cc4b90111bb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9234: 72eee4b969e95dc17ef223eeece226074e47172a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

72eee4b969e9 drm/i915: Warn on obsolete revision checks 97c198d6616d drm/i915: Remove kbl preproduction workarounds 819a0e8a100a drm/i915: Add a define for first production revid fb0d40cccdf0 drm/i915: Move chipset definitions to intel_chipset.h 8100f915cd3b drm/i915: Use unknown production revid as alpha quality flag ec78e5bf259c drm/i915: Store first production revid into device info

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9234/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

PATCH 6/6 drm/i915: Warn on obsolete revision checks

In reply to Mika Kuoppala

If we are doing revision checks against a preproduction range, when there is already a product, it is a sign that there is code to be removed.

---
 drivers/gpu/drm/i915/intel_chipset.h | 30 +++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_chipset.h +23 -7
index d6cd7ba7d669..3f38b052863e 100644
@@ -130,6 +130,12 @@
 #define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))
 #define IS_ALPHA_SUPPORT(intel_info)    (FIRST_PRODUCT_REVID(intel_info) == PRODUCT_REVID_UNKNOWN)
 
+#define BUILD_BUG_ON_REVID_LT(revid, production_revid) ({ \
+		BUILD_BUG_ON((production_revid) != PRODUCT_REVID_UNKNOWN && \
+			     (revid) < (production_revid)); \
+		1; \
+	})
+
 #define SKL_REVID_A0		0x0
 #define SKL_REVID_B0		0x1
 #define SKL_REVID_C0		0x2
@@ -140,7 +146,9 @@
 #define SKL_REVID_PRODUCT	SKL_REVID_G0
 #define SKL_REVID_H0		0x7
 
-#define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))
+#define IS_SKL_REVID(p, since, until) \
+	(BUILD_BUG_ON_REVID_LT(until, SKL_REVID_PRODUCT) && \
+	 IS_SKYLAKE(p) && IS_REVID(p, since, until))
 
 #define BXT_REVID_A0		0x0
 #define BXT_REVID_A1		0x1
@@ -150,7 +158,8 @@
 #define BXT_REVID_PRODUCT	BXT_REVID_C0
 
 #define IS_BXT_REVID(dev_priv, since, until) \
-	(IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))
+	(BUILD_BUG_ON_REVID_LT(until, BXT_REVID_PRODUCT) && \
+	 IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))
 
 #define KBL_REVID_A0		0x0
 #define KBL_REVID_B0		0x1
@@ -160,32 +169,39 @@
 #define KBL_REVID_E0		0x4
 
 #define IS_KBL_REVID(dev_priv, since, until) \
-	(IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))
+	(BUILD_BUG_ON_REVID_LT(until, KBL_REVID_PRODUCT) && \
+	 IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))
 
 #define GLK_REVID_A0		0x0
 #define GLK_REVID_A1		0x1
 #define GLK_REVID_B0		0x3
+#define GLK_REVID_PRODUCT	PRODUCT_REVID_UNKNOWN
 
-#define IS_GLK_REVID(dev_priv, since, until) \
-	(IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
+#define IS_GLK_REVID(dev_priv, since, until)		    \
+	(BUILD_BUG_ON_REVID_LT(until, GLK_REVID_PRODUCT) && \
+	 IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
 
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
 #define CNL_REVID_C0		0x2
 #define CNL_REVID_D0		0x4
 #define CNL_REVID_G0		0x5
+#define CNL_REVID_PRODUCT	PRODUCT_REVID_UNKNOWN
 
 #define IS_CNL_REVID(p, since, until) \
-	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
+	(BUILD_BUG_ON_REVID_LT(until, CNL_REVID_PRODUCT) && \
+	 IS_CANNONLAKE(p) && IS_REVID(p, since, until))
 
 #define ICL_REVID_A0		0x0
 #define ICL_REVID_A2		0x1
 #define ICL_REVID_B0		0x3
 #define ICL_REVID_B2		0x4
 #define ICL_REVID_C0		0x5
+#define ICL_REVID_PRODUCT	PRODUCT_REVID_UNKNOWN
 
 #define IS_ICL_REVID(p, since, until) \
-	(IS_ICELAKE(p) && IS_REVID(p, since, until))
+	(BUILD_BUG_ON_REVID_LT(until, ICL_REVID_PRODUCT) && \
+	IS_ICELAKE(p) && IS_REVID(p, since, until))
 
 /*
  * The genX designation typically refers to the render engine, so render
Signature · 6 lines
2.17.0

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

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915: Store first production revid into device info (rev2)

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info (rev2)
URL : https://patchwork.freedesktop.org/series/44429/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c1df0dd08b23 drm/i915: Store first production revid into device info
-:60: WARNING:LONG_LINE: line over 100 characters
#60: FILE: drivers/gpu/drm/i915/i915_drv.h:2435:
+#define IS_PREPRODUCTION_HW(dev_priv)   (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:60: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #60: FILE: drivers/gpu/drm/i915/i915_drv.h:2435:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

total: 0 errors, 1 warnings, 1 checks, 99 lines checked
3fb49f40c250 drm/i915: Use unknown production revid as alpha quality flag 5c8cb615b9b4 drm/i915: Move chipset definitions to intel_chipset.h
-:231: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #231:
new file mode 100644

-:252: CHECK:MACRO_ARG_REUSE: Macro argument reuse 's' - possible side-effects? #252: FILE: drivers/gpu/drm/i915/intel_chipset.h:17:
+#define INTEL_GEN_MASK(s, e) ( \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \
+ GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
+ (s) != GEN_FOREVER ? (s) - 1 : 0) \
+)

-:252: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'e' - possible side-effects? #252: FILE: drivers/gpu/drm/i915/intel_chipset.h:17:
+#define INTEL_GEN_MASK(s, e) ( \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(s)) + \
+ BUILD_BUG_ON_ZERO(!__builtin_constant_p(e)) + \
+ GENMASK((e) != GEN_FOREVER ? (e) - 1 : BITS_PER_LONG - 1, \
+ (s) != GEN_FOREVER ? (s) - 1 : 0) \
+)

-:272: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #272: FILE: drivers/gpu/drm/i915/intel_chipset.h:37:
+#define IS_REVID(p, since, until) \
+ (INTEL_REVID(p) >= (since) && INTEL_REVID(p) <= (until))

-:289: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #289: FILE: drivers/gpu/drm/i915/intel_chipset.h:54:
+#define IS_G4X(dev_priv) (IS_G45(dev_priv) || IS_GM45(dev_priv))

-:296: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #296: FILE: drivers/gpu/drm/i915/intel_chipset.h:61:
+#define IS_IVB_GT1(dev_priv) (IS_IVYBRIDGE(dev_priv) && \
+ (dev_priv)->info.gt == 1)

-:310: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #310: FILE: drivers/gpu/drm/i915/intel_chipset.h:75:
+#define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)

-:312: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #312: FILE: drivers/gpu/drm/i915/intel_chipset.h:77:
+#define IS_BDW_ULT(dev_priv) (IS_BROADWELL(dev_priv) && \
+ ((INTEL_DEVID(dev_priv) & 0xf) == 0x6 || \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xb || \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xe))

-:317: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #317: FILE: drivers/gpu/drm/i915/intel_chipset.h:82:
+#define IS_BDW_ULX(dev_priv) (IS_BROADWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xf) == 0xe)

-:319: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #319: FILE: drivers/gpu/drm/i915/intel_chipset.h:84:
+#define IS_BDW_GT3(dev_priv) (IS_BROADWELL(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:321: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #321: FILE: drivers/gpu/drm/i915/intel_chipset.h:86:
+#define IS_HSW_ULT(dev_priv) (IS_HASWELL(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0A00)

-:323: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #323: FILE: drivers/gpu/drm/i915/intel_chipset.h:88:
+#define IS_HSW_GT3(dev_priv) (IS_HASWELL(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:326: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #326: FILE: drivers/gpu/drm/i915/intel_chipset.h:91:
+#define IS_HSW_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x0A0E || \
+ INTEL_DEVID(dev_priv) == 0x0A1E)

-:328: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #328: FILE: drivers/gpu/drm/i915/intel_chipset.h:93:
+#define IS_SKL_ULT(dev_priv) (INTEL_DEVID(dev_priv) == 0x1906 || \

+				 INTEL_DEVID(dev_priv) == 0x1913 || \
+				 INTEL_DEVID(dev_priv) == 0x1916 || \
+				 INTEL_DEVID(dev_priv) == 0x1921 || \

+ INTEL_DEVID(dev_priv) == 0x1926)

-:333: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #333: FILE: drivers/gpu/drm/i915/intel_chipset.h:98:
+#define IS_SKL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x190E || \
+ INTEL_DEVID(dev_priv) == 0x1915 || \
+ INTEL_DEVID(dev_priv) == 0x191E)

-:336: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #336: FILE: drivers/gpu/drm/i915/intel_chipset.h:101:
+#define IS_KBL_ULT(dev_priv) (INTEL_DEVID(dev_priv) == 0x5906 || \

+				 INTEL_DEVID(dev_priv) == 0x5913 || \
+				 INTEL_DEVID(dev_priv) == 0x5916 || \
+				 INTEL_DEVID(dev_priv) == 0x5921 || \

+ INTEL_DEVID(dev_priv) == 0x5926)

-:341: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #341: FILE: drivers/gpu/drm/i915/intel_chipset.h:106:
+#define IS_KBL_ULX(dev_priv) (INTEL_DEVID(dev_priv) == 0x590E || \
+ INTEL_DEVID(dev_priv) == 0x5915 || \
+ INTEL_DEVID(dev_priv) == 0x591E)

-:344: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #344: FILE: drivers/gpu/drm/i915/intel_chipset.h:109:
+#define IS_SKL_GT2(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:346: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #346: FILE: drivers/gpu/drm/i915/intel_chipset.h:111:
+#define IS_SKL_GT3(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:348: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #348: FILE: drivers/gpu/drm/i915/intel_chipset.h:113:
+#define IS_SKL_GT4(dev_priv) (IS_SKYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 4)

-:350: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #350: FILE: drivers/gpu/drm/i915/intel_chipset.h:115:
+#define IS_KBL_GT2(dev_priv) (IS_KABYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:352: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #352: FILE: drivers/gpu/drm/i915/intel_chipset.h:117:
+#define IS_KBL_GT3(dev_priv) (IS_KABYLAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:354: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #354: FILE: drivers/gpu/drm/i915/intel_chipset.h:119:
+#define IS_CFL_ULT(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0x00F0) == 0x00A0)

-:356: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #356: FILE: drivers/gpu/drm/i915/intel_chipset.h:121:
+#define IS_CFL_GT2(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (dev_priv)->info.gt == 2)

-:358: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #358: FILE: drivers/gpu/drm/i915/intel_chipset.h:123:
+#define IS_CFL_GT3(dev_priv) (IS_COFFEELAKE(dev_priv) && \
+ (dev_priv)->info.gt == 3)

-:360: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #360: FILE: drivers/gpu/drm/i915/intel_chipset.h:125:
+#define IS_CNL_WITH_PORT_F(dev_priv) (IS_CANNONLAKE(dev_priv) && \
+ (INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)

-:365: WARNING:LONG_LINE: line over 100 characters #365: FILE: drivers/gpu/drm/i915/intel_chipset.h:130:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:365: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #365: FILE: drivers/gpu/drm/i915/intel_chipset.h:130:
+#define IS_PREPRODUCTION_HW(dev_priv) (INTEL_REVID(dev_priv) < FIRST_PRODUCT_REVID(INTEL_INFO(dev_priv)))

-:377: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #377: FILE: drivers/gpu/drm/i915/intel_chipset.h:142:
+#define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:385: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #385: FILE: drivers/gpu/drm/i915/intel_chipset.h:150:
+#define IS_BXT_REVID(dev_priv, since, until) \
+ (IS_BROXTON(dev_priv) && IS_REVID(dev_priv, since, until))

-:394: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #394: FILE: drivers/gpu/drm/i915/intel_chipset.h:159:
+#define IS_KBL_REVID(dev_priv, since, until) \
+ (IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:401: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #401: FILE: drivers/gpu/drm/i915/intel_chipset.h:166:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:410: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #410: FILE: drivers/gpu/drm/i915/intel_chipset.h:175:
+#define IS_CNL_REVID(p, since, until) \
+ (IS_CANNONLAKE(p) && IS_REVID(p, since, until))

-:419: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #419: FILE: drivers/gpu/drm/i915/intel_chipset.h:184:
+#define IS_ICL_REVID(p, since, until) \
+ (IS_ICELAKE(p) && IS_REVID(p, since, until))

-:440: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #440: FILE: drivers/gpu/drm/i915/intel_chipset.h:205:
+#define IS_GEN9_LP(dev_priv) (IS_GEN9(dev_priv) && IS_LP(dev_priv))

-:441: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #441: FILE: drivers/gpu/drm/i915/intel_chipset.h:206:
+#define IS_GEN9_BC(dev_priv) (IS_GEN9(dev_priv) && !IS_LP(dev_priv))

total: 0 errors, 2 warnings, 34 checks, 420 lines checked
03ad36c85d35 drm/i915: Add a define for first production revid
5eeb7818c8d9 drm/i915: Remove kbl preproduction workarounds
2c53f1798c4f drm/i915: Warn on obsolete revision checks
-:20: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'production_revid' - possible side-effects? #20: FILE: drivers/gpu/drm/i915/intel_chipset.h:133:
+#define BUILD_BUG_ON_REVID_LT(revid, production_revid) ({ \
+ BUILD_BUG_ON((production_revid) != PRODUCT_REVID_UNKNOWN && \
+ (revid) < (production_revid)); \
+ 1; \
+ })

-:34: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects? #34: FILE: drivers/gpu/drm/i915/intel_chipset.h:149:
+#define IS_SKL_REVID(p, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, SKL_REVID_PRODUCT) && \
+ IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:34: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'until' - possible side-effects? #34: FILE: drivers/gpu/drm/i915/intel_chipset.h:149:
+#define IS_SKL_REVID(p, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, SKL_REVID_PRODUCT) && \
+ IS_SKYLAKE(p) && IS_REVID(p, since, until))

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #65: FILE: drivers/gpu/drm/i915/intel_chipset.h:180:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, GLK_REVID_PRODUCT) && \
+ IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'until' - possible side-effects? #65: FILE: drivers/gpu/drm/i915/intel_chipset.h:180:
+#define IS_GLK_REVID(dev_priv, since, until) \
+ (BUILD_BUG_ON_REVID_LT(until, GLK_REVID_PRODUCT) && \
+ IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))

total: 0 errors, 0 warnings, 5 checks, 75 lines checked

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

#12 lore raw

✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915: Store first production revid into device info (rev2)

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info (rev2)
URL : https://patchwork.freedesktop.org/series/44429/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915: Store first production revid into device info
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3669:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3676:16: warning: expression using sizeof(void)

Commit: drm/i915: Use unknown production revid as alpha quality flag -drivers/gpu/drm/i915/selftests/../i915_drv.h:3676:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void)

Commit: drm/i915: Move chipset definitions to intel_chipset.h -drivers/gpu/drm/i915/selftests/../i915_drv.h:3675:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3477:16: warning: expression using sizeof(void)

Commit: drm/i915: Add a define for first production revid Okay!

Commit: drm/i915: Remove kbl preproduction workarounds Okay!

Commit: drm/i915: Warn on obsolete revision checks Okay!

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

#13 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Store first production revid into device info (rev2)

In reply to Mika Kuoppala
== Series Details ==

== Series Details ==

Series: series starting with [1/6] drm/i915: Store first production revid into device info (rev2)
URL : https://patchwork.freedesktop.org/series/44429/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4294 -> Patchwork_9238 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9238 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9238, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/44429/revisions/2/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_9238:

=== IGT changes ===

    ==== Possible regressions ====

    igt@drv_module_reload@basic-no-display:
      fi-cfl-s3:          PASS -> DMESG-WARN +2

    igt@drv_module_reload@basic-reload:
      fi-cfl-8700k:       PASS -> DMESG-WARN +2
      fi-cfl-guc:         PASS -> DMESG-WARN +2

    igt@drv_module_reload@basic-reload-inject:
      fi-cfl-u2:          PASS -> DMESG-WARN +2

== Known issues ==

Here are the changes found in Patchwork_9238 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      fi-glk-j4005:       PASS -> FAIL (fdo#103481)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@kms_chamelium@dp-crc-fast:
      fi-kbl-7500u:       DMESG-FAIL (fdo#103841) -> PASS

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       DMESG-WARN (fdo#106000, fdo#106097) -> PASS

fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097

== Participating hosts (41 -> 38) ==

Additional (1): fi-bxt-dsi
Missing (4): fi-byt-j1900 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4294 -> Patchwork_9238

CI_DRM_4294: af0889384edc6de2f91494325d571c66dffea83f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4512: 093fa482371795c3aa246509994eb21907f501b9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9238: 2c53f1798c4f1b1e6269655971119ea450f5f725 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2c53f1798c4f drm/i915: Warn on obsolete revision checks 5eeb7818c8d9 drm/i915: Remove kbl preproduction workarounds 03ad36c85d35 drm/i915: Add a define for first production revid 5c8cb615b9b4 drm/i915: Move chipset definitions to intel_chipset.h 3fb49f40c250 drm/i915: Use unknown production revid as alpha quality flag c1df0dd08b23 drm/i915: Store first production revid into device info

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9238/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx