Am Freitag, den 16.06.2017, 18:14 +0100 schrieb Daniel Stone: > 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 <dani...@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))
This hunk need to be squashed into the previous patch. With that fixed: Reviewed-by: Lucas Stach <l.st...@pengutronix.de> > return 0; > > if (gbm_format_to_dri_format(format) == 0) > @@ -1047,31 +1047,6 @@ gbm_dri_bo_import(struct gbm_device *gbm, > return &bo->base; > } > > -static bool > -is_planar_format(uint32_t format) > -{ > - switch (format) { > - case GBM_FORMAT_NV12: > - case GBM_FORMAT_NV21: > - case GBM_FORMAT_NV16: > - case GBM_FORMAT_NV61: > - case GBM_FORMAT_YUV410: > - case GBM_FORMAT_YVU410: > - case GBM_FORMAT_YUV411: > - case GBM_FORMAT_YVU411: > - case GBM_FORMAT_YUV420: > - case GBM_FORMAT_YVU420: > - case GBM_FORMAT_YUV422: > - case GBM_FORMAT_YVU422: > - case GBM_FORMAT_YUV444: > - case GBM_FORMAT_YVU444: > - return true; > - default: > - return false; > - } > - > -} > - > static struct gbm_bo * > create_dumb(struct gbm_device *gbm, > uint32_t width, uint32_t height, > @@ -1093,11 +1068,6 @@ create_dumb(struct gbm_device *gbm, > return NULL; > } > > - if (is_planar_format(format)) { > - errno = EINVAL; > - return NULL; > - } > - > bo = calloc(1, sizeof *bo); > if (bo == NULL) > return NULL; _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev