Skip to contentSkip to conversation

basic drm driver for Trident CyberBlade

PATCH New Jesse Barnes 1 participant 1 message Mar 6, 2006 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 basic drm driver for Trident CyberBlade

I'm trying to get the CyberBlade EXA driver into a bit better shape, and that means some sort of decent host<->fb DMA support. The device itself is apparently capable of that, but EXA has trouble since it only has the user virtual address of the transfers it wants to make, so I thought a DRM driver might be in order. It's also necessary for decent VBLANK support, which will hopefully be pretty straightforward. Note that at this point, the DRM driver won't do you any good since I haven't checked the EXA stuff that uses it into X.Org CVS yet (and afaik there's no DRI driver for this device either).

Any thoughts on how the host<->fb DMA stuff should work? Basically EXA UploadToScreen wants to hand the card a virtual address range and have it loaded up to the card's VRAM; DownloadFromScreen wants to do the same in reverse. Should I just add a device specific DRM_IOCTL to accomplish this (using get_user_pages() etc.) or is there some existing code I could leverage?

Thanks,
Jesse

drivers/char/drm/Makefile +2 -0
index 9d180c4..a212175 100644
@@ -8,6 +8,7 @@ drm-objs    :=	drm_auth.o drm_bufs.o drm
 		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
 		drm_sysfs.o
 
+blade-objs  := blade_drv.o
 tdfx-objs   := tdfx_drv.o
 r128-objs   := r128_drv.o r128_cce.o r128_state.o r128_irq.o
 mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
@@ -30,6 +31,7 @@ endif
 
 obj-$(CONFIG_DRM)	+= drm.o
 obj-$(CONFIG_DRM_TDFX)	+= tdfx.o
+obj-$(CONFIG_DRM_BLADE) += blade.o
 obj-$(CONFIG_DRM_R128)	+= r128.o
 obj-$(CONFIG_DRM_RADEON)+= radeon.o
 obj-$(CONFIG_DRM_MGA)	+= mga.o
char/drm/blade_drv.c new file +117 -0

117 lines not on this page · raw message

drivers/char/drm/Kconfig +7 -0
index 56ace9d..10c42b7 100644
@@ -16,6 +16,13 @@ config DRM
 	  details.  You should also select and configure AGP
 	  (/dev/agpgart) support.
 
+config DRM_BLADE
+	tristate "Trident CyberBlade/i1"
+	depends on DRM && PCI
+	help
+	  Choose this option if you have a Trident CyberBlade/i1 device.  If M
+	  is selected, the module will be called blade.
+
 config DRM_TDFX
 	tristate "3dfx Banshee/Voodoo3+"
 	depends on DRM && PCI