diff options
author | Chris Wilson <chris.p.wilson@intel.com> | 2022-12-02 15:28:42 +0300 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2022-12-12 12:56:47 +0300 |
commit | 35168a6c4ed53db4f786858bac23b1474fd7d0dc (patch) | |
tree | 7187a641b13c8d54f161c7efd57550dfc74dce34 /drivers/gpu/drm/i915/gt/selftest_migrate.c | |
parent | f67986b0119c048c6537cdc93da511f7ffdb2338 (diff) | |
download | linux-35168a6c4ed53db4f786858bac23b1474fd7d0dc.tar.xz |
drm/i915/migrate: Account for the reserved_space
If the ring is nearly full when calling into emit_pte(), we might
incorrectly trample the reserved_space when constructing the packet to
emit the PTEs. This then triggers the GEM_BUG_ON(rq->reserved_space >
ring->space) when later submitting the request, since the request itself
doesn't have enough space left in the ring to emit things like
workarounds, breadcrumbs etc.
v2: Fix the whitespace errors
Testcase: igt@i915_selftests@live_emit_pte_full_ring
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7535
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6889
Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration")
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Cc: <stable@vger.kernel.org> # v5.15+
Tested-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221202122844.428006-1-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/selftest_migrate.c')
0 files changed, 0 insertions, 0 deletions