diff options
author | Simon Glass | 2019-12-06 21:42:19 -0700 |
---|---|---|
committer | Bin Meng | 2019-12-15 11:44:17 +0800 |
commit | e98791ab80bd136bfaba8c0b2c40651da45ffbf9 (patch) | |
tree | aec793f0d75da9018b3195a9caa9ea43a33ef784 /arch/x86/lib/fsp/fsp_graphics.c | |
parent | cf87d3b5039d2e497380ccddff905cf3e58e0032 (diff) |
x86: fsp: Set up an MTRR for the graphics frame buffer
The FSP-S may do this but at least for coral it does not. Set this up so
that graphics is not deathly slow.
It isn't clear whether the FSP is expected to set up MTRR. It is not
mentioned in the APL FSP document.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib/fsp/fsp_graphics.c')
-rw-r--r-- | arch/x86/lib/fsp/fsp_graphics.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 91d2d085572..226c7e66b3f 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/arch/x86/lib/fsp/fsp_graphics.c @@ -8,6 +8,7 @@ #include <vbe.h> #include <video.h> #include <asm/fsp/fsp_support.h> +#include <asm/mtrr.h> DECLARE_GLOBAL_DATA_PTR; @@ -97,6 +98,9 @@ static int fsp_video_probe(struct udevice *dev) if (ret) goto err; + mtrr_add_request(MTRR_TYPE_WRCOMB, vesa->phys_base_ptr, 256 << 20); + mtrr_commit(true); + printf("%dx%dx%d\n", uc_priv->xsize, uc_priv->ysize, vesa->bits_per_pixel); |