mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Keith Packard <keithp@keithp.com>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Lubos Kolouch <lubos.kolouch@gmail.com>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Force explicit bpp selection for intel_dp_link_required
Date: Wed, 25 Jan 2012 12:51:16 -0800	[thread overview]
Message-ID: <20120125125116.5cea2c4b@jbarnes-desktop> (raw)
In-Reply-To: <1327508186-26704-2-git-send-email-keithp@keithp.com>

[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]

On Wed, 25 Jan 2012 08:16:25 -0800
Keith Packard <keithp@keithp.com> wrote:

> It is never correct to use intel_crtc->bpp in intel_dp_link_required,
> so instead pass an explicit bpp in to this function. This patch
> only supports 18bpp and 24bpp modes, which means that 10bpc modes will
> be computed incorrectly. Fixing that will require more extensive
> changes, and so must be addressed separately from this bugfix.
> 
> intel_dp_link_required is called from intel_dp_mode_valid and
> intel_dp_mode_fixup.
> 
> * intel_dp_mode_valid is called to list supported modes; in this case,
>   the current crtc values cannot be relevant as the modes in question
>   may never be selected. Thus, using intel_crtc->bpp is never right.
> 
> * intel_dp_mode_fixup is called during mode setting, but it is run
>   well before ironlake_crtc_mode_set is called to set intel_crtc->bpp,
>   so using intel_crtc-bpp in this path can only ever get a stale
>   value.

Yeah, looks like I got this wrong when I added the pipe bpp field.
Wonder if there's a good way to catch this sort of bug with an assert
so we don't get the order mixed up again...

The big downside here is that we'll be very pessimistic about the link
bw requirements for say 16 or 8bpp modes.

I see you have another patch to address some of this, but I wonder if
we have enough info to calculate the bpp at prepare time so it's set
early on for use by both the crtc and encoder code?

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-01-25 20:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-25 16:16 [PATCH 0/2] drm/i915: Use correct bpc computations for DisplayPort Keith Packard
2012-01-25 16:16 ` [PATCH 1/2] drm/i915: Force explicit bpp selection for intel_dp_link_required Keith Packard
2012-01-25 20:51   ` Jesse Barnes [this message]
2012-01-25 21:17     ` [Intel-gfx] " Keith Packard
2012-01-25 21:50       ` Daniel Vetter
2012-01-25 22:45         ` Keith Packard
2012-01-25 21:52   ` Daniel Vetter
2012-01-27 10:30   ` Daniel Vetter
2012-02-06 12:12     ` Dave Airlie
2012-02-06 16:03       ` Daniel Vetter
2012-02-06 22:10       ` Keith Packard
2012-01-25 16:16 ` [PATCH 2/2] drm/i915: Select DP BPC at mode set, rather than mode validate Keith Packard
2012-01-25 22:11   ` [Intel-gfx] " Daniel Vetter
2012-01-25 22:56     ` 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=20120125125116.5cea2c4b@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lubos.kolouch@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

Powered by JetHome