aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-01-15 19:56:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 20:56:32 -0500
commit01c8f1c44b83a0825b573e7c723b033cece37b86 (patch)
tree5900d53e74db4515aa6aa760dd120122171fdaa0 /drivers/gpu/drm/msm
parent69660fd797c3e52f7f20478a27687f293d1a41be (diff)
mm, dax, gpu: convert vm_insert_mixed to pfn_t
Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of evaluating the PFN_MAP and PFN_DEV flags. When both are set it triggers _PAGE_DEVMAP to be set in the resulting pte. There are no functional changes to the gpu drivers as a result of this conversion. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Cc: Dave Hansen <dave@sr71.net> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index c76cc853b08a..3cedb8d5c855 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -18,6 +18,7 @@
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/shmem_fs.h> 19#include <linux/shmem_fs.h>
20#include <linux/dma-buf.h> 20#include <linux/dma-buf.h>
21#include <linux/pfn_t.h>
21 22
22#include "msm_drv.h" 23#include "msm_drv.h"
23#include "msm_gem.h" 24#include "msm_gem.h"
@@ -222,7 +223,8 @@ int msm_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
222 VERB("Inserting %p pfn %lx, pa %lx", vmf->virtual_address, 223 VERB("Inserting %p pfn %lx, pa %lx", vmf->virtual_address,
223 pfn, pfn << PAGE_SHIFT); 224 pfn, pfn << PAGE_SHIFT);
224 225
225 ret = vm_insert_mixed(vma, (unsigned long)vmf->virtual_address, pfn); 226 ret = vm_insert_mixed(vma, (unsigned long)vmf->virtual_address,
227 __pfn_to_pfn_t(pfn, PFN_DEV));
226 228
227out_unlock: 229out_unlock:
228 mutex_unlock(&dev->struct_mutex); 230 mutex_unlock(&dev->struct_mutex);