summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_step.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2021-03-26 16:21:35 +0300
committerJani Nikula <jani.nikula@intel.com>2021-03-29 14:56:13 +0300
commit34b7e27b88e546174638d6ec919d378012f731f2 (patch)
treeee1733a14701bc23854b2bf21c3e75c53ff3833e /drivers/gpu/drm/i915/intel_step.c
parentef47b7ab1faa6d32af351690e0bf664f6c6721b8 (diff)
downloadlinux-34b7e27b88e546174638d6ec919d378012f731f2.tar.xz
drm/i915: switch TGL and ADL to the new stepping scheme
This changes the way revids not present in the array are handled: - For gaps in the array, the next present revid is used. - For revids beyond the array, the new STEP_FUTURE is used instead of the last revid in the array. In both cases, we'll get debug logging of what's going on. v2: Rename stepping->step Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/756fe3d75b1e91ef812fc1fd3f70337e9c571d91.1616764798.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_step.c')
-rw-r--r--drivers/gpu/drm/i915/intel_step.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_step.c b/drivers/gpu/drm/i915/intel_step.c
index e9ff481b2eda..f6298622c53e 100644
--- a/drivers/gpu/drm/i915/intel_step.c
+++ b/drivers/gpu/drm/i915/intel_step.c
@@ -26,7 +26,7 @@ static const struct i915_rev_steppings kbl_revids[] = {
[7] = { .gt_stepping = STEP_G0, .disp_stepping = STEP_C0 },
};
-const struct i915_rev_steppings tgl_uy_revid_step_tbl[] = {
+static const struct i915_rev_steppings tgl_uy_revid_step_tbl[] = {
[0] = { .gt_stepping = STEP_A0, .disp_stepping = STEP_A0 },
[1] = { .gt_stepping = STEP_B0, .disp_stepping = STEP_C0 },
[2] = { .gt_stepping = STEP_B1, .disp_stepping = STEP_C0 },
@@ -34,12 +34,12 @@ const struct i915_rev_steppings tgl_uy_revid_step_tbl[] = {
};
/* Same GT stepping between tgl_uy_revids and tgl_revids don't mean the same HW */
-const struct i915_rev_steppings tgl_revid_step_tbl[] = {
+static const struct i915_rev_steppings tgl_revid_step_tbl[] = {
[0] = { .gt_stepping = STEP_A0, .disp_stepping = STEP_B0 },
[1] = { .gt_stepping = STEP_B0, .disp_stepping = STEP_D0 },
};
-const struct i915_rev_steppings adls_revid_step_tbl[] = {
+static const struct i915_rev_steppings adls_revid_step_tbl[] = {
[0x0] = { .gt_stepping = STEP_A0, .disp_stepping = STEP_A0 },
[0x1] = { .gt_stepping = STEP_A0, .disp_stepping = STEP_A2 },
[0x4] = { .gt_stepping = STEP_B0, .disp_stepping = STEP_B0 },
@@ -54,7 +54,16 @@ void intel_step_init(struct drm_i915_private *i915)
int revid = INTEL_REVID(i915);
struct i915_rev_steppings step = {};
- if (IS_KABYLAKE(i915)) {
+ if (IS_ALDERLAKE_S(i915)) {
+ revids = adls_revid_step_tbl;
+ size = ARRAY_SIZE(adls_revid_step_tbl);
+ } else if (IS_TGL_U(i915) || IS_TGL_Y(i915)) {
+ revids = tgl_uy_revid_step_tbl;
+ size = ARRAY_SIZE(tgl_uy_revid_step_tbl);
+ } else if (IS_TIGERLAKE(i915)) {
+ revids = tgl_revid_step_tbl;
+ size = ARRAY_SIZE(tgl_revid_step_tbl);
+ } else if (IS_KABYLAKE(i915)) {
revids = kbl_revids;
size = ARRAY_SIZE(kbl_revids);
}