Commit 1cd6b4a0 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-next-fixes-2021-04-27' of...

Merge tag 'drm-intel-next-fixes-2021-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

drm/i915 fixes for v5.13-rc1:
- Several fixes to GLK handling in recent display refactoring (Ville)
- Rare watchdog timer race fix (Tvrtko)
- Cppcheck redundant condition fix (José)
- Overlay error code propagation fix (Dan Carpenter)
- Documentation fix (Maarten)
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/871raw5d3g.fsf@intel.com
parents add74e32 270e3cc5
...@@ -1403,7 +1403,8 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane) ...@@ -1403,7 +1403,8 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)
* require the entire fb to accommodate that to avoid * require the entire fb to accommodate that to avoid
* potential runtime errors at plane configuration time. * potential runtime errors at plane configuration time.
*/ */
if (IS_DISPLAY_VER(dev_priv, 9) && color_plane == 0 && fb->width > 3840) if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
color_plane == 0 && fb->width > 3840)
tile_width *= 4; tile_width *= 4;
/* /*
* The main surface pitch must be padded to a multiple of four * The main surface pitch must be padded to a multiple of four
......
...@@ -96,7 +96,7 @@ static bool intel_dp_read_lttpr_common_caps(struct intel_dp *intel_dp) ...@@ -96,7 +96,7 @@ static bool intel_dp_read_lttpr_common_caps(struct intel_dp *intel_dp)
* Detecting LTTPRs must be avoided on platforms with an AUX timeout * Detecting LTTPRs must be avoided on platforms with an AUX timeout
* period < 3.2ms. (see DP Standard v2.0, 2.11.2, 3.6.6.1). * period < 3.2ms. (see DP Standard v2.0, 2.11.2, 3.6.6.1).
*/ */
if (DISPLAY_VER(i915) < 10) if (DISPLAY_VER(i915) < 10 || IS_GEMINILAKE(i915))
return false; return false;
if (drm_dp_read_lttpr_common_caps(&intel_dp->aux, if (drm_dp_read_lttpr_common_caps(&intel_dp->aux,
......
...@@ -597,7 +597,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv, ...@@ -597,7 +597,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv,
return false; return false;
/* Display WA #1105: skl,bxt,kbl,cfl,glk */ /* Display WA #1105: skl,bxt,kbl,cfl,glk */
if (IS_DISPLAY_VER(dev_priv, 9) && if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
modifier == DRM_FORMAT_MOD_LINEAR && stride & 511) modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
return false; return false;
......
...@@ -803,8 +803,10 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay, ...@@ -803,8 +803,10 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
atomic_inc(&dev_priv->gpu_error.pending_fb_pin); atomic_inc(&dev_priv->gpu_error.pending_fb_pin);
vma = intel_overlay_pin_fb(new_bo); vma = intel_overlay_pin_fb(new_bo);
if (IS_ERR(vma)) if (IS_ERR(vma)) {
ret = PTR_ERR(vma);
goto out_pin_section; goto out_pin_section;
}
i915_gem_object_flush_frontbuffer(new_bo, ORIGIN_DIRTYFB); i915_gem_object_flush_frontbuffer(new_bo, ORIGIN_DIRTYFB);
......
...@@ -1519,8 +1519,7 @@ void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state) ...@@ -1519,8 +1519,7 @@ void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
u32 psr_status; u32 psr_status;
mutex_lock(&intel_dp->psr.lock); mutex_lock(&intel_dp->psr.lock);
if (!intel_dp->psr.enabled || if (!intel_dp->psr.enabled || intel_dp->psr.psr2_enabled) {
(intel_dp->psr.enabled && intel_dp->psr.psr2_enabled)) {
mutex_unlock(&intel_dp->psr.lock); mutex_unlock(&intel_dp->psr.lock);
continue; continue;
} }
......
...@@ -70,6 +70,7 @@ static void try_to_writeback(struct drm_i915_gem_object *obj, ...@@ -70,6 +70,7 @@ static void try_to_writeback(struct drm_i915_gem_object *obj,
/** /**
* i915_gem_shrink - Shrink buffer object caches * i915_gem_shrink - Shrink buffer object caches
* @ww: i915 gem ww acquire ctx, or NULL
* @i915: i915 device * @i915: i915 device
* @target: amount of memory to make available, in pages * @target: amount of memory to make available, in pages
* @nr_scanned: optional output for number of pages scanned (incremental) * @nr_scanned: optional output for number of pages scanned (incremental)
......
...@@ -941,11 +941,6 @@ static int cmd_reg_handler(struct parser_exec_state *s, ...@@ -941,11 +941,6 @@ static int cmd_reg_handler(struct parser_exec_state *s,
/* below are all lri handlers */ /* below are all lri handlers */
vreg = &vgpu_vreg(s->vgpu, offset); vreg = &vgpu_vreg(s->vgpu, offset);
if (!intel_gvt_mmio_is_cmd_accessible(gvt, offset)) {
gvt_vgpu_err("%s access to non-render register (%x)\n",
cmd, offset);
return -EBADRQC;
}
if (is_cmd_update_pdps(offset, s) && if (is_cmd_update_pdps(offset, s) &&
cmd_pdp_mmio_update_handler(s, offset, index)) cmd_pdp_mmio_update_handler(s, offset, index))
......
...@@ -587,12 +587,6 @@ static void _ppgtt_set_root_entry(struct intel_vgpu_mm *mm, ...@@ -587,12 +587,6 @@ static void _ppgtt_set_root_entry(struct intel_vgpu_mm *mm,
entry, index, false, 0, mm->vgpu); entry, index, false, 0, mm->vgpu);
} }
static inline void ppgtt_set_guest_root_entry(struct intel_vgpu_mm *mm,
struct intel_gvt_gtt_entry *entry, unsigned long index)
{
_ppgtt_set_root_entry(mm, entry, index, true);
}
static inline void ppgtt_set_shadow_root_entry(struct intel_vgpu_mm *mm, static inline void ppgtt_set_shadow_root_entry(struct intel_vgpu_mm *mm,
struct intel_gvt_gtt_entry *entry, unsigned long index) struct intel_gvt_gtt_entry *entry, unsigned long index)
{ {
......
...@@ -126,7 +126,7 @@ static bool intel_get_gvt_attrs(struct attribute_group ***intel_vgpu_type_groups ...@@ -126,7 +126,7 @@ static bool intel_get_gvt_attrs(struct attribute_group ***intel_vgpu_type_groups
return true; return true;
} }
static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt) static int intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
{ {
int i, j; int i, j;
struct intel_vgpu_type *type; struct intel_vgpu_type *type;
...@@ -144,7 +144,7 @@ static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt) ...@@ -144,7 +144,7 @@ static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
gvt_vgpu_type_groups[i] = group; gvt_vgpu_type_groups[i] = group;
} }
return true; return 0;
unwind: unwind:
for (j = 0; j < i; j++) { for (j = 0; j < i; j++) {
...@@ -152,7 +152,7 @@ static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt) ...@@ -152,7 +152,7 @@ static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
kfree(group); kfree(group);
} }
return false; return -ENOMEM;
} }
static void intel_gvt_cleanup_vgpu_type_groups(struct intel_gvt *gvt) static void intel_gvt_cleanup_vgpu_type_groups(struct intel_gvt *gvt)
...@@ -373,7 +373,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915) ...@@ -373,7 +373,7 @@ int intel_gvt_init_device(struct drm_i915_private *i915)
goto out_clean_thread; goto out_clean_thread;
ret = intel_gvt_init_vgpu_type_groups(gvt); ret = intel_gvt_init_vgpu_type_groups(gvt);
if (ret == false) { if (ret) {
gvt_err("failed to init vgpu type groups: %d\n", ret); gvt_err("failed to init vgpu type groups: %d\n", ret);
goto out_clean_types; goto out_clean_types;
} }
......
...@@ -350,6 +350,8 @@ static void __rq_arm_watchdog(struct i915_request *rq) ...@@ -350,6 +350,8 @@ static void __rq_arm_watchdog(struct i915_request *rq)
if (!ce->watchdog.timeout_us) if (!ce->watchdog.timeout_us)
return; return;
i915_request_get(rq);
hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
wdg->timer.function = __rq_watchdog_expired; wdg->timer.function = __rq_watchdog_expired;
hrtimer_start_range_ns(&wdg->timer, hrtimer_start_range_ns(&wdg->timer,
...@@ -357,7 +359,6 @@ static void __rq_arm_watchdog(struct i915_request *rq) ...@@ -357,7 +359,6 @@ static void __rq_arm_watchdog(struct i915_request *rq)
NSEC_PER_USEC), NSEC_PER_USEC),
NSEC_PER_MSEC, NSEC_PER_MSEC,
HRTIMER_MODE_REL); HRTIMER_MODE_REL);
i915_request_get(rq);
} }
static void __rq_cancel_watchdog(struct i915_request *rq) static void __rq_cancel_watchdog(struct i915_request *rq)
......
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