[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119144147.8022-4-Eugeniy.Paltsev@synopsys.com>
Date: Tue, 19 Nov 2019 17:41:46 +0300
From: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
To: dri-devel@...ts.freedesktop.org,
Alexey Brodkin <Alexey.Brodkin@...opsys.com>
Cc: linux-snps-arc@...ts.infradead.org, linux-kernel@...r.kernel.org,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
Subject: [PATCH 3/4] DRM: ARC: PGU: replace unsupported by HW RGB888 format by XRGB888
ARC PGU doesn't support RGB888 (24 bit) format but supports
XRGB888 (32 bit) format. Fix incorrect format list in a driver.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
---
drivers/gpu/drm/arc/arcpgu_crtc.c | 6 +++---
drivers/gpu/drm/arc/arcpgu_regs.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 5473b19a52ee..980e00180e6f 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -22,7 +22,7 @@
static const u32 arc_pgu_supported_formats[] = {
DRM_FORMAT_RGB565,
- DRM_FORMAT_RGB888,
+ DRM_FORMAT_XRGB8888,
};
static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc)
@@ -44,9 +44,9 @@ static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc)
reg_ctrl = arc_pgu_read(arcpgu, ARCPGU_REG_CTRL);
if (format == DRM_FORMAT_RGB565)
- reg_ctrl &= ~ARCPGU_MODE_RGB888_MASK;
+ reg_ctrl &= ~ARCPGU_MODE_XRGB8888;
else
- reg_ctrl |= ARCPGU_MODE_RGB888_MASK;
+ reg_ctrl |= ARCPGU_MODE_XRGB8888;
arc_pgu_write(arcpgu, ARCPGU_REG_CTRL, reg_ctrl);
}
diff --git a/drivers/gpu/drm/arc/arcpgu_regs.h b/drivers/gpu/drm/arc/arcpgu_regs.h
index dab2c380f7f3..b689a382d556 100644
--- a/drivers/gpu/drm/arc/arcpgu_regs.h
+++ b/drivers/gpu/drm/arc/arcpgu_regs.h
@@ -25,7 +25,7 @@
#define ARCPGU_CTRL_VS_POL_OFST 0x3
#define ARCPGU_CTRL_HS_POL_MASK 0x1
#define ARCPGU_CTRL_HS_POL_OFST 0x4
-#define ARCPGU_MODE_RGB888_MASK 0x04
+#define ARCPGU_MODE_XRGB8888 BIT(2)
#define ARCPGU_STAT_BUSY_MASK 0x02
#endif
--
2.21.0
Powered by blists - more mailing lists