aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/neofb.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/video/neofb.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/video/neofb.c')
-rw-r--r--drivers/video/neofb.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 7ef079c146e..588527a254c 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -71,6 +71,7 @@
71#include <asm/io.h> 71#include <asm/io.h>
72#include <asm/irq.h> 72#include <asm/irq.h>
73#include <asm/pgtable.h> 73#include <asm/pgtable.h>
74#include <asm/system.h>
74 75
75#ifdef CONFIG_MTRR 76#ifdef CONFIG_MTRR
76#include <asm/mtrr.h> 77#include <asm/mtrr.h>
@@ -83,12 +84,12 @@
83 84
84/* --------------------------------------------------------------------- */ 85/* --------------------------------------------------------------------- */
85 86
86static bool internal; 87static int internal;
87static bool external; 88static int external;
88static bool libretto; 89static int libretto;
89static bool nostretch; 90static int nostretch;
90static bool nopciburst; 91static int nopciburst;
91static char *mode_option = NULL; 92static char *mode_option __devinitdata = NULL;
92 93
93#ifdef MODULE 94#ifdef MODULE
94 95
@@ -1184,8 +1185,8 @@ static int neofb_pan_display(struct fb_var_screeninfo *var,
1184 1185
1185 DBG("neofb_update_start"); 1186 DBG("neofb_update_start");
1186 1187
1187 Base = (var->yoffset * info->var.xres_virtual + var->xoffset) >> 2; 1188 Base = (var->yoffset * var->xres_virtual + var->xoffset) >> 2;
1188 Base *= (info->var.bits_per_pixel + 7) / 8; 1189 Base *= (var->bits_per_pixel + 7) / 8;
1189 1190
1190 neoUnlock(); 1191 neoUnlock();
1191 1192
@@ -1632,7 +1633,7 @@ static struct fb_ops neofb_ops = {
1632 1633
1633/* --------------------------------------------------------------------- */ 1634/* --------------------------------------------------------------------- */
1634 1635
1635static struct fb_videomode mode800x480 = { 1636static struct fb_videomode __devinitdata mode800x480 = {
1636 .xres = 800, 1637 .xres = 800,
1637 .yres = 480, 1638 .yres = 480,
1638 .pixclock = 25000, 1639 .pixclock = 25000,
@@ -1646,7 +1647,8 @@ static struct fb_videomode mode800x480 = {
1646 .vmode = FB_VMODE_NONINTERLACED 1647 .vmode = FB_VMODE_NONINTERLACED
1647}; 1648};
1648 1649
1649static int neo_map_mmio(struct fb_info *info, struct pci_dev *dev) 1650static int __devinit neo_map_mmio(struct fb_info *info,
1651 struct pci_dev *dev)
1650{ 1652{
1651 struct neofb_par *par = info->par; 1653 struct neofb_par *par = info->par;
1652 1654
@@ -1706,8 +1708,8 @@ static void neo_unmap_mmio(struct fb_info *info)
1706 info->fix.mmio_len); 1708 info->fix.mmio_len);
1707} 1709}
1708 1710
1709static int neo_map_video(struct fb_info *info, struct pci_dev *dev, 1711static int __devinit neo_map_video(struct fb_info *info,
1710 int video_len) 1712 struct pci_dev *dev, int video_len)
1711{ 1713{
1712 //unsigned long addr; 1714 //unsigned long addr;
1713 1715
@@ -1771,7 +1773,7 @@ static void neo_unmap_video(struct fb_info *info)
1771 info->fix.smem_len); 1773 info->fix.smem_len);
1772} 1774}
1773 1775
1774static int neo_scan_monitor(struct fb_info *info) 1776static int __devinit neo_scan_monitor(struct fb_info *info)
1775{ 1777{
1776 struct neofb_par *par = info->par; 1778 struct neofb_par *par = info->par;
1777 unsigned char type, display; 1779 unsigned char type, display;
@@ -1850,7 +1852,7 @@ static int neo_scan_monitor(struct fb_info *info)
1850 return 0; 1852 return 0;
1851} 1853}
1852 1854
1853static int neo_init_hw(struct fb_info *info) 1855static int __devinit neo_init_hw(struct fb_info *info)
1854{ 1856{
1855 struct neofb_par *par = info->par; 1857 struct neofb_par *par = info->par;
1856 int videoRam = 896; 1858 int videoRam = 896;
@@ -1938,8 +1940,8 @@ static int neo_init_hw(struct fb_info *info)
1938} 1940}
1939 1941
1940 1942
1941static struct fb_info *neo_alloc_fb_info(struct pci_dev *dev, 1943static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const struct
1942 const struct pci_device_id *id) 1944 pci_device_id *id)
1943{ 1945{
1944 struct fb_info *info; 1946 struct fb_info *info;
1945 struct neofb_par *par; 1947 struct neofb_par *par;
@@ -2037,7 +2039,8 @@ static void neo_free_fb_info(struct fb_info *info)
2037 2039
2038/* --------------------------------------------------------------------- */ 2040/* --------------------------------------------------------------------- */
2039 2041
2040static int neofb_probe(struct pci_dev *dev, const struct pci_device_id *id) 2042static int __devinit neofb_probe(struct pci_dev *dev,
2043 const struct pci_device_id *id)
2041{ 2044{
2042 struct fb_info *info; 2045 struct fb_info *info;
2043 u_int h_sync, v_sync; 2046 u_int h_sync, v_sync;
@@ -2126,7 +2129,7 @@ err_map_mmio:
2126 return err; 2129 return err;
2127} 2130}
2128 2131
2129static void neofb_remove(struct pci_dev *dev) 2132static void __devexit neofb_remove(struct pci_dev *dev)
2130{ 2133{
2131 struct fb_info *info = pci_get_drvdata(dev); 2134 struct fb_info *info = pci_get_drvdata(dev);
2132 2135
@@ -2192,7 +2195,7 @@ static struct pci_driver neofb_driver = {
2192 .name = "neofb", 2195 .name = "neofb",
2193 .id_table = neofb_devices, 2196 .id_table = neofb_devices,
2194 .probe = neofb_probe, 2197 .probe = neofb_probe,
2195 .remove = neofb_remove, 2198 .remove = __devexit_p(neofb_remove)
2196}; 2199};
2197 2200
2198/* ************************* init in-kernel code ************************** */ 2201/* ************************* init in-kernel code ************************** */