From: Keith Packard <keithp@keithp.com>
To: Adam Jackson <ajax@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/7] drm/i915: Treat PCH eDP like DP in most places
Date: Wed, 02 Nov 2011 14:13:12 -0700 [thread overview]
Message-ID: <yun7h3iut1z.fsf@aiko.keithp.com> (raw)
In-Reply-To: <4EB1A9A7.8070900@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]
On Wed, 02 Nov 2011 16:35:51 -0400, Adam Jackson <ajax@redhat.com> wrote:
> It is? The DP 1.1a text for lane count is "For Rev.1.1, only the
> following three values are supported. All other values are reserved."
Yeah, if you look at the MAX_LINK_RATE field, we assume that it has a
useful value. I'll bet they were thinking of letting the spec support
things like alternate clock rates or 3 lanes or something, and the 1.1
version just tied things down to allow only sensible values there.
How about we just always use the DPCD value?
commit e0fafa5dee031ef6174eadb005a5f01d13da931d
Author: Keith Packard <keithp@keithp.com>
Date: Wed Nov 2 13:03:47 2011 -0700
drm/i915: Use DPCD value for max DP lanes.
The BIOS VBT value for an eDP panel has been shown to be incorrect on
one machine, and we haven't found any machines where the DPCD value
was wrong, so we'll use the DPCD value everywhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 02b56ce..5056d29 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -154,16 +154,12 @@ intel_edp_link_config(struct intel_encoder *intel_encoder,
static int
intel_dp_max_lane_count(struct intel_dp *intel_dp)
{
- int max_lane_count = 4;
-
- if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11) {
- max_lane_count = intel_dp->dpcd[DP_MAX_LANE_COUNT] & 0x1f;
- switch (max_lane_count) {
- case 1: case 2: case 4:
- break;
- default:
- max_lane_count = 4;
- }
+ int max_lane_count = intel_dp->dpcd[DP_MAX_LANE_COUNT] & 0x1f;
+ switch (max_lane_count) {
+ case 1: case 2: case 4:
+ break;
+ default:
+ max_lane_count = 4;
}
return max_lane_count;
}
@@ -765,12 +761,11 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
continue;
intel_dp = enc_to_intel_dp(encoder);
- if (intel_dp->base.type == INTEL_OUTPUT_DISPLAYPORT || is_pch_edp(intel_dp)) {
+ if (intel_dp->base.type == INTEL_OUTPUT_DISPLAYPORT ||
+ intel_dp->base.type == INTEL_OUTPUT_EDP)
+ {
lane_count = intel_dp->lane_count;
break;
- } else if (is_cpu_edp(intel_dp)) {
- lane_count = dev_priv->edp.lanes;
- break;
}
}
--
keith.packard@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
next prev parent reply other threads:[~2011-11-02 21:13 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 6:20 [PATCH 0/7] drm/i915: Fix PCH eDP support for SNB Keith Packard
2011-11-02 6:20 ` [PATCH 1/7] drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control Keith Packard
2011-11-02 16:02 ` [Intel-gfx] " Jesse Barnes
2011-11-02 16:13 ` Keith Packard
2011-11-02 6:20 ` [PATCH 2/7] drm/i915: Remove link_status field from intel_dp structure Keith Packard
2011-11-02 16:13 ` [Intel-gfx] " Jesse Barnes
2011-11-02 6:20 ` [PATCH 3/7] drm/i915: Treat PCH eDP like DP in most places Keith Packard
2011-11-02 15:29 ` [Intel-gfx] " Adam Jackson
2011-11-02 16:55 ` Keith Packard
2011-11-02 17:35 ` Keith Packard
2011-11-02 16:20 ` Jesse Barnes
2011-11-02 17:10 ` Keith Packard
2011-11-02 17:13 ` Adam Jackson
2011-11-02 17:31 ` Keith Packard
2011-11-02 19:36 ` [Intel-gfx] " Adam Jackson
2011-11-02 20:05 ` Keith Packard
2011-11-02 20:35 ` Adam Jackson
2011-11-02 21:13 ` Keith Packard [this message]
2011-11-02 21:16 ` Adam Jackson
2011-11-02 18:54 ` Keith Packard
2011-11-02 19:07 ` Alex Deucher
2011-11-02 6:20 ` [PATCH 4/7] drm/i915: Let panel power sequencing hardware do its job Keith Packard
2011-11-02 7:31 ` Keith Packard
2011-11-02 16:23 ` [Intel-gfx] " Jesse Barnes
2011-11-02 17:14 ` Keith Packard
2011-11-02 17:37 ` Keith Packard
2011-11-03 19:57 ` Jesse Barnes
2011-11-03 22:01 ` Keith Packard
2011-11-02 6:20 ` [PATCH 5/7] drm/i915: Make DP prepare/commit consistent with DP dpms Keith Packard
2011-11-03 20:00 ` Jesse Barnes
2011-11-03 22:30 ` [Intel-gfx] " Keith Packard
2011-11-03 22:41 ` Jesse Barnes
2011-11-03 22:59 ` Keith Packard
2011-11-02 6:20 ` [PATCH 6/7] drm/i915: Try harder during dp pattern 1 link training Keith Packard
2011-11-02 9:12 ` Chris Wilson
2011-11-02 17:20 ` Keith Packard
2011-11-02 17:38 ` Keith Packard
2011-11-03 20:03 ` [Intel-gfx] " Jesse Barnes
2011-11-03 22:32 ` Keith Packard
2011-11-02 6:20 ` [PATCH 7/7] drm/i915: Remove trailing white space Keith Packard
2011-11-03 20:03 ` [Intel-gfx] " Jesse Barnes
2011-11-03 22:36 ` Keith Packard
2011-11-03 22:48 ` Keith Packard
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=yun7h3iut1z.fsf@aiko.keithp.com \
--to=keithp@keithp.com \
--cc=ajax@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
/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