summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/aty/mach64_accel.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-10-08 12:57:35 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-10-08 12:57:35 +0200
commit01c40a17249727472da3f52e2f344cc2cc4138c4 (patch)
tree8ec4aa2139d8f3a2bda32432481f8fef0388da83 /drivers/video/fbdev/aty/mach64_accel.c
parentc09bcc91bb94ed91f1391bffcbe294963d605732 (diff)
downloadlinux-01c40a17249727472da3f52e2f344cc2cc4138c4.tar.bz2
mach64: optimize wait_for_fifo
This is a simple optimization for fifo waiting that improves scrolling performance by 5%. If the queue has more free entries that what we consume, we can skip the costly register read next time. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Ville Syrjälä <syrjala@sci.fi> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/aty/mach64_accel.c')
-rw-r--r--drivers/video/fbdev/aty/mach64_accel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbdev/aty/mach64_accel.c b/drivers/video/fbdev/aty/mach64_accel.c
index 3ad46255f990..e4b2c89baee2 100644
--- a/drivers/video/fbdev/aty/mach64_accel.c
+++ b/drivers/video/fbdev/aty/mach64_accel.c
@@ -37,7 +37,7 @@ static u32 rotation24bpp(u32 dx, u32 direction)
return ((rotation << 8) | DST_24_ROTATION_ENABLE);
}
-void aty_reset_engine(const struct atyfb_par *par)
+void aty_reset_engine(struct atyfb_par *par)
{
/* reset engine */
aty_st_le32(GEN_TEST_CNTL,
@@ -50,6 +50,8 @@ void aty_reset_engine(const struct atyfb_par *par)
/* HOST errors */
aty_st_le32(BUS_CNTL,
aty_ld_le32(BUS_CNTL, par) | BUS_HOST_ERR_ACK | BUS_FIFO_ERR_ACK, par);
+
+ par->fifo_space = 0;
}
static void reset_GTC_3D_engine(const struct atyfb_par *par)