Skip to content

Commit dfbbcaf

Browse files
mripardpelwell
authored andcommitted
drm/vc4: hdmi: Replace CSC_CTL hardcoded value by defines
On BCM2711, the HDMI_CSC_CTL register value has been hardcoded to an opaque value. Let's replace it with properly defined values. Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
1 parent 35fccf0 commit dfbbcaf

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,9 +795,8 @@ static void vc5_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi,
795795
const struct drm_display_mode *mode)
796796
{
797797
unsigned long flags;
798-
u32 csc_ctl;
799-
800-
csc_ctl = 0x07; /* RGB_CONVERT_MODE = custom matrix, || USE_RGB_TO_YCBCR */
798+
u32 csc_ctl = VC5_MT_CP_CSC_CTL_ENABLE | VC4_SET_FIELD(VC4_HD_CSC_CTL_MODE_CUSTOM,
799+
VC5_MT_CP_CSC_CTL_MODE);
801800

802801
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
803802

‎drivers/gpu/drm/vc4/vc4_regs.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ enum {
796796
# define VC4_HD_CSC_CTL_RGB2YCC BIT(1)
797797
# define VC4_HD_CSC_CTL_ENABLE BIT(0)
798798

799+
# define VC5_MT_CP_CSC_CTL_ENABLE BIT(2)
800+
# define VC5_MT_CP_CSC_CTL_MODE_MASK VC4_MASK(1, 0)
801+
799802
# define VC4_DVP_HT_CLOCK_STOP_PIXEL BIT(1)
800803

801804
/* HVS display list information. */

0 commit comments

Comments
 (0)