mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
etnaviv: fix refcnt initialization in etna_screen
Despite being a member of the etna_screen struct, 'refcnt' is used by
the winsys-specific logic to track the reference count of the object
managed in a hash table. When the count reaches zero, the pipe screen
is removed from the table and destroyed.
Fix the logic by initializing the refcnt to 1 when screen created.
This initialization is done in etna_screen_create(), to follow the
same logic as in freedreno and virgl.
Fixes: c9e8b49b88 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
parent
c036122646
commit
5d8514de14
1 changed files with 1 additions and 0 deletions
|
|
@ -772,6 +772,7 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
|
|||
screen->dev = dev;
|
||||
screen->gpu = gpu;
|
||||
screen->ro = renderonly_dup(ro);
|
||||
screen->refcnt = 1;
|
||||
|
||||
if (!screen->ro) {
|
||||
DBG("could not create renderonly object");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue