Commit 4badc1eb authored by James Simmons's avatar James Simmons

[ATY FBDEV] Reversed mobilty patches. They busted every other card.

parent 369fc5be
......@@ -704,13 +704,6 @@ config FB_ATY_CT
framebuffer device. The ATI product support page for these boards
is at <http://support.ati.com/products/pc/mach64/>.
config FB_ATY_GENERIC_LCD
bool "generic LCD support (EXPERIMENTAL)"
depends on FB_ATY_CT
help
say Y here to support ATI Rage 3D MOBILITY M1 or others flawours
of Mach64 on Notebooks
config FB_ATY_GX
bool "Mach64 GX support" if PCI
depends on FB_ATY
......
......@@ -8,6 +8,8 @@
*/
struct crtc {
u32 vxres;
u32 vyres;
u32 h_tot_disp;
u32 h_sync_strt_wid;
u32 v_tot_disp;
......@@ -16,11 +18,6 @@ struct crtc {
u32 gen_cntl;
u32 dp_pix_width; /* acceleration */
u32 dp_chain_mask; /* acceleration */
#ifdef CONFIG_FB_ATY_GENERIC_LCD
u32 monitors_enabled; /* LCD monitor support */
u16 h_stretching; /* LCD monitor support */
u16 v_stretching; /* LCD monitor support */
#endif
};
struct pll_514 {
......@@ -36,7 +33,6 @@ struct pll_18818 {
};
struct pll_ct {
u8 xclk_post_div_real;
u8 pll_ref_div;
u8 pll_gen_cntl;
u8 mclk_fb_div;
......@@ -79,51 +75,23 @@ struct atyfb_par {
u32 ref_clk_per;
u32 pll_per;
u32 mclk_per;
u32 xclk_per;
u8 bus_type;
u8 ram_type;
u8 mem_refresh_rate;
u8 blitter_may_be_busy;
unsigned char clock;
u32 accel_flags;
#ifdef __sparc__
struct pci_mmap_map *mmap_map;
u8 mmaped;
int open;
#endif
#ifdef CONFIG_FB_ATY_CT
u8 fifo_size;
u8 dsp_loop_latency;
u8 page_size;
#endif
#ifdef CONFIG_FB_ATY_GENERIC_LCD
unsigned long bios_base_phys;
unsigned long bios_base;
unsigned long lcd_table;
u16 lcd_width;
u16 lcd_height;
u32 lcd_pixclock;
u16 lcd_htotal;
u16 lcd_hdisp;
u16 lcd_hsync_start;
u16 lcd_hsync_delay;
u16 lcd_hsync_width;
u16 lcd_vtotal;
u16 lcd_vdisp;
u16 lcd_vsync_start;
u16 lcd_vsync_width;
u16 lcd_right;
u16 lcd_lower;
u16 lcd_hblank_width;
u16 lcd_vblank_width;
#endif
#ifdef CONFIG_PMAC_PBOOK
struct fb_info *next;
unsigned char *save_framebuffer;
unsigned long save_pll[64];
#endif
};
/*
* ATI Mach64 features
*/
......@@ -243,12 +211,11 @@ extern const struct aty_dac_ops aty_dac_ct; /* Integrated */
struct aty_pll_ops {
int (*var_to_pll) (const struct fb_info * info, u32 vclk_per,
u32 bpp, u32 width, union aty_pll * pll);
u8 bpp, union aty_pll * pll);
u32(*pll_to_var) (const struct fb_info * info,
const union aty_pll * pll);
void (*set_pll) (const struct fb_info * info,
const union aty_pll * pll);
void (*init_pll)(struct fb_info * info);
};
extern const struct aty_pll_ops aty_pll_ati18818_1; /* ATI 18818 */
......@@ -259,11 +226,13 @@ extern const struct aty_pll_ops aty_pll_ibm514; /* IBM RGB514 */
extern const struct aty_pll_ops aty_pll_unsupported; /* unsupported */
extern const struct aty_pll_ops aty_pll_ct; /* Integrated */
extern void aty_set_pll_ct(const struct fb_info *info,
const union aty_pll *pll);
extern void aty_calc_pll_ct(const struct fb_info *info,
struct pll_ct *pll);
/*
* Hardware cursor support
*/
......
This diff is collapsed.
......@@ -170,11 +170,11 @@ static inline void draw_rect(s16 x, s16 y, u16 width, u16 height,
par->blitter_may_be_busy = 1;
}
void atyfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
u32 direction = DST_LAST_PEL;
u32 dy = area->dy, sy = area->sy, direction = DST_LAST_PEL;
u32 sx = area->sx, dx = area->dx, width = area->width;
u32 pitch_value;
if (!area->width || !area->height)
......@@ -191,35 +191,35 @@ void atyfb_copyarea(struct fb_info *info, struct fb_copyarea *area)
/* In 24 bpp, the engine is in 8 bpp - this requires that all */
/* horizontal coordinates and widths must be adjusted */
pitch_value *= 3;
area->sx *= 3;
area->dx *= 3;
area->width *= 3;
sx *= 3;
dx *= 3;
width *= 3;
}
if (area->sy < area->dy) {
area->dy += area->height - 1;
area->sy += area->height - 1;
dy += area->height - 1;
sy += area->height - 1;
} else
direction |= DST_Y_TOP_TO_BOTTOM;
if (area->sx < area->dx) {
area->dx += area->width - 1;
area->sx += area->width - 1;
if (sx < dx) {
dx += width - 1;
sx += width - 1;
} else
direction |= DST_X_LEFT_TO_RIGHT;
wait_for_fifo(4, par);
aty_st_le32(DP_SRC, FRGD_SRC_BLIT, par);
aty_st_le32(SRC_Y_X, (area->sx << 16) | area->sy, par);
aty_st_le32(SRC_HEIGHT1_WIDTH1, (area->width << 16) | area->height,par);
aty_st_le32(SRC_Y_X, (sx << 16) | sy, par);
aty_st_le32(SRC_HEIGHT1_WIDTH1, (width << 16) | area->height, par);
aty_st_le32(DST_CNTL, direction, par);
draw_rect(area->dx, area->dy, area->width, area->height, par);
draw_rect(dx, dy, width, area->height, par);
}
void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
u32 color = rect->color, dx = rect->dx, width = rect->width;
struct atyfb_par *par = (struct atyfb_par *) info->par;
u32 color = rect->color, dx = rect->dx, width = rect->width;
if (!rect->width || !rect->height)
return;
......@@ -230,8 +230,8 @@ void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return;
}
color |= (color << 8);
color |= (color << 16);
color |= (rect->color << 8);
color |= (rect->color << 16);
if (info->var.bits_per_pixel == 24) {
/* In 24 bpp, the engine is in 8 bpp - this requires that all */
......@@ -251,7 +251,7 @@ void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
draw_rect(dx, rect->dy, width, rect->height, par);
}
void atyfb_imageblit(struct fb_info *info, struct fb_image *image)
void atyfb_imageblit(struct fb_info *info, const struct fb_image *image)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment