Re: [PATCH] to fix slow gen2 Intel video (i830, i845, i85x, i865) with KMS

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Fri, 25 Jan 2013 22:48:21 +0200
On Sat, Jan 26, 2013 at 05:06:54AM +0900, Taku YAMAMOTO wrote:
> Hi all,
> 
> A good news to owners of i830, i845, i852, i855 and i865 (a.k.a. gen2),
> who've got frustrated with the bad performance with KMS.
> 
> I managed to track down the root cause of the slowness of gen2 with KMS and
> finally fixed it.
> The attached one-liner patch is the fix.
> (It was my surprise that the actual problem lied in agp rather than i915kms.)
> 
> -- 
> -|-__   YAMAMOTO, Taku
>  | __ <     <taku_at_tackymt.homeip.net>
> 
>       - A chicken is an egg's way of producing more eggs. -

> --- sys/dev/agp/agp_i810.c.orig	2013-01-20 16:18:33.382363986 +0900
> +++ sys/dev/agp/agp_i810.c	2013-01-25 05:47:17.046570619 +0900
> _at__at_ -2228,7 +2228,7 _at__at_ agp_i830_chipset_flush(device_t dev)
>  	bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1 << 31));
>  	for (i = 0; i < 20000 /* 1 sec */; i++) {
>  		hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC);
> -		if ((hic & (1 << 31)) != 0)
> +		if ((hic & (1 << 31)) == 0)
>  			break;
>  		DELAY(50);
>  	}


This looks right, comparing our (mine) code and the Linux intel-gtt.c.
Thank you for tracking it down.

Unfortunately, this magic is not documented at all. The 855GM datasheet
I have completely omits a description for the register 0x70 of the host
bridge. The only reference we are allowed to see is in the Linux agp
driver source.

I will wait a little before committing, in the hope that someone gives
the change an additional test.

Received on Fri Jan 25 2013 - 19:48:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:34 UTC