dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1.1 01/13] drm/atomic: Only update crtc->x/y if it's part of the state, v2.
Date: Thu, 16 Jul 2015 16:58:27 +0200	[thread overview]
Message-ID: <20150716145827.GK6223@phenom.ffwll.local> (raw)
In-Reply-To: <55A7B6C5.7090101@linux.intel.com>

On Thu, Jul 16, 2015 at 03:51:01PM +0200, Maarten Lankhorst wrote:
> Universal planes may not be assigned to the current crtc, so only
> update crtc->x/y when the primary is part of the state and bound
> to the current crtc.
> 
> Changes since v1:
> - Add the crtc check.
> 
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Applied to topic/drm-misc, thanks.
-Daniel

> ---
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index e52dfc828e60..9ede58365ae1 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -665,10 +665,16 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
>  
>  	/* set legacy state in the crtc structure */
>  	for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
> +		struct drm_plane *primary = crtc->primary;
> +
>  		crtc->mode = crtc->state->mode;
>  		crtc->enabled = crtc->state->enable;
> -		crtc->x = crtc->primary->state->src_x >> 16;
> -		crtc->y = crtc->primary->state->src_y >> 16;
> +
> +		if (drm_atomic_get_existing_plane_state(old_state, primary) &&
> +		    primary->state->crtc == crtc) {
> +			crtc->x = primary->state->src_x >> 16;
> +			crtc->y = primary->state->src_y >> 16;
> +		}
>  
>  		if (crtc->state->enable)
>  			drm_calc_timestamping_constants(crtc,
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-07-16 14:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1437037166-9339-1-git-send-email-maarten.lankhorst@linux.intel.com>
2015-07-16  8:59 ` [PATCH 01/13] drm/atomic: Only update crtc->x/y if it's part of the state Maarten Lankhorst
2015-07-16  9:19   ` Daniel Vetter
2015-07-16  9:17     ` Maarten Lankhorst
2015-07-16  9:29       ` Daniel Vetter
2015-07-16  9:38         ` Maarten Lankhorst
2015-07-16 12:34           ` Daniel Vetter
2015-07-16 13:44             ` Maarten Lankhorst
2015-07-16 13:51   ` [PATCH v1.1 01/13] drm/atomic: Only update crtc->x/y if it's part of the state, v2 Maarten Lankhorst
2015-07-16 14:58     ` Daniel Vetter [this message]
2015-07-16  8:59 ` [PATCH 02/13] drm/atomic: Update legacy DPMS state during modesets Maarten Lankhorst
2015-07-16  9:19   ` Daniel Vetter
2015-07-16  9:24     ` Maarten Lankhorst
2015-07-16  9:31       ` Daniel Vetter
2015-07-27 11:04         ` [PATCH v1.1 02/13] drm/atomic: Update legacy DPMS state during modesets, v2 Maarten Lankhorst
2015-07-27 11:16           ` Daniel Vetter
2015-07-27 11:15             ` Maarten Lankhorst
2015-07-27 11:24             ` [PATCH v1.2 02/13] drm/atomic: Update legacy DPMS state during modesets, v3 Maarten Lankhorst
2015-07-27 13:56               ` 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=20150716145827.GK6223@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.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