From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Mika Kahola <mika.kahola@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Check HDMI TMDS clock rate from DPCD
Date: Tue, 3 May 2016 16:26:01 +0300 [thread overview]
Message-ID: <20160503132601.GD4329@intel.com> (raw)
In-Reply-To: <1462275998-4864-4-git-send-email-mika.kahola@intel.com>
On Tue, May 03, 2016 at 02:46:38PM +0300, Mika Kahola wrote:
> Read TMDS clock rate from DPCD for HDMI to filter out
> modes that might require higher TMDS clock rate than
> supported.
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 3 +++
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++---
> 3 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 74a04ce..0fd078c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4591,6 +4591,9 @@ static void intel_dp_get_dfp(struct intel_dp *intel_dp)
> if (intel_dp->dfp.type & DP_DS_PORT_TYPE_VGA) {
> intel_dp->dfp.dot_clk = dfp_info[1] * 8 * 1000;
> DRM_DEBUG_KMS("max pixel rate for VGA is %d kHz\n", intel_dp->dfp.dot_clk);
> + } else if (!(intel_dp->dfp.type & DP_DS_PORT_TYPE_WIRELESS)) {
> + intel_dp->dfp.tmds_clk = DIV_ROUND_CLOSEST(dfp_info[1] * 25 * 1000, 10);
> + DRM_DEBUG_KMS("max TMDS clock is %d kHz\n", intel_dp->dfp.tmds_clk);
> }
> }
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 9798a59..8bf97da 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -799,6 +799,7 @@ struct intel_dp_dfp {
> int type;
> bool detailed_cap_info;
> int dot_clk; /* pixel rate for VGA dongles */
> + int tmds_clk;
> };
>
> struct intel_dp {
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index e1012d6..70e8e17 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1170,13 +1170,14 @@ static void pch_post_disable_hdmi(struct intel_encoder *encoder)
> static int hdmi_port_clock_limit(struct intel_hdmi *hdmi, bool respect_dvi_limit)
> {
> struct drm_device *dev = intel_hdmi_to_dev(hdmi);
> + int tmds_clock = hdmi_to_dig_port(hdmi)->dp.dfp.tmds_clk;
>
> if ((respect_dvi_limit && !hdmi->has_hdmi_sink) || IS_G4X(dev))
> - return 165000;
> + return (tmds_clock > 0 ? min(165000, tmds_clock) : 165000);
> else if (IS_HASWELL(dev) || INTEL_INFO(dev)->gen >= 8)
> - return 300000;
> + return (tmds_clock > 0 ? min(300000, tmds_clock) : 300000);
> else
> - return 225000;
> + return (tmds_clock > 0 ? min(225000, tmds_clock) : 225000);
Changing limits for native HDMI ports isn't going to do much when
dealing with active DP dongles.
> }
>
> static enum drm_mode_status
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-05-03 13:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 11:46 [PATCH 0/3] drm/i915: DP branch devices Mika Kahola
2016-05-03 11:46 ` [PATCH 1/3] drm/i915: Check pixel rate for DP to VGA dongle Mika Kahola
2016-05-03 13:23 ` Ville Syrjälä
2016-05-03 14:28 ` [Intel-gfx] " Daniel Vetter
2016-05-03 14:33 ` Ville Syrjälä
2016-05-10 9:44 ` Mika Kahola
2016-05-10 9:54 ` Ville Syrjälä
2016-05-03 11:46 ` [PATCH 2/3] drm: Add DP port types from DP 1.3 specification Mika Kahola
[not found] ` <CAKb7UvhW5_QHGBzzZusZU-gTTjhR0=J5djPE3z1VrTZrBRr6Kw@mail.gmail.com>
2016-05-03 14:35 ` Ilia Mirkin
2016-05-04 10:22 ` Mika Kahola
2016-05-03 11:46 ` [PATCH 3/3] drm/i915: Check HDMI TMDS clock rate from DPCD Mika Kahola
2016-05-03 13:26 ` Ville Syrjälä [this message]
2016-05-03 12:26 ` ✗ Fi.CI.BAT: warning for drm/i915: DP branch devices Patchwork
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=20160503132601.GD4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox