summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7ac09e0)
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.
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-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,
static struct gbm_bo *
create_dumb(struct gbm_device *gbm,
uint32_t width, uint32_t height,
- if (is_planar_format(format)) {
- errno = EINVAL;
- return NULL;
- }
-
bo = calloc(1, sizeof *bo);
if (bo == NULL)
return NULL;
bo = calloc(1, sizeof *bo);
if (bo == NULL)
return NULL;