linux-uconsole/drivers/gpu/drm/meson
Martin Blumenstingl a14083fe26 drm: meson: venc: cvbs: fix CVBS mode matching
commit 43cb86799f upstream.

With commit 222ec1618c ("drm: Add aspect ratio parsing in DRM
layer") the drm core started honoring the picture_aspect_ratio field
when comparing two drm_display_modes. Prior to that it was ignored.
When the CVBS encoder driver was initially submitted there was no aspect
ratio check.

Switch from drm_mode_equal() to drm_mode_match() without
DRM_MODE_MATCH_ASPECT_RATIO to fix "kmscube" and X.org output using the
CVBS connector. When (for example) kmscube sets the output mode when
using the CVBS connector it passes HDMI_PICTURE_ASPECT_NONE, making the
drm_mode_equal() fail as it include the aspect ratio.

Prior to this patch kmscube reported:
  failed to set mode: Invalid argument

The CVBS mode checking in the sun4i (drivers/gpu/drm/sun4i/sun4i_tv.c
sun4i_tv_mode_to_drm_mode) and ZTE (drivers/gpu/drm/zte/zx_tvenc.c
tvenc_mode_{pal,ntsc}) drivers don't set the "picture_aspect_ratio" at
all. The Meson VPU driver does not rely on the aspect ratio for the CVBS
output so we can safely decouple it from the hdmi_picture_aspect
setting.

Cc: <stable@vger.kernel.org>
Fixes: 222ec1618c ("drm: Add aspect ratio parsing in DRM layer")
Fixes: bbbe775ec5 ("drm: Add support for Amlogic Meson Graphic Controller")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: squashed with drm: meson: venc: cvbs: deduplicate the meson_cvbs_mode lookup code]
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191208171832.1064772-3-martin.blumenstingl@googlemail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-21 10:57:39 +01:00
..
Kconfig
Makefile
meson_canvas.c drm/meson: Convert existing documentation to actual kerneldoc 2017-04-04 17:49:31 +02:00
meson_canvas.h
meson_crtc.c drm/meson: Fix atomic mode switching regression 2019-01-31 08:14:40 +01:00
meson_crtc.h
meson_drv.c drm/meson: Uninstall IRQ handler 2019-05-04 09:20:20 +02:00
meson_drv.h drm/meson: fix vsync buffer update 2018-02-20 10:03:52 +01:00
meson_dw_hdmi.c drm/meson: Enable fast_io in meson_dw_hdmi_regmap_config 2018-12-08 12:59:07 +01:00
meson_dw_hdmi.h
meson_plane.c drm/meson: Add support for XBGR8888 & ABGR8888 formats 2019-09-19 09:09:36 +02:00
meson_plane.h
meson_registers.h drm/meson: Add missing VPU init 2017-12-08 10:43:46 +01:00
meson_vclk.c drm/meson: Make DMT timings parameters and pixel clock generic 2018-07-16 11:14:59 +02:00
meson_vclk.h drm/meson: Make DMT timings parameters and pixel clock generic 2018-07-16 11:14:59 +02:00
meson_venc.c drm/meson: add support for 1080p25 mode 2018-12-17 09:24:36 +01:00
meson_venc.h drm/meson: Make DMT timings parameters and pixel clock generic 2018-07-16 11:14:59 +02:00
meson_venc_cvbs.c drm: meson: venc: cvbs: fix CVBS mode matching 2019-12-21 10:57:39 +01:00
meson_venc_cvbs.h
meson_viu.c drm/meson: Fix OOB memory accesses in meson_viu_set_osd_lut() 2018-12-08 12:59:08 +01:00
meson_viu.h
meson_vpp.c drm/meson: Convert existing documentation to actual kerneldoc 2017-04-04 17:49:31 +02:00
meson_vpp.h