From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/13] drm/i915: Fully separate source vs. sink rates
Date: Tue, 17 Mar 2015 11:06:31 +0100 [thread overview]
Message-ID: <20150317100631.GR21993@phenom.ffwll.local> (raw)
In-Reply-To: <1426173039-24584-7-git-send-email-ville.syrjala@linux.intel.com>
On Thu, Mar 12, 2015 at 05:10:32PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Remove the sink vs. source limit mess from intel_dp_max_link_bw() and
> just move the source restriction checks to intel_dp_source_rates().
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index aa373a2..61538f4 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -126,19 +126,11 @@ int
> intel_dp_max_link_bw(struct intel_dp *intel_dp)
> {
> int max_link_bw = intel_dp->dpcd[DP_MAX_LINK_RATE];
> - struct drm_device *dev = intel_dp->attached_connector->base.dev;
>
> switch (max_link_bw) {
> case DP_LINK_BW_1_62:
> case DP_LINK_BW_2_7:
> - break;
> - case DP_LINK_BW_5_4: /* 1.2 capable displays may advertise higher bw */
> - if (((IS_HASWELL(dev) && !IS_HSW_ULX(dev)) ||
> - INTEL_INFO(dev)->gen >= 8) &&
> - intel_dp->dpcd[DP_DPCD_REV] >= 0x12)
> - max_link_bw = DP_LINK_BW_5_4;
> - else
> - max_link_bw = DP_LINK_BW_2_7;
> + case DP_LINK_BW_5_4:
This hunk conflicts with the WaDisableHBR2 patch. Resolved it while
applying.
-Daniel
> break;
> default:
> WARN(1, "invalid max DP link bw val %x, using 1.62Gbps\n",
> @@ -1151,10 +1143,8 @@ intel_dp_sink_rates(struct intel_dp *intel_dp, const int **sink_rates)
> }
>
> static int
> -intel_dp_source_rates(struct intel_dp *intel_dp, const int **source_rates)
> +intel_dp_source_rates(struct drm_device *dev, const int **source_rates)
> {
> - struct drm_device *dev = intel_dp_to_dev(intel_dp);
> -
> if (INTEL_INFO(dev)->gen >= 9) {
> *source_rates = gen9_rates;
> return ARRAY_SIZE(gen9_rates);
> @@ -1162,7 +1152,11 @@ intel_dp_source_rates(struct intel_dp *intel_dp, const int **source_rates)
>
> *source_rates = default_rates;
>
> - return (intel_dp_max_link_bw(intel_dp) >> 3) + 1;
> + if (INTEL_INFO(dev)->gen >= 8 ||
> + (IS_HASWELL(dev) && !IS_HSW_ULX(dev)))
> + return (DP_LINK_BW_5_4 >> 3) + 1;
> + else
> + return (DP_LINK_BW_2_7 >> 3) + 1;
> }
>
> static void
> @@ -1256,7 +1250,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
>
> sink_len = intel_dp_sink_rates(intel_dp, &sink_rates);
>
> - source_len = intel_dp_source_rates(intel_dp, &source_rates);
> + source_len = intel_dp_source_rates(dev, &source_rates);
>
> supported_len = intel_supported_rates(source_rates, source_len,
> sink_rates, sink_len, supported_rates);
> --
> 2.0.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-17 10:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 15:10 [PATCH 00/13] drm/i915: Clean up the DP link rate code ville.syrjala
2015-03-12 15:10 ` [PATCH 01/13] drm/i915: Make the DP rates int instead of uint32_t ville.syrjala
2015-03-13 22:45 ` Todd Previte
2015-03-12 15:10 ` [PATCH 02/13] drm/i915: Store the converted link rates in intel_dp->supported_rates[] ville.syrjala
2015-03-13 22:58 ` Todd Previte
2015-03-12 15:10 ` [PATCH 03/13] drm/i915: Don't copy the DP source rates arrays ville.syrjala
2015-03-13 23:04 ` Todd Previte
2015-03-16 9:13 ` Jindal, Sonika
2015-03-16 9:34 ` Ville Syrjälä
2015-03-16 9:37 ` Jindal, Sonika
2015-03-16 10:55 ` Ville Syrjälä
2015-03-16 11:33 ` sonika
2015-03-16 11:55 ` Ville Syrjälä
2015-03-12 15:10 ` [PATCH 04/13] drm/i915: Don't copy sink rates either ville.syrjala
2015-03-12 15:10 ` [PATCH 05/13] drm/i915: Remove special case from intel_supported_rates() ville.syrjala
2015-03-12 15:10 ` [PATCH 06/13] drm/i915: Fully separate source vs. sink rates ville.syrjala
2015-03-17 10:06 ` Daniel Vetter [this message]
2015-03-12 15:10 ` [PATCH 07/13] drm/i915: Hide the source vs. sink rate handling from intel_dp_compute_config() ville.syrjala
2015-03-13 11:44 ` sonika
2015-03-13 12:02 ` Ville Syrjälä
2015-03-13 11:56 ` sonika
2015-03-12 15:10 ` [PATCH 08/13] drm/i915: Fix max link rate in intel_dp_mode_valid() ville.syrjala
2015-03-12 15:10 ` [PATCH 09/13] drm/i915: Use DP_LINK_RATE_SET whenever possible ville.syrjala
2015-03-12 15:10 ` [PATCH 10/13] drm/i915: Fix MST link rate handling ville.syrjala
2015-03-12 15:10 ` [PATCH 11/13] drm/i915: Avoid overflowing the DP link rate arrays ville.syrjala
2015-03-12 15:10 ` [PATCH 12/13] drm/i915: Add eDP intermediate frequencies for CHV ville.syrjala
2015-03-12 15:10 ` [PATCH 13/13] drm/i915: Include the sink/source/supported rates in debug output ville.syrjala
2015-03-12 19:42 ` shuang.he
2015-03-13 17:40 ` [PATCH 14/13] drm/i915: Unconfuse DP link rate array names ville.syrjala
2015-03-17 9:45 ` sonika
2015-03-17 10:13 ` Daniel Vetter
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=20150317100631.GR21993@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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