From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 1/4] lib/intel: Extract gem_store_dword_needs_physical()
Date: Wed, 2 Oct 2024 13:45:12 +0300 [thread overview]
Message-ID: <20241002104515.32164-1-ville.syrjala@linux.intel.com> (raw)
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Extract a small helper that can determine if MI_STORE_DWORD
operates with physical addresses or not.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_gt.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 9641a6610bf2..331783e49acf 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -655,21 +655,27 @@ unsigned intel_detect_and_clear_missed_interrupts(int fd)
return missed;
}
+static bool gem_store_dword_needs_physical(const struct intel_device_info *info)
+{
+ switch (info->graphics_ver) {
+ case 2:
+ return true;
+ case 3:
+ return info->is_grantsdale || info->is_alviso;
+ default:
+ return false;
+ }
+}
+
bool gem_class_can_store_dword(int fd, int class)
{
uint16_t devid = intel_get_drm_devid(fd);
const struct intel_device_info *info = intel_get_device_info(devid);
const int ver = info->graphics_ver;
- if (ver == 0) /* unknown, assume it just works */
- return true;
-
- if (ver <= 2) /* requires physical addresses */
+ if (gem_store_dword_needs_physical(info))
return false;
- if (ver == 3 && (info->is_grantsdale || info->is_alviso))
- return false; /* only supports physical addresses */
-
if (ver == 6 && class == I915_ENGINE_CLASS_VIDEO)
return false; /* broken, unbelievably broken */
--
2.45.2
next reply other threads:[~2024-10-02 10:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 10:45 Ville Syrjala [this message]
2024-10-02 10:45 ` [PATCH i-g-t 2/4] lib/intel: Unify MI_STORE_DWORD secure batch checks Ville Syrjala
2024-10-02 14:43 ` Kamil Konieczny
2024-10-08 21:27 ` Ville Syrjälä
2024-10-10 18:49 ` Ville Syrjälä
2024-10-11 8:42 ` Kamil Konieczny
2024-10-02 10:45 ` [PATCH i-g-t 3/4] lib/intel: MI_STORE_DWORD doesn't need secure batches on i965 Ville Syrjala
2024-10-11 8:46 ` Kamil Konieczny
2024-10-02 10:45 ` [PATCH i-g-t 4/4] lib/intel: Documnent gem_can_store_dword() Ville Syrjala
2024-10-11 8:48 ` Kamil Konieczny
2024-10-02 12:00 ` ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/4] lib/intel: Extract gem_store_dword_needs_physical() Patchwork
2024-10-02 12:12 ` ✓ CI.xeBAT: success " Patchwork
2024-10-02 13:49 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-04 10:33 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-10-07 14:54 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/intel: Extract gem_store_dword_needs_physical() (rev2) Patchwork
2024-10-07 15:11 ` ✓ CI.xeBAT: " Patchwork
2024-10-08 6:51 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-08 12:39 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-11 8:45 ` [PATCH i-g-t 1/4] lib/intel: Extract gem_store_dword_needs_physical() Kamil Konieczny
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=20241002104515.32164-1-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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