cmap
int i, error, ns, cmap = 0;
for (cmap = 0; cmap < isp->isp_nchan; cmap++) {
struct isp_fc *fc = ISP_FC_PC(isp, cmap);
im.chan = cmap;
while (--cmap >= 0) {
struct isp_fc *fc = ISP_FC_PC(isp, cmap);
if (info->cmap.len)
fb_dealloc_cmap(&info->cmap);
static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info)
if (cmap->start + cmap->len > 16)
for (i = 0; i < cmap->len; ++i) {
u16 red = cmap->red[i];
u16 green = cmap->green[i];
u16 blue = cmap->blue[i];
palette[cmap->start + i] = value;
static int setcmap_legacy(struct fb_cmap *cmap, struct fb_info *info)
if (cmap->start + cmap->len > crtc->gamma_size)
memcpy(r + cmap->start, cmap->red, cmap->len * sizeof(*r));
memcpy(g + cmap->start, cmap->green, cmap->len * sizeof(*g));
memcpy(b + cmap->start, cmap->blue, cmap->len * sizeof(*b));
struct fb_cmap *cmap)
if (!size || cmap->start + cmap->len > size)
if (cmap->start || cmap->len != size) {
for (i = 0; i < cmap->start; i++) {
for (i = cmap->start + cmap->len; i < size; i++) {
for (i = 0; i < cmap->len; i++) {
lut[cmap->start + i].red = cmap->red[i];
lut[cmap->start + i].green = cmap->green[i];
lut[cmap->start + i].blue = cmap->blue[i];
static int setcmap_atomic(struct fb_cmap *cmap, struct fb_info *info)
gamma_lut = setcmap_new_gamma_lut(crtc, cmap);
memcpy(r + cmap->start, cmap->red, cmap->len * sizeof(*r));
memcpy(g + cmap->start, cmap->green, cmap->len * sizeof(*g));
memcpy(b + cmap->start, cmap->blue, cmap->len * sizeof(*b));
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
ret = setcmap_pseudo_palette(cmap, info);
ret = setcmap_atomic(cmap, info);
ret = setcmap_legacy(cmap, info);
ret = fb_alloc_cmap(&info->cmap, 256, 0);
fb_dealloc_cmap(&info->cmap);
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
static inline int drm_fb_helper_setcmap(struct fb_cmap *cmap,
int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
struct fbcmap cmap; /* cursor color map */
cmap_lookup_hard(struct cmap *cm, wint_t ch)
cmap_cache(struct cmap *cm)
cmap_default(struct cmap *cm, wint_t def)
struct cmap *
struct cmap *cm;
cmap_add(struct cmap *cm, wint_t from, wint_t to)
struct cmap * cmap_alloc(void);
bool cmap_add(struct cmap *, wint_t, wint_t);
wint_t cmap_lookup_hard(struct cmap *, wint_t);
void cmap_cache(struct cmap *);
wint_t cmap_default(struct cmap *, wint_t);
cmap_lookup(struct cmap *cm, wint_t from)
cmap_min(struct cmap *cm)
cmap_max(struct cmap *cm)
struct cmap *map;
static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
(*tt.tt_putc)(cmap[wwsmap[i][j]]);