diff options
author | Andres Salomon <dilinger@queued.net> | 2008-04-28 05:15:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:36 -0400 |
commit | d1b4cc3ec5f8ddbac57ada58cbab36f5a0be38eb (patch) | |
tree | 76f9fa67cf3f717f22f1a293a4ca2c23cadc975e /drivers/video/geode/display_gx.c | |
parent | 9f1277bd1497858a05a80222a6e98f9c43343491 (diff) |
gxfb: stop sharing code with gx1fb
We want to stop sharing stuff with gx1fb; it makes little sense. There were
fields in geodefb_par that weren't being used, there was little point to the
DC/VP ops callbacks, etc. This implements the following:
- Create gxfb_par (based on geodefb_par), place it in gxfb.h
- Drop display_gx.h and video_gx.h. The last few patches moved most
stuff into gxfb.h anyways, so there was very little left.
- Drop the geode_{dc,vid}_ops stuff. Un-static functions, add
declarations to gxfb.h.
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/geode/display_gx.c')
-rw-r--r-- | drivers/video/geode/display_gx.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c index acf20bf2d26c..3743c8766a08 100644 --- a/drivers/video/geode/display_gx.c +++ b/drivers/video/geode/display_gx.c | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <asm/div64.h> | 18 | #include <asm/div64.h> |
19 | #include <asm/delay.h> | 19 | #include <asm/delay.h> |
20 | 20 | ||
21 | #include "geodefb.h" | ||
22 | #include "display_gx.h" | ||
23 | #include "gxfb.h" | 21 | #include "gxfb.h" |
24 | 22 | ||
25 | unsigned int gx_frame_buffer_size(void) | 23 | unsigned int gx_frame_buffer_size(void) |
@@ -43,9 +41,9 @@ int gx_line_delta(int xres, int bpp) | |||
43 | return (xres * (bpp >> 3) + 7) & ~0x7; | 41 | return (xres * (bpp >> 3) + 7) & ~0x7; |
44 | } | 42 | } |
45 | 43 | ||
46 | static void gx_set_mode(struct fb_info *info) | 44 | void gx_set_mode(struct fb_info *info) |
47 | { | 45 | { |
48 | struct geodefb_par *par = info->par; | 46 | struct gxfb_par *par = info->par; |
49 | u32 gcfg, dcfg; | 47 | u32 gcfg, dcfg; |
50 | int hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal; | 48 | int hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal; |
51 | int vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal; | 49 | int vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal; |
@@ -69,7 +67,7 @@ static void gx_set_mode(struct fb_info *info) | |||
69 | write_dc(par, DC_GENERAL_CFG, gcfg); | 67 | write_dc(par, DC_GENERAL_CFG, gcfg); |
70 | 68 | ||
71 | /* Setup DCLK and its divisor. */ | 69 | /* Setup DCLK and its divisor. */ |
72 | par->vid_ops->set_dclk(info); | 70 | gx_set_dclk_frequency(info); |
73 | 71 | ||
74 | /* | 72 | /* |
75 | * Setup new mode. | 73 | * Setup new mode. |
@@ -147,16 +145,16 @@ static void gx_set_mode(struct fb_info *info) | |||
147 | write_dc(par, DC_DISPLAY_CFG, dcfg); | 145 | write_dc(par, DC_DISPLAY_CFG, dcfg); |
148 | write_dc(par, DC_GENERAL_CFG, gcfg); | 146 | write_dc(par, DC_GENERAL_CFG, gcfg); |
149 | 147 | ||
150 | par->vid_ops->configure_display(info); | 148 | gx_configure_display(info); |
151 | 149 | ||
152 | /* Relock display controller registers */ | 150 | /* Relock display controller registers */ |
153 | write_dc(par, DC_UNLOCK, DC_UNLOCK_LOCK); | 151 | write_dc(par, DC_UNLOCK, DC_UNLOCK_LOCK); |
154 | } | 152 | } |
155 | 153 | ||
156 | static void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, | 154 | void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, |
157 | unsigned red, unsigned green, unsigned blue) | 155 | unsigned red, unsigned green, unsigned blue) |
158 | { | 156 | { |
159 | struct geodefb_par *par = info->par; | 157 | struct gxfb_par *par = info->par; |
160 | int val; | 158 | int val; |
161 | 159 | ||
162 | /* Hardware palette is in RGB 8-8-8 format. */ | 160 | /* Hardware palette is in RGB 8-8-8 format. */ |
@@ -167,8 +165,3 @@ static void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, | |||
167 | write_dc(par, DC_PAL_ADDRESS, regno); | 165 | write_dc(par, DC_PAL_ADDRESS, regno); |
168 | write_dc(par, DC_PAL_DATA, val); | 166 | write_dc(par, DC_PAL_DATA, val); |
169 | } | 167 | } |
170 | |||
171 | struct geode_dc_ops gx_dc_ops = { | ||
172 | .set_mode = gx_set_mode, | ||
173 | .set_palette_reg = gx_set_hw_palette_reg, | ||
174 | }; | ||