drm/i915: Make lrc_init_wa_ctx compatible with ww locking, v3.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 23 Mar 2021 15:50:15 +0000 (16:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Mar 2021 16:27:20 +0000 (17:27 +0100)
commit5ace5e9618e9acf46217ab0fa97f34afce2f21a6
tree74227cdcdfa75a874848f8d7cfcd38247b693dc7
parent7d1c2618eac590d948eb33b9807d913ddb6e105f
drm/i915: Make lrc_init_wa_ctx compatible with ww locking, v3.

Make creation separate from pinning, in order to take the lock only
once, and pin the mapping with the lock held.

Changes since v1:
- Rebase on top of upstream changes.
Changes since v2:
- Fully clear wa_ctx on error.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-27-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/gt/intel_lrc.c