summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gma500/psb_drv.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.jf.intel.com>2011-04-19 15:27:28 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-25 17:13:48 -0700
commitf20ee24445b54be28cae8609c4194fb400377c63 (patch)
tree0fbd997ce4ccedf161930151d6b1d264160959ce /drivers/staging/gma500/psb_drv.h
parentf11dd9b14f48941ca4282174a282ee4f17ded530 (diff)
downloadop-kernel-dev-f20ee24445b54be28cae8609c4194fb400377c63.zip
op-kernel-dev-f20ee24445b54be28cae8609c4194fb400377c63.tar.gz
gma500: begin adding GEM
This puts in place the infrastructure for GEM allocators. Our implementation is fairly simplistic at this point and we don't deal with things like evicting objects from the GART to make space, nor compaction. We extent our gtt_range struct to include a GEM object and that allows GEM to do all the handle management and most of the memory mapping work for us. This patch also doesn't load GEM pages into the GART so the GEM side isn't very useful. Before we can do that a fair bit of work is needed reworking the internal GTT code. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500/psb_drv.h')
-rw-r--r--drivers/staging/gma500/psb_drv.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/staging/gma500/psb_drv.h b/drivers/staging/gma500/psb_drv.h
index 9da6a33..aa68ae7 100644
--- a/drivers/staging/gma500/psb_drv.h
+++ b/drivers/staging/gma500/psb_drv.h
@@ -243,7 +243,6 @@ struct drm_psb_private {
struct mutex gtt_mutex;
struct resource *gtt_mem; /* Our PCI resource */
- struct gtt_range *gtt_handles[GTT_MAX];
struct psb_mmu_driver *mmu;
struct psb_mmu_pd *pf_pd;
@@ -627,9 +626,22 @@ extern const struct drm_connector_helper_funcs
psb_intel_lvds_connector_helper_funcs;
extern const struct drm_connector_funcs psb_intel_lvds_connector_funcs;
+/* psb_gem.c */
+extern int psb_gem_init_object(struct drm_gem_object *obj);
+extern void psb_gem_free_object(struct drm_gem_object *obj);
+extern int psb_gem_get_aperture(struct drm_device *dev, void *data,
+ struct drm_file *file);
+extern int psb_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
+ struct drm_mode_create_dumb *args);
+extern int psb_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev,
+ uint32_t handle);
+extern int psb_gem_dumb_map_gtt(struct drm_file *file, struct drm_device *dev,
+ uint32_t handle, uint64_t *offset);
+extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
+
/*
- *Debug print bits setting
+ * Debug print bits setting
*/
#define PSB_D_GENERAL (1 << 0)
#define PSB_D_INIT (1 << 1)
OpenPOWER on IntegriCloud