All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Intel primary plane support (v7)
@ 2014-05-29 15:06 Matt Roper
  2014-05-29 15:06 ` [PATCH 1/4] drm: Check CRTC compatibility in setplane Matt Roper
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Matt Roper @ 2014-05-29 15:06 UTC (permalink / raw)
  To: intel-gfx

Re-posting the final versions of these patches now that they all have a r-b, as
requested by Daniel.  Corresponding i-g-t tests will be sent shortly.

Previous patch review thread and comments are here:
 http://lists.freedesktop.org/archives/intel-gfx/2014-April/044527.html

Matt Roper (4):
  drm: Check CRTC compatibility in setplane
  drm/plane-helper: Add drm_plane_helper_check_update() (v3)
  drm/i915: don't force full modeset if primary plane is disabled (v2)
  drm/i915: Intel-specific primary plane handling (v8)

 drivers/gpu/drm/drm_crtc.c           |   7 +
 drivers/gpu/drm/drm_plane_helper.c   | 130 +++++++++++++-----
 drivers/gpu/drm/i915/intel_display.c | 255 ++++++++++++++++++++++++++++++++++-
 include/drm/drm_plane_helper.h       |  22 +++
 4 files changed, 373 insertions(+), 41 deletions(-)

-- 
1.8.5.1

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH 3/4] drm/i915: don't force full modeset if primary plane is disabled
@ 2014-04-30 17:07 Matt Roper
  2014-05-15 16:13 ` [PATCH 3/4] drm/i915: don't force full modeset if primary plane is disabled (v2) Matt Roper
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Roper @ 2014-04-30 17:07 UTC (permalink / raw)
  To: intel-gfx

In a future patch, we'll allow the primary plane to be disabled by
userspace via the universal plane API.  If a modeset is requested while
the primary plane is disabled, crtc->primary->fb will be NULL which
generally triggers a full modeset (except in fastboot situations).  If
we detect that the crtc is active, but there's no primary plane fb,
we should still allow a simple plane update rather than a full modeset
if the mode isn't actually changing (after re-enabling the primary plane
of course).

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e1e1239..04bd821 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10136,12 +10136,17 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
 	if (is_crtc_connector_off(set)) {
 		config->mode_changed = true;
 	} else if (set->crtc->primary->fb != set->fb) {
-		/* If we have no fb then treat it as a full mode set */
+		/*
+		 * If we have no fb, we can only flip as long as the crtc is
+		 * active, otherwise we need a full mode set.  The crtc may
+		 * be active if we've only disabled the primary plane, or
+		 * in fastboot situations.
+		 */
 		if (set->crtc->primary->fb == NULL) {
 			struct intel_crtc *intel_crtc =
 				to_intel_crtc(set->crtc);
 
-			if (intel_crtc->active && i915.fastboot) {
+			if (intel_crtc->active) {
 				DRM_DEBUG_KMS("crtc has no fb, will flip\n");
 				config->fb_changed = true;
 			} else {
@@ -10380,8 +10385,21 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
 		ret = intel_set_mode(set->crtc, set->mode,
 				     set->x, set->y, set->fb);
 	} else if (config->fb_changed) {
+		struct drm_i915_private *dev_priv = dev->dev_private;
+		struct intel_crtc *intel_crtc = to_intel_crtc(set->crtc);
+
 		intel_crtc_wait_for_pending_flips(set->crtc);
 
+		/*
+		 * We need to make sure the primary plane is re-enabled if it
+		 * has previously been turned off.
+		 */
+		if (!intel_crtc->primary_enabled) {
+			BUG_ON(!intel_crtc->active);
+			intel_enable_primary_hw_plane(dev_priv, intel_crtc->plane,
+						      intel_crtc->pipe);
+		}
+
 		ret = intel_pipe_set_base(set->crtc,
 					  set->x, set->y, set->fb);
 		/*
-- 
1.8.5.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-06-13 17:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-29 15:06 [PATCH 0/4] Intel primary plane support (v7) Matt Roper
2014-05-29 15:06 ` [PATCH 1/4] drm: Check CRTC compatibility in setplane Matt Roper
2014-05-29 15:06 ` [PATCH 2/4] drm/plane-helper: Add drm_plane_helper_check_update() (v3) Matt Roper
2014-05-29 15:06 ` [PATCH 3/4] drm/i915: don't force full modeset if primary plane is disabled (v2) Matt Roper
2014-05-29 15:06 ` [PATCH 4/4] drm/i915: Intel-specific primary plane handling (v8) Matt Roper
2014-05-29 15:09 ` [PATCH i-g-t 1/5] kms: Add universal plane support Matt Roper
2014-05-29 15:09   ` [PATCH i-g-t 2/5] kms: Add igt_drm_plane_try_commit() Matt Roper
2014-06-13 16:24     ` Damien Lespiau
2014-05-29 15:09   ` [PATCH i-g-t 3/5] kms_plane: Update for universal plane changes Matt Roper
2014-06-13 16:27     ` Damien Lespiau
2014-05-29 15:09   ` [PATCH i-g-t 4/5] kms_universal_plane: Universal plane testing (v5) Matt Roper
2014-05-29 15:09   ` [PATCH i-g-t 5/5] kms_cursor_crc: Combine data_t and test_data_t Matt Roper
2014-06-13 16:21   ` [PATCH i-g-t 1/5] kms: Add universal plane support Damien Lespiau
2014-06-13 17:00   ` Damien Lespiau
  -- strict thread matches above, loose matches on Subject: below --
2014-04-30 17:07 [PATCH 3/4] drm/i915: don't force full modeset if primary plane is disabled Matt Roper
2014-05-15 16:13 ` [PATCH 3/4] drm/i915: don't force full modeset if primary plane is disabled (v2) Matt Roper

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.