Commit 97922b54 authored by Erik-Jan Post's avatar Erik-Jan Post Committed by Linus Torvalds

viafb: fix acceleration for some chips

Fix a regression in hardware acceleration which made the accelerated
framebuffer unusable on some chips.  These need extra initialization and
an extra flag which is no longer needed/available on current chips.
Signed-off-by: default avatarErik-Jan Post <ej.lfs@xs4all.nl>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8a3a95c3
...@@ -137,7 +137,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height, ...@@ -137,7 +137,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height,
tmp, dst_pitch); tmp, dst_pitch);
return -EINVAL; return -EINVAL;
} }
tmp = (tmp >> 3) | (dst_pitch << (16 - 3)); tmp = VIA_PITCH_ENABLE | (tmp >> 3) | (dst_pitch << (16 - 3));
writel(tmp, engine + 0x38); writel(tmp, engine + 0x38);
if (op == VIA_BITBLT_FILL) if (op == VIA_BITBLT_FILL)
...@@ -352,6 +352,9 @@ int viafb_init_engine(struct fb_info *info) ...@@ -352,6 +352,9 @@ int viafb_init_engine(struct fb_info *info)
viapar->shared->vq_vram_addr = viapar->fbmem_free; viapar->shared->vq_vram_addr = viapar->fbmem_free;
viapar->fbmem_used += VQ_SIZE; viapar->fbmem_used += VQ_SIZE;
/* Init 2D engine reg to reset 2D engine */
writel(0x0, engine + VIA_REG_KEYCONTROL);
/* Init AGP and VQ regs */ /* Init AGP and VQ regs */
switch (chip_name) { switch (chip_name) {
case UNICHROME_K8M890: case UNICHROME_K8M890:
......
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