summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_gem.h
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-05-22 21:13:57 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-28 13:41:05 +0300
commit6ada1328642b8ffc25917c89569d3e16354b43d2 (patch)
tree6d98fffc3e24973b1ea482c617f1c23cc95e9b51 /drivers/gpu/drm/omapdrm/omap_gem.h
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff)
downloadlinux-6ada1328642b8ffc25917c89569d3e16354b43d2.tar.xz
gpu: drm: omapdrm: Adding new typedef vm_fault_t
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") Previously vm_insert_mixed() returns err which driver mapped into VM_FAULT_* type. Also return value of vm_insert_mixed() not handled correctly and 0 was returned inside fault_2d() as default. The new function vmf_insert_mixed() will replace this inefficiency by returning correct VM_FAULT_* type. vmf_error() is the newly introduce inline function in 4.17-rc6. Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.h b/drivers/gpu/drm/omapdrm/omap_gem.h
index a78bde05193a..c1c45fbde155 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.h
+++ b/drivers/gpu/drm/omapdrm/omap_gem.h
@@ -21,6 +21,7 @@
#define __OMAPDRM_GEM_H__
#include <linux/types.h>
+#include <linux/mm_types.h>
enum dma_data_direction;
@@ -80,7 +81,7 @@ struct dma_buf *omap_gem_prime_export(struct drm_device *dev,
struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
struct dma_buf *buffer);
-int omap_gem_fault(struct vm_fault *vmf);
+vm_fault_t omap_gem_fault(struct vm_fault *vmf);
int omap_gem_roll(struct drm_gem_object *obj, u32 roll);
void omap_gem_cpu_sync_page(struct drm_gem_object *obj, int pgoff);
void omap_gem_dma_sync_buffer(struct drm_gem_object *obj,