All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 6/7] drm/atomic: Convert get_existing_state callers to get_old/new_state, v2.
Date: Tue, 17 Jan 2017 03:27:59 +0200	[thread overview]
Message-ID: <2353911.UeQs03ax0S@avalon> (raw)
In-Reply-To: <1484559464-27107-7-git-send-email-maarten.lankhorst@linux.intel.com>

Hi Maarten,

One more thing.

On Monday 16 Jan 2017 10:37:43 Maarten Lankhorst wrote:
> This is a straightforward conversion that converts all the users of
> get_existing_state in atomic core to use get_old_state or get_new_state
> 
> Changes since v1:
> - Fix using the wrong state in
> drm_atomic_helper_update_legacy_modeset_state.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_atomic.c        |  6 +++---
>  drivers/gpu/drm/drm_atomic_helper.c | 39 ++++++++++++++--------------------
>  drivers/gpu/drm/drm_blend.c         |  3 +--
>  3 files changed, 22 insertions(+), 26 deletions(-)

[snip]

> diff --git a/drivers/gpu/drm/drm_atomic_helper.c
> b/drivers/gpu/drm/drm_atomic_helper.c index b26cf786ce12..1de8d5fbc8d3
> 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c

[snip]

> @@ -698,8 +695,7 @@ disable_outputs(struct drm_device *dev, struct
> drm_atomic_state *old_state) if (!old_conn_state->crtc)
>  			continue;
> 
> -		old_crtc_state = drm_atomic_get_existing_crtc_state(old_state,
> -								    
old_conn_state->crtc);
> +		old_crtc_state = drm_atomic_get_new_crtc_state(old_state,
> old_conn_state->crtc);

This looks wrong. I believe you should call drm_atomic_get_old_crtc_state() 
here. If I'm not mistaken drm_atomic_get_existing_crtc_state() did the right 
thing as old_state->crtcs[*].state was set to the old state by the state swap 
operation.

On the other hand, drm_atomic_helper_update_legacy_modeset_state() uses 
drm_atomic_get_new_plane_state() the same way you do here, even though it 
operates after state swap, and your changelog specifically mentions that 
you've fixed that in v2. It's getting too late to properly wrap my head around 
this, I'll let you check which option is correct (but I reserve the right to 
challenge it if your explanation isn't convincing enough ;-)).

>  		if (!old_crtc_state->active ||
>  		    !drm_atomic_crtc_needs_modeset(old_conn_state->crtc-
>state))

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-01-17  1:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  9:37 [PATCH v3 0/7] drm/atomic: Add accessor macros for all atomic state Maarten Lankhorst
2017-01-16  9:37 ` [PATCH v3 1/7] drm/atomic: Add new iterators over all state, v3 Maarten Lankhorst
2017-01-16 23:11   ` Laurent Pinchart
2017-01-17  7:41     ` Maarten Lankhorst
2017-01-18 22:56       ` Laurent Pinchart
2017-01-23  8:48         ` Daniel Vetter
2017-02-12 12:11           ` Laurent Pinchart
2017-02-12 12:13   ` Laurent Pinchart
2017-01-16  9:37 ` [PATCH v3 2/7] drm/atomic: Make add_affected_connectors look at crtc_state Maarten Lankhorst
2017-01-16 23:29   ` Laurent Pinchart
2017-01-16  9:37 ` [PATCH v3 3/7] drm/atomic: Use new atomic iterator macros Maarten Lankhorst
2017-01-16 23:55   ` Laurent Pinchart
2017-02-14 20:03     ` Daniel Vetter
2017-02-14 20:07       ` Laurent Pinchart
2017-01-16  9:37 ` [PATCH v3 4/7] drm/atomic: Fix atomic helpers to use the new " Maarten Lankhorst
2017-01-17  1:01   ` Laurent Pinchart
2017-01-18 14:49     ` Maarten Lankhorst
2017-01-18 18:03       ` Laurent Pinchart
2017-01-16  9:37 ` [PATCH v3 5/7] drm/atomic: Add macros to access existing old/new state Maarten Lankhorst
2017-01-17  1:05   ` Laurent Pinchart
2017-01-16  9:37 ` [PATCH v3 6/7] drm/atomic: Convert get_existing_state callers to get_old/new_state, v2 Maarten Lankhorst
2017-01-17  1:12   ` Laurent Pinchart
2017-02-16 14:37     ` Maarten Lankhorst
2017-01-17  1:27   ` Laurent Pinchart [this message]
2017-02-16 14:34     ` Maarten Lankhorst
2017-01-16  9:37 ` [PATCH v3 7/7] drm/blend: Use new atomic iterator macros Maarten Lankhorst
2017-01-17  1:14   ` Laurent Pinchart
2017-01-16 11:24 ` ✗ Fi.CI.BAT: warning for drm/atomic: Add accessor macros for all atomic state. (rev4) Patchwork
2017-01-17  0:45 ` [PATCH v3 0/7] drm/atomic: Add accessor macros for all atomic state Laurent Pinchart
2017-01-23  8:50   ` [Intel-gfx] " Daniel Vetter
2017-01-17  1:34 ` Laurent Pinchart
2017-02-12 12:35 ` Laurent Pinchart

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=2353911.UeQs03ax0S@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 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.