Skip to content

Commit 5908a3b

Browse files
Eugeniy Paltsevabrodkin
authored andcommitted
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@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
1 parent 491b14b commit 5908a3b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/gpu/drm/arc/arcpgu_crtc.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
static const u32 arc_pgu_supported_formats[] = {
2424
DRM_FORMAT_RGB565,
25-
DRM_FORMAT_RGB888,
25+
DRM_FORMAT_XRGB8888,
2626
};
2727

2828
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)
4444

4545
reg_ctrl = arc_pgu_read(arcpgu, ARCPGU_REG_CTRL);
4646
if (format == DRM_FORMAT_RGB565)
47-
reg_ctrl &= ~ARCPGU_MODE_RGB888_MASK;
47+
reg_ctrl &= ~ARCPGU_MODE_XRGB8888;
4848
else
49-
reg_ctrl |= ARCPGU_MODE_RGB888_MASK;
49+
reg_ctrl |= ARCPGU_MODE_XRGB8888;
5050
arc_pgu_write(arcpgu, ARCPGU_REG_CTRL, reg_ctrl);
5151
}
5252

‎drivers/gpu/drm/arc/arcpgu_regs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#define ARCPGU_CTRL_VS_POL_OFST 0x3
2626
#define ARCPGU_CTRL_HS_POL_MASK 0x1
2727
#define ARCPGU_CTRL_HS_POL_OFST 0x4
28-
#define ARCPGU_MODE_RGB888_MASK 0x04
28+
#define ARCPGU_MODE_XRGB8888 BIT(2)
2929
#define ARCPGU_STAT_BUSY_MASK 0x02
3030

3131
#endif

0 commit comments

Comments
 (0)