diff mbox

[3/5] drm/i915: Use unknown production revid as alpha quality flag

Message ID 20180608134205.6452-3-mika.kuoppala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kuoppala June 8, 2018, 1:42 p.m. UTC
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.

v2: rebase, comment beautification

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c          | 2 +-
 drivers/gpu/drm/i915/i915_pci.c          | 3 +--
 drivers/gpu/drm/i915/intel_chipset.h     | 2 +-
 drivers/gpu/drm/i915/intel_device_info.h | 1 -
 4 files changed, 3 insertions(+), 5 deletions(-)

Comments

Chris Wilson June 8, 2018, 1:53 p.m. UTC | #1
Quoting Mika Kuoppala (2018-06-08 14:42:03)
> 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.
> 
> v2: rebase, comment beautification
> 
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Though not my domain, so please do get maintainer buy in.
-Chris
Joonas Lahtinen June 11, 2018, 11:23 a.m. UTC | #2
Quoting Mika Kuoppala (2018-06-08 16:42:03)
> 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.

Well, I'm hoping we won't be at the phase when the product is shipping
and the field gets populated, but the driver quality is still alpha
where we would need two fields. But this indeed happened with Skylake,
so I would not remove the separation of the fields just in case.

Regards, Joonas
Jani Nikula June 11, 2018, 12:22 p.m. UTC | #3
On Mon, 11 Jun 2018, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> Quoting Mika Kuoppala (2018-06-08 16:42:03)
>> 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.
>
> Well, I'm hoping we won't be at the phase when the product is shipping
> and the field gets populated, but the driver quality is still alpha
> where we would need two fields. But this indeed happened with Skylake,
> so I would not remove the separation of the fields just in case.

Yeah, please keep them separated, and please keep the name as
IS_ALPHA_SUPPORT. Let's not rename it too often and let's not conflate
this stuff in the interest of letting it sink in what all of these mean.

BR,
Jani.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 86725c272251..74d3cccca905 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -858,7 +858,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(info) != PRODUCT_REVID_UNKNOWN) {
+	if (pre && !IS_PLATFORM_SUPPORT_ALPHA(info)) {
 		DRM_ERROR("This is a pre-production stepping. "
 			  "It may not be fully functional.\n");
 		add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 60a02082055c..4a5a4f8778ad 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -604,7 +604,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,
 };
@@ -689,7 +688,7 @@  static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		(struct intel_device_info *) ent->driver_data;
 	int err;
 
-	if (IS_ALPHA_SUPPORT(intel_info) && !i915_modparams.alpha_support) {
+	if (IS_PLATFORM_SUPPORT_ALPHA(intel_info) && !i915_modparams.alpha_support) {
 		DRM_INFO("The driver support for your hardware in this kernel version is alpha quality\n"
 			 "See CONFIG_DRM_I915_ALPHA_SUPPORT or i915.alpha_support module parameter\n"
 			 "to enable support in this kernel version, or check for kernel updates.\n");
diff --git a/drivers/gpu/drm/i915/intel_chipset.h b/drivers/gpu/drm/i915/intel_chipset.h
index a917ab40f857..946c889c0118 100644
--- a/drivers/gpu/drm/i915/intel_chipset.h
+++ b/drivers/gpu/drm/i915/intel_chipset.h
@@ -125,11 +125,11 @@ 
 #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_PLATFORM_SUPPORT_ALPHA(intel_info) (FIRST_PRODUCT_REVID(intel_info) == PRODUCT_REVID_UNKNOWN)
 
 #define SKL_REVID_A0		0x0
 #define SKL_REVID_B0		0x1
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index 64ec283003dd..a66837db341b 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -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); \