]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/i915/gen9: Store plane minimum blocks in CRTC wm state (v2)
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 12 May 2016 14:05:59 +0000 (07:05 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 13 May 2016 14:32:56 +0000 (07:32 -0700)
This will eventually allow us to re-use old values without
re-calculating them for unchanged planes (which also helps us avoid
re-grabbing extra plane states).

v2:
 -  Drop unnecessary memset's; they were meant for a later patch (which
    got reworked anyway to not need them, but were mis-rebased into this
    one.  (Maarten)

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
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-6-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

index 423355f1b4f7ae37b31a00917195f0a863417246..db350e56b5aa32583199fd06ce2120714ed9a269 100644 (file)
@@ -431,6 +431,10 @@ struct intel_crtc_wm_state {
                        /* cached plane data rate */
                        unsigned plane_data_rate[I915_MAX_PLANES];
                        unsigned plane_y_data_rate[I915_MAX_PLANES];
+
+                       /* minimum block allocation */
+                       uint16_t minimum_blocks[I915_MAX_PLANES];
+                       uint16_t minimum_y_blocks[I915_MAX_PLANES];
                } skl;
        };
 
index ad344daaab89876f782d00f3b1da3c2327d61722..05b04a6ca37a3fd5c81987e22af009d4256622bd 100644 (file)
@@ -3067,8 +3067,8 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
        enum pipe pipe = intel_crtc->pipe;
        struct skl_ddb_entry *alloc = &ddb->pipe[pipe];
        uint16_t alloc_size, start, cursor_blocks;
-       uint16_t minimum[I915_MAX_PLANES];
-       uint16_t y_minimum[I915_MAX_PLANES];
+       uint16_t *minimum = cstate->wm.skl.minimum_blocks;
+       uint16_t *y_minimum = cstate->wm.skl.minimum_y_blocks;
        unsigned int total_data_rate;
 
        skl_ddb_get_pipe_allocation_limits(dev, cstate, config, alloc);