[PATCH i-g-t v2 07/12] lib/intel_bufops: Add Ys tiling in linear_to and to_linear path
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Jun 18 05:23:30 UTC 2024
To iterate over all tilings we need to have each case addressed
in the code. Add missing Ys case.
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_blt.c | 3 +++
lib/intel_bufops.c | 6 ++++--
lib/intel_cmds_info.h | 1 +
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/intel_blt.c b/lib/intel_blt.c
index d1200ca862..20c42eec14 100644
--- a/lib/intel_blt.c
+++ b/lib/intel_blt.c
@@ -540,6 +540,7 @@ const char *blt_tiling_name(enum blt_tiling_type tiling)
case T_TILE4: return "tile4";
case T_TILE64: return "tile64";
case T_YFMAJOR: return "yfmajor";
+ case T_YSMAJOR: return "ysmajor";
default:
break;
}
@@ -582,6 +583,7 @@ int blt_tile_to_i915_tile(enum blt_tiling_type tiling)
case T_TILE4: return I915_TILING_4;
case T_TILE64: return I915_TILING_64;
case T_YFMAJOR: return I915_TILING_Yf;
+ case T_YSMAJOR: return I915_TILING_Ys;
default:
break;
}
@@ -606,6 +608,7 @@ enum blt_tiling_type i915_tile_to_blt_tile(uint32_t tiling)
case I915_TILING_4: return T_TILE4;
case I915_TILING_64: return T_TILE64;
case I915_TILING_Yf: return T_YFMAJOR;
+ case I915_TILING_Ys: return T_YSMAJOR;
default:
igt_assert_f(0, "Unknown tiling!\n");
}
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 36b9aa2a8c..38b720624e 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -1697,8 +1697,6 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
bops->y_to_linear = copy_y_to_linear;
bops->linear_to_tile4 = copy_linear_to_tile4;
bops->tile4_to_linear = copy_tile4_to_linear;
- bops->linear_to_ys = NULL;
- bops->ys_to_linear = NULL;
return bops;
}
@@ -1956,6 +1954,10 @@ bool buf_ops_set_software_tiling(struct buf_ops *bops,
igt_debug("-> use SW on tiling Yf\n");
break;
+ case I915_TILING_Ys:
+ igt_debug("-> use SW on tiling Ys\n");
+ break;
+
default:
igt_warn("Invalid tiling: %d\n", tiling);
was_changed = false;
diff --git a/lib/intel_cmds_info.h b/lib/intel_cmds_info.h
index 6f7d655083..7960e0412e 100644
--- a/lib/intel_cmds_info.h
+++ b/lib/intel_cmds_info.h
@@ -14,6 +14,7 @@ enum blt_tiling_type {
T_YMAJOR,
T_TILE4,
T_YFMAJOR,
+ T_YSMAJOR,
T_TILE64,
__BLT_MAX_TILING
};
--
2.34.1
More information about the igt-dev
mailing list