From d1b4cc3ec5f8ddbac57ada58cbab36f5a0be38eb Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Mon, 28 Apr 2008 02:15:01 -0700 Subject: 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 Cc: Jordan Crouse Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/geode/display_gx.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'drivers/video/geode/display_gx.c') diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c index acf20bf2d26..3743c8766a0 100644 --- a/drivers/video/geode/display_gx.c +++ b/drivers/video/geode/display_gx.c @@ -18,8 +18,6 @@ #include #include -#include "geodefb.h" -#include "display_gx.h" #include "gxfb.h" unsigned int gx_frame_buffer_size(void) @@ -43,9 +41,9 @@ int gx_line_delta(int xres, int bpp) return (xres * (bpp >> 3) + 7) & ~0x7; } -static void gx_set_mode(struct fb_info *info) +void gx_set_mode(struct fb_info *info) { - struct geodefb_par *par = info->par; + struct gxfb_par *par = info->par; u32 gcfg, dcfg; int hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal; int vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal; @@ -69,7 +67,7 @@ static void gx_set_mode(struct fb_info *info) write_dc(par, DC_GENERAL_CFG, gcfg); /* Setup DCLK and its divisor. */ - par->vid_ops->set_dclk(info); + gx_set_dclk_frequency(info); /* * Setup new mode. @@ -147,16 +145,16 @@ static void gx_set_mode(struct fb_info *info) write_dc(par, DC_DISPLAY_CFG, dcfg); write_dc(par, DC_GENERAL_CFG, gcfg); - par->vid_ops->configure_display(info); + gx_configure_display(info); /* Relock display controller registers */ write_dc(par, DC_UNLOCK, DC_UNLOCK_LOCK); } -static void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, - unsigned red, unsigned green, unsigned blue) +void gx_set_hw_palette_reg(struct fb_info *info, unsigned regno, + unsigned red, unsigned green, unsigned blue) { - struct geodefb_par *par = info->par; + struct gxfb_par *par = info->par; int val; /* 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, write_dc(par, DC_PAL_ADDRESS, regno); write_dc(par, DC_PAL_DATA, val); } - -struct geode_dc_ops gx_dc_ops = { - .set_mode = gx_set_mode, - .set_palette_reg = gx_set_hw_palette_reg, -}; -- cgit v1.2.3