Re: [Mesa-dev] [PATCH] etnaviv: only try to construct scanout resource when on KMS winsys

2019-03-27 Thread Christian Gmeiner
Am Mi., 27. März 2019 um 12:25 Uhr schrieb Lucas Stach :
>
> Trying to construct a scanout capable buffer will only ever work when
> when we are on top of a KMS winsys, as the render node isn't capable
> of allocating contiguous buffers.
>
> Tested-by: Marius Vlad 
> Signed-off-by: Lucas Stach 

Reviewed-by: Christian Gmeiner 

> ---
>  src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c 
> b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> index c7eedab74187..83179d3cd088 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
> @@ -238,7 +238,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned 
> layout,
> if (!screen->specs.use_blt && templat->target != PIPE_BUFFER)
>etna_adjust_rs_align(screen->specs.pixel_pipes, NULL, );
>
> -   if (templat->bind & PIPE_BIND_SCANOUT) {
> +   if (templat->bind & PIPE_BIND_SCANOUT && screen->ro->kms_fd >= 0) {
>struct pipe_resource scanout_templat = *templat;
>struct renderonly_scanout *scanout;
>struct winsys_handle handle;
> --
> 2.20.1
>
> ___
> etnaviv mailing list
> etna...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv



-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] etnaviv: only try to construct scanout resource when on KMS winsys

2019-03-27 Thread Lucas Stach
Trying to construct a scanout capable buffer will only ever work when
when we are on top of a KMS winsys, as the render node isn't capable
of allocating contiguous buffers.

Tested-by: Marius Vlad 
Signed-off-by: Lucas Stach 
---
 src/gallium/drivers/etnaviv/etnaviv_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c 
b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index c7eedab74187..83179d3cd088 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -238,7 +238,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned 
layout,
if (!screen->specs.use_blt && templat->target != PIPE_BUFFER)
   etna_adjust_rs_align(screen->specs.pixel_pipes, NULL, );
 
-   if (templat->bind & PIPE_BIND_SCANOUT) {
+   if (templat->bind & PIPE_BIND_SCANOUT && screen->ro->kms_fd >= 0) {
   struct pipe_resource scanout_templat = *templat;
   struct renderonly_scanout *scanout;
   struct winsys_handle handle;
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev