aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/framebuffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/framebuffer.cc')
-rw-r--r--src/drivers/framebuffer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/framebuffer.cc b/src/drivers/framebuffer.cc
index ce7790e..33b73d6 100644
--- a/src/drivers/framebuffer.cc
+++ b/src/drivers/framebuffer.cc
@@ -15,7 +15,7 @@ void framebuffer_init(FB_CFG config){
// Ensure we start writing at the begining of the page since
// start is not necessarly 4096 bytes aligned
start=PAGE(start);
- PAGE_RMAP(start,fb_cfg.location, PAGING_OPT_DEFAULTS,fb_cfg.pitch*fb_cfg.height);
+ PAGE_RMAP(start,fb_cfg.location, PAGING_OPT_PCD|PAGING_OPT_DEFAULTS,fb_cfg.pitch*fb_cfg.height);
fb_cfg.location=start;
}
@@ -25,7 +25,7 @@ void framebuffer_draw(FB_PIXEL p){
p.y=p.y>(fb_cfg.width)?fb_cfg.width:p.y;
p.x=p.x<0?0:p.x;
p.y=p.y<0?0:p.y;
-
+
u8 *pixel=(u8*)(fb_cfg.location+p.x*(fb_cfg.depth/8)+p.y*fb_cfg.pitch);
pixel[0]=p.r;
pixel[1]=p.g;