Skip to content

Commit

Permalink
drm/simplefb: Drop [XA]RGB2101010 cross-conversion
Browse files Browse the repository at this point in the history
Assuming Macs are the only platforms using this so far, the DTs have
always claimed XRGB2101010, so only the A->X path is relevant. Testing
suggests nothing depends on this. Let's drop it and see if anyone
complains.

Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Oct 27, 2022
1 parent 602165b commit f1d0725
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions drivers/gpu/drm/tiny/simpledrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,18 +485,6 @@ static const uint32_t simpledrm_primary_plane_formats_xrgb8888[] = {
//DRM_FORMAT_ARGB1555,
};

/*
* Supported conversions to [AX]RGB2101010:
* A/X variants (no-op)
* from [AX]RGB8888
*/
static const uint32_t simpledrm_primary_plane_formats_xrgb2101010[] = {
DRM_FORMAT_XRGB2101010,
DRM_FORMAT_ARGB2101010,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
};

static const uint64_t simpledrm_primary_plane_format_modifiers[] = {
DRM_FORMAT_MOD_LINEAR,
DRM_FORMAT_MOD_INVALID
Expand Down Expand Up @@ -823,6 +811,8 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
switch (format->format) {
case DRM_FORMAT_RGB565:
case DRM_FORMAT_RGB888:
case DRM_FORMAT_XRGB2101010:
case DRM_FORMAT_ARGB2101010:
conv_formats = simpledrm_primary_plane_formats_base;
conv_nformats = ARRAY_SIZE(simpledrm_primary_plane_formats_base);
break;
Expand All @@ -831,11 +821,6 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
conv_formats = simpledrm_primary_plane_formats_xrgb8888;
conv_nformats = ARRAY_SIZE(simpledrm_primary_plane_formats_xrgb8888);
break;
case DRM_FORMAT_XRGB2101010:
case DRM_FORMAT_ARGB2101010:
conv_formats = simpledrm_primary_plane_formats_xrgb2101010;
conv_nformats = ARRAY_SIZE(simpledrm_primary_plane_formats_xrgb2101010);
break;
default:
conv_formats = NULL;
conv_nformats = 0;
Expand Down

0 comments on commit f1d0725

Please sign in to comment.