From 55057660f035a03078910d678e5fd9b0cb0b795a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 6 Sep 2006 23:25:14 -0700 Subject: Put the PCI device/vendor id in the drm_device_t. This helps us unbreak FreeBSD DRM from the 965 changes. --- linux-core/drmP.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 6046dde6..70bf3495 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -747,6 +747,8 @@ typedef struct drm_device { drm_agp_head_t *agp; /**< AGP data */ struct pci_dev *pdev; /**< PCI device structure */ + int pci_vendor; /**< PCI vendor id */ + int pci_device; /**< PCI device id */ #ifdef __alpha__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3) struct pci_controler *hose; -- cgit v1.2.3 From ef98a8e20dad8ae7e38f397d63c13bd24105ce53 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 18 Sep 2006 21:22:12 +1000 Subject: drm: put domain number back to 0, domain support is seriously fubar.. --- linux-core/drmP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 70bf3495..a955c3de 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -777,7 +777,7 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev, #ifdef __alpha__ #define drm_get_pci_domain(dev) dev->hose->bus->number #else -#define drm_get_pci_domain(dev) pci_domain_nr(dev->pdev->bus) +#define drm_get_pci_domain(dev) 0 #endif #if __OS_HAS_AGP -- cgit v1.2.3 From 62f6ea225615392098dedee47d4ccdd69e126a43 Mon Sep 17 00:00:00 2001 From: Felix Kuhling Date: Fri, 22 Sep 2006 03:46:54 +1000 Subject: bug 5942: add stubs for drm_mtrr_add/del for non-MTRR configured linux --- linux-core/drmP.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index a955c3de..fd48059a 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -810,6 +810,18 @@ static inline int drm_mtrr_del(int handle, unsigned long offset, } #else +static inline int drm_mtrr_add(unsigned long offset, unsigned long size, + unsigned int flags) +{ + return -ENODEV; +} + +static inline int drm_mtrr_del(int handle, unsigned long offset, + unsigned long size, unsigned int flags) +{ + return -ENODEV; +} + #define drm_core_has_MTRR(dev) (0) #endif -- cgit v1.2.3 From ab351505f36a6c66405ea7604378268848340a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 11 Aug 2006 17:57:59 +0200 Subject: Add support for secondary vertical blank interrupt to DRM core. --- linux-core/drmP.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index fd48059a..200b6493 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -110,6 +110,7 @@ #define DRIVER_IRQ_VBL 0x100 #define DRIVER_DMA_QUEUE 0x200 #define DRIVER_FB_DMA 0x400 +#define DRIVER_IRQ_VBL2 0x800 /*@}*/ @@ -582,6 +583,7 @@ struct drm_driver { int new); void (*kernel_context_switch_unlock) (struct drm_device * dev); int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence); + int (*vblank_wait2) (struct drm_device * dev, unsigned int *sequence); int (*dri_library_name) (struct drm_device * dev, char * buf); /** @@ -732,8 +734,10 @@ typedef struct drm_device { wait_queue_head_t vbl_queue; /**< VBLANK wait queue */ atomic_t vbl_received; + atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */ spinlock_t vbl_lock; drm_vbl_sig_t vbl_sigs; /**< signal list to send on VBLANK */ + drm_vbl_sig_t vbl_sigs2; /**< signals to send on secondary VBLANK */ unsigned int vbl_pending; /*@} */ -- cgit v1.2.3 From d817cc1f30060fcc4a85a05b2de8a2a1687421b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 16 Aug 2006 15:47:22 +0200 Subject: Add support for interrupt triggered driver callback with lock held to DRM core. --- linux-core/drmP.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 200b6493..e61be1a1 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -739,6 +739,8 @@ typedef struct drm_device { drm_vbl_sig_t vbl_sigs; /**< signal list to send on VBLANK */ drm_vbl_sig_t vbl_sigs2; /**< signals to send on secondary VBLANK */ unsigned int vbl_pending; + spinlock_t tasklet_lock; /**< For drm_locked_tasklet */ + void (*locked_tasklet_func)(struct drm_device *dev); /*@} */ cycles_t ctx_start; @@ -984,6 +986,7 @@ extern int drm_wait_vblank(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_vblank_wait(drm_device_t * dev, unsigned int *vbl_seq); extern void drm_vbl_send_signals(drm_device_t * dev); +extern void drm_locked_tasklet(drm_device_t *dev, void(*func)(drm_device_t*)); /* AGP/GART support (drm_agpsupport.h) */ extern drm_agp_head_t *drm_agp_init(drm_device_t *dev); -- cgit v1.2.3 From 29598e5253ff5c085ccf63580fd24b84db848424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 22 Aug 2006 16:40:07 +0200 Subject: Add support for tracking drawable information to core Actually make the existing ioctls for adding and removing drawables do something useful, and add another ioctl for the X server to update drawable information. The only kind of drawable information tracked so far is cliprects. --- linux-core/drmP.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index e61be1a1..8ccbed4f 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -772,6 +772,15 @@ typedef struct drm_device { drm_local_map_t *agp_buffer_map; unsigned int agp_buffer_token; drm_head_t primary; /**< primary screen head */ + + /** \name Drawable information */ + /*@{ */ + spinlock_t drw_lock; + unsigned int drw_bitfield_length; + u32 *drw_bitfield; + unsigned int drw_info_length; + drm_drawable_info_t **drw_info; + /*@} */ } drm_device_t; static __inline__ int drm_core_check_feature(struct drm_device *dev, @@ -922,6 +931,8 @@ extern int drm_adddraw(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_rmdraw(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +extern drm_drawable_info_t *drm_get_drawable_info(drm_device_t *dev, + drm_drawable_t id); /* Authentication IOCTL support (drm_auth.h) */ extern int drm_getmagic(struct inode *inode, struct file *filp, -- cgit v1.2.3 From 98a89504589427a76c3f5cfa2266962a1a212672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 23 Aug 2006 16:05:47 +0200 Subject: Hook up DRM_IOCTL_UPDATE_DRAW ioctl. --- linux-core/drmP.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 8ccbed4f..5c9644e0 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -931,6 +931,8 @@ extern int drm_adddraw(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_rmdraw(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); +extern int drm_update_drawable_info(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg); extern drm_drawable_info_t *drm_get_drawable_info(drm_device_t *dev, drm_drawable_t id); -- cgit v1.2.3 From f3deef730d52c94ce21ada7e4ceb63aa28a8601b Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Mon, 2 Oct 2006 05:46:42 +0300 Subject: Bug 6242: [mach64] Use private DMA buffers, part #3. Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional flag is needed, since PCI DMA buffers do not have an associated map. --- linux-core/drmP.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-core/drmP.h') diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 5c9644e0..2bbec70c 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -449,7 +449,8 @@ typedef struct drm_device_dma { enum { _DRM_DMA_USE_AGP = 0x01, _DRM_DMA_USE_SG = 0x02, - _DRM_DMA_USE_FB = 0x04 + _DRM_DMA_USE_FB = 0x04, + _DRM_DMA_USE_PCI_RO = 0x08 } flags; } drm_device_dma_t; -- cgit v1.2.3