diff options
author | Daniel Stone <daniels@collabora.com> | 2017-06-16 14:28:42 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-07-18 22:16:20 +0100 |
commit | 7f157a21f16296f72d005d73c301c90a98d1e662 (patch) | |
tree | e769289e3752af1b103247d63dfa260d75a1fb25 | |
parent | 7ac09e0c5511c1d2f622ab7271e33f6fe8c27841 (diff) |
gbm: Remove is_planar_format dead code
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>
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index e50ce04c86..1b2cc4ce76 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -1022,31 +1022,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, @@ -1068,11 +1043,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; |