From: Daniel Vetter <daniel@ffwll.ch>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 11/23] drm/i915: Copy the staged connector config to the legacy atomic state
Date: Wed, 4 Mar 2015 16:46:05 +0100 [thread overview]
Message-ID: <20150304154605.GD18775@phenom.ffwll.local> (raw)
In-Reply-To: <1425388937-1247-12-git-send-email-ander.conselvan.de.oliveira@intel.com>
On Tue, Mar 03, 2015 at 03:22:05PM +0200, Ander Conselvan de Oliveira wrote:
> With this in place, we can start converting pieces of the modeset code
> to look at the connector atomic state instead of the staged config.
>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 23 ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 108d3d2..4e90cb4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11607,9 +11607,11 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
> static int
> intel_modeset_stage_output_state(struct drm_device *dev,
> struct drm_mode_set *set,
> - struct intel_set_config *config)
> + struct intel_set_config *config,
> + struct drm_atomic_state *state)
> {
> struct intel_connector *connector;
> + struct drm_connector_state *connector_state;
> struct intel_encoder *encoder;
> struct intel_crtc *crtc;
> int ro;
> @@ -11673,6 +11675,14 @@ intel_modeset_stage_output_state(struct drm_device *dev,
> }
> connector->new_encoder->new_crtc = to_intel_crtc(new_crtc);
>
> + connector_state =
> + drm_atomic_get_connector_state(state, &connector->base);
> + if (IS_ERR(connector_state))
> + return PTR_ERR(connector_state);
> +
> + connector_state->crtc = new_crtc;
> + connector_state->best_encoder = &connector->new_encoder->base;
> +
> DRM_DEBUG_KMS("[CONNECTOR:%d:%s] to [CRTC:%d]\n",
> connector->base.base.id,
> connector->base.name,
> @@ -11705,9 +11715,16 @@ intel_modeset_stage_output_state(struct drm_device *dev,
> }
> /* Now we've also updated encoder->new_crtc for all encoders. */
> for_each_intel_connector(dev, connector) {
> - if (connector->new_encoder)
> + connector_state =
> + drm_atomic_get_connector_state(state, &connector->base);
> +
> + if (connector->new_encoder) {
> if (connector->new_encoder != connector->encoder)
> connector->encoder = connector->new_encoder;
> + } else {
> + connector_state->crtc = NULL;
> + }
> +
Unecessary line. Of course you've put that in there to check that I
actually read your patches ;-)
Cheers, Daniel
> }
> for_each_intel_crtc(dev, crtc) {
> crtc->new_enabled = false;
> @@ -11816,7 +11833,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
>
> state->acquire_ctx = dev->mode_config.acquire_ctx;
>
> - ret = intel_modeset_stage_output_state(dev, set, config);
> + ret = intel_modeset_stage_output_state(dev, set, config, state);
> if (ret)
> goto fail;
>
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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-04 15:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 13:21 [PATCH 00/23] Remove depencies on staged config for atomic transition Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 01/23] drm/i915: Set crtc backpointer when duplicating crtc state Ander Conselvan de Oliveira
2015-03-04 15:24 ` Daniel Vetter
2015-03-03 13:21 ` [PATCH 02/23] drm/i915: Add a for_each_intel_connector macro Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 03/23] drm/i915: Improve staged config logging Ander Conselvan de Oliveira
2015-03-03 13:21 ` [PATCH 04/23] drm/i915: Add intel_atomic_get_crtc_state() helper function Ander Conselvan de Oliveira
2015-03-04 15:27 ` Daniel Vetter
2015-03-03 13:21 ` [PATCH 05/23] drm/i915: Allocate a drm_atomic_state for the legacy modeset code Ander Conselvan de Oliveira
2015-03-04 15:33 ` Daniel Vetter
2015-03-09 23:19 ` Matt Roper
2015-03-12 12:28 ` Ander Conselvan De Oliveira
2015-03-03 13:22 ` [PATCH 06/23] drm/i915: Add an optional atomic state argument to intel_set_mode() Ander Conselvan de Oliveira
2015-03-04 15:41 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 07/23] drm/i915: Use an atomic state for the load detect modeset Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 08/23] drm/i915: Allocate a crtc_state also when the crtc is being disabled Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 09/23] drm/i915: Update dummy connector atomic state with current config Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 10/23] drm/i915: Implement connector state duplication Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 11/23] drm/i915: Copy the staged connector config to the legacy atomic state Ander Conselvan de Oliveira
2015-03-04 15:46 ` Daniel Vetter [this message]
2015-03-04 16:58 ` Conselvan De Oliveira, Ander
2015-03-04 17:51 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 12/23] drm/i915: Don't use encoder->new_crtc in intel_modeset_pipe_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 13/23] drm/i915: Don't use encoder->new_crtc in compute_baseline_pipe_bpp() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 14/23] drm/i915: Don't depend on encoder->new_crtc in intel_dp_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 15/23] drm/i915: Don't depend on encoder->new_crtc in intel_hdmi_compute_config Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 16/23] drm/i915: Use atomic state in intel_ddi_crtc_get_new_encoder() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 17/23] drm/i915: Don't use staged config in intel_dp_mst_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 18/23] drm/i915: Don't use encoder->new_crtc in intel_lvds_compute_config() Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 19/23] drm/i915: Pass an atomic state to modeset_global_resources() functions Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 20/23] drm/i915: Use atomic state in pipe_has_enabled_pch() Ander Conselvan de Oliveira
2015-03-04 15:55 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 21/23] drm/i915: Convert intel_pipe_will_have_type() to using atomic state Ander Conselvan de Oliveira
2015-03-04 16:03 ` Daniel Vetter
2015-03-04 16:51 ` Conselvan De Oliveira, Ander
2015-03-04 16:57 ` Daniel Vetter
2015-03-03 13:22 ` [PATCH 22/23] drm/i915: Don't look at staged config crtc when changing DRRS state Ander Conselvan de Oliveira
2015-03-03 13:22 ` [PATCH 23/23] drm/i915: Remove usage of encoder->new_crtc from clock computations Ander Conselvan de Oliveira
2015-03-04 7:22 ` shuang.he
2015-03-04 15:21 ` [PATCH 00/23] Remove depencies on staged config for atomic transition 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=20150304154605.GD18775@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=intel-gfx@lists.freedesktop.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