]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/vc4: vec: Fix definition of PAL-M mode
authorMateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Thu, 29 Sep 2022 16:31:19 +0000 (18:31 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 10 Oct 2022 11:59:52 +0000 (13:59 +0200)
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.

Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v4-25-60d38873f782@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_vec.c

index 0b333386570267231d3f454cb3d2dd9df15abb65..92c07e31d632d71eabdfb577972d99166239e9c5 100644 (file)
@@ -69,6 +69,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
@@ -255,10 +256,9 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = {
                .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 = &ntsc_mode,
+               .config0 = VEC_CONFIG0_PAL_M_STD,
+               .config1 = VEC_CONFIG1_C_CVBS_CVBS,
        },
 };