Commit 311e305f authored by Maxime Ripard's avatar Maxime Ripard

drm/vc4: hdmi: Implement a register layout abstraction

The HDMI controllers found in the BCM2711 have most of the registers
reorganized in multiple registers areas and at different offsets than
previously found.

The logic however remains pretty much the same, so it doesn't really make
sense to create a whole new driver and we should share the code as much as
possible.

Let's implement some indirection to wrap around a register and depending on
the variant will lookup the associated register on that particular variant.
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Tested-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Tested-by: default avatarHoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3070236daff920e7edd11c5a72ac31fd0f6a656b.1599120059.git-series.maxime@cerno.tech
parent 33c773eb
This diff is collapsed.
......@@ -22,8 +22,15 @@ to_vc4_hdmi_encoder(struct drm_encoder *encoder)
}
struct vc4_hdmi;
struct vc4_hdmi_register;
struct vc4_hdmi_variant {
/* List of the registers available on that variant */
const struct vc4_hdmi_register *registers;
/* Number of registers on that variant */
unsigned int num_registers;
/* Callback to get the resources (memory region, interrupts,
* clocks, etc) for that variant.
*/
......@@ -85,9 +92,4 @@ encoder_to_vc4_hdmi(struct drm_encoder *encoder)
return container_of(_encoder, struct vc4_hdmi, encoder);
}
#define HDMI_READ(offset) readl(vc4_hdmi->hdmicore_regs + offset)
#define HDMI_WRITE(offset, val) writel(val, vc4_hdmi->hdmicore_regs + offset)
#define HD_READ(offset) readl(vc4_hdmi->hd_regs + offset)
#define HD_WRITE(offset, val) writel(val, vc4_hdmi->hd_regs + offset)
#endif /* _VC4_HDMI_H_ */
#ifndef _VC4_HDMI_REGS_H_
#define _VC4_HDMI_REGS_H_
#include "vc4_hdmi.h"
#define VC4_HDMI_PACKET_STRIDE 0x24
enum vc4_hdmi_regs {
VC4_INVALID = 0,
VC4_HDMI,
VC4_HD,
};
enum vc4_hdmi_field {
HDMI_AUDIO_PACKET_CONFIG,
HDMI_CEC_CNTRL_1,
HDMI_CEC_CNTRL_2,
HDMI_CEC_CNTRL_3,
HDMI_CEC_CNTRL_4,
HDMI_CEC_CNTRL_5,
HDMI_CEC_CPU_CLEAR,
HDMI_CEC_CPU_MASK_CLEAR,
HDMI_CEC_CPU_MASK_SET,
HDMI_CEC_CPU_MASK_STATUS,
HDMI_CEC_CPU_STATUS,
/*
* Transmit data, first byte is low byte of the 32-bit reg.
* MSB of each byte transmitted first.
*/
HDMI_CEC_RX_DATA_1,
HDMI_CEC_RX_DATA_2,
HDMI_CEC_RX_DATA_3,
HDMI_CEC_RX_DATA_4,
HDMI_CEC_TX_DATA_1,
HDMI_CEC_TX_DATA_2,
HDMI_CEC_TX_DATA_3,
HDMI_CEC_TX_DATA_4,
HDMI_CORE_REV,
HDMI_CRP_CFG,
HDMI_CSC_12_11,
HDMI_CSC_14_13,
HDMI_CSC_22_21,
HDMI_CSC_24_23,
HDMI_CSC_32_31,
HDMI_CSC_34_33,
HDMI_CSC_CTL,
/*
* 20-bit fields containing CTS values to be transmitted if
* !EXTERNAL_CTS_EN
*/
HDMI_CTS_0,
HDMI_CTS_1,
HDMI_FIFO_CTL,
HDMI_FRAME_COUNT,
HDMI_HORZA,
HDMI_HORZB,
HDMI_HOTPLUG,
HDMI_HOTPLUG_INT,
/*
* 3 bits per field, where each field maps from that
* corresponding MAI bus channel to the given HDMI channel.
*/
HDMI_MAI_CHANNEL_MAP,
HDMI_MAI_CONFIG,
HDMI_MAI_CTL,
/*
* Register for DMAing in audio data to be transported over
* the MAI bus to the Falcon core.
*/
HDMI_MAI_DATA,
/* Format header to be placed on the MAI data. Unused. */
HDMI_MAI_FMT,
/* Last received format word on the MAI bus. */
HDMI_MAI_FORMAT,
HDMI_MAI_SMP,
HDMI_MAI_THR,
HDMI_M_CTL,
HDMI_RAM_PACKET_CONFIG,
HDMI_RAM_PACKET_START,
HDMI_RAM_PACKET_STATUS,
HDMI_SCHEDULER_CONTROL,
HDMI_SW_RESET_CONTROL,
HDMI_TX_PHY_CTL_0,
HDMI_TX_PHY_RESET_CTL,
HDMI_VERTA0,
HDMI_VERTA1,
HDMI_VERTB0,
HDMI_VERTB1,
HDMI_VID_CTL,
};
struct vc4_hdmi_register {
char *name;
enum vc4_hdmi_regs reg;
unsigned int offset;
};
#define _VC4_REG(_base, _reg, _offset) \
[_reg] = { \
.name = #_reg, \
.reg = _base, \
.offset = _offset, \
}
#define VC4_HD_REG(reg, offset) _VC4_REG(VC4_HD, reg, offset)
#define VC4_HDMI_REG(reg, offset) _VC4_REG(VC4_HDMI, reg, offset)
static const struct vc4_hdmi_register vc4_hdmi_fields[] = {
VC4_HD_REG(HDMI_M_CTL, 0x000c),
VC4_HD_REG(HDMI_MAI_CTL, 0x0014),
VC4_HD_REG(HDMI_MAI_THR, 0x0018),
VC4_HD_REG(HDMI_MAI_FMT, 0x001c),
VC4_HD_REG(HDMI_MAI_DATA, 0x0020),
VC4_HD_REG(HDMI_MAI_SMP, 0x002c),
VC4_HD_REG(HDMI_VID_CTL, 0x0038),
VC4_HD_REG(HDMI_CSC_CTL, 0x0040),
VC4_HD_REG(HDMI_CSC_12_11, 0x0044),
VC4_HD_REG(HDMI_CSC_14_13, 0x0048),
VC4_HD_REG(HDMI_CSC_22_21, 0x004c),
VC4_HD_REG(HDMI_CSC_24_23, 0x0050),
VC4_HD_REG(HDMI_CSC_32_31, 0x0054),
VC4_HD_REG(HDMI_CSC_34_33, 0x0058),
VC4_HD_REG(HDMI_FRAME_COUNT, 0x0068),
VC4_HDMI_REG(HDMI_CORE_REV, 0x0000),
VC4_HDMI_REG(HDMI_SW_RESET_CONTROL, 0x0004),
VC4_HDMI_REG(HDMI_HOTPLUG_INT, 0x0008),
VC4_HDMI_REG(HDMI_HOTPLUG, 0x000c),
VC4_HDMI_REG(HDMI_FIFO_CTL, 0x005c),
VC4_HDMI_REG(HDMI_MAI_CHANNEL_MAP, 0x0090),
VC4_HDMI_REG(HDMI_MAI_CONFIG, 0x0094),
VC4_HDMI_REG(HDMI_MAI_FORMAT, 0x0098),
VC4_HDMI_REG(HDMI_AUDIO_PACKET_CONFIG, 0x009c),
VC4_HDMI_REG(HDMI_RAM_PACKET_CONFIG, 0x00a0),
VC4_HDMI_REG(HDMI_RAM_PACKET_STATUS, 0x00a4),
VC4_HDMI_REG(HDMI_CRP_CFG, 0x00a8),
VC4_HDMI_REG(HDMI_CTS_0, 0x00ac),
VC4_HDMI_REG(HDMI_CTS_1, 0x00b0),
VC4_HDMI_REG(HDMI_SCHEDULER_CONTROL, 0x00c0),
VC4_HDMI_REG(HDMI_HORZA, 0x00c4),
VC4_HDMI_REG(HDMI_HORZB, 0x00c8),
VC4_HDMI_REG(HDMI_VERTA0, 0x00cc),
VC4_HDMI_REG(HDMI_VERTB0, 0x00d0),
VC4_HDMI_REG(HDMI_VERTA1, 0x00d4),
VC4_HDMI_REG(HDMI_VERTB1, 0x00d8),
VC4_HDMI_REG(HDMI_CEC_CNTRL_1, 0x00e8),
VC4_HDMI_REG(HDMI_CEC_CNTRL_2, 0x00ec),
VC4_HDMI_REG(HDMI_CEC_CNTRL_3, 0x00f0),
VC4_HDMI_REG(HDMI_CEC_CNTRL_4, 0x00f4),
VC4_HDMI_REG(HDMI_CEC_CNTRL_5, 0x00f8),
VC4_HDMI_REG(HDMI_CEC_TX_DATA_1, 0x00fc),
VC4_HDMI_REG(HDMI_CEC_TX_DATA_2, 0x0100),
VC4_HDMI_REG(HDMI_CEC_TX_DATA_3, 0x0104),
VC4_HDMI_REG(HDMI_CEC_TX_DATA_4, 0x0108),
VC4_HDMI_REG(HDMI_CEC_RX_DATA_1, 0x010c),
VC4_HDMI_REG(HDMI_CEC_RX_DATA_2, 0x0110),
VC4_HDMI_REG(HDMI_CEC_RX_DATA_3, 0x0114),
VC4_HDMI_REG(HDMI_CEC_RX_DATA_4, 0x0118),
VC4_HDMI_REG(HDMI_TX_PHY_RESET_CTL, 0x02c0),
VC4_HDMI_REG(HDMI_TX_PHY_CTL_0, 0x02c4),
VC4_HDMI_REG(HDMI_CEC_CPU_STATUS, 0x0340),
VC4_HDMI_REG(HDMI_CEC_CPU_CLEAR, 0x0348),
VC4_HDMI_REG(HDMI_CEC_CPU_MASK_STATUS, 0x034c),
VC4_HDMI_REG(HDMI_CEC_CPU_MASK_SET, 0x034c),
VC4_HDMI_REG(HDMI_CEC_CPU_MASK_CLEAR, 0x0354),
VC4_HDMI_REG(HDMI_RAM_PACKET_START, 0x0400),
};
static inline
void __iomem *__vc4_hdmi_get_field_base(struct vc4_hdmi *hdmi,
enum vc4_hdmi_regs reg)
{
switch (reg) {
case VC4_HD:
return hdmi->hd_regs;
case VC4_HDMI:
return hdmi->hdmicore_regs;
default:
return NULL;
}
return NULL;
}
static inline u32 vc4_hdmi_read(struct vc4_hdmi *hdmi,
enum vc4_hdmi_regs reg)
{
const struct vc4_hdmi_register *field;
const struct vc4_hdmi_variant *variant = hdmi->variant;
void __iomem *base;
if (reg > variant->num_registers) {
dev_warn(&hdmi->pdev->dev,
"Invalid register ID %u\n", reg);
return 0;
}
field = &variant->registers[reg];
base = __vc4_hdmi_get_field_base(hdmi, field->reg);
if (!base) {
dev_warn(&hdmi->pdev->dev,
"Unknown register ID %u\n", reg);
return 0;
}
return readl(base + field->offset);
}
#define HDMI_READ(reg) vc4_hdmi_read(vc4_hdmi, reg)
static inline void vc4_hdmi_write(struct vc4_hdmi *hdmi,
enum vc4_hdmi_regs reg,
u32 value)
{
const struct vc4_hdmi_register *field;
const struct vc4_hdmi_variant *variant = hdmi->variant;
void __iomem *base;
if (reg > variant->num_registers) {
dev_warn(&hdmi->pdev->dev,
"Invalid register ID %u\n", reg);
return;
}
field = &variant->registers[reg];
base = __vc4_hdmi_get_field_base(hdmi, field->reg);
if (!base)
return;
writel(value, base + field->offset);
}
#define HDMI_WRITE(reg, val) vc4_hdmi_write(vc4_hdmi, reg, val)
#endif /* _VC4_HDMI_REGS_H_ */
......@@ -493,32 +493,16 @@
#define SCALER5_DLIST_START 0x00004000
#define VC4_HDMI_CORE_REV 0x000
#define VC4_HDMI_SW_RESET_CONTROL 0x004
# define VC4_HDMI_SW_RESET_FORMAT_DETECT BIT(1)
# define VC4_HDMI_SW_RESET_HDMI BIT(0)
#define VC4_HDMI_HOTPLUG_INT 0x008
#define VC4_HDMI_HOTPLUG 0x00c
# define VC4_HDMI_HOTPLUG_CONNECTED BIT(0)
/* 3 bits per field, where each field maps from that corresponding MAI
* bus channel to the given HDMI channel.
*/
#define VC4_HDMI_MAI_CHANNEL_MAP 0x090
#define VC4_HDMI_MAI_CONFIG 0x094
# define VC4_HDMI_MAI_CONFIG_FORMAT_REVERSE BIT(27)
# define VC4_HDMI_MAI_CONFIG_BIT_REVERSE BIT(26)
# define VC4_HDMI_MAI_CHANNEL_MASK_MASK VC4_MASK(15, 0)
# define VC4_HDMI_MAI_CHANNEL_MASK_SHIFT 0
/* Last received format word on the MAI bus. */
#define VC4_HDMI_MAI_FORMAT 0x098
#define VC4_HDMI_AUDIO_PACKET_CONFIG 0x09c
# define VC4_HDMI_AUDIO_PACKET_ZERO_DATA_ON_SAMPLE_FLAT BIT(29)
# define VC4_HDMI_AUDIO_PACKET_ZERO_DATA_ON_INACTIVE_CHANNELS BIT(24)
# define VC4_HDMI_AUDIO_PACKET_FORCE_SAMPLE_PRESENT BIT(19)
......@@ -532,12 +516,8 @@
# define VC4_HDMI_AUDIO_PACKET_CEA_MASK_MASK VC4_MASK(7, 0)
# define VC4_HDMI_AUDIO_PACKET_CEA_MASK_SHIFT 0
#define VC4_HDMI_RAM_PACKET_CONFIG 0x0a0
# define VC4_HDMI_RAM_PACKET_ENABLE BIT(16)
#define VC4_HDMI_RAM_PACKET_STATUS 0x0a4
#define VC4_HDMI_CRP_CFG 0x0a8
/* When set, the CTS_PERIOD counts based on MAI bus sync pulse instead
* of pixel clock.
*/
......@@ -551,23 +531,12 @@
# define VC4_HDMI_CRP_CFG_N_MASK VC4_MASK(19, 0)
# define VC4_HDMI_CRP_CFG_N_SHIFT 0
/* 20-bit fields containing CTS values to be transmitted if !EXTERNAL_CTS_EN */
#define VC4_HDMI_CTS_0 0x0ac
#define VC4_HDMI_CTS_1 0x0b0
/* 20-bit fields containing number of clocks to send CTS0/1 before
* switching to the other one.
*/
#define VC4_HDMI_CTS_PERIOD_0 0x0b4
#define VC4_HDMI_CTS_PERIOD_1 0x0b8
#define VC4_HDMI_HORZA 0x0c4
# define VC4_HDMI_HORZA_VPOS BIT(14)
# define VC4_HDMI_HORZA_HPOS BIT(13)
/* Horizontal active pixels (hdisplay). */
# define VC4_HDMI_HORZA_HAP_MASK VC4_MASK(12, 0)
# define VC4_HDMI_HORZA_HAP_SHIFT 0
#define VC4_HDMI_HORZB 0x0c8
/* Horizontal pack porch (htotal - hsync_end). */
# define VC4_HDMI_HORZB_HBP_MASK VC4_MASK(29, 20)
# define VC4_HDMI_HORZB_HBP_SHIFT 20
......@@ -578,7 +547,6 @@
# define VC4_HDMI_HORZB_HFP_MASK VC4_MASK(9, 0)
# define VC4_HDMI_HORZB_HFP_SHIFT 0
#define VC4_HDMI_FIFO_CTL 0x05c
# define VC4_HDMI_FIFO_CTL_RECENTER_DONE BIT(14)
# define VC4_HDMI_FIFO_CTL_USE_EMPTY BIT(13)
# define VC4_HDMI_FIFO_CTL_ON_VB BIT(7)
......@@ -591,15 +559,12 @@
# define VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N BIT(0)
# define VC4_HDMI_FIFO_VALID_WRITE_MASK 0xefff
#define VC4_HDMI_SCHEDULER_CONTROL 0x0c0
# define VC4_HDMI_SCHEDULER_CONTROL_MANUAL_FORMAT BIT(15)
# define VC4_HDMI_SCHEDULER_CONTROL_IGNORE_VSYNC_PREDICTS BIT(5)
# define VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWAYS_KEEPOUT BIT(3)
# define VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE BIT(1)
# define VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI BIT(0)
#define VC4_HDMI_VERTA0 0x0cc
#define VC4_HDMI_VERTA1 0x0d4
/* Vertical sync pulse (vsync_end - vsync_start). */
# define VC4_HDMI_VERTA_VSP_MASK VC4_MASK(24, 20)
# define VC4_HDMI_VERTA_VSP_SHIFT 20
......@@ -610,8 +575,6 @@
# define VC4_HDMI_VERTA_VAL_MASK VC4_MASK(12, 0)
# define VC4_HDMI_VERTA_VAL_SHIFT 0
#define VC4_HDMI_VERTB0 0x0d0
#define VC4_HDMI_VERTB1 0x0d8
/* Vertical sync pulse offset (for interlaced) */
# define VC4_HDMI_VERTB_VSPO_MASK VC4_MASK(21, 9)
# define VC4_HDMI_VERTB_VSPO_SHIFT 9
......@@ -619,7 +582,6 @@
# define VC4_HDMI_VERTB_VBP_MASK VC4_MASK(8, 0)
# define VC4_HDMI_VERTB_VBP_SHIFT 0
#define VC4_HDMI_CEC_CNTRL_1 0x0e8
/* Set when the transmission has ended. */
# define VC4_HDMI_CEC_TX_EOM BIT(31)
/* If set, transmission was acked on the 1st or 2nd attempt (only one
......@@ -660,7 +622,6 @@
/* Set these fields to how many bit clock cycles get to that many
* microseconds.
*/
#define VC4_HDMI_CEC_CNTRL_2 0x0ec
# define VC4_HDMI_CEC_CNT_TO_1500_US_MASK VC4_MASK(30, 24)
# define VC4_HDMI_CEC_CNT_TO_1500_US_SHIFT 24
# define VC4_HDMI_CEC_CNT_TO_1300_US_MASK VC4_MASK(23, 17)
......@@ -672,7 +633,6 @@
# define VC4_HDMI_CEC_CNT_TO_400_US_MASK VC4_MASK(4, 0)
# define VC4_HDMI_CEC_CNT_TO_400_US_SHIFT 0
#define VC4_HDMI_CEC_CNTRL_3 0x0f0
# define VC4_HDMI_CEC_CNT_TO_2750_US_MASK VC4_MASK(31, 24)
# define VC4_HDMI_CEC_CNT_TO_2750_US_SHIFT 24
# define VC4_HDMI_CEC_CNT_TO_2400_US_MASK VC4_MASK(23, 16)
......@@ -682,7 +642,6 @@
# define VC4_HDMI_CEC_CNT_TO_1700_US_MASK VC4_MASK(7, 0)
# define VC4_HDMI_CEC_CNT_TO_1700_US_SHIFT 0
#define VC4_HDMI_CEC_CNTRL_4 0x0f4
# define VC4_HDMI_CEC_CNT_TO_4300_US_MASK VC4_MASK(31, 24)
# define VC4_HDMI_CEC_CNT_TO_4300_US_SHIFT 24
# define VC4_HDMI_CEC_CNT_TO_3900_US_MASK VC4_MASK(23, 16)
......@@ -692,7 +651,6 @@
# define VC4_HDMI_CEC_CNT_TO_3500_US_MASK VC4_MASK(7, 0)
# define VC4_HDMI_CEC_CNT_TO_3500_US_SHIFT 0
#define VC4_HDMI_CEC_CNTRL_5 0x0f8
# define VC4_HDMI_CEC_TX_SW_RESET BIT(27)
# define VC4_HDMI_CEC_RX_SW_RESET BIT(26)
# define VC4_HDMI_CEC_PAD_SW_RESET BIT(25)
......@@ -705,39 +663,11 @@
# define VC4_HDMI_CEC_CNT_TO_4500_US_MASK VC4_MASK(7, 0)
# define VC4_HDMI_CEC_CNT_TO_4500_US_SHIFT 0
/* Transmit data, first byte is low byte of the 32-bit reg. MSB of
* each byte transmitted first.
*/
#define VC4_HDMI_CEC_TX_DATA_1 0x0fc
#define VC4_HDMI_CEC_TX_DATA_2 0x100
#define VC4_HDMI_CEC_TX_DATA_3 0x104
#define VC4_HDMI_CEC_TX_DATA_4 0x108
#define VC4_HDMI_CEC_RX_DATA_1 0x10c
#define VC4_HDMI_CEC_RX_DATA_2 0x110
#define VC4_HDMI_CEC_RX_DATA_3 0x114
#define VC4_HDMI_CEC_RX_DATA_4 0x118
#define VC4_HDMI_TX_PHY_RESET_CTL 0x2c0
#define VC4_HDMI_TX_PHY_CTL0 0x2c4
# define VC4_HDMI_TX_PHY_RNG_PWRDN BIT(25)
/* Interrupt status bits */
#define VC4_HDMI_CPU_STATUS 0x340
#define VC4_HDMI_CPU_SET 0x344
#define VC4_HDMI_CPU_CLEAR 0x348
# define VC4_HDMI_CPU_CEC BIT(6)
# define VC4_HDMI_CPU_HOTPLUG BIT(0)
#define VC4_HDMI_CPU_MASK_STATUS 0x34c
#define VC4_HDMI_CPU_MASK_SET 0x350
#define VC4_HDMI_CPU_MASK_CLEAR 0x354
#define VC4_HDMI_GCP(x) (0x400 + ((x) * 0x4))
#define VC4_HDMI_RAM_PACKET(x) (0x400 + ((x) * 0x24))
#define VC4_HDMI_PACKET_STRIDE 0x24
#define VC4_HD_M_CTL 0x00c
/* Debug: Current receive value on the CEC pad. */
# define VC4_HD_CECRXD BIT(9)
/* Debug: Override CEC output to 0. */
......@@ -747,7 +677,6 @@
# define VC4_HD_M_SW_RST BIT(2)
# define VC4_HD_M_ENABLE BIT(0)
#define VC4_HD_MAI_CTL 0x014
/* Set when audio stream is received at a slower rate than the
* sampling period, so MAI fifo goes empty. Write 1 to clear.
*/
......@@ -772,7 +701,6 @@
/* Single-shot reset bit. Read value is undefined. */
# define VC4_HD_MAI_CTL_RESET BIT(0)
#define VC4_HD_MAI_THR 0x018
# define VC4_HD_MAI_THR_PANICHIGH_MASK VC4_MASK(29, 24)
# define VC4_HD_MAI_THR_PANICHIGH_SHIFT 24
# define VC4_HD_MAI_THR_PANICLOW_MASK VC4_MASK(21, 16)
......@@ -782,31 +710,20 @@
# define VC4_HD_MAI_THR_DREQLOW_MASK VC4_MASK(5, 0)
# define VC4_HD_MAI_THR_DREQLOW_SHIFT 0
/* Format header to be placed on the MAI data. Unused. */
#define VC4_HD_MAI_FMT 0x01c
/* Register for DMAing in audio data to be transported over the MAI
* bus to the Falcon core.
*/
#define VC4_HD_MAI_DATA 0x020
/* Divider from HDMI HSM clock to MAI serial clock. Sampling period
* converges to N / (M + 1) cycles.
*/
#define VC4_HD_MAI_SMP 0x02c
# define VC4_HD_MAI_SMP_N_MASK VC4_MASK(31, 8)
# define VC4_HD_MAI_SMP_N_SHIFT 8
# define VC4_HD_MAI_SMP_M_MASK VC4_MASK(7, 0)
# define VC4_HD_MAI_SMP_M_SHIFT 0
#define VC4_HD_VID_CTL 0x038
# define VC4_HD_VID_CTL_ENABLE BIT(31)
# define VC4_HD_VID_CTL_UNDERFLOW_ENABLE BIT(30)
# define VC4_HD_VID_CTL_FRAME_COUNTER_RESET BIT(29)
# define VC4_HD_VID_CTL_VSYNC_LOW BIT(28)
# define VC4_HD_VID_CTL_HSYNC_LOW BIT(27)
#define VC4_HD_CSC_CTL 0x040
# define VC4_HD_CSC_CTL_ORDER_MASK VC4_MASK(7, 5)
# define VC4_HD_CSC_CTL_ORDER_SHIFT 5
# define VC4_HD_CSC_CTL_ORDER_RGB 0
......@@ -824,15 +741,6 @@
# define VC4_HD_CSC_CTL_RGB2YCC BIT(1)
# define VC4_HD_CSC_CTL_ENABLE BIT(0)
#define VC4_HD_CSC_12_11 0x044
#define VC4_HD_CSC_14_13 0x048
#define VC4_HD_CSC_22_21 0x04c
#define VC4_HD_CSC_24_23 0x050
#define VC4_HD_CSC_32_31 0x054
#define VC4_HD_CSC_34_33 0x058
#define VC4_HD_FRAME_COUNT 0x068
/* HVS display list information. */
#define HVS_BOOTLOADER_DLIST_END 32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment