drm/vc4: drv: Add support for 2712 D-step

Add in the compatible string and VC4_GEN_ enum for the D-step

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241025-drm-vc4-2712-support-v2-22-35efa83c8fc0@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2024-10-25 18:15:53 +01:00
parent fa9ccf0102
commit 83c4f5947c
4 changed files with 9 additions and 0 deletions

View File

@@ -466,6 +466,7 @@ static void vc4_platform_drm_shutdown(struct platform_device *pdev)
static const struct of_device_id vc4_of_match[] = {
{ .compatible = "brcm,bcm2711-vc5", .data = (void *)VC4_GEN_5 },
/* NB GEN_6_C will be corrected on D0 hw to GEN_6_D via vc4_hvs_bind */
{ .compatible = "brcm,bcm2712-vc6", .data = (void *)VC4_GEN_6_C },
{ .compatible = "brcm,bcm2835-vc4", .data = (void *)VC4_GEN_4 },
{ .compatible = "brcm,cygnus-vc4", .data = (void *)VC4_GEN_4 },

View File

@@ -85,6 +85,7 @@ enum vc4_gen {
VC4_GEN_4,
VC4_GEN_5,
VC4_GEN_6_C,
VC4_GEN_6_D,
};
struct vc4_dev {

View File

@@ -1532,6 +1532,10 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
if (vc4->gen >= VC4_GEN_6_C) {
hvs->regset.regs = vc6_hvs_regs;
hvs->regset.nregs = ARRAY_SIZE(vc6_hvs_regs);
if (VC4_GET_FIELD(HVS_READ(SCALER6_VERSION), SCALER6_VERSION) ==
SCALER6_VERSION_D0)
vc4->gen = VC4_GEN_6_D;
} else {
hvs->regset.regs = vc4_hvs_regs;
hvs->regset.nregs = ARRAY_SIZE(vc4_hvs_regs);

View File

@@ -527,6 +527,9 @@
#define SCALER5_DLIST_START 0x00004000
#define SCALER6_VERSION 0x00000000
# define SCALER6_VERSION_MASK VC4_MASK(7, 0)
# define SCALER6_VERSION_C0 0x00000053
# define SCALER6_VERSION_D0 0x00000054
#define SCALER6_CXM_SIZE 0x00000004
#define SCALER6_LBM_SIZE 0x00000008
#define SCALER6_UBM_SIZE 0x0000000c