Commit 49a51c4b authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-fixes-2018-08-29' of...

Merge tag 'drm-intel-fixes-2018-08-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- fix for GLK and CNL watermark workaround
- fix for display affecting NUCs with LSPCON
- freeing an allocated write_buf on hdcp
- audio hook when display is disabled
- vma stop holding ppgtt reference
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180829234512.GA32468@intel.com
parents 185c3cfa 80ab3169
...@@ -199,7 +199,6 @@ vma_create(struct drm_i915_gem_object *obj, ...@@ -199,7 +199,6 @@ vma_create(struct drm_i915_gem_object *obj,
vma->flags |= I915_VMA_GGTT; vma->flags |= I915_VMA_GGTT;
list_add(&vma->obj_link, &obj->vma_list); list_add(&vma->obj_link, &obj->vma_list);
} else { } else {
i915_ppgtt_get(i915_vm_to_ppgtt(vm));
list_add_tail(&vma->obj_link, &obj->vma_list); list_add_tail(&vma->obj_link, &obj->vma_list);
} }
...@@ -807,9 +806,6 @@ static void __i915_vma_destroy(struct i915_vma *vma) ...@@ -807,9 +806,6 @@ static void __i915_vma_destroy(struct i915_vma *vma)
if (vma->obj) if (vma->obj)
rb_erase(&vma->obj_node, &vma->obj->vma_tree); rb_erase(&vma->obj_node, &vma->obj->vma_tree);
if (!i915_vma_is_ggtt(vma))
i915_ppgtt_put(i915_vm_to_ppgtt(vma->vm));
rbtree_postorder_for_each_entry_safe(iter, n, &vma->active, node) { rbtree_postorder_for_each_entry_safe(iter, n, &vma->active, node) {
GEM_BUG_ON(i915_gem_active_isset(&iter->base)); GEM_BUG_ON(i915_gem_active_isset(&iter->base));
kfree(iter); kfree(iter);
......
...@@ -962,9 +962,6 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv) ...@@ -962,9 +962,6 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv)
{ {
int ret; int ret;
if (INTEL_INFO(dev_priv)->num_pipes == 0)
return;
ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops); ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops);
if (ret < 0) { if (ret < 0) {
DRM_ERROR("failed to add audio component (%d)\n", ret); DRM_ERROR("failed to add audio component (%d)\n", ret);
......
...@@ -2988,6 +2988,7 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state, ...@@ -2988,6 +2988,7 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
int w = drm_rect_width(&plane_state->base.src) >> 16; int w = drm_rect_width(&plane_state->base.src) >> 16;
int h = drm_rect_height(&plane_state->base.src) >> 16; int h = drm_rect_height(&plane_state->base.src) >> 16;
int dst_x = plane_state->base.dst.x1; int dst_x = plane_state->base.dst.x1;
int dst_w = drm_rect_width(&plane_state->base.dst);
int pipe_src_w = crtc_state->pipe_src_w; int pipe_src_w = crtc_state->pipe_src_w;
int max_width = skl_max_plane_width(fb, 0, rotation); int max_width = skl_max_plane_width(fb, 0, rotation);
int max_height = 4096; int max_height = 4096;
...@@ -3009,10 +3010,10 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state, ...@@ -3009,10 +3010,10 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
* screen may cause FIFO underflow and display corruption. * screen may cause FIFO underflow and display corruption.
*/ */
if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
(dst_x + w < 4 || dst_x > pipe_src_w - 4)) { (dst_x + dst_w < 4 || dst_x > pipe_src_w - 4)) {
DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n", DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n",
dst_x + w < 4 ? "end" : "start", dst_x + dst_w < 4 ? "end" : "start",
dst_x + w < 4 ? dst_x + w : dst_x, dst_x + dst_w < 4 ? dst_x + dst_w : dst_x,
4, pipe_src_w - 4); 4, pipe_src_w - 4);
return -ERANGE; return -ERANGE;
} }
......
...@@ -943,8 +943,12 @@ static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port, ...@@ -943,8 +943,12 @@ static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port,
ret = i2c_transfer(adapter, &msg, 1); ret = i2c_transfer(adapter, &msg, 1);
if (ret == 1) if (ret == 1)
return 0; ret = 0;
return ret >= 0 ? -EIO : ret; else if (ret >= 0)
ret = -EIO;
kfree(write_buf);
return ret;
} }
static static
......
...@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, ...@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n", DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n",
lspcon_mode_name(mode)); lspcon_mode_name(mode));
wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400);
if (current_mode != mode) if (current_mode != mode)
DRM_ERROR("LSPCON mode hasn't settled\n"); DRM_ERROR("LSPCON mode hasn't settled\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment