diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch b/target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch new file mode 100644 index 0000000000..762e877049 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0448-drm-vc4-Fix-definition-of-PAL-M-mode.patch @@ -0,0 +1,77 @@ +From 967b49174527035216ee4d54c82c4528fed0be55 Mon Sep 17 00:00:00 2001 +From: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> +Date: Thu, 15 Jul 2021 01:07:53 +0200 +Subject: [PATCH] drm/vc4: Fix definition of PAL-M mode + +PAL-M is a Brazilian analog TV standard that uses a PAL-style chroma +subcarrier at 3.575611[888111] MHz on top of 525-line (480i60) timings. +This commit makes the driver actually use the proper VEC preset for this +mode instead of just changing PAL subcarrier frequency. + +DRM mode constant names have also been changed, as they no longer +correspond to the "NTSC" or "PAL" terms. + +Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com> +--- + drivers/gpu/drm/vc4/vc4_vec.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_vec.c ++++ b/drivers/gpu/drm/vc4/vc4_vec.c +@@ -68,6 +68,7 @@ + #define VEC_CONFIG0_STD_MASK GENMASK(1, 0) + #define VEC_CONFIG0_NTSC_STD 0 + #define VEC_CONFIG0_PAL_BDGHI_STD 1 ++#define VEC_CONFIG0_PAL_M_STD 2 + #define VEC_CONFIG0_PAL_N_STD 3 + + #define VEC_SCHPH 0x108 +@@ -241,14 +242,14 @@ static const struct debugfs_reg32 vec_re + VC4_REG32(VEC_DAC_MISC), + }; + +-static const struct drm_display_mode ntsc_mode = { ++static const struct drm_display_mode drm_mode_480i = { + DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 13500, + 720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0, + 480, 480 + 7, 480 + 7 + 6, 525, 0, + DRM_MODE_FLAG_INTERLACE) + }; + +-static const struct drm_display_mode pal_mode = { ++static const struct drm_display_mode drm_mode_576i = { + DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 13500, + 720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0, + 576, 576 + 4, 576 + 4 + 6, 625, 0, +@@ -257,25 +258,24 @@ static const struct drm_display_mode pal + + static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = { + [VC4_VEC_TV_MODE_NTSC] = { +- .mode = &ntsc_mode, ++ .mode = &drm_mode_480i, + .config0 = VEC_CONFIG0_NTSC_STD | VEC_CONFIG0_PDEN, + .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, + [VC4_VEC_TV_MODE_NTSC_J] = { +- .mode = &ntsc_mode, ++ .mode = &drm_mode_480i, + .config0 = VEC_CONFIG0_NTSC_STD, + .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, + [VC4_VEC_TV_MODE_PAL] = { +- .mode = &pal_mode, ++ .mode = &drm_mode_576i, + .config0 = VEC_CONFIG0_PAL_BDGHI_STD, + .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, + [VC4_VEC_TV_MODE_PAL_M] = { +- .mode = &pal_mode, +- .config0 = VEC_CONFIG0_PAL_BDGHI_STD, +- .config1 = VEC_CONFIG1_C_CVBS_CVBS | VEC_CONFIG1_CUSTOM_FREQ, +- .custom_freq = 0x223b61d1, ++ .mode = &drm_mode_480i, ++ .config0 = VEC_CONFIG0_PAL_M_STD, ++ .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, + }; + |