Changeset 20eb5e4d in mainline for uspace


Ignore:
Timestamp:
2008-12-07T00:41:59Z (16 years ago)
Author:
Pavel Rimsky <rimskyp@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5d9430d7
Parents:
2b1f860
Message:

Added forgotten stuff related to framebuffers with offsets. Got rid of VISUAL_SB1500_PALETTE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fb/fb.c

    r2b1f860 r20eb5e4d  
    522522 */
    523523static bool
    524 screen_init(void *addr, unsigned int xres, unsigned int yres,
    525         unsigned int scan, unsigned int visual, bool invert_colors)
     524screen_init(void *addr, unsigned int offset, unsigned int xres,
     525        unsigned int yres, unsigned int scan, unsigned int visual,
     526        bool invert_colors)
    526527{
    527528        switch (visual) {
     
    565566        }
    566567
    567         screen.fbaddress = (unsigned char *) addr;
     568        screen.fbaddress = (unsigned char *) (((uintptr_t) addr) + offset);
    568569        screen.xres = xres;
    569570        screen.yres = yres;
     
    13541355        unsigned int fb_scanline;
    13551356        unsigned int fb_visual;
     1357        unsigned int fb_offset;
    13561358        bool fb_invert_colors;
    13571359        void *fb_addr;
     
    13611363
    13621364        fb_ph_addr = (void *) sysinfo_value("fb.address.physical");
     1365        fb_offset = sysinfo_value("fb.offset");
    13631366        fb_width = sysinfo_value("fb.width");
    13641367        fb_height = sysinfo_value("fb.height");
     
    13701373        fb_addr = as_get_mappable_page(asz);
    13711374       
    1372         physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >>
     1375        physmem_map(fb_ph_addr + fb_offset, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >>
    13731376            PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
    13741377
    1375         if (screen_init(fb_addr, fb_width, fb_height, fb_scanline, fb_visual,
     1378        if (screen_init(fb_addr, fb_offset, fb_width, fb_height, fb_scanline, fb_visual,
    13761379            fb_invert_colors))
    13771380                return 0;
Note: See TracChangeset for help on using the changeset viewer.