From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 2/2] drm/i915: Use graphics ver, rel info for media on old platforms
Date: Tue, 11 Oct 2022 08:38:51 -0700 [thread overview]
Message-ID: <20221011153851.3781507-2-radhakrishna.sripada@intel.com> (raw)
In-Reply-To: <20221011153851.3781507-1-radhakrishna.sripada@intel.com>
Platforms prior to MTL do not have a separate media and graphics version.
On platforms where GMD id is not supported, reuse the graphics ip version,
release info for media.
The rest of the IP graphics, display versions would be copied during driver
creation.
While at it warn if GMD is not used for platforms greater than gen12.
v2:
- Use simple assignment to copy contents of the structure(JaniN)
Fixes: c2c7075225ef ("drm/i915: Read graphics/media/display arch version from hw")
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
drivers/gpu/drm/i915/intel_device_info.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 37267c662dc6..1dc1fb29a776 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -329,8 +329,16 @@ static void intel_ipver_early_init(struct drm_i915_private *i915)
{
struct intel_runtime_info *runtime = RUNTIME_INFO(i915);
- if (!HAS_GMD_ID(i915))
+ if (!HAS_GMD_ID(i915)) {
+ drm_WARN_ON(&i915->drm, RUNTIME_INFO(i915)->graphics.ip.ver > 12);
+ /*
+ * On older platforms, graphics and media share the same ip
+ * version and release.
+ */
+ RUNTIME_INFO(i915)->media.ip =
+ RUNTIME_INFO(i915)->graphics.ip;
return;
+ }
ip_ver_read(i915, i915_mmio_reg_offset(GMD_ID_GRAPHICS),
&runtime->graphics.ip);
--
2.34.1
next prev parent reply other threads:[~2022-10-11 15:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 15:38 [Intel-gfx] [PATCH v2 1/2] drm/i915: Add intel_ prefix to struct ip_version Radhakrishna Sripada
2022-10-11 15:38 ` Radhakrishna Sripada [this message]
2022-10-14 22:14 ` [Intel-gfx] [PATCH v2 2/2] drm/i915: Use graphics ver, rel info for media on old platforms Lucas De Marchi
2022-10-11 18:39 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/2] drm/i915: Add intel_ prefix to struct ip_version Patchwork
2022-10-11 19:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-12 0:37 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-10-17 17:29 ` [Intel-gfx] [PATCH v2 1/2] " Lucas De Marchi
2022-10-18 0:29 ` Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221011153851.3781507-2-radhakrishna.sripada@intel.com \
--to=radhakrishna.sripada@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox