diff mbox series

[RFC,v4,1/2] drm/i915: Add RPL-U sub platform

Message ID 20230130100806.1373883-2-chaitanya.kumar.borah@intel.com (mailing list archive)
State New, archived
Headers show
Series Add new CDCLK step for RPL-U | expand

Commit Message

Borah, Chaitanya Kumar Jan. 30, 2023, 10:08 a.m. UTC
Separate out RPLU device ids and add them to both RPL and
newly created RPL-U subplatforms.

v2: (Matt)
    - Sort PCI-IDs numerically
    - Name the sub-platform to accurately depict what it is for
    - Make RPL-U part of RPL subplatform

v3: revert to RPL-U subplatform (Jani)

v4: (Jani)
    - Add RPL-U ids to RPL-P platform
    - Remove redundant comment

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h          |  2 ++
 drivers/gpu/drm/i915/intel_device_info.c |  7 +++++++
 drivers/gpu/drm/i915/intel_device_info.h |  1 +
 include/drm/i915_pciids.h                | 12 ++++++++----
 4 files changed, 18 insertions(+), 4 deletions(-)

Comments

Lucas De Marchi Nov. 17, 2023, 11:35 p.m. UTC | #1
On Mon, Jan 30, 2023 at 03:38:05PM +0530, Chaitanya Kumar Borah wrote:
>Separate out RPLU device ids and add them to both RPL and
>newly created RPL-U subplatforms.
>
>v2: (Matt)
>    - Sort PCI-IDs numerically
>    - Name the sub-platform to accurately depict what it is for
>    - Make RPL-U part of RPL subplatform
>
>v3: revert to RPL-U subplatform (Jani)
>
>v4: (Jani)
>    - Add RPL-U ids to RPL-P platform

humn...

>diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
>index 4a4c190f7698..5824e1d7d162 100644
>--- a/include/drm/i915_pciids.h
>+++ b/include/drm/i915_pciids.h
>@@ -684,14 +684,18 @@
> 	INTEL_VGA_DEVICE(0xA78A, info), \
> 	INTEL_VGA_DEVICE(0xA78B, info)
>
>+/* RPL-U */
>+#define INTEL_RPLU_IDS(info) \
>+	INTEL_VGA_DEVICE(0xA721, info), \
>+	INTEL_VGA_DEVICE(0xA7A1, info), \
>+	INTEL_VGA_DEVICE(0xA7A9, info)
>+
> /* RPL-P */
> #define INTEL_RPLP_IDS(info) \
>+	INTEL_RPLU_IDS(info), \

drive by comment while reviewing other stuff. Why was U added to the
P macro? That looks odd. Adding it to the rpl subplatform, together with P would
be ok, but in this macro it looks wrong. Doing it the other way I think the
only affected place would be the early-quirks, which would need a separate entry,
but admitedly they should had been INTEL_RPL_IDS() with all the
variants.


Lucas De Marchi
Jani Nikula Nov. 20, 2023, 10:30 a.m. UTC | #2
On Fri, 17 Nov 2023, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Mon, Jan 30, 2023 at 03:38:05PM +0530, Chaitanya Kumar Borah wrote:
>>Separate out RPLU device ids and add them to both RPL and
>>newly created RPL-U subplatforms.
>>
>>v2: (Matt)
>>    - Sort PCI-IDs numerically
>>    - Name the sub-platform to accurately depict what it is for
>>    - Make RPL-U part of RPL subplatform
>>
>>v3: revert to RPL-U subplatform (Jani)
>>
>>v4: (Jani)
>>    - Add RPL-U ids to RPL-P platform
>
> humn...
>
>>diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
>>index 4a4c190f7698..5824e1d7d162 100644
>>--- a/include/drm/i915_pciids.h
>>+++ b/include/drm/i915_pciids.h
>>@@ -684,14 +684,18 @@
>> 	INTEL_VGA_DEVICE(0xA78A, info), \
>> 	INTEL_VGA_DEVICE(0xA78B, info)
>>
>>+/* RPL-U */
>>+#define INTEL_RPLU_IDS(info) \
>>+	INTEL_VGA_DEVICE(0xA721, info), \
>>+	INTEL_VGA_DEVICE(0xA7A1, info), \
>>+	INTEL_VGA_DEVICE(0xA7A9, info)
>>+
>> /* RPL-P */
>> #define INTEL_RPLP_IDS(info) \
>>+	INTEL_RPLU_IDS(info), \
>
> drive by comment while reviewing other stuff. Why was U added to the
> P macro? That looks odd. Adding it to the rpl subplatform, together with P would
> be ok, but in this macro it looks wrong. Doing it the other way I think the
> only affected place would be the early-quirks, which would need a separate entry,
> but admitedly they should had been INTEL_RPL_IDS() with all the
> variants.

It's been 10 months, I have no recollection, but this is what I found in
old mails [1].

BR,
Jani.

[1] https://lore.kernel.org/r/87mt686m1o.fsf@intel.com

>
>
> Lucas De Marchi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 48fd82722f12..c88e514728a0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -619,6 +619,8 @@  IS_SUBPLATFORM(const struct drm_i915_private *i915,
 	IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_N)
 #define IS_ADLP_RPLP(dev_priv) \
 	IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPL)
+#define IS_ADLP_RPLU(dev_priv) \
+	IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPLU)
 #define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \
 				    (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00)
 #define IS_BDW_ULT(dev_priv) \
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 849baf6c3b3c..322e1ef94c47 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -201,6 +201,10 @@  static const u16 subplatform_rpl_ids[] = {
 	INTEL_RPLP_IDS(0),
 };
 
+static const u16 subplatform_rplu_ids[] = {
+	INTEL_RPLU_IDS(0),
+};
+
 static const u16 subplatform_g10_ids[] = {
 	INTEL_DG2_G10_IDS(0),
 	INTEL_ATS_M150_IDS(0),
@@ -268,6 +272,9 @@  static void intel_device_info_subplatform_init(struct drm_i915_private *i915)
 	} else if (find_devid(devid, subplatform_rpl_ids,
 			      ARRAY_SIZE(subplatform_rpl_ids))) {
 		mask = BIT(INTEL_SUBPLATFORM_RPL);
+		if (find_devid(devid, subplatform_rplu_ids,
+			       ARRAY_SIZE(subplatform_rplu_ids)))
+			mask |= BIT(INTEL_SUBPLATFORM_RPLU);
 	} else if (find_devid(devid, subplatform_g10_ids,
 			      ARRAY_SIZE(subplatform_g10_ids))) {
 		mask = BIT(INTEL_SUBPLATFORM_G10);
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index d588e5fd2eea..3e3ca5eb073f 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -127,6 +127,7 @@  enum intel_platform {
  * bit set
  */
 #define INTEL_SUBPLATFORM_N    1
+#define INTEL_SUBPLATFORM_RPLU  2
 
 /* MTL */
 #define INTEL_SUBPLATFORM_M	0
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 4a4c190f7698..5824e1d7d162 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -684,14 +684,18 @@ 
 	INTEL_VGA_DEVICE(0xA78A, info), \
 	INTEL_VGA_DEVICE(0xA78B, info)
 
+/* RPL-U */
+#define INTEL_RPLU_IDS(info) \
+	INTEL_VGA_DEVICE(0xA721, info), \
+	INTEL_VGA_DEVICE(0xA7A1, info), \
+	INTEL_VGA_DEVICE(0xA7A9, info)
+
 /* RPL-P */
 #define INTEL_RPLP_IDS(info) \
+	INTEL_RPLU_IDS(info), \
 	INTEL_VGA_DEVICE(0xA720, info), \
-	INTEL_VGA_DEVICE(0xA721, info), \
 	INTEL_VGA_DEVICE(0xA7A0, info), \
-	INTEL_VGA_DEVICE(0xA7A1, info), \
-	INTEL_VGA_DEVICE(0xA7A8, info), \
-	INTEL_VGA_DEVICE(0xA7A9, info)
+	INTEL_VGA_DEVICE(0xA7A8, info)
 
 /* DG2 */
 #define INTEL_DG2_G10_IDS(info) \