Changeset 5035eeb7 in mainline


Ignore:
Timestamp:
2006-09-05T16:47:59Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2bf639
Parents:
d681c17
Message:

Pass "fb.bpp-align" property to userspace so that our fb task works properly even on
framebuffers used in some Sun hardware.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/fb/fb.c

    rd681c17 r5035eeb7  
    395395        sysinfo_set_item_val("fb.height", NULL, yres);
    396396        sysinfo_set_item_val("fb.bpp", NULL, bpp);
     397        sysinfo_set_item_val("fb.bpp-align", NULL, align);
    397398        sysinfo_set_item_val("fb.scanline", NULL, scan);
    398399        sysinfo_set_item_val("fb.address.physical", NULL, addr);
  • uspace/fb/fb.c

    rd681c17 r5035eeb7  
    454454 * @param bpp  Bits per pixel (8, 16, 24, 32)
    455455 * @param scan Bytes per one scanline
    456  *
    457  */
    458 static void screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan)
     456 * @param align Alignment for 24bpp mode.
     457 *
     458 */
     459static void
     460screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan, int align)
    459461{
    460462        switch (bpp) {
     
    472474                        screen.rgb2scr = rgb_3byte;
    473475                        screen.scr2rgb = byte3_rgb;
    474                         screen.pixelbytes = 3;
     476                        if (!align)
     477                                screen.pixelbytes = 3;
     478                        else
     479                                screen.pixelbytes = 4;
    475480                        break;
    476481                case 32:
     
    12171222        unsigned int fb_height;
    12181223        unsigned int fb_bpp;
     1224        unsigned int fb_bpp_align;
    12191225        unsigned int fb_scanline;
    12201226        void *fb_addr;
     
    12271233        fb_height=sysinfo_value("fb.height");
    12281234        fb_bpp=sysinfo_value("fb.bpp");
     1235        fb_bpp_align=sysinfo_value("fb.bpp-align");
    12291236        fb_scanline=sysinfo_value("fb.scanline");
    12301237
     
    12351242                    AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE);
    12361243       
    1237         screen_init(fb_addr, fb_width, fb_height, fb_bpp, fb_scanline);
     1244        screen_init(fb_addr, fb_width, fb_height, fb_bpp, fb_scanline, fb_bpp_align);
    12381245
    12391246        return 0;
Note: See TracChangeset for help on using the changeset viewer.