Skip to content

Commit 1cd6b4a

Browse files
committed
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: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents add74e3 + 270e3cc commit 1cd6b4a

File tree

10 files changed

+15
-22
lines changed

10 files changed

+15
-22
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,8 @@ intel_fb_stride_alignment(const struct drm_framebuffer *fb, int color_plane)
14031403
* require the entire fb to accommodate that to avoid
14041404
* potential runtime errors at plane configuration time.
14051405
*/
1406-
if (IS_DISPLAY_VER(dev_priv, 9) && color_plane == 0 && fb->width > 3840)
1406+
if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
1407+
color_plane == 0 && fb->width > 3840)
14071408
tile_width *= 4;
14081409
/*
14091410
* The main surface pitch must be padded to a multiple of four

drivers/gpu/drm/i915/display/intel_dp_link_training.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static bool intel_dp_read_lttpr_common_caps(struct intel_dp *intel_dp)
9696
* Detecting LTTPRs must be avoided on platforms with an AUX timeout
9797
* period < 3.2ms. (see DP Standard v2.0, 2.11.2, 3.6.6.1).
9898
*/
99-
if (DISPLAY_VER(i915) < 10)
99+
if (DISPLAY_VER(i915) < 10 || IS_GEMINILAKE(i915))
100100
return false;
101101

102102
if (drm_dp_read_lttpr_common_caps(&intel_dp->aux,

drivers/gpu/drm/i915/display/intel_fbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv,
597597
return false;
598598

599599
/* Display WA #1105: skl,bxt,kbl,cfl,glk */
600-
if (IS_DISPLAY_VER(dev_priv, 9) &&
600+
if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
601601
modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
602602
return false;
603603

drivers/gpu/drm/i915/display/intel_overlay.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,10 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
803803
atomic_inc(&dev_priv->gpu_error.pending_fb_pin);
804804

805805
vma = intel_overlay_pin_fb(new_bo);
806-
if (IS_ERR(vma))
806+
if (IS_ERR(vma)) {
807+
ret = PTR_ERR(vma);
807808
goto out_pin_section;
809+
}
808810

809811
i915_gem_object_flush_frontbuffer(new_bo, ORIGIN_DIRTYFB);
810812

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,7 @@ void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
15191519
u32 psr_status;
15201520

15211521
mutex_lock(&intel_dp->psr.lock);
1522-
if (!intel_dp->psr.enabled ||
1523-
(intel_dp->psr.enabled && intel_dp->psr.psr2_enabled)) {
1522+
if (!intel_dp->psr.enabled || intel_dp->psr.psr2_enabled) {
15241523
mutex_unlock(&intel_dp->psr.lock);
15251524
continue;
15261525
}

drivers/gpu/drm/i915/gem/i915_gem_shrinker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static void try_to_writeback(struct drm_i915_gem_object *obj,
7070

7171
/**
7272
* i915_gem_shrink - Shrink buffer object caches
73+
* @ww: i915 gem ww acquire ctx, or NULL
7374
* @i915: i915 device
7475
* @target: amount of memory to make available, in pages
7576
* @nr_scanned: optional output for number of pages scanned (incremental)

drivers/gpu/drm/i915/gvt/cmd_parser.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -941,11 +941,6 @@ static int cmd_reg_handler(struct parser_exec_state *s,
941941

942942
/* below are all lri handlers */
943943
vreg = &vgpu_vreg(s->vgpu, offset);
944-
if (!intel_gvt_mmio_is_cmd_accessible(gvt, offset)) {
945-
gvt_vgpu_err("%s access to non-render register (%x)\n",
946-
cmd, offset);
947-
return -EBADRQC;
948-
}
949944

950945
if (is_cmd_update_pdps(offset, s) &&
951946
cmd_pdp_mmio_update_handler(s, offset, index))

drivers/gpu/drm/i915/gvt/gtt.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,6 @@ static void _ppgtt_set_root_entry(struct intel_vgpu_mm *mm,
587587
entry, index, false, 0, mm->vgpu);
588588
}
589589

590-
static inline void ppgtt_set_guest_root_entry(struct intel_vgpu_mm *mm,
591-
struct intel_gvt_gtt_entry *entry, unsigned long index)
592-
{
593-
_ppgtt_set_root_entry(mm, entry, index, true);
594-
}
595-
596590
static inline void ppgtt_set_shadow_root_entry(struct intel_vgpu_mm *mm,
597591
struct intel_gvt_gtt_entry *entry, unsigned long index)
598592
{

drivers/gpu/drm/i915/gvt/gvt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static bool intel_get_gvt_attrs(struct attribute_group ***intel_vgpu_type_groups
126126
return true;
127127
}
128128

129-
static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
129+
static int intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
130130
{
131131
int i, j;
132132
struct intel_vgpu_type *type;
@@ -144,15 +144,15 @@ static bool intel_gvt_init_vgpu_type_groups(struct intel_gvt *gvt)
144144
gvt_vgpu_type_groups[i] = group;
145145
}
146146

147-
return true;
147+
return 0;
148148

149149
unwind:
150150
for (j = 0; j < i; j++) {
151151
group = gvt_vgpu_type_groups[j];
152152
kfree(group);
153153
}
154154

155-
return false;
155+
return -ENOMEM;
156156
}
157157

158158
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)
373373
goto out_clean_thread;
374374

375375
ret = intel_gvt_init_vgpu_type_groups(gvt);
376-
if (ret == false) {
376+
if (ret) {
377377
gvt_err("failed to init vgpu type groups: %d\n", ret);
378378
goto out_clean_types;
379379
}

drivers/gpu/drm/i915/i915_request.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,15 @@ static void __rq_arm_watchdog(struct i915_request *rq)
350350
if (!ce->watchdog.timeout_us)
351351
return;
352352

353+
i915_request_get(rq);
354+
353355
hrtimer_init(&wdg->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
354356
wdg->timer.function = __rq_watchdog_expired;
355357
hrtimer_start_range_ns(&wdg->timer,
356358
ns_to_ktime(ce->watchdog.timeout_us *
357359
NSEC_PER_USEC),
358360
NSEC_PER_MSEC,
359361
HRTIMER_MODE_REL);
360-
i915_request_get(rq);
361362
}
362363

363364
static void __rq_cancel_watchdog(struct i915_request *rq)

0 commit comments

Comments
 (0)