[Mesa-dev] [PATCH 07/11] gbm: Remove is_planar_format dead code

Eric Engestrom eric.engestrom at imgtec.com
Fri Jun 16 18:00:07 UTC 2017


On Friday, 2017-06-16 18:14:30 +0100, Daniel Stone wrote:
> This was only used in create_dumb() to blacklist planar formats.
> However, the start of the function already whitelists ARGB8888 (cursor)
> and XRGB8888 (scanout), and nothing else. So this entire function can be
> removed.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>  src/gbm/backends/dri/gbm_dri.c | 32 +-------------------------------
>  1 file changed, 1 insertion(+), 31 deletions(-)
> 
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index 4ed780cdeb..3ee1004ddd 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -613,7 +613,7 @@ gbm_dri_is_format_supported(struct gbm_device *gbm,
>        break;
>     }
>  
> -   if ((usage & GBM_BO_USE_CURSOR) && (usage & GBM_BO_USE_RENDERING)
> +   if ((usage & GBM_BO_USE_CURSOR) && (usage & GBM_BO_USE_RENDERING))
>        return 0;
>  
>     if (gbm_format_to_dri_format(format) == 0)

This hunk fixes a bug introduced in the previous commit; squash it there
instead? :)


More information about the mesa-dev mailing list