summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gma500/psb_drv.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.jf.intel.com>2011-04-13 10:37:03 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-25 17:12:58 -0700
commit8d9c134c6e53e27f37ae3167e25190885586e538 (patch)
tree0b20985584942c83ee419c257fa3bdbdf1a7ac56 /drivers/staging/gma500/psb_drv.h
parent36207d1167c76b9b3d986cdb36bd3468a367cafb (diff)
downloadop-kernel-dev-8d9c134c6e53e27f37ae3167e25190885586e538.zip
op-kernel-dev-8d9c134c6e53e27f37ae3167e25190885586e538.tar.gz
gma500: Add a gtt allocator
At the moment we don't do any page backing for the GTT so only the stolen area pages will actually work. That is fine for our initial framebuffer and a bit of testing but will need resolution (including alternate mmap methods and the like for s/g areas) eventually. Rather than use some of the overcomplex stuff in the DRM we use the existing Linux resource allocators to hand out framebuffers and the like. This also has the nice result that /proc/iomem shows the allocations. 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 c3609e0..7a0506a 100644
--- a/drivers/staging/gma500/psb_drv.h
+++ b/drivers/staging/gma500/psb_drv.h
@@ -21,6 +21,7 @@
#define _PSB_DRV_H_
#include <linux/version.h>
+#include <linux/kref.h>
#include <drm/drmP.h>
#include "drm_global.h"
@@ -228,6 +229,7 @@ struct psb_intel_opregion {
int enabled;
};
+
struct drm_psb_private {
struct drm_device *dev;
@@ -235,19 +237,29 @@ struct drm_psb_private {
struct psb_gtt *pg;
- /*GTT Memory manager*/
+ /* GTT Memory manager */
struct psb_gtt_mm *gtt_mm;
struct page *scratch_page;
+ struct mutex gtt_mutex;
+ struct resource *gtt_mem; /* Our PCI resource */
+ struct gtt_range *gtt_handles[GTT_MAX];
+
+ struct gtt_range *fb; /* System frame buffer */
+
struct psb_mmu_driver *mmu;
struct psb_mmu_pd *pf_pd;
+ /*
+ * Register base
+ */
+
uint8_t *sgx_reg;
uint8_t *vdc_reg;
uint32_t gatt_free_offset;
/*
- *Fencing / irq.
+ * Fencing / irq.
*/
uint32_t vdc_irq_mask;
OpenPOWER on IntegriCloud