Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eugeniy Paltsev and committed by
Alexey Brodkin
5908a3bd 491b14b9

+4 -4
+3 -3
drivers/gpu/drm/arc/arcpgu_crtc.c
··· 22 22 23 23 static const u32 arc_pgu_supported_formats[] = { 24 24 DRM_FORMAT_RGB565, 25 - DRM_FORMAT_RGB888, 25 + DRM_FORMAT_XRGB8888, 26 26 }; 27 27 28 28 static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc) ··· 44 44 45 45 reg_ctrl = arc_pgu_read(arcpgu, ARCPGU_REG_CTRL); 46 46 if (format == DRM_FORMAT_RGB565) 47 - reg_ctrl &= ~ARCPGU_MODE_RGB888_MASK; 47 + reg_ctrl &= ~ARCPGU_MODE_XRGB8888; 48 48 else 49 - reg_ctrl |= ARCPGU_MODE_RGB888_MASK; 49 + reg_ctrl |= ARCPGU_MODE_XRGB8888; 50 50 arc_pgu_write(arcpgu, ARCPGU_REG_CTRL, reg_ctrl); 51 51 } 52 52
+1 -1
drivers/gpu/drm/arc/arcpgu_regs.h
··· 25 25 #define ARCPGU_CTRL_VS_POL_OFST 0x3 26 26 #define ARCPGU_CTRL_HS_POL_MASK 0x1 27 27 #define ARCPGU_CTRL_HS_POL_OFST 0x4 28 - #define ARCPGU_MODE_RGB888_MASK 0x04 28 + #define ARCPGU_MODE_XRGB8888 BIT(2) 29 29 #define ARCPGU_STAT_BUSY_MASK 0x02 30 30 31 31 #endif