[Intel-gfx] [PATCH] x86/early-quirks: Extend Intel graphics stolen memory placement to 64bit

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Nov 24 13:55:25 UTC 2017


On Fri, Nov 24, 2017 at 09:30:17AM +0200, Joonas Lahtinen wrote:
> @@ -426,14 +426,14 @@ static size_t __init chv_stolen_size(int num, int slot, int func)
>  	 * 0x17 to 0x1d: 4MB increments start at 36MB
>  	 */
>  	if (gms < 0x11)
> -		return (size_t)gms * MB(32);
> +		return gms * MB(32);
>  	else if (gms < 0x17)
> -		return (size_t)(gms - 0x11 + 2) * MB(4);
> +		return (gms - 0x11 + 2) * MB(4);
>  	else
> -		return (size_t)(gms - 0x17 + 9) * MB(4);
> +		return (gms - 0x17 + 9) * MB(4);

Unrelated random idea: Maybe someone could replace the
semi-magic looking +2,+9 etc. with just +MB(whatever)?

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list