Skip to contentSkip to conversation

nvidiafb: Add update framebuffer driver for nVidia chipsets

PATCH In review Antonino A. Daplas 1 participant 1 message Feb 17, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/7 nvidiafb: Add update framebuffer driver for nVidia chipsets

Because nVidia keeps pumping out new graphics chipsets, it is becoming harder to add support for these with the old rivafb code. Currently, rivafb can properly support NV_ARCH_20 chipsets and older.

Instead of rewriting rivafb to support the latest chipsets, I've decided to write a new driver, called nvidiafb. The aim is to closely follow Xorg development.

Currently, this driver is based on the most recent CVS Xorg nv driver. Main differences from rivafb are:

- console acceleration for all chipsets
- uses DMA instead of PIO
- better LCD/digital output support
- better monitor detection
- support for Riva128 will be dropped as it cannot do DMA, rivafb will remain as the driver for this chipset

It should work with Xorg/XFree86 nv driver, but as with rivafb, is not compatible with the proprietary nvidia driver.

Once the code becomes stable, rivafb code will be trimmed to only support the Riva128 and perhaps some of the older chipsets. The code has been tested on several nVidia graphics card on x86 and x86_64. I'm still waiting for feedback from Guido Guenther regarding ppc.

This need not go to mainline immediately, as I would prefer the code to receive rigorous testing in the mm tree.

---

 drivers/video/Kconfig           |   32
 drivers/video/Makefile          |    1
 drivers/video/nvidia/Makefile   |   12
 drivers/video/nvidia/nv_accel.c |  367 ++++++++
 drivers/video/nvidia/nv_dma.h   |  178 ++++
 drivers/video/nvidia/nv_hw.c    | 1582 ++++++++++++++++++++++++++++++++++++
 drivers/video/nvidia/nv_i2c.c   |  209 ++++
 drivers/video/nvidia/nv_local.h |   98 ++
 drivers/video/nvidia/nv_of.c    |   59 +
 drivers/video/nvidia/nv_proto.h |   61 +
 drivers/video/nvidia/nv_setup.c |  622 ++++++++++++++
 drivers/video/nvidia/nv_type.h  |  174 ++++
 drivers/video/nvidia/nvidia.c   | 1725 ++++++++++++++++++++++++++++++++++++++++
 include/linux/fb.h              |    5
 include/linux/pci_ids.h         |   84 +
drivers/video/Kconfig +32 -0
diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig
@@ -606,6 +606,38 @@
 	  framebuffer.  Product specs at
 	  <http://www.erd.epson.com/vdc/html/products.htm>.
 
+config FB_NVIDIA
+	tristate "nVidia Framebuffer Support"
+	depends on FB && PCI
+	select I2C_ALGOBIT if FB_NVIDIA_I2C
+	select I2C if FB_NVIDIA_I2C
+	select FB_MODE_HELPERS
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	select FB_SOFT_CURSOR
+	help
+	  This driver supports graphics boards with the nVidia chips, TNT
+	  and newer. For very old chipsets, such as the RIVA128, then use
+	  the the rivafb.
+	  Say Y if you have such a graphics board.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called nvidiafb.
+          none yet
+
+config FB_NVIDIA_I2C
+       bool "Enable DDC Support"
+       depends on FB_NVIDIA && !PPC_OF
+       help
+	  This enables I2C support for nVidia Chipsets.  This is used
+	  only for getting EDID information from the attached display
+	  allowing for robust video mode handling and switching.
+
+	  Because fbdev-2.6 requires that drivers must be able to
+	  independently validate video mode parameters, you should say Y
+	  here.
+
 config FB_RIVA
 	tristate "nVidia Riva support"
 	depends on FB && PCI
drivers/video/Makefile +1 -0
diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile
@@ -30,6 +30,7 @@
 
 obj-$(CONFIG_FB_MATROX)		  += matrox/
 obj-$(CONFIG_FB_RIVA)		  += riva/ vgastate.o
+obj-$(CONFIG_FB_NVIDIA)		  += nvidia/
 obj-$(CONFIG_FB_ATY)		  += aty/
 obj-$(CONFIG_FB_ATY128)		  += aty/
 obj-$(CONFIG_FB_RADEON)		  += aty/
drivers/video/nvidia/Makefile new file +12 -0
diff -Nru a/drivers/video/nvidia/Makefile b/drivers/video/nvidia/Makefile
@@ -0,0 +1,12 @@
+#
+# Makefile for the nVidia framebuffer driver
+#
+
+obj-$(CONFIG_FB_NVIDIA)          += nvidiafb.o
+
+nvidiafb-y                       := nvidia.o nv_hw.o nv_setup.o \
+			            nv_accel.o
+nvidiafb-$(CONFIG_FB_NVIDIA_I2C) += nv_i2c.o
+nvidiafb-$(CONFIG_PPC_OF)	 += nv_of.o
+
+nvidiafb-objs                    := $(nvidiafb-y)
\ No newline at end of file
drivers/video/nvidia/nv_accel.c new file +367 -0

367 lines not on this page · raw message

drivers/video/nvidia/nv_dma.h new file +178 -0

178 lines not on this page · raw message

drivers/video/nvidia/nv_hw.c new file +1582 -0

1,582 lines not on this page · raw message

drivers/video/nvidia/nv_i2c.c new file +209 -0

209 lines not on this page · raw message

drivers/video/nvidia/nv_local.h new file +98 -0

98 lines not on this page · raw message

drivers/video/nvidia/nv_of.c new file +59 -0

59 lines not on this page · raw message

drivers/video/nvidia/nv_proto.h new file +61 -0

61 lines not on this page · raw message

drivers/video/nvidia/nv_setup.c new file +622 -0

388 lines not on this page · raw message

drivers/video/nvidia/nv_type.h new file +174 -0

174 lines not on this page · raw message

drivers/video/nvidia/nvidia.c new file +1725 -0

1,725 lines not on this page · raw message

include/linux/fb.h +4 -1
diff -Nru a/include/linux/fb.h b/include/linux/fb.h

Lines of this file are not shown. View the raw message.

include/linux/pci_ids.h +83 -1

84 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Part of the diff is not shown here. View the raw message.