Mesa (staging/21.2): etnaviv: fix renderonly check in etna_resource_alloc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 30 17:14:46 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 1396ddcc4e2ec14e0428770144461d0f4d857ac9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1396ddcc4e2ec14e0428770144461d0f4d857ac9
Author: Simon Ser <contact at emersion.fr>
Date: Tue Jul 27 08:52:45 2021 +0200
etnaviv: fix renderonly check in etna_resource_alloc
When the driver hasn't been initialized via renderonly, screen->ro
will be NULL. This fixes a crash when passing USE_SCANOUT to etnaviv
when it's missing renderonly.
Signed-off-by: Simon Ser <contact at emersion.fr>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074>
(cherry picked from commit 3b3cd5128672ab2dd2541b1789a40a4dd2652cc1)
---
.pick_status.json | 2 +-
src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 2c8d2f0a30a..44b2b1865fc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -283,7 +283,7 @@
"description": "etnaviv: fix renderonly check in etna_resource_alloc",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index ce37b0e779c..fa865f25093 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -272,7 +272,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale);
- if (unlikely(templat->bind & PIPE_BIND_SCANOUT) && screen->ro->kms_fd >= 0) {
+ if (unlikely(templat->bind & PIPE_BIND_SCANOUT) && screen->ro) {
struct pipe_resource scanout_templat = *templat;
struct winsys_handle handle;
More information about the mesa-commit
mailing list