From: Keith Packard <keith.packard@intel.com>
To: Jerker Buud <b.jerker@gmail.com>,
Patrik Kullman <patrik.kullman@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: drivers/gpu/drm/i915/intel_dp.c problem with commit dc22ee6fc18ce0f15424e753e8473c306ece95c1
Date: Sat, 26 Nov 2011 11:27:11 -0800 [thread overview]
Message-ID: <86k46m8z1s.fsf@sumi.keithp.com> (raw)
In-Reply-To: <CACVkyFdhpU1sQb-T-pXYkV8Ot27+LYxV_=FGd=aPLLyrD3-1dg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2204 bytes --]
On Sat, 26 Nov 2011 09:50:41 -0800, Jerker Buud <b.jerker@gmail.com> wrote:
> 245,247c245,246
> < if (!is_edp(intel_dp) &&
> < (intel_dp_link_required(intel_dp, mode->clock)
> < > intel_dp_max_data_rate(max_link_clock, max_lanes)))
> ---
> > if (intel_dp_link_required(intel_dp, mode->clock)
> > > intel_dp_max_data_rate(max_link_clock, max_lanes))
Ok, I think I understand why this change is required.
These machines are 'optimized' to provide the bare minimum connection
necessary between the CPU and the eDP panel -- a single lane is hooked
up, which is just enough to run the link at 18bpp, but not enough to run
it at 24bpp.
The problem here (in intel_dp_link_required) is that this is being
called to see which modes can be supported on the panel. Without the
CRTC being configured with the appropriate bpp value, this code assumes
24bpp.
I thought Adam Jackson had some code around that automatically switched
From 24bpp to 18bpp when the link didn't have enough bandwidth for
24bpp, but I can't find that now.
In any case, I think we need to centralize the bpp selection inside
intel_dp.c instead of having it in both places. Then, we can make that
depend on the requested mode as well as the machine configuration.
Here's a patch which uses the VBT configured bpp value in this case. I'd
love to hear whether this suffices to resolve your problem.
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 294f557..3e15479 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -212,10 +212,16 @@ intel_dp_link_required(struct intel_dp *intel_dp, int pixel_clock)
{
struct drm_crtc *crtc = intel_dp->base.base.crtc;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
- int bpp = 24;
+ struct drm_device *dev = intel_dp->base.base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ int bpp;
if (intel_crtc)
bpp = intel_crtc->bpp;
+ else if (intel_dp->base.type == INTEL_OUTPUT_EDP)
+ bpp = dev_priv->edp.bpp;
+ else
+ bpp = 24;
return (pixel_clock * bpp + 9) / 10;
}
--
keith.packard@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
next parent reply other threads:[~2011-11-29 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CACVkyFdhpU1sQb-T-pXYkV8Ot27+LYxV_=FGd=aPLLyrD3-1dg@mail.gmail.com>
2011-11-26 19:27 ` Keith Packard [this message]
2011-11-29 14:06 ` drivers/gpu/drm/i915/intel_dp.c problem with commit dc22ee6fc18ce0f15424e753e8473c306ece95c1 Patrik Kullman
2011-11-30 20:36 ` Patrik Kullman
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=86k46m8z1s.fsf@sumi.keithp.com \
--to=keith.packard@intel.com \
--cc=b.jerker@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrik.kullman@gmail.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