All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	dri-devel@lists.freedesktop.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 1/2] drm/atomic: use helper to get crtc state
Date: Tue, 15 Mar 2016 16:53:28 +0200	[thread overview]
Message-ID: <20160315145328.GX4329@intel.com> (raw)
In-Reply-To: <1458045960-25193-1-git-send-email-a.hajda@samsung.com>

On Tue, Mar 15, 2016 at 01:46:00PM +0100, Andrzej Hajda wrote:
> DRM core provide helper to access crtc state.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 2b430b0..e1cbba6 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -67,7 +67,8 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
>  	struct drm_crtc_state *crtc_state;
>  
>  	if (plane->state->crtc) {
> -		crtc_state = state->crtc_states[drm_crtc_index(plane->state->crtc)];
> +		crtc_state = drm_atomic_get_existing_crtc_state(state,
> +								plane->state->crtc);
>  
>  		if (WARN_ON(!crtc_state))
>  			return;
> @@ -76,8 +77,8 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
>  	}
>  
>  	if (plane_state->crtc) {
> -		crtc_state =
> -			state->crtc_states[drm_crtc_index(plane_state->crtc)];
> +		crtc_state = drm_atomic_get_existing_crtc_state(state,
> +								plane_state->crtc);
>  
>  		if (WARN_ON(!crtc_state))
>  			return;
> @@ -366,8 +367,8 @@ mode_fixup(struct drm_atomic_state *state)
>  		if (!conn_state->crtc || !conn_state->best_encoder)
>  			continue;
>  
> -		crtc_state =
> -			state->crtc_states[drm_crtc_index(conn_state->crtc)];
> +		crtc_state = drm_atomic_get_existing_crtc_state(state,
> +								conn_state->crtc);
>  
>  		/*
>  		 * Each encoder has at most one connector (since we always steal
> @@ -666,7 +667,8 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
>  		if (!old_conn_state->crtc)
>  			continue;
>  
> -		old_crtc_state = old_state->crtc_states[drm_crtc_index(old_conn_state->crtc)];
> +		old_crtc_state = drm_atomic_get_existing_crtc_state(old_state,
> +								    old_conn_state->crtc);
>  
>  		if (!old_crtc_state->active ||
>  		    !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state))
> -- 
> 1.9.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2016-03-15 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 12:46 [PATCH 1/2] drm/atomic: use helper to get crtc state Andrzej Hajda
2016-03-15 14:53 ` Ville Syrjälä [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=20160315145328.GX4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=m.szyprowski@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.