diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-17 16:04:26 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-17 21:53:03 +0200 |
commit | 32a1963148277407f7af0160da2b7c0527afc8a4 (patch) | |
tree | 4d077fc715d46755017e9d84634906f98e2c6cf5 /drivers/gpu/drm/i915/i915_drv.h | |
parent | drm/i915/dmc: protect against loading wrong firmware (diff) | |
download | linux-32a1963148277407f7af0160da2b7c0527afc8a4.tar.xz linux-32a1963148277407f7af0160da2b7c0527afc8a4.zip |
drm/i915/gtt: Serialise both updates to PDE and our shadow
Currently, we perform a locked update of the shadow entry when
allocating a page directory entry such that if two clients are
concurrently allocating neighbouring ranges we only insert one new entry
for the pair of them. However, we also need to serialise both clients
wrt to the actual entry in the HW table, or else we may allow one client
or even a third client to proceed ahead of the HW write. My handwave
before was that under the _pathological_ condition we would see the
scratch entry instead of the expected entry, causing a temporary
glitch. That starvation condition will eventually show up in practice, so
fix it.
The reason for the previous cheat was to avoid having to free the extra
allocation while under the spinlock. Now, we keep the extra entry
allocated until the end instead.
v2: Fix error paths for gen6
Fixes: 1d1b5490b91c ("drm/i915/gtt: Replace struct_mutex serialisation for allocation")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190617140426.7203-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
0 files changed, 0 insertions, 0 deletions