[PATCH i-g-t v2 04/12] lib/intel_bufops: Add Tile4 in linear_to and to_linear helpers

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Jun 18 05:23:27 UTC 2024


intel_buf_to_linear() and linear_to_intel_buf() allows easy tile/detile,
only thing they need is to select appropriate implementation. There's
missing switch for Tile4 so let's add it.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 lib/intel_bufops.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 30ba2547dc..56e37d2da7 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -804,6 +804,10 @@ void intel_buf_to_linear(struct buf_ops *bops, struct intel_buf *buf,
 		igt_assert(bops->ys_to_linear);
 		bops->ys_to_linear(bops, buf, linear);
 		break;
+	case I915_TILING_4:
+		igt_assert(bops->tile4_to_linear);
+		bops->tile4_to_linear(bops, buf, linear);
+		break;
 	}
 
 	if (buf->compression)
@@ -836,6 +840,10 @@ void linear_to_intel_buf(struct buf_ops *bops, struct intel_buf *buf,
 		igt_assert(bops->linear_to_ys);
 		bops->linear_to_ys(bops, buf, linear);
 		break;
+	case I915_TILING_4:
+		igt_assert(bops->linear_to_tile4);
+		bops->linear_to_tile4(bops, buf, linear);
+		break;
 	}
 
 	if (buf->compression)
@@ -1942,6 +1950,10 @@ bool buf_ops_set_software_tiling(struct buf_ops *bops,
 		}
 		break;
 
+	case I915_TILING_4:
+		igt_debug("-> use SW on tiling 4\n");
+		break;
+
 	default:
 		igt_warn("Invalid tiling: %d\n", tiling);
 		was_changed = false;
-- 
2.34.1



More information about the igt-dev mailing list