Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f51a14dd authored by David Miller's avatar David Miller Committed by Paul Mundt
Browse files

svga: Make svga_set_default_atc_regs take an iomem regbase pointer.

parent e2fade2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -654,7 +654,7 @@ static int arkfb_set_par(struct fb_info *info)

	/* Set default values */
	svga_set_default_gfx_regs(par->state.vgabase);
	svga_set_default_atc_regs();
	svga_set_default_atc_regs(par->state.vgabase);
	svga_set_default_seq_regs();
	svga_set_default_crt_regs();
	svga_wcrt_multi(par->state.vgabase, ark_line_compare_regs, 0xFFFFFFFF);
+1 −1
Original line number Diff line number Diff line
@@ -515,7 +515,7 @@ static int s3fb_set_par(struct fb_info *info)

	/* Set default values */
	svga_set_default_gfx_regs(par->state.vgabase);
	svga_set_default_atc_regs();
	svga_set_default_atc_regs(par->state.vgabase);
	svga_set_default_seq_regs();
	svga_set_default_crt_regs();
	svga_wcrt_multi(par->state.vgabase, s3_line_compare_regs, 0xFFFFFFFF);
+12 −12
Original line number Diff line number Diff line
@@ -93,26 +93,26 @@ void svga_set_default_gfx_regs(void __iomem *regbase)
}

/* Set attribute controller registers to sane values */
void svga_set_default_atc_regs(void)
void svga_set_default_atc_regs(void __iomem *regbase)
{
	u8 count;

	vga_r(NULL, 0x3DA);
	vga_w(NULL, VGA_ATT_W, 0x00);
	vga_r(regbase, 0x3DA);
	vga_w(regbase, VGA_ATT_W, 0x00);

	/* All standard ATC registers (AR00 - AR14) */
	for (count = 0; count <= 0xF; count ++)
		svga_wattr(NULL, count, count);
		svga_wattr(regbase, count, count);

	svga_wattr(NULL, VGA_ATC_MODE, 0x01);
/*	svga_wattr(NULL, VGA_ATC_MODE, 0x41); */
	svga_wattr(NULL, VGA_ATC_OVERSCAN, 0x00);
	svga_wattr(NULL, VGA_ATC_PLANE_ENABLE, 0x0F);
	svga_wattr(NULL, VGA_ATC_PEL, 0x00);
	svga_wattr(NULL, VGA_ATC_COLOR_PAGE, 0x00);
	svga_wattr(regbase, VGA_ATC_MODE, 0x01);
/*	svga_wattr(regbase, VGA_ATC_MODE, 0x41); */
	svga_wattr(regbase, VGA_ATC_OVERSCAN, 0x00);
	svga_wattr(regbase, VGA_ATC_PLANE_ENABLE, 0x0F);
	svga_wattr(regbase, VGA_ATC_PEL, 0x00);
	svga_wattr(regbase, VGA_ATC_COLOR_PAGE, 0x00);

	vga_r(NULL, 0x3DA);
	vga_w(NULL, VGA_ATT_W, 0x20);
	vga_r(regbase, 0x3DA);
	vga_w(regbase, VGA_ATT_W, 0x20);
}

/* Set sequencer registers to sane values */
+1 −1
Original line number Diff line number Diff line
@@ -426,7 +426,7 @@ static int vt8623fb_set_par(struct fb_info *info)

	/* Set default values */
	svga_set_default_gfx_regs(par->state.vgabase);
	svga_set_default_atc_regs();
	svga_set_default_atc_regs(par->state.vgabase);
	svga_set_default_seq_regs();
	svga_set_default_crt_regs();
	svga_wcrt_multi(par->state.vgabase, vt8623_line_compare_regs, 0xFFFFFFFF);
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ void svga_wcrt_multi(void __iomem *regbase, const struct vga_regset *regset, u32
void svga_wseq_multi(void __iomem *regbase, const struct vga_regset *regset, u32 value);

void svga_set_default_gfx_regs(void __iomem *regbase);
void svga_set_default_atc_regs(void);
void svga_set_default_atc_regs(void __iomem *regbase);
void svga_set_default_seq_regs(void);
void svga_set_default_crt_regs(void);
void svga_set_textmode_vga_regs(void);