]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/i915: Track whether an atomic transaction changes the active CRTC's
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 12 May 2016 14:06:00 +0000 (07:06 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 13 May 2016 14:33:10 +0000 (07:33 -0700)
For the purposes of DDB re-allocation we need to know whether a
transaction changes the list of CRTC's that are active.  While
state->modeset could be used for this purpose, that would be slightly
too aggressive since it would lead us to re-allocate the DDB when a
CRTC's mode changes, but not its final active state.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-7-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h

index 51d0070696094af475b7c0b85bad6aa78c2a08de..5d9909049180fcf2c73369ee092e41d6fc55c6f0 100644 (file)
@@ -13270,6 +13270,9 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
                        intel_state->active_crtcs |= 1 << i;
                else
                        intel_state->active_crtcs &= ~(1 << i);
+
+               if (crtc_state->active != crtc->state->active)
+                       intel_state->active_pipe_changes |= drm_crtc_mask(crtc);
        }
 
        /*
index db350e56b5aa32583199fd06ce2120714ed9a269..9f9c9cb82a2085e613ec4e91ecc2c981a7ae8a05 100644 (file)
@@ -291,6 +291,16 @@ struct intel_atomic_state {
 
        bool dpll_set, modeset;
 
+       /*
+        * Does this transaction change the pipes that are active?  This mask
+        * tracks which CRTC's have changed their active state at the end of
+        * the transaction (not counting the temporary disable during modesets).
+        * This mask should only be non-zero when intel_state->modeset is true,
+        * but the converse is not necessarily true; simply changing a mode may
+        * not flip the final active status of any CRTC's
+        */
+       unsigned int active_pipe_changes;
+
        unsigned int active_crtcs;
        unsigned int min_pixclk[I915_MAX_PIPES];