version 1.7, 2021/08/07 16:18:58 |
version 1.8, 2022/02/16 23:49:26 |
Line 161 static inline void |
|
Line 161 static inline void |
|
valkyriefb_write_reg(struct valkyriefb_softc *sc, int reg, uint8_t val) |
valkyriefb_write_reg(struct valkyriefb_softc *sc, int reg, uint8_t val) |
{ |
{ |
*(sc->sc_base + VAL_REGS_OFFSET + reg) = val; |
*(sc->sc_base + VAL_REGS_OFFSET + reg) = val; |
__asm("eieio; sync;"); |
__asm volatile("eieio; sync;" ::: "memory"); |
} |
} |
|
|
#ifdef VALKYRIEFB_DEBUG |
#ifdef VALKYRIEFB_DEBUG |
Line 177 valkyriefb_write_cmap(struct valkyriefb_ |
|
Line 177 valkyriefb_write_cmap(struct valkyriefb_ |
|
int reg, uint8_t r, uint8_t g, uint8_t b) |
int reg, uint8_t r, uint8_t g, uint8_t b) |
{ |
{ |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_ADDR) = reg; |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_ADDR) = reg; |
__asm("eieio; sync;"); |
__asm volatile("eieio; sync;" ::: "memory"); |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = r; |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = r; |
__asm("eieio; sync;"); |
__asm volatile("eieio; sync;" ::: "memory"); |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = g; |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = g; |
__asm("eieio; sync;"); |
__asm volatile("eieio; sync;" ::: "memory"); |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = b; |
*(sc->sc_base + VAL_CMAP_OFFSET + VAL_CMAP_LUT) = b; |
__asm("eieio; sync;"); |
__asm volatile("eieio; sync;" ::: "memory"); |
} |
} |
|
|
static int |
static int |