[PATCH] drm/udl: Cut >165 MHz modes for DVI

Dave Airlie airlied at gmail.com
Fri Mar 15 01:51:23 UTC 2019


On Sat, 9 Mar 2019 at 19:39, Robert Tarasov <tutankhamen at chromium.org> wrote:
>
> Filter out all modes with clock higher than 165 MHz for DVI connector in
> drm/udl driver.
>
> Signed-off-by: Robert Tarasov <tutankhamen at chromium.org>
> ---
>  drivers/gpu/drm/udl/udl_connector.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
> index 68b221b9a01f..3b9be500b9ae 100644
> --- a/drivers/gpu/drm/udl/udl_connector.c
> +++ b/drivers/gpu/drm/udl/udl_connector.c
> @@ -109,6 +109,14 @@ static int udl_mode_valid(struct drm_connector *connector,
>                           struct drm_display_mode *mode)
>  {
>         struct udl_device *udl = connector->dev->dev_private;
> +       int con_type = connector->connector_type;
> +
> +       if ((con_type == DRM_MODE_CONNECTOR_DVII ||
> +            con_type == DRM_MODE_CONNECTOR_DVID ||
> +            con_type == DRM_MODE_CONNECTOR_DVIA) &&
> +           mode->clock > 165000)
> +               return MODE_CLOCK_HIGH;

I think you can just do (mode->clock > 165000)

At least currently the driver hardcodes DVII connectors always.

Whether that is worth fixing (not even sure we get told what is on the
other side), is another question.

Dave.


More information about the dri-devel mailing list