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

Changeset f4665bdc in mainline


Ignore:
Timestamp:
2017-10-05T07:49:02Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
84eb4edd
Parents:
b669092
Message:

Kfb should unmap the frame buffer when client connection is terminated.

File:
1 edited

Legend:

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

    rb669092 rf4665bdc  
    9595static int kfb_yield(visualizer_t *vs)
    9696{
     97        int rc;
     98
    9799        if (vs->mode_set) {
    98100                vs->ops.handle_damage = NULL;
    99101        }
    100102
    101         return physmem_unmap(kfb.addr);
     103        rc = physmem_unmap(kfb.addr);
     104        if (rc != EOK)
     105                return rc;
     106
     107        kfb.addr = NULL;
     108        return EOK;
    102109}
    103110
     
    158165{
    159166        visualizer_t *vsl;
     167        int rc;
    160168
    161169        vsl = (visualizer_t *) ddf_fun_data_get((ddf_fun_t *)arg);
    162170        graph_visualizer_connection(vsl, iid, icall, NULL);
     171
     172        if (kfb.addr != NULL) {
     173                rc = physmem_unmap(kfb.addr);
     174                if (rc == EOK)
     175                        kfb.addr = NULL;
     176        }
    163177}
    164178
Note: See TracChangeset for help on using the changeset viewer.