Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/4] lib/intel: Extract gem_store_dword_needs_physical()
@ 2024-10-02 10:45 Ville Syrjala
  2024-10-02 10:45 ` [PATCH i-g-t 2/4] lib/intel: Unify MI_STORE_DWORD secure batch checks Ville Syrjala
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Ville Syrjala @ 2024-10-02 10:45 UTC (permalink / raw)
  To: igt-dev

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


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-10-11  8:48 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 10:45 [PATCH i-g-t 1/4] lib/intel: Extract gem_store_dword_needs_physical() Ville Syrjala
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox