From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Theodore Ts'o <tytso@mit.edu>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm/atomic-helper: Add an atomice best_encoder callback
Date: Tue, 4 Aug 2015 10:52:43 +0200 [thread overview]
Message-ID: <20150804085242.GA3886@ulmo> (raw)
In-Reply-To: <1438615451-856-1-git-send-email-daniel.vetter@ffwll.ch>
[-- Attachment #1.1: Type: text/plain, Size: 2478 bytes --]
On Mon, Aug 03, 2015 at 05:24:08PM +0200, Daniel Vetter wrote:
> With legacy helpers all the routing was already set up when calling
> best_encoder and so could be inspected. But with atomic it's staged,
> hence we need a new atomic compliant callback for drivers which need
> to inspect the requested state and can't just decided the best encoder
> statically.
>
> This is needed to fix up i915 dp mst where we need to pick the right
> encoder depending upon the requested CRTC for the connector.
>
> v2: Don't forget to amend the kerneldoc
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 7 ++++++-
> include/drm/drm_crtc_helper.h | 3 +++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index aac212297b49..8694ca9beee3 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -196,7 +196,12 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx)
> }
>
> funcs = connector->helper_private;
> - new_encoder = funcs->best_encoder(connector);
> +
> + if (funcs->atomic_best_encoder)
> + new_encoder = funcs->atomic_best_encoder(connector,
> + connector_state);
> + else
> + new_encoder = funcs->best_encoder(connector);
>
> if (!new_encoder) {
> DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n",
> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
> index c8fc187061de..918aa68b5199 100644
> --- a/include/drm/drm_crtc_helper.h
> +++ b/include/drm/drm_crtc_helper.h
> @@ -168,6 +168,7 @@ struct drm_encoder_helper_funcs {
> * @get_modes: get mode list for this connector
> * @mode_valid: is this mode valid on the given connector? (optional)
> * @best_encoder: return the preferred encoder for this connector
> + * @atomic_best_encoder: atomic version of @best_encoder
This could arguably be more verbose, but the limits of kerneldoc don't
make that easy. Perhaps a more verbose description could be provided in
done in the DRM DocBook, along with other documentation about atomic
mode-setting.
Irrespective of that, this makes sense, so:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-08-04 8:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 15:24 [PATCH 1/4] drm/atomic-helper: Add an atomice best_encoder callback Daniel Vetter
2015-08-03 15:24 ` [PATCH 2/4] drm/i915: Fixup dp mst encoder selection Daniel Vetter
2015-08-03 15:24 ` [PATCH 3/4] drm/dp-mst: Remove debug WARN_ON Daniel Vetter
2015-08-04 8:53 ` Thierry Reding
2015-08-03 15:24 ` [PATCH 4/4] drm/atomic-helpers: Make encoder picking more robust Daniel Vetter
2015-08-04 8:56 ` Ander Conselvan De Oliveira
2015-08-04 9:11 ` [Intel-gfx] " Daniel Vetter
2015-08-04 8:56 ` Thierry Reding
2015-08-04 8:52 ` Thierry Reding [this message]
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=20150804085242.GA3886@ulmo \
--to=thierry.reding@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/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