drm/i915: simplify ULT/ULX subplatform detection
Subsystems (2)
PATCH 1/2 drm/i915: simplify ULT/ULX subplatform detection
For HSW and BDW, ULX machines are also considered ULT. For the sake of simplicity and clarity, handle this at the IS_XXX_ULT() macro level instead of two simultaneous subplatforms.
--- drivers/gpu/drm/i915/i915_drv.h | 9 ++++++--- drivers/gpu/drm/i915/intel_device_info.c | 4 ---- 2 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +6 -3
@@ -509,13 +509,16 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, IS_SUBPLATFORM(i915, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPLU)#define IS_HASWELL_EARLY_SDV (i915) (IS_HASWELL(i915) && \ (INTEL_DEVID(i915) & 0xFF00) == 0x0C00) +/* BDW ULX machines are also considered ULT. */ #define IS_BROADWELL_ULT (i915) \ - IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULT) + (IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULT) || \ + IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULX))#define IS_BROADWELL_ULX (i915) \ IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULX) +/* HSW ULX machines are also considered ULT. */ #define IS_HASWELL_ULT (i915) \ - IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULT) -/* ULX machines are also considered ULT. */ + (IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULT) || \ + IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULX))#define IS_HASWELL_ULX (i915) \ IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULX)#define IS_SKYLAKE_ULT (i915) \
drivers/gpu/drm/i915/intel_device_info.c +0 -4
@@ -245,10 +245,6 @@ static void intel_device_info_subplatform_init(struct drm_i915_private *i915) }else if (find_devid (devid, subplatform_ulx_ids,ARRAY_SIZE (subplatform_ulx_ids))) { mask =BIT (INTEL_SUBPLATFORM_ULX ); -if (IS_HASWELL (i915) ||IS_BROADWELL (i915)) { -/* ULX machines are also considered ULT. */ - mask |=BIT (INTEL_SUBPLATFORM_ULT ); - } }else if (find_devid (devid, subplatform_portf_ids,ARRAY_SIZE (subplatform_portf_ids))) { mask =BIT (INTEL_SUBPLATFORM_PORTF );
Signature · 1 line
2.47.3
PATCH 2/2 drm/i915: separate RPL-U from RPL-P
RPL-S is a subplatform of ADL-S and RPL-P is a subplatform of ADL-P. It's a bit much that RPL-P also matches RPL-U. Separate RPL-U from RPL-P, and make RPL-U a standalone subplatform of ADL-P.
--- drivers/gpu/drm/i915/intel_device_info.c | 7 +++---- drivers/gpu/drm/i915/intel_step.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_device_info.c +3 -4
@@ -178,7 +178,6 @@ static const u16 subplatform_n_ids[] = {static const u16 subplatform_rpl_ids[] = {INTEL_RPLS_IDS (ID ), -INTEL_RPLU_IDS (ID ),INTEL_RPLP_IDS (ID ), };
@@ -257,9 +256,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_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 );
drivers/gpu/drm/i915/intel_step.c +1 -1
@@ -177,7 +177,7 @@ void intel_step_init(struct drm_i915_private *i915) }else if (IS_ALDERLAKE_P_N (i915)) { revids = adlp_n_revids; size =ARRAY_SIZE (adlp_n_revids); - }else if (IS_RAPTORLAKE_P (i915)) { + }else if (IS_RAPTORLAKE_P (i915) ||IS_RAPTORLAKE_U (i915)) { revids = adlp_rplp_revids; size =ARRAY_SIZE (adlp_rplp_revids); }else if (IS_ALDERLAKE_P (i915)) {
Signature · 1 line
2.47.3
Re: [PATCH 2/2] drm/i915: separate RPL-U from RPL-P
Quoted 3 lines · Jani Nikula
RPL-S is a subplatform of ADL-S and RPL-P is a subplatform of ADL-P. It's a bit much that RPL-P also matches RPL-U. Separate RPL-U from RPL-P, and make RPL-U a standalone subplatform of ADL-P.
My head spins every time I look at the subplatform mess.
Quoted 12 lines
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/intel_device_info.c | 7 +++---- drivers/gpu/drm/i915/intel_step.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/intel_device_info.c +0
-0
drivers/gpu/drm/i915/intel_device_info.c static const u16 subplatform_n_ids[] = { · line 181
Quoted 5 lines
drivers/gpu/drm/i915/intel_device_info.c +0
-1@@ -178,7 +178,6 @@ static const u16 subplatform_n_ids[] = {static const u16 subplatform_rpl_ids[] = {INTEL_RPLS_IDS (ID ), -INTEL_RPLU_IDS (ID ),INTEL_RPLP_IDS (ID ),
I don't even know why RPL-S and RPL-P are grouped together here. IIRC one is an ADL-S (one of the franken-TGLs) derivative, and the other is an ADL-P (actual ADL) derivative.
And I *think* RPL-U is just a variant of RPL-P, just like ADL-N is just a variant of ADL-P.
Hmm, oh this is GT stuff. Yeah, no real idea what's a derivative of what on that side. But IS_RAPTORLAKE_U() seems to be completely unused on that side, so I think you might just want to nuke the RPL-U subplatform and call it a RPL-P.
There are also incredible constructs such as 'IS_ALDERLAKE_P(i915) && !IS_ALDERLAKE_P_N(i915)' somewhere in the code.
I think the only way this can be made sensible in any way is to have a rule that if you have even a single subplatform, then you add subplatforms for all the variants of that platform. Unfortunately I don't have a good idea how to deal with ADL-S and its derivatives. With ADL-P you can avoid that issue by making the platform name just "ADL", with ADL-P being one of its subplatforms. But ADL-S has to be both a platform and subplatform :/
Quoted 30 lines
drivers/gpu/drm/i915/intel_device_info.c +3
-3};@@ -257,9 +256,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_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 );drivers/gpu/drm/i915/intel_step.c +1
-1@@ -177,7 +177,7 @@ void intel_step_init(struct drm_i915_private *i915) }else if (IS_ALDERLAKE_P_N (i915)) { revids = adlp_n_revids; size =ARRAY_SIZE (adlp_n_revids); - }else if (IS_RAPTORLAKE_P (i915)) { + }else if (IS_RAPTORLAKE_P (i915) ||IS_RAPTORLAKE_U (i915)) { revids = adlp_rplp_revids; size =ARRAY_SIZE (adlp_rplp_revids); }else if (IS_ALDERLAKE_P (i915)) {Signature · 1 line
2.47.3
Signature · 2 lines
Ville Syrjälä Intel
Patchwork
CI✓ i915.CI.BAT: success for series starting with [1/2] drm/i915: simplify ULT/ULX subplatform detection
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: simplify ULT/ULX subplatform detection
URL : https://patchwork.freedesktop.org/series/179541/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_19605 -> Patchwork_179541v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179541v1/index.html
Participating hosts (40 -> 39)
------------------------------
Missing (1): bat-dg2-13
Changes
-------
No changes found
Build changes
-------------
* Linux: CI_DRM_19605 -> Patchwork_179541v1
CI-20190529: 20190529
CI_DRM_19605: 28c36332c01de3058d0cb9e350a77e1282c31658 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_9203: 9203
Patchwork_179541v1: 28c36332c01de3058d0cb9e350a77e1282c31658 @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_179541v1/index.html