[PATCH v2 04/10] etnaviv: increment correct seqno for external resources

Christian Gmeiner christian.gmeiner at gmail.com
Sun Jul 9 13:56:16 UTC 2017


2017-07-04 17:45 GMT+02:00 Lucas Stach <l.stach at pengutronix.de>:
> If we import a dma-buf with a sampler/pixel pipe incompatible modifier,
> the imported buffer will end up in an external resource view. As
> resource_changed signals the change of the imported resource, we need
> to update the external view seqno, instead of the base resource seqno.
>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> Reviewed-by: Wladimir J. van der Laan <laanwj at gmail.com>

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index be63b9c42172..69eecf224dc5 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -305,7 +305,10 @@ etna_resource_changed(struct pipe_screen *pscreen, struct pipe_resource *prsc)
>  {
>     struct etna_resource *res = etna_resource(prsc);
>
> -   res->seqno++;
> +   if (res->external)
> +      etna_resource(res->external)->seqno++;
> +   else
> +      res->seqno++;
>  }
>
>  static void
> --
> 2.11.0
>

greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info


More information about the etnaviv mailing list