diff options
author | Vasily Khoruzhick <[email protected]> | 2019-12-08 12:03:42 -0800 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2019-12-09 15:21:55 +0000 |
commit | 01a451b04d2da9981ea8f16f9d0d6a49fcc6c2df (patch) | |
tree | 036eaa917d2a822134e4232c83f7cfc11f274153 /src/gallium/drivers/lima | |
parent | 9d78cf4584756e5f881cff757adbccfd6d66c1b6 (diff) |
lima: handle DRM_FORMAT_MOD_INVALID in resource_from_handle()
Assume that resource is tiled if we get DRM_FORMAT_MOD_INVALID
in resource_from_handle() and we don't have RO.
Fixes: 8c12f4e5f24f ("lima: enable tiling")
Reviewed-by: Qiang Yu <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima')
-rw-r--r-- | src/gallium/drivers/lima/lima_resource.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c index b5c7d11a83e..1b589ed5279 100644 --- a/src/gallium/drivers/lima/lima_resource.c +++ b/src/gallium/drivers/lima/lima_resource.c @@ -329,9 +329,13 @@ lima_resource_from_handle(struct pipe_screen *pscreen, case DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED: res->tiled = true; break; + case DRM_FORMAT_MOD_INVALID: + res->tiled = screen->ro == NULL; + break; default: fprintf(stderr, "Attempted to import unsupported modifier 0x%llx\n", (long long)handle->modifier); + goto err_out; } return pres; |