0097-drm-vc4-Add-support-for-more-display-plane-formats.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 7a94e7c745428eb542ebbfe6370ae138ad76be4c Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Tue, 20 Oct 2015 13:59:15 +0100
  4. Subject: [PATCH 097/381] drm/vc4: Add support for more display plane formats.
  5. Signed-off-by: Eric Anholt <eric@anholt.net>
  6. ---
  7. drivers/gpu/drm/vc4/vc4_plane.c | 16 ++++++++++++++++
  8. 1 file changed, 16 insertions(+)
  9. --- a/drivers/gpu/drm/vc4/vc4_plane.c
  10. +++ b/drivers/gpu/drm/vc4/vc4_plane.c
  11. @@ -59,6 +59,22 @@ static const struct hvs_format {
  12. .drm = DRM_FORMAT_ARGB8888, .hvs = HVS_PIXEL_FORMAT_RGBA8888,
  13. .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = true,
  14. },
  15. + {
  16. + .drm = DRM_FORMAT_RGB565, .hvs = HVS_PIXEL_FORMAT_RGB565,
  17. + .pixel_order = HVS_PIXEL_ORDER_XRGB, .has_alpha = false,
  18. + },
  19. + {
  20. + .drm = DRM_FORMAT_BGR565, .hvs = HVS_PIXEL_FORMAT_RGB565,
  21. + .pixel_order = HVS_PIXEL_ORDER_XBGR, .has_alpha = false,
  22. + },
  23. + {
  24. + .drm = DRM_FORMAT_ARGB1555, .hvs = HVS_PIXEL_FORMAT_RGBA5551,
  25. + .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = true,
  26. + },
  27. + {
  28. + .drm = DRM_FORMAT_XRGB1555, .hvs = HVS_PIXEL_FORMAT_RGBA5551,
  29. + .pixel_order = HVS_PIXEL_ORDER_ABGR, .has_alpha = false,
  30. + },
  31. };
  32. static const struct hvs_format *vc4_get_hvs_format(u32 drm_format)