|
@@ -3377,6 +3377,7 @@ static void skylake_update_primary_plane(struct drm_plane *plane,
|
|
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
|
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->base.crtc);
|
|
|
struct drm_framebuffer *fb = plane_state->base.fb;
|
|
|
+ const struct skl_wm_values *wm = &dev_priv->wm.skl_results;
|
|
|
int pipe = intel_crtc->pipe;
|
|
|
u32 plane_ctl;
|
|
|
unsigned int rotation = plane_state->base.rotation;
|
|
@@ -3410,6 +3411,9 @@ static void skylake_update_primary_plane(struct drm_plane *plane,
|
|
|
intel_crtc->adjusted_x = src_x;
|
|
|
intel_crtc->adjusted_y = src_y;
|
|
|
|
|
|
+ if (wm->dirty_pipes & drm_crtc_mask(&intel_crtc->base))
|
|
|
+ skl_write_plane_wm(intel_crtc, wm, 0);
|
|
|
+
|
|
|
I915_WRITE(PLANE_CTL(pipe, 0), plane_ctl);
|
|
|
I915_WRITE(PLANE_OFFSET(pipe, 0), (src_y << 16) | src_x);
|
|
|
I915_WRITE(PLANE_STRIDE(pipe, 0), stride);
|
|
@@ -3441,7 +3445,10 @@ static void skylake_disable_primary_plane(struct drm_plane *primary,
|
|
|
{
|
|
|
struct drm_device *dev = crtc->dev;
|
|
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
|
|
- int pipe = to_intel_crtc(crtc)->pipe;
|
|
|
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
|
+ int pipe = intel_crtc->pipe;
|
|
|
+
|
|
|
+ skl_write_plane_wm(intel_crtc, &dev_priv->wm.skl_results, 0);
|
|
|
|
|
|
I915_WRITE(PLANE_CTL(pipe, 0), 0);
|
|
|
I915_WRITE(PLANE_SURF(pipe, 0), 0);
|
|
@@ -10814,9 +10821,13 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base,
|
|
|
struct drm_device *dev = crtc->dev;
|
|
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
|
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
|
+ const struct skl_wm_values *wm = &dev_priv->wm.skl_results;
|
|
|
int pipe = intel_crtc->pipe;
|
|
|
uint32_t cntl = 0;
|
|
|
|
|
|
+ if (INTEL_GEN(dev_priv) >= 9 && wm->dirty_pipes & drm_crtc_mask(crtc))
|
|
|
+ skl_write_cursor_wm(intel_crtc, wm);
|
|
|
+
|
|
|
if (plane_state && plane_state->base.visible) {
|
|
|
cntl = MCURSOR_GAMMA_ENABLE;
|
|
|
switch (plane_state->base.crtc_w) {
|
|
@@ -14740,10 +14751,12 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
|
|
|
struct drm_crtc_state *old_crtc_state)
|
|
|
{
|
|
|
struct drm_device *dev = crtc->dev;
|
|
|
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
|
|
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);
|
|
|
+ enum pipe pipe = intel_crtc->pipe;
|
|
|
|
|
|
/* Perform vblank evasion around commit operation */
|
|
|
intel_pipe_update_start(intel_crtc);
|
|
@@ -14758,8 +14771,12 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
|
|
|
|
|
|
if (to_intel_crtc_state(crtc->state)->update_pipe)
|
|
|
intel_update_pipe_config(intel_crtc, old_intel_state);
|
|
|
- else if (INTEL_INFO(dev)->gen >= 9)
|
|
|
+ else if (INTEL_GEN(dev_priv) >= 9) {
|
|
|
skl_detach_scalers(intel_crtc);
|
|
|
+
|
|
|
+ I915_WRITE(PIPE_WM_LINETIME(pipe),
|
|
|
+ dev_priv->wm.skl_hw.wm_linetime[pipe]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void intel_finish_crtc_commit(struct drm_crtc *crtc,
|