[Mesa-dev] [PATCH] gbm: Add GBM_BO_USE_LINEAR flag

Alex Deucher alexdeucher at gmail.com
Fri Mar 27 08:06:09 PDT 2015


On Fri, Mar 27, 2015 at 4:58 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Flora Cui <flora.cui at amd.com>
>
> Signed-off-by: Flora Cui <flora.cui at amd.com>
> Reviewed-by: Jammy Zhou <Jammy.Zhou at amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gbm/backends/dri/gbm_dri.c | 2 ++
>  src/gbm/main/gbm.h             | 4 ++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index c513672..62bdf89 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -858,6 +858,8 @@ gbm_dri_bo_create(struct gbm_device *gbm,
>        dri_use |= __DRI_IMAGE_USE_SCANOUT;
>     if (usage & GBM_BO_USE_CURSOR)
>        dri_use |= __DRI_IMAGE_USE_CURSOR;
> +   if (usage & GBM_BO_USE_LINEAR)
> +      dri_use |= __DRI_IMAGE_USE_LINEAR;
>
>     /* Gallium drivers requires shared in order to get the handle/stride */
>     dri_use |= __DRI_IMAGE_USE_SHARE;
> diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
> index 7b23c26..2708e50 100644
> --- a/src/gbm/main/gbm.h
> +++ b/src/gbm/main/gbm.h
> @@ -209,6 +209,10 @@ enum gbm_bo_flags {
>      * with GBM_BO_USE_CURSOR. but may not work for other combinations.
>      */
>     GBM_BO_USE_WRITE    = (1 << 3),
> +   /**
> +    * Buffer is linear, i.e. not tiled.
> +    */
> +   GBM_BO_USE_LINEAR = (1 << 4),
>  };
>
>  int
> --
> 2.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list