aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2012-09-12 02:06:44 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-14 20:59:14 -0500
commit6c39dcc465373daae484b1a893e47b5e631fb62f (patch)
treedd46219eb75602cfa2cce364761753d7acf83f35 /drivers/video
parent83dac59409387789b88bed40b1be86a8abc572be (diff)
fbdev: Add GXT4000P and GXT6500P support to the gxt4500 driver
I'm reviving an old patch from 2009 that adds support for GXT4000P and GXT6500P adapter to the gxt4500 driver. See threads at http://marc.info/?l=linux-fbdev-devel&m=124345080216952&w=2 and https://lists.ozlabs.org/pipermail/linuxppc-dev/2009-June/072672.html for more details. This patch adds support for GXT4000P and GXT6500P cards found on some IBM pSeries machines. GXT4000P/6000P and GXT4500P/6500P couples are identical from software's point of view and are based on the same Raster Engine (RC1000), except for a different reference clock for the PLL. GXT6x00P models are equipped with an additional Geometry Engine (GT1000) but this driver doesn't use it. Signed-off-by: Nico Macrionitis <acrux@cruxppc.org> Signed-off-by: Giuseppe Coviello <cjg@cruxppc.org> Tested-by: Dan Horák <dan@danny.cz> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig8
-rw-r--r--drivers/video/gxt4500.c15
2 files changed, 18 insertions, 5 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index d08d7998a4aa..0cff083fbbe2 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2140,14 +2140,16 @@ config FB_UDL
2140 To compile as a module, choose M here: the module name is udlfb. 2140 To compile as a module, choose M here: the module name is udlfb.
2141 2141
2142config FB_IBM_GXT4500 2142config FB_IBM_GXT4500
2143 tristate "Framebuffer support for IBM GXT4500P adaptor" 2143 tristate "Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors"
2144 depends on FB && PPC 2144 depends on FB && PPC
2145 select FB_CFB_FILLRECT 2145 select FB_CFB_FILLRECT
2146 select FB_CFB_COPYAREA 2146 select FB_CFB_COPYAREA
2147 select FB_CFB_IMAGEBLIT 2147 select FB_CFB_IMAGEBLIT
2148 ---help--- 2148 ---help---
2149 Say Y here to enable support for the IBM GXT4500P display 2149 Say Y here to enable support for the IBM GXT4000P/6000P and
2150 adaptor, found on some IBM System P (pSeries) machines. 2150 GXT4500P/6500P display adaptor based on Raster Engine RC1000,
2151 found on some IBM System P (pSeries) machines. This driver
2152 doesn't use Geometry Engine GT1000.
2151 2153
2152config FB_PS3 2154config FB_PS3
2153 tristate "PS3 GPU framebuffer driver" 2155 tristate "PS3 GPU framebuffer driver"
diff --git a/drivers/video/gxt4500.c b/drivers/video/gxt4500.c
index 0e9afa41d163..4bdea6e9bd55 100644
--- a/drivers/video/gxt4500.c
+++ b/drivers/video/gxt4500.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Frame buffer device for IBM GXT4500P and GXT6000P display adaptors 2 * Frame buffer device for IBM GXT4500P/6500P and GXT4000P/6000P
3 * display adaptors
3 * 4 *
4 * Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org> 5 * Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org>
5 */ 6 */
@@ -14,6 +15,8 @@
14#include <linux/string.h> 15#include <linux/string.h>
15 16
16#define PCI_DEVICE_ID_IBM_GXT4500P 0x21c 17#define PCI_DEVICE_ID_IBM_GXT4500P 0x21c
18#define PCI_DEVICE_ID_IBM_GXT6500P 0x21b
19#define PCI_DEVICE_ID_IBM_GXT4000P 0x16e
17#define PCI_DEVICE_ID_IBM_GXT6000P 0x170 20#define PCI_DEVICE_ID_IBM_GXT6000P 0x170
18 21
19/* GXT4500P registers */ 22/* GXT4500P registers */
@@ -173,6 +176,8 @@ static const struct fb_videomode defaultmode __devinitconst = {
173/* List of supported cards */ 176/* List of supported cards */
174enum gxt_cards { 177enum gxt_cards {
175 GXT4500P, 178 GXT4500P,
179 GXT6500P,
180 GXT4000P,
176 GXT6000P 181 GXT6000P
177}; 182};
178 183
@@ -182,6 +187,8 @@ static const struct cardinfo {
182 const char *cardname; 187 const char *cardname;
183} cardinfo[] = { 188} cardinfo[] = {
184 [GXT4500P] = { .refclk_ps = 9259, .cardname = "IBM GXT4500P" }, 189 [GXT4500P] = { .refclk_ps = 9259, .cardname = "IBM GXT4500P" },
190 [GXT6500P] = { .refclk_ps = 9259, .cardname = "IBM GXT6500P" },
191 [GXT4000P] = { .refclk_ps = 40000, .cardname = "IBM GXT4000P" },
185 [GXT6000P] = { .refclk_ps = 40000, .cardname = "IBM GXT6000P" }, 192 [GXT6000P] = { .refclk_ps = 40000, .cardname = "IBM GXT6000P" },
186}; 193};
187 194
@@ -736,6 +743,10 @@ static void __devexit gxt4500_remove(struct pci_dev *pdev)
736static const struct pci_device_id gxt4500_pci_tbl[] = { 743static const struct pci_device_id gxt4500_pci_tbl[] = {
737 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P), 744 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P),
738 .driver_data = GXT4500P }, 745 .driver_data = GXT4500P },
746 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6500P),
747 .driver_data = GXT6500P },
748 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4000P),
749 .driver_data = GXT4000P },
739 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6000P), 750 { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6000P),
740 .driver_data = GXT6000P }, 751 .driver_data = GXT6000P },
741 { 0 } 752 { 0 }
@@ -768,7 +779,7 @@ static void __exit gxt4500_exit(void)
768module_exit(gxt4500_exit); 779module_exit(gxt4500_exit);
769 780
770MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>"); 781MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
771MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P/6000P"); 782MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P/6500P and GXT4000P/6000P");
772MODULE_LICENSE("GPL"); 783MODULE_LICENSE("GPL");
773module_param(mode_option, charp, 0); 784module_param(mode_option, charp, 0);
774MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\""); 785MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\"");