[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparc
Subject: ffb: use standard fields for framebuffer physical address and
From: Krzysztof Helt <krzysztof.h1 () poczta ! fm>
Date: 2009-05-04 20:40:55
Message-ID: 20090504224055.f4292314.krzysztof.h1 () poczta ! fm
[Download RAW message or body]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len
for physical address and length of framebuffer.
This also fixes output of the 'fbset -i' command - address and length
of the framebuffer are displayed correctly.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
diff -urp linux-orig/drivers/video/ffb.c linux-2.6.30/drivers/video/ffb.c
--- linux-orig/drivers/video/ffb.c 2008-10-13 18:03:36.000000000 +0200
+++ linux-2.6.30/drivers/video/ffb.c 2009-05-04 01:02:36.000000000 +0200
@@ -365,9 +365,6 @@ struct ffb_par {
int fifo_cache;
- unsigned long physbase;
- unsigned long fbsize;
-
int board_type;
u32 pseudo_palette[16];
@@ -854,16 +851,14 @@ static int ffb_mmap(struct fb_info *info
struct ffb_par *par = (struct ffb_par *)info->par;
return sbusfb_mmap_helper(ffb_mmap_map,
- par->physbase, par->fbsize,
+ info->fix.smem_start, info->fix.smem_len,
0, vma);
}
static int ffb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
- struct ffb_par *par = (struct ffb_par *)info->par;
-
return sbusfb_ioctl_helper(cmd, arg, info,
- FBTYPE_CREATOR, 24, par->fbsize);
+ FBTYPE_CREATOR, 24, info->fix.smem_len);
}
/*
@@ -925,7 +920,7 @@ static int __devinit ffb_probe(struct of
goto out_unmap_fbc;
par->rop_cache = FFB_ROP_NEW;
- par->physbase = op->resource[0].start;
+ info->fix.smem_start = op->resource[0].start;
/* Don't mention copyarea, so SCROLL_REDRAW is always
* used. It is the fastest on this chip.
@@ -937,11 +932,11 @@ static int __devinit ffb_probe(struct of
info->fbops = &ffb_ops;
- info->screen_base = (char *) par->physbase + FFB_DFB24_POFF;
+ info->screen_base = (char *) info->fix.smem_start + FFB_DFB24_POFF;
info->pseudo_palette = par->pseudo_palette;
sbusfb_fill_var(&info->var, dp, 32);
- par->fbsize = PAGE_ALIGN(info->var.xres * info->var.yres * 4);
+ info->fix.smem_len = PAGE_ALIGN(info->var.xres * info->var.yres * 4);
ffb_fixup_var_rgb(&info->var);
info->var.accel_flags = FB_ACCELF_TEXT;
@@ -1003,7 +998,7 @@ static int __devinit ffb_probe(struct of
"DAC pnum[%x] rev[%d] manuf_rev[%d]\n",
dp->full_name,
((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"),
- par->physbase, par->board_type,
+ info->fix.smem_start, par->board_type,
dac_pnum, dac_rev, dac_mrev);
return 0;
----------------------------------------------------------------------
Szukasz pracy? Sprawdĵ nasze oferty!
http://link.interia.pl/f2142
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic