Changeset 712c4ba in mainline for kernel/genarch/src/fb/fb.c


Ignore:
Timestamp:
2011-05-20T16:09:24Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b6f3e7e
Parents:
326bf65
Message:

avoid spinlocks to be taken in the direct code path to physically outputing kconsole characters to the framebuffer (this fixes ticket #243)
the spinlock in printf() (kernel) was sacrificed, this might lead potentially to scrambled kconsole output
the hack of ignoring spinlocks whose names start with "*" in the livelock detector can be removed

File:
1 edited

Legend:

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

    r326bf65 r712c4ba  
    8080
    8181typedef struct {
    82         SPINLOCK_DECLARE(lock);
     82        mutex_t mtx;
    8383       
    8484        uint8_t *addr;
     
    365365{
    366366        fb_instance_t *instance = (fb_instance_t *) dev->data;
    367         spinlock_lock(&instance->lock);
     367        mutex_lock(&instance->mtx);
    368368       
    369369        switch (ch) {
     
    406406        cursor_put(instance, silent);
    407407       
    408         spinlock_unlock(&instance->lock);
     408        mutex_unlock(&instance->mtx);
    409409}
    410410
     
    473473        fb_instance_t *instance = (fb_instance_t *) dev->data;
    474474       
    475         spinlock_lock(&instance->lock);
     475        mutex_lock(&instance->mtx);
    476476        fb_redraw_internal(instance);
    477         spinlock_unlock(&instance->lock);
     477        mutex_unlock(&instance->mtx);
    478478}
    479479
     
    554554        fbdev->data = instance;
    555555       
    556         spinlock_initialize(&instance->lock, "*fb.instance.lock");
     556        mutex_initialize(&instance->mtx, MUTEX_PASSIVE);
    557557        instance->rgb_conv = rgb_conv;
    558558        instance->pixelbytes = pixelbytes;
Note: See TracChangeset for help on using the changeset viewer.