Mesa (master): panfrost: Update the resource layout when doing a tile -> linear conversion
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 27 10:27:52 UTC 2020
Module: Mesa
Branch: master
Commit: d4f662a25227a3d469a516ba0acb6dc4d1a71bcb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4f662a25227a3d469a516ba0acb6dc4d1a71bcb
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Thu Nov 26 15:35:20 2020 +0100
panfrost: Update the resource layout when doing a tile -> linear conversion
If we don't do that the stride in texture/framebuffer descriptors
is wrong, leading to page faults when those buffers are accessed.
Fixes: 00360cd5c85e ("panfrost: Calculate the row stride at resource creation time")
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7797>
---
src/gallium/drivers/panfrost/pan_resource.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index c96546398f1..4727483e44f 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -1044,8 +1044,6 @@ panfrost_ptr_unmap(struct pipe_context *pctx,
assert(transfer->box.depth == 1);
if (panfrost_should_linear_convert(prsrc, transfer)) {
- prsrc->modifier = DRM_FORMAT_MOD_LINEAR;
-
util_copy_rect(
bo->ptr.cpu + prsrc->slices[0].offset,
prsrc->base.format,
@@ -1056,6 +1054,8 @@ panfrost_ptr_unmap(struct pipe_context *pctx,
trans->map,
transfer->stride,
0, 0);
+
+ panfrost_resource_setup(dev, prsrc, NULL, DRM_FORMAT_MOD_LINEAR);
} else {
panfrost_store_tiled_image(
bo->ptr.cpu + prsrc->slices[transfer->level].offset,
More information about the mesa-commit
mailing list