Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b669092 in mainline for uspace/drv/fb/kfb/port.c


Ignore:
Timestamp:
2017-10-05T07:34:46Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
f4665bdc
Parents:
fe8961d
Message:

Kfb should not map the frame buffer until it is claimed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/kfb/port.c

    rfe8961d rb669092  
    6666
    6767typedef struct {
     68        sysarg_t paddr;
    6869        sysarg_t width;
    6970        sysarg_t height;
     
    8788static int kfb_claim(visualizer_t *vs)
    8889{
    89         return EOK;
     90        return physmem_map(kfb.paddr + kfb.offset,
     91            ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH,
     92            AS_AREA_READ | AS_AREA_WRITE, (void *) &kfb.addr);
    9093}
    9194
     
    9699        }
    97100
    98         return EOK;
     101        return physmem_unmap(kfb.addr);
    99102}
    100103
     
    210213        kfb.width = width;
    211214        kfb.height = height;
     215        kfb.paddr = paddr;
    212216        kfb.offset = offset;
    213217        kfb.scanline = scanline;
     
    287291        kfb.size = scanline * height;
    288292        kfb.addr = AS_AREA_ANY;
    289        
    290         rc = physmem_map(paddr + offset,
    291             ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH,
    292             AS_AREA_READ | AS_AREA_WRITE, (void *) &kfb.addr);
    293         if (rc != EOK)
    294                 return rc;
    295293       
    296294        ddf_fun_t *fun_vs = ddf_fun_create(dev, fun_exposed, "vsl0");
Note: See TracChangeset for help on using the changeset viewer.