From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Cyrus Lien <cyrus.lien@canonical.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/edid: add support for min horizontal rate equal to max horizontal rate
Date: Tue, 9 Jun 2020 17:57:45 +0300 [thread overview]
Message-ID: <20200609145745.GO6112@intel.com> (raw)
In-Reply-To: <20200608195704.29841-1-cyrus.lien@canonical.com>
On Tue, Jun 09, 2020 at 03:57:04AM +0800, Cyrus Lien wrote:
> According to EDID spec, table 3.26, byte #6 and #8, which said "Minimum
> rate value shall be less than or equal to maximum rate value". The minimum
> horizontal/vertical rate value is able to be equal to maximum horizontal/
> veritcal rate value.
How does that justifiy ignoring the min value?
>
> This change check if h/v-sync excess maximum horizontal/vertical rate if
> hmin equal to hmax or vmin equal to vmax.
>
> Signed-off-by: Cyrus Lien <cyrus.lien@canonical.com>
> ---
> drivers/gpu/drm/drm_edid.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fed653f13c26..23878320eabd 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2674,6 +2674,9 @@ mode_in_hsync_range(const struct drm_display_mode *mode,
> hmax += ((t[4] & 0x08) ? 255 : 0);
> hsync = drm_mode_hsync(mode);
>
> + if (hmax == hmin)
> + return (hsync <= hmax);
> +
> return (hsync <= hmax && hsync >= hmin);
> }
>
> @@ -2691,6 +2694,9 @@ mode_in_vsync_range(const struct drm_display_mode *mode,
> vmax += ((t[4] & 0x02) ? 255 : 0);
> vsync = drm_mode_vrefresh(mode);
>
> + if (vmax == vmin)
> + return (vsync <= vmax);
> +
> return (vsync <= vmax && vsync >= vmin);
> }
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Cyrus Lien <cyrus.lien@canonical.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/edid: add support for min horizontal rate equal to max horizontal rate
Date: Tue, 9 Jun 2020 17:57:45 +0300 [thread overview]
Message-ID: <20200609145745.GO6112@intel.com> (raw)
In-Reply-To: <20200608195704.29841-1-cyrus.lien@canonical.com>
On Tue, Jun 09, 2020 at 03:57:04AM +0800, Cyrus Lien wrote:
> According to EDID spec, table 3.26, byte #6 and #8, which said "Minimum
> rate value shall be less than or equal to maximum rate value". The minimum
> horizontal/vertical rate value is able to be equal to maximum horizontal/
> veritcal rate value.
How does that justifiy ignoring the min value?
>
> This change check if h/v-sync excess maximum horizontal/vertical rate if
> hmin equal to hmax or vmin equal to vmax.
>
> Signed-off-by: Cyrus Lien <cyrus.lien@canonical.com>
> ---
> drivers/gpu/drm/drm_edid.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fed653f13c26..23878320eabd 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2674,6 +2674,9 @@ mode_in_hsync_range(const struct drm_display_mode *mode,
> hmax += ((t[4] & 0x08) ? 255 : 0);
> hsync = drm_mode_hsync(mode);
>
> + if (hmax == hmin)
> + return (hsync <= hmax);
> +
> return (hsync <= hmax && hsync >= hmin);
> }
>
> @@ -2691,6 +2694,9 @@ mode_in_vsync_range(const struct drm_display_mode *mode,
> vmax += ((t[4] & 0x02) ? 255 : 0);
> vsync = drm_mode_vrefresh(mode);
>
> + if (vmax == vmin)
> + return (vsync <= vmax);
> +
> return (vsync <= vmax && vsync >= vmin);
> }
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2020-06-09 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 19:57 [PATCH] drm/edid: add support for min horizontal rate equal to max horizontal rate Cyrus Lien
2020-06-08 19:57 ` Cyrus Lien
2020-06-09 14:57 ` Ville Syrjälä [this message]
2020-06-09 14:57 ` Ville Syrjälä
2020-06-17 16:58 ` Cyrus Lien
2020-06-17 17:56 ` Ville Syrjälä
2020-06-17 17:56 ` Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200609145745.GO6112@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=cyrus.lien@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.