mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
drm/i915/gt: Switch to object allocations for page directories
The GEM object is grossly overweight for the practicality of tracking large numbers of individual pages, yet it is currently our only abstraction for tracking DMA allocations. Since those allocations need to be reserved upfront before an operation, and that we need to break away from simple system memory, we need to ditch using plain struct page wrappers. In the process, we drop the WC mapping as we ended up clflushing everything anyway due to various issues across a wider range of platforms. Though in a future step, we need to drop the kmap_atomic approach which suggests we need to pre-map all the pages and keep them mapped. v2: Verify our large scratch page is suitably DMA aligned; and manually clear the scratch since we are allocating plain struct pages full of prior content. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200729164219.5737-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
committed by
Joonas Lahtinen
parent
cd0452aa2a
commit
89351925a4
@@ -307,7 +307,7 @@ static int live_noa_gpr(void *arg)
|
||||
}
|
||||
|
||||
/* Poison the ce->vm so we detect writes not to the GGTT gt->scratch */
|
||||
scratch = kmap(ce->vm->scratch[0].base.page);
|
||||
scratch = kmap(__px_page(ce->vm->scratch[0]));
|
||||
memset(scratch, POISON_FREE, PAGE_SIZE);
|
||||
|
||||
rq = intel_context_create_request(ce);
|
||||
@@ -405,7 +405,7 @@ static int live_noa_gpr(void *arg)
|
||||
out_rq:
|
||||
i915_request_put(rq);
|
||||
out_ce:
|
||||
kunmap(ce->vm->scratch[0].base.page);
|
||||
kunmap(__px_page(ce->vm->scratch[0]));
|
||||
intel_context_put(ce);
|
||||
out:
|
||||
stream_destroy(stream);
|
||||
|
||||
Reference in New Issue
Block a user