mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 09:40:21 +01:00
etnaviv: fix NULL pointer dereference in TS allocation
Commitc2b06e1a38("etnaviv: add support for sharing the TS buffer") introduced a problem similar to the one fixed in3b3cd51286("etnaviv: fix renderonly check in etna_resource_alloc") in a different code path. This causes a NULL pointer dereference when the screen is instanciated on the render node. Fix it in the same way by just checking for a valid pointer. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19923>
This commit is contained in:
parent
3aadbb9fde
commit
74ff3f70bb
1 changed files with 1 additions and 1 deletions
|
|
@ -154,7 +154,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen,
|
|||
DBG_F(ETNA_DBG_RESOURCE_MSGS, "%p: Allocating tile status of size %zu",
|
||||
rsc, ts_bo_size);
|
||||
|
||||
if ((rsc->base.bind & PIPE_BIND_SCANOUT) && screen->ro->kms_fd >= 0) {
|
||||
if ((rsc->base.bind & PIPE_BIND_SCANOUT) && screen->ro) {
|
||||
struct pipe_resource scanout_templat;
|
||||
struct winsys_handle handle;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue