From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 15/18] drm/i915: Call plane update functions directly from intel_atomic_commit.
Date: Thu, 2 Jul 2015 16:36:59 +0200 [thread overview]
Message-ID: <1435847822-5318-16-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1435847822-5318-1-git-send-email-maarten.lankhorst@linux.intel.com>
Now that there's only a single path for all atomic updates we can call
intel_(pre/post)_plane_update from intel_atomic_commit directly. This
makes the intention more clear.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2a7dadd2d482..abfbc8eab6f4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13299,12 +13299,19 @@ static int intel_atomic_commit(struct drm_device *dev,
/* Now enable the clocks, plane, pipe, and connectors that we set up. */
for_each_crtc_in_state(state, crtc, crtc_state, i) {
- if (needs_modeset(crtc->state) && crtc->state->active) {
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ bool modeset = needs_modeset(crtc->state);
+
+ if (modeset && crtc->state->active) {
update_scanline_offset(to_intel_crtc(crtc));
dev_priv->display.crtc_enable(crtc);
}
+ if (!modeset)
+ intel_pre_plane_update(intel_crtc);
+
drm_atomic_helper_commit_planes_on_crtc(crtc_state);
+ intel_post_plane_update(intel_crtc);
}
/* FIXME: add subpixel order */
@@ -13640,10 +13647,6 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_crtc_state *old_intel_state =
to_intel_crtc_state(old_crtc_state);
- bool modeset = needs_modeset(crtc->state);
-
- if (!modeset)
- intel_pre_plane_update(intel_crtc);
if (intel_crtc->atomic.update_wm_pre)
intel_update_watermarks(crtc);
@@ -13656,7 +13659,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
intel_pipe_update_start(intel_crtc,
&intel_crtc->atomic.start_vbl_count);
- if (modeset)
+ if (needs_modeset(crtc->state))
return;
if (to_intel_crtc_state(crtc->state)->update_pipe)
@@ -13677,8 +13680,6 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
intel_crtc->atomic.start_vbl_count);
intel_runtime_pm_put(dev_priv);
-
- intel_post_plane_update(intel_crtc);
}
/**
--
2.1.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-02 14:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 14:36 [PATCH 00/18] Convert to atomic, part 4 Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 01/18] drm/atomic: add connectors_changed to separate it from mode_changed Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 02/18] drm/i915: Fix noatomic crtc disabling Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 03/18] drm/i915: Do not update pfit state when toggling crtc enabled Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 04/18] drm/i915: Do not use plane_config in intel_fbdev.c Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 05/18] drm/i915: Allow fuzzy matching in pipe_config_compare Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 06/18] drm/i915: Fill in more crtc state Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 07/18] drm/i915: fill in more mode members Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 08/18] drm/i915: Rework primary plane stuff slightly Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 09/18] drm/i915: Convert suspend/resume to atomic Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 10/18] drm/i915: Update power domains on readout Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 11/18] drm/i915: skip modeset if compatible, and enable fastboot for everyone Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 12/18] drm/i915: Always reset in intel_crtc_restore_mode Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 13/18] drm/i915: Make intel_display_suspend atomic, try 2 Maarten Lankhorst
2015-07-02 14:36 ` [PATCH 14/18] drm/i915: Use full atomic modeset Maarten Lankhorst
2015-07-02 14:36 ` Maarten Lankhorst [this message]
2015-07-02 14:37 ` [PATCH 16/18] drm/i915: always disable irqs in intel_pipe_update_start Maarten Lankhorst
2015-07-02 14:37 ` [PATCH 17/18] drm/i915: Only commit planes on crtc's that have changed planes Maarten Lankhorst
2015-07-02 14:37 ` [PATCH 18/18] drm/i915: Remove use of runtime pm in atomic commit functions Maarten Lankhorst
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=1435847822-5318-16-git-send-email-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.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