lkml.org 
[lkml]   [2010]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6 v2] ARM: Add basic architecture support for VIA/WonderMedia 85xx SoC's
On Sun, Nov 07, 2010 at 07:28:52PM +0300, Alexey Charkov wrote:
> +static inline void preallocate_fb(struct vt8500fb_platform_data *p,
> + unsigned long align) {
> + p->video_mem_len = (p->xres_virtual * p->yres_virtual * 4) >>
> + (p->bpp > 16 ? 0 : (p->bpp > 8 ? 1 :
> + (8 / p->bpp) + 1));
> + p->video_mem_phys = (unsigned long)memblock_alloc(p->video_mem_len,
> + align);
> + p->video_mem_virt = phys_to_virt(p->video_mem_phys);
> +}
...
> +void __init vt8500_map_io(void)
> +{
> + wmt_current_regs = &wmt_regmaps[VT8500_INDEX];
> + wmt_current_irqs = &wmt_irqs[VT8500_INDEX];
> + set_data();
> +#ifdef CONFIG_FB_VT8500
> + panels[current_panel_idx].bpp = 16; /* Always use RGB565 */
> + preallocate_fb(&panels[current_panel_idx], SZ_4M);
> + vt8500_device_lcdc.dev.platform_data = &panels[current_panel_idx];
> +#endif
> + iotable_init(vt8500_io_desc, ARRAY_SIZE(vt8500_io_desc));
> +}
...
> +void __init wm8505_map_io(void)
> +{
> + wmt_current_regs = &wmt_regmaps[WM8505_INDEX];
> + wmt_current_irqs = &wmt_irqs[WM8505_INDEX];
> + set_data();
> +#ifdef CONFIG_FB_WM8505
> + panels[current_panel_idx].bpp = 32; /* Always use RGB888 */
> + preallocate_fb(&panels[current_panel_idx], 32);
> + vt8500_device_wm8505_fb.dev.platform_data = &panels[current_panel_idx];
> +#endif
> + iotable_init(vt8500_io_desc, ARRAY_SIZE(vt8500_io_desc));
> +}

I'd much prefer that the allocation of memblock memory is done via the
'reserve' machine callback, rather than trying to group it into the IO
mapping callback. Is there a reason it can't be?


\
 
 \ /
  Last update: 2010-11-07 18:01    [W:0.125 / U:7.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site