diff mbox

[Xenial,SRU/Yakkety] Set write-combining mtrr for vesafb

Message ID 1469201948-20700-1-git-send-email-stefan.bader@canonical.com
State New
Headers show

Commit Message

Stefan Bader July 22, 2016, 3:39 p.m. UTC
Otherwise console can be rather slow on higher resolutions. We
had this in Trusty-Vivid but at some point after that the source
file moved into a different directory. Which likely caused it to
get lost again.

We probably need to be careful to make sure that any Yakkety kernel
post 4.4 still adds it, too.

-Stefan


From 24924c740ea3c5c15a27f391171fad2ca93582a2 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@canonical.com>
Date: Tue, 21 Apr 2015 14:54:52 +0200
Subject: [PATCH] UBUNTU: SAUCE: vesafb: Set mtrr:3 (write-combining) as
 default

We had this setting from Oneiric to Saucy[1]. In Saucy it was part
of the combined patch to make vesafb a module, which was unnessesary
in Trusty as we moved back to built-in.
Was added back in Trusty but again lost after Vivid.

It will still be possible to disable mtrr by putting
  video=vesafb:nomtrr or video=vesafb:mtrr:<x>
on the kernel command-line but without that knowledge the default
will be noticably slower (especially on higher resolutions).

[1] https://lists.ubuntu.com/archives/kernel-team/2011-May/015600.html

BugLink: http://bugs.launchpad.net/bugs/1605662

(forward-ported from trusty by adapting file location)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 drivers/video/vesafb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Colin Ian King July 22, 2016, 3:48 p.m. UTC | #1
On 22/07/16 16:39, Stefan Bader wrote:
> Otherwise console can be rather slow on higher resolutions. We
> had this in Trusty-Vivid but at some point after that the source
> file moved into a different directory. Which likely caused it to
> get lost again.
> 
> We probably need to be careful to make sure that any Yakkety kernel
> post 4.4 still adds it, too.
> 
> -Stefan
> 
> 
> From 24924c740ea3c5c15a27f391171fad2ca93582a2 Mon Sep 17 00:00:00 2001
> From: Stefan Bader <stefan.bader@canonical.com>
> Date: Tue, 21 Apr 2015 14:54:52 +0200
> Subject: [PATCH] UBUNTU: SAUCE: vesafb: Set mtrr:3 (write-combining) as
>  default
> 
> We had this setting from Oneiric to Saucy[1]. In Saucy it was part
> of the combined patch to make vesafb a module, which was unnessesary
> in Trusty as we moved back to built-in.
> Was added back in Trusty but again lost after Vivid.
> 
> It will still be possible to disable mtrr by putting
>   video=vesafb:nomtrr or video=vesafb:mtrr:<x>
> on the kernel command-line but without that knowledge the default
> will be noticably slower (especially on higher resolutions).
> 
> [1] https://lists.ubuntu.com/archives/kernel-team/2011-May/015600.html
> 
> BugLink: http://bugs.launchpad.net/bugs/1605662
> 
> (forward-ported from trusty by adapting file location)
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/video/vesafb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c
> index 1c7da3b..d479804 100644
> --- a/drivers/video/fbdev/vesafb.c
> +++ b/drivers/video/fbdev/vesafb.c
> @@ -47,7 +47,7 @@ static struct fb_fix_screeninfo vesafb_fix = {
>  };
>  
>  static int   inverse    __read_mostly;
> -static int   mtrr       __read_mostly;		/* disable mtrr */
> +static int   mtrr       __read_mostly = 3;	/* enable mtrr write-comb. */
>  static int   vram_remap;			/* Set amount of memory to be used */
>  static int   vram_total;			/* Set total amount of memory */
>  static int   pmi_setpal __read_mostly = 1;	/* pmi for palette changes ??? */
> 

Makes sense.

Acked-by: Colin Ian King <colin.king@canonical.com>
Tim Gardner July 22, 2016, 4:05 p.m. UTC | #2
Is this upstreamable ?
Stefan Bader July 22, 2016, 4:11 p.m. UTC | #3
On 22.07.2016 18:05, Tim Gardner wrote:
> Is this upstreamable ?
> 
dunno. long term I had the feeling they wanted to get rid of mtrr completely (to
be replace pat). So I guess interest might be rather low...

-Stefan
Colin Ian King July 22, 2016, 4:16 p.m. UTC | #4
On 22/07/16 17:11, Stefan Bader wrote:
> On 22.07.2016 18:05, Tim Gardner wrote:
>> Is this upstreamable ?
>>
> dunno. long term I had the feeling they wanted to get rid of mtrr completely (to
> be replace pat). So I guess interest might be rather low...

Always worth doing IMHO

Colin
Kamal Mostafa July 25, 2016, 4:11 p.m. UTC | #5
Applied to X.

 -Kamal
diff mbox

Patch

diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c
index 1c7da3b..d479804 100644
--- a/drivers/video/fbdev/vesafb.c
+++ b/drivers/video/fbdev/vesafb.c
@@ -47,7 +47,7 @@  static struct fb_fix_screeninfo vesafb_fix = {
 };
 
 static int   inverse    __read_mostly;
-static int   mtrr       __read_mostly;		/* disable mtrr */
+static int   mtrr       __read_mostly = 3;	/* enable mtrr write-comb. */
 static int   vram_remap;			/* Set amount of memory to be used */
 static int   vram_total;			/* Set total amount of memory */
 static int   pmi_setpal __read_mostly = 1;	/* pmi for palette changes ??? */