Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-16 14:48:59 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-16 14:49:00 +0200
commitabd68160534c6a0ae3cc145f0e7eae66682f94a9 (patch)
treed4fdf8a874b054f782e2bacd5b530b93ddb4ff82
parentc31bdf9ea35c3f4d407b40f0c5af9d35071e32f2 (diff)
drm/meson: Add support for XBGR8888 & ABGR8888 formats
(bsc#1051510).
-rw-r--r--patches.drm/drm-meson-Add-support-for-XBGR8888-ABGR8888-formats.patch65
-rw-r--r--series.conf1
2 files changed, 66 insertions, 0 deletions
diff --git a/patches.drm/drm-meson-Add-support-for-XBGR8888-ABGR8888-formats.patch b/patches.drm/drm-meson-Add-support-for-XBGR8888-ABGR8888-formats.patch
new file mode 100644
index 0000000000..0fbdd80aae
--- /dev/null
+++ b/patches.drm/drm-meson-Add-support-for-XBGR8888-ABGR8888-formats.patch
@@ -0,0 +1,65 @@
+From 5ffff4415f9eeae834960226770963e2947e17eb Mon Sep 17 00:00:00 2001
+From: Neil Armstrong <narmstrong@baylibre.com>
+Date: Mon, 29 Apr 2019 09:52:38 +0200
+Subject: [PATCH] drm/meson: Add support for XBGR8888 & ABGR8888 formats
+Git-commit: 5ffff4415f9eeae834960226770963e2947e17eb
+Patch-mainline: v5.3-rc1
+References: bsc#1051510
+
+Add missing XBGR8888 & ABGR8888 formats variants from the primary plane.
+
+Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
+Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
+Reviewed-by: Kevin Hilman <khilman@baylibre.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20190429075238.7884-1-narmstrong@baylibre.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/meson/meson_plane.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
+index 97fdf6b4600c..5c7d39d1cde9 100644
+--- a/drivers/gpu/drm/meson/meson_plane.c
++++ b/drivers/gpu/drm/meson/meson_plane.c
+@@ -153,6 +153,13 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
+ priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
+ OSD_COLOR_MATRIX_32_ARGB;
+ break;
++ case DRM_FORMAT_XBGR8888:
++ /* For XRGB, replace the pixel's alpha by 0xFF */
++ writel_bits_relaxed(OSD_REPLACE_EN, OSD_REPLACE_EN,
++ priv->io_base + _REG(VIU_OSD1_CTRL_STAT2));
++ priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
++ OSD_COLOR_MATRIX_32_ABGR;
++ break;
+ case DRM_FORMAT_ARGB8888:
+ /* For ARGB, use the pixel's alpha */
+ writel_bits_relaxed(OSD_REPLACE_EN, 0,
+@@ -160,6 +167,13 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
+ priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
+ OSD_COLOR_MATRIX_32_ARGB;
+ break;
++ case DRM_FORMAT_ABGR8888:
++ /* For ARGB, use the pixel's alpha */
++ writel_bits_relaxed(OSD_REPLACE_EN, 0,
++ priv->io_base + _REG(VIU_OSD1_CTRL_STAT2));
++ priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_32 |
++ OSD_COLOR_MATRIX_32_ABGR;
++ break;
+ case DRM_FORMAT_RGB888:
+ priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_24 |
+ OSD_COLOR_MATRIX_24_RGB;
+@@ -344,7 +358,9 @@ static const struct drm_plane_funcs meson_plane_funcs = {
+
+ static const uint32_t supported_drm_formats[] = {
+ DRM_FORMAT_ARGB8888,
++ DRM_FORMAT_ABGR8888,
+ DRM_FORMAT_XRGB8888,
++ DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_RGB888,
+ DRM_FORMAT_RGB565,
+ };
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 693ce42f9b..a0708a3191 100644
--- a/series.conf
+++ b/series.conf
@@ -22915,6 +22915,7 @@
patches.arch/powerpc-mm-Fix-node-look-up-with-numa-off-boot.patch
patches.arch/powerpc-mm-Consolidate-numa_enable-check-and-min_com.patch
patches.drivers/platform-x86-pmc_atom-Add-CB4063-Beckhoff-Automation.patch
+ patches.drm/drm-meson-Add-support-for-XBGR8888-ABGR8888-formats.patch
# powerpc/linux next
patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch