[igt-dev] [PATCH i-g-t v23 03/18] lib/intel_bufops: change stride requirements for Grantsdale

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Sun Aug 2 16:29:47 UTC 2020


Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 lib/intel_bufops.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 2ba4dbf6..d077b1ac 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -752,8 +752,7 @@ static void __intel_buf_init(struct buf_ops *bops,
 
 			if (bops->intel_gen < 3)
 				tile_width = 128;
-			else if (IS_915GM(devid) || IS_915G(devid) ||
-				 buf->tiling == I915_TILING_X)
+			else if (IS_915G(devid) || buf->tiling == I915_TILING_X)
 				tile_width = 512;
 			else
 				tile_width = 128;
@@ -1037,11 +1036,13 @@ static bool probe_hw_tiling(struct buf_ops *bops, uint32_t tiling,
 {
 	uint64_t size = 256 * 256;
 	uint32_t handle, buf_tiling, buf_swizzle, phys_swizzle;
-	uint32_t stride;
+	uint32_t devid, stride;
 	int ret;
 	bool is_set = false;
 
-	if (tiling == I915_TILING_X)
+	devid =  intel_get_drm_devid(bops->fd);
+
+	if (tiling == I915_TILING_X || IS_915G(devid))
 		stride = 512;
 	else if (tiling == I915_TILING_Y)
 		stride = 128;
-- 
2.26.0



More information about the igt-dev mailing list