summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/shmem_utils.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-12-04 11:45:37 +1000
committerDave Airlie <airlied@redhat.com>2020-12-04 11:45:45 +1000
commit94cfbd05e46a31cc181e7ac6bc4b32ac09f8864f (patch)
tree56c96fe4172cfab8abe7023bc55a5f78d1aaa044 /drivers/gpu/drm/i915/gt/shmem_utils.c
parentaac06646aa85772eed49931d721e917209cabb51 (diff)
parentccc9e67ab26feda7e62749bb54c05d7abe07dca9 (diff)
Merge tag 'drm-intel-fixes-2020-12-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
Fixes for GPU hang, null dereference, suspend-resume, power consumption, and use-after-free. - Program mocs:63 for cache eviction on gen9 (Chris) - Protect context lifetime with RCU (Chris) - Split the breadcrumb spinlock between global and contexts (Chris) - Retain default context state across shrinking (Venkata) - Limit frequency drop to RPe on parking (Chris) - Return earlier from intel_modeset_init() without display (Jani) - Defer initial modeset until after GGTT is initialized (Chris) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201203134705.GA1575873@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/shmem_utils.c')
-rw-r--r--drivers/gpu/drm/i915/gt/shmem_utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gt/shmem_utils.c b/drivers/gpu/drm/i915/gt/shmem_utils.c
index f011ea42487e..463af675fadd 100644
--- a/drivers/gpu/drm/i915/gt/shmem_utils.c
+++ b/drivers/gpu/drm/i915/gt/shmem_utils.c
@@ -103,10 +103,13 @@ static int __shmem_rw(struct file *file, loff_t off,
return PTR_ERR(page);
vaddr = kmap(page);
- if (write)
+ if (write) {
memcpy(vaddr + offset_in_page(off), ptr, this);
- else
+ set_page_dirty(page);
+ } else {
memcpy(ptr, vaddr + offset_in_page(off), this);
+ }
+ mark_page_accessed(page);
kunmap(page);
put_page(page);