diff mbox series

drm/meson/meson_venc: Relax the supported mode checks

Message ID 20230210-relax_dmt_limits-v1-0-a1474624d530@baylibre.com (mailing list archive)
State Superseded
Delegated to: Neil Armstrong
Headers show
Series drm/meson/meson_venc: Relax the supported mode checks | expand

Commit Message

Carlo Caione Feb. 10, 2023, 10:55 a.m. UTC
Relax a bit the supported modes list by including also 480x1920. This
was actually tested on real hardware and it works correctly.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
drm/meson/meson_venc: Add more supported resolutions.

In particular relax the resolution checks to allow more resolutions like
480x1920.

To: Neil Armstrong <neil.armstrong@linaro.org>
To: David Airlie <airlied@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
To: Kevin Hilman <khilman@baylibre.com>
To: Jerome Brunet <jbrunet@baylibre.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpu/drm/meson/meson_venc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


---
base-commit: 38c1e0c65865426676123cc9a127526fa02bcac6
change-id: 20230210-relax_dmt_limits-355e2a1c7ccf

Best regards,

Comments

Carlo Caione Feb. 13, 2023, 9:15 a.m. UTC | #1
On 13/02/2023 08:09, Da Xue wrote:

>     -       if (mode->hdisplay < 640 || mode->hdisplay > 1920)
>     +       if (mode->hdisplay < 480 || mode->hdisplay > 1920)
>                      return MODE_BAD_HVALUE;
> 
>     -       if (mode->vdisplay < 480 || mode->vdisplay > 1200)
>     +       if (mode->vdisplay < 480 || mode->vdisplay > 1920)
>                      return MODE_BAD_VVALUE;
> 
> Should these be lowered to 400 instead of 480?

If you want to support 400x1280 then we need to tweak mode->hdisplay as 
well.

I'll push a v2.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c
index 3c55ed003359..5b3621589a9f 100644
--- a/drivers/gpu/drm/meson/meson_venc.c
+++ b/drivers/gpu/drm/meson/meson_venc.c
@@ -866,10 +866,10 @@  meson_venc_hdmi_supported_mode(const struct drm_display_mode *mode)
 			    DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC))
 		return MODE_BAD;
 
-	if (mode->hdisplay < 640 || mode->hdisplay > 1920)
+	if (mode->hdisplay < 480 || mode->hdisplay > 1920)
 		return MODE_BAD_HVALUE;
 
-	if (mode->vdisplay < 480 || mode->vdisplay > 1200)
+	if (mode->vdisplay < 480 || mode->vdisplay > 1920)
 		return MODE_BAD_VVALUE;
 
 	return MODE_OK;