From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/3] drm/atomic: Use explicit old crtc state in drm_atomic_add_affected_planes()
Date: Thu, 1 Nov 2018 20:46:44 +0200 [thread overview]
Message-ID: <20181101184646.14753-1-ville.syrjala@linux.intel.com> (raw)
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace 'crtc->state' with the explicit old crtc state.
Actually it shouldn't matter whether we use the old or the new
crtc state here since any plane that has been removed from the
crtc since the crtc state was duplicated will have been added
to the atomic state already. That is, you can't call
drm_atomic_set_crtc_for_plane() without having the new
plane state already in hand.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/drm_atomic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 3dbfbddae7e6..064c48075917 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -927,6 +927,8 @@ int
drm_atomic_add_affected_planes(struct drm_atomic_state *state,
struct drm_crtc *crtc)
{
+ const struct drm_crtc_state *old_crtc_state =
+ drm_atomic_get_old_crtc_state(state, crtc);
struct drm_plane *plane;
WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
@@ -934,7 +936,7 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state,
DRM_DEBUG_ATOMIC("Adding all current planes for [CRTC:%d:%s] to %p\n",
crtc->base.id, crtc->name, state);
- drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
+ drm_for_each_plane_mask(plane, state->dev, old_crtc_state->plane_mask) {
struct drm_plane_state *plane_state =
drm_atomic_get_plane_state(state, plane);
--
2.18.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2018-11-01 18:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 18:46 Ville Syrjala [this message]
2018-11-01 18:46 ` [PATCH 2/3] drm/atomic: Use explicit old/new state in drm_atomic_crtc_check() Ville Syrjala
2018-11-05 9:29 ` Daniel Vetter
2018-11-01 18:46 ` [PATCH 3/3] drm/atomic: Use explicit old/new state in drm_atomic_plane_check() Ville Syrjala
2018-11-05 9:33 ` Daniel Vetter
2018-11-05 14:37 ` [Intel-gfx] " Ville Syrjälä
2018-11-06 19:16 ` [PATCH v2 " Ville Syrjala
2018-11-01 19:27 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/atomic: Use explicit old crtc state in drm_atomic_add_affected_planes() Patchwork
2018-11-01 19:45 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-02 0:05 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-05 9:26 ` [PATCH 1/3] " Daniel Vetter
2018-11-05 14:04 ` Ville Syrjälä
2018-11-05 14:30 ` Wentland, Harry
2018-11-05 14:39 ` Ville Syrjälä
2018-11-07 13:04 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/atomic: Use explicit old crtc state in drm_atomic_add_affected_planes() (rev2) Patchwork
2018-11-07 13:20 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-07 16:12 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-07 17:47 ` Patchwork
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=20181101184646.14753-1-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox