drm fixes for 5.16-rc5

ttm:
 - fix ttm_bo_swapout
 
 syncobj:
 - fix fence find bug with signalled fences
 
 i915:
 - fix error pointer deref in gem execbuffer
 - fix for GT init with GuC/HuC on ICL
 
 amdgpu:
 - DPIA fix
 - eDP fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmGy1uEACgkQDHTzWXnE
 hr7KNRAAlW9JhjyhIXBmk3UzXJ71YSi3KkWo9cyfVpoUUhjZ3yLTDhxLxvjyrlYg
 Jv3wkBhQKjcQl8fVyvypaySotfg0s3lqzFNzTp6TDAz+u5wvN5Xbi6uUgfQgav3T
 pecliq53LAtfRSkZchm6AxHTZ2hq9AUk46rT7RgvFCVnEC1xioc3zEL1vEHbua0q
 dTjnu8jovmiZHRbMI+U7sNy2D4tJ7olxQYK2kBhdeDdajpmIxXHX1dFJ8xTyRAK6
 dIt7iVY9Lje8q+qYyayT4m+jOWGfOUrGQRSyFZJrOF4T1Uyjak8H0jpUbxOZQh84
 HCQbrn+INkgXT2aix0vxptFnsaWbwW3aVG70pGf9c1SUob2eWJuyYNIJaLzANdWK
 4RVVjtVu4LJJft3yHpowDFJNLes6pRniDhN+zX9Ym66jhEaxfPlNjL8mVFOKJk8g
 SkHXf6QZU4TGT0rSgv7I9dd803airplQJxxXXVD7sdNrgc7lZBjw+fpCh2Xm66FN
 DbqjStQ/1Is3QJFTYHrlQFVKo43d38M1imTEpxPmPzIK6DXhT7uz79h2A85jSqes
 gA8bYEXHYcMV1a/uDveyoQtOlGcLein4Ji4VoiKr26F1gS5pbQmu5IYoXZnN022Q
 2S/aGS1cL9yJ5I07Zd/gvay3SKaQSWUZRD0McAfbB/+GFaqC9w0=
 =Z2Ds
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2021-12-10' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Regular fixes, pretty small overall, couple of core fixes, two i915
  and two amdgpu, hopefully it stays this quiet.

  ttm:
   - fix ttm_bo_swapout

  syncobj:
   - fix fence find bug with signalled fences

  i915:
   - fix error pointer deref in gem execbuffer
   - fix for GT init with GuC/HuC on ICL

  amdgpu:
   - DPIA fix
   - eDP fix"

* tag 'drm-fixes-2021-12-10' of git://anongit.freedesktop.org/drm/drm:
  drm/i915/gen11: Moving WAs to icl_gt_workarounds_init()
  drm/amd/display: prevent reading unitialized links
  drm/amd/display: Fix DPIA outbox timeout after S3/S4/reset
  drm/i915: Fix error pointer dereference in i915_gem_do_execbuffer()
  drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.
  drm/ttm: fix ttm_bo_swapout
This commit is contained in:
Linus Torvalds 2021-12-10 11:29:53 -08:00
commit 9b302ffe4e
6 changed files with 30 additions and 12 deletions

View File

@ -2576,7 +2576,8 @@ static int dm_resume(void *handle)
*/
link_enc_cfg_init(dm->dc, dc_state);
amdgpu_dm_outbox_init(adev);
if (dc_enable_dmub_notifications(adev->dm.dc))
amdgpu_dm_outbox_init(adev);
r = dm_dmub_hw_init(adev);
if (r)
@ -2625,6 +2626,10 @@ static int dm_resume(void *handle)
/* TODO: Remove dc_state->dccg, use dc->dccg directly. */
dc_resource_state_construct(dm->dc, dm_state->context);
/* Re-enable outbox interrupts for DPIA. */
if (dc_enable_dmub_notifications(adev->dm.dc))
amdgpu_dm_outbox_init(adev);
/* Before powering on DC we need to re-initialize DMUB. */
r = dm_dmub_hw_init(adev);
if (r)

View File

@ -226,6 +226,8 @@ static inline void get_edp_links(const struct dc *dc,
*edp_num = 0;
for (i = 0; i < dc->link_count; i++) {
// report any eDP links, even unconnected DDI's
if (!dc->links[i])
continue;
if (dc->links[i]->connector_signal == SIGNAL_TYPE_EDP) {
edp_links[*edp_num] = dc->links[i];
if (++(*edp_num) == MAX_NUM_EDP)

View File

@ -404,8 +404,17 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
if (*fence) {
ret = dma_fence_chain_find_seqno(fence, point);
if (!ret)
if (!ret) {
/* If the requested seqno is already signaled
* drm_syncobj_find_fence may return a NULL
* fence. To make sure the recipient gets
* signalled, use a new fence instead.
*/
if (!*fence)
*fence = dma_fence_get_stub();
goto out;
}
dma_fence_put(*fence);
} else {
ret = -EINVAL;

View File

@ -3277,6 +3277,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
out_fence = eb_requests_create(&eb, in_fence, out_fence_fd);
if (IS_ERR(out_fence)) {
err = PTR_ERR(out_fence);
out_fence = NULL;
if (eb.requests[0])
goto err_request;
else

View File

@ -1127,6 +1127,15 @@ icl_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
GAMT_CHKN_BIT_REG,
GAMT_CHKN_DISABLE_L3_COH_PIPE);
/* Wa_1407352427:icl,ehl */
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
PSDUNIT_CLKGATE_DIS);
/* Wa_1406680159:icl,ehl */
wa_write_or(wal,
SUBSLICE_UNIT_LEVEL_CLKGATE,
GWUNIT_CLKGATE_DIS);
/* Wa_1607087056:icl,ehl,jsl */
if (IS_ICELAKE(i915) ||
IS_JSL_EHL_GT_STEP(i915, STEP_A0, STEP_B0))
@ -1852,15 +1861,6 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE,
VSUNIT_CLKGATE_DIS | HSUNIT_CLKGATE_DIS);
/* Wa_1407352427:icl,ehl */
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
PSDUNIT_CLKGATE_DIS);
/* Wa_1406680159:icl,ehl */
wa_write_or(wal,
SUBSLICE_UNIT_LEVEL_CLKGATE,
GWUNIT_CLKGATE_DIS);
/*
* Wa_1408767742:icl[a2..forever],ehl[all]
* Wa_1605460711:icl[a0..c0]

View File

@ -1103,7 +1103,7 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
* as an indication that we're about to swap out.
*/
memset(&place, 0, sizeof(place));
place.mem_type = TTM_PL_SYSTEM;
place.mem_type = bo->resource->mem_type;
if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL))
return -EBUSY;
@ -1135,6 +1135,7 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
struct ttm_place hop;
memset(&hop, 0, sizeof(hop));
place.mem_type = TTM_PL_SYSTEM;
ret = ttm_resource_alloc(bo, &place, &evict_mem);
if (unlikely(ret))
goto out;