[igt-dev] [PATCH i-g-t 1/3] lib/igt_draw: BCS_SWCTRL is gen6+

Ville Syrjala ville.syrjala at linux.intel.com
Fri Nov 29 14:30:46 UTC 2019


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Let's make sure we are runing on gen6+ before trying
to poke BCS_SWCTRL.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/igt_draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index bea86c612df8..11bbfd0a1353 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -273,6 +273,8 @@ static void switch_blt_tiling(struct intel_batchbuffer *batch, uint32_t tiling,
 	if (tiling != I915_TILING_Y)
 		return;
 
+	igt_require(batch->gen >= 6);
+
 	bcs_swctrl = (0x3 << 16) | (on ? 0x3 : 0x0);
 
 	/* To change the tile register, insert an MI_FLUSH_DW followed by an
-- 
2.23.0



More information about the igt-dev mailing list