Skip to content

Commit a1fa726

Browse files
committed
Merge tag 'drm-misc-fixes-2021-08-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Short summary of fixes pull: * meson: Fix colors when booting with HDR Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YRTb+qUuBYWjJDVg@linux-uq9g.fritz.box
2 parents 3e234e9 + bf33677 commit a1fa726

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

drivers/gpu/drm/meson/meson_registers.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@
634634
#define VPP_WRAP_OSD3_MATRIX_PRE_OFFSET2 0x3dbc
635635
#define VPP_WRAP_OSD3_MATRIX_EN_CTRL 0x3dbd
636636

637+
/* osd1 HDR */
638+
#define OSD1_HDR2_CTRL 0x38a0
639+
#define OSD1_HDR2_CTRL_VDIN0_HDR2_TOP_EN BIT(13)
640+
#define OSD1_HDR2_CTRL_REG_ONLY_MAT BIT(16)
641+
637642
/* osd2 scaler */
638643
#define OSD2_VSC_PHASE_STEP 0x3d00
639644
#define OSD2_VSC_INI_PHASE 0x3d01

drivers/gpu/drm/meson/meson_viu.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,14 @@ void meson_viu_init(struct meson_drm *priv)
425425
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXM) ||
426426
meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL))
427427
meson_viu_load_matrix(priv);
428-
else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
428+
else if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
429429
meson_viu_set_g12a_osd1_matrix(priv, RGB709_to_YUV709l_coeff,
430430
true);
431+
/* fix green/pink color distortion from vendor u-boot */
432+
writel_bits_relaxed(OSD1_HDR2_CTRL_REG_ONLY_MAT |
433+
OSD1_HDR2_CTRL_VDIN0_HDR2_TOP_EN, 0,
434+
priv->io_base + _REG(OSD1_HDR2_CTRL));
435+
}
431436

432437
/* Initialize OSD1 fifo control register */
433438
reg = VIU_OSD_DDR_PRIORITY_URGENT |

0 commit comments

Comments
 (0)