/Linux-v4.19/drivers/video/fbdev/core/ |
D | fbcmap.c | 92 int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags) in fb_alloc_cmap_gfp() argument 97 if (cmap->len != len) { in fb_alloc_cmap_gfp() 98 fb_dealloc_cmap(cmap); in fb_alloc_cmap_gfp() 102 cmap->red = kmalloc(size, flags); in fb_alloc_cmap_gfp() 103 if (!cmap->red) in fb_alloc_cmap_gfp() 105 cmap->green = kmalloc(size, flags); in fb_alloc_cmap_gfp() 106 if (!cmap->green) in fb_alloc_cmap_gfp() 108 cmap->blue = kmalloc(size, flags); in fb_alloc_cmap_gfp() 109 if (!cmap->blue) in fb_alloc_cmap_gfp() 112 cmap->transp = kmalloc(size, flags); in fb_alloc_cmap_gfp() [all …]
|
D | fbmem.c | 1019 fb_set_cmap(&info->cmap, info); in fb_set_var() 1085 struct fb_cmap_user cmap; in do_fb_ioctl() local 1124 if (copy_from_user(&cmap, argp, sizeof(cmap))) in do_fb_ioctl() 1126 ret = fb_set_user_cmap(&cmap, info); in do_fb_ioctl() 1129 if (copy_from_user(&cmap, argp, sizeof(cmap))) in do_fb_ioctl() 1133 cmap_from = info->cmap; in do_fb_ioctl() 1135 ret = fb_cmap_to_user(&cmap_from, &cmap); in do_fb_ioctl() 1256 struct fb_cmap_user __user *cmap; in fb_getput_cmap() local 1261 cmap = compat_alloc_user_space(sizeof(*cmap)); in fb_getput_cmap() 1264 if (copy_in_user(&cmap->start, &cmap32->start, 2 * sizeof(__u32))) in fb_getput_cmap() [all …]
|
/Linux-v4.19/kernel/bpf/ |
D | cpumap.c | 81 struct bpf_cpu_map *cmap; in cpu_map_alloc() local 94 cmap = kzalloc(sizeof(*cmap), GFP_USER); in cpu_map_alloc() 95 if (!cmap) in cpu_map_alloc() 98 bpf_map_init_from_attr(&cmap->map, attr); in cpu_map_alloc() 101 if (cmap->map.max_entries > NR_CPUS) { in cpu_map_alloc() 107 cost = (u64) cmap->map.max_entries * sizeof(struct bpf_cpu_map_entry *); in cpu_map_alloc() 111 cmap->map.pages = round_up(cost, PAGE_SIZE) >> PAGE_SHIFT; in cpu_map_alloc() 114 ret = bpf_map_precharge_memlock(cmap->map.pages); in cpu_map_alloc() 121 cmap->flush_needed = __alloc_percpu(cpu_map_bitmap_size(attr), in cpu_map_alloc() 123 if (!cmap->flush_needed) in cpu_map_alloc() [all …]
|
/Linux-v4.19/include/trace/events/ |
D | irq_matrix.h | 68 struct cpumap *cmap), 70 TP_ARGS(bit, cpu, matrix, cmap), 88 __entry->online = cmap->online; 89 __entry->available = cmap->available; 90 __entry->allocated = cmap->allocated; 91 __entry->managed = cmap->managed; 144 struct irq_matrix *matrix, struct cpumap *cmap), 146 TP_ARGS(bit, cpu, matrix, cmap) 152 struct irq_matrix *matrix, struct cpumap *cmap), 154 TP_ARGS(bit, cpu, matrix, cmap) [all …]
|
/Linux-v4.19/drivers/video/fbdev/ |
D | sbuslib.c | 119 struct fb_cmap cmap; in sbusfb_ioctl_helper() local 134 cmap.len = 1; in sbusfb_ioctl_helper() 135 cmap.red = &red; in sbusfb_ioctl_helper() 136 cmap.green = &green; in sbusfb_ioctl_helper() 137 cmap.blue = &blue; in sbusfb_ioctl_helper() 138 cmap.transp = NULL; in sbusfb_ioctl_helper() 151 cmap.start = index + i; in sbusfb_ioctl_helper() 152 err = fb_set_cmap(&cmap, info); in sbusfb_ioctl_helper() 163 struct fb_cmap *cmap = &info->cmap; in sbusfb_ioctl_helper() local 174 if (index + count > cmap->len) in sbusfb_ioctl_helper() [all …]
|
D | cg3.c | 88 struct bt_regs cmap; member 142 struct bt_regs __iomem *bt = &par->regs->cmap; in cg3_setcolreg() 341 regp = (u8 __iomem *)&par->regs->cmap.addr; in cg3_do_default_mode() 343 regp = (u8 __iomem *)&par->regs->cmap.control; in cg3_do_default_mode() 401 err = fb_alloc_cmap(&info->cmap, 256, 0); in cg3_probe() 405 fb_set_cmap(&info->cmap, info); in cg3_probe() 421 fb_dealloc_cmap(&info->cmap); in cg3_probe() 442 fb_dealloc_cmap(&info->cmap); in cg3_remove()
|
D | pmag-ba-fb.c | 100 if (regno >= info->cmap.len) in pmagbafb_setcolreg() 161 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in pmagbafb_probe() 231 fb_dealloc_cmap(&info->cmap); in pmagbafb_probe() 252 fb_dealloc_cmap(&info->cmap); in pmagbafb_remove()
|
D | uvesafb.c | 994 if (regno >= info->cmap.len) in uvesafb_setcolreg() 1037 static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info) in uvesafb_setcmap() argument 1044 if (cmap->start + cmap->len > info->cmap.start + in uvesafb_setcmap() 1045 info->cmap.len || cmap->start < info->cmap.start) in uvesafb_setcmap() 1048 entries = kmalloc_array(cmap->len, sizeof(*entries), in uvesafb_setcmap() 1053 for (i = 0; i < cmap->len; i++) { in uvesafb_setcmap() 1054 entries[i].red = cmap->red[i] >> shift; in uvesafb_setcmap() 1055 entries[i].green = cmap->green[i] >> shift; in uvesafb_setcmap() 1056 entries[i].blue = cmap->blue[i] >> shift; in uvesafb_setcmap() 1059 err = uvesafb_setpalette(entries, cmap->len, cmap->start, info); in uvesafb_setcmap() [all …]
|
D | metronomefb.c | 708 retval = fb_alloc_cmap(&info->cmap, 8, 0); in metronomefb_probe() 716 info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16; in metronomefb_probe() 717 memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8); in metronomefb_probe() 718 memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8); in metronomefb_probe() 733 fb_dealloc_cmap(&info->cmap); in metronomefb_probe() 756 fb_dealloc_cmap(&info->cmap); in metronomefb_remove()
|
D | pm2fb.c | 764 info->cmap.len = 256; in pm2fb_set_par() 872 if (regno >= info->cmap.len) /* no. of hw registers */ in pm2fb_setcolreg() 1296 struct fb_cmap cmap = info->cmap; in pm2vfb_cursor() local 1301 cmap.red[bg_idx] >> 8 ); in pm2vfb_cursor() 1303 cmap.green[bg_idx] >> 8 ); in pm2vfb_cursor() 1305 cmap.blue[bg_idx] >> 8 ); in pm2vfb_cursor() 1308 cmap.red[fg_idx] >> 8 ); in pm2vfb_cursor() 1310 cmap.green[fg_idx] >> 8 ); in pm2vfb_cursor() 1312 cmap.blue[fg_idx] >> 8 ); in pm2vfb_cursor() 1409 info->cmap.red[bg_idx] >> 8); in pm2fb_cursor() [all …]
|
D | q40fb.c | 108 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in q40fb_probe() 117 fb_dealloc_cmap(&info->cmap); in q40fb_probe()
|
D | p9100.c | 294 if (fb_alloc_cmap(&info->cmap, 256, 0)) in p9100_probe() 303 fb_set_cmap(&info->cmap, info); in p9100_probe() 314 fb_dealloc_cmap(&info->cmap); in p9100_probe() 335 fb_dealloc_cmap(&info->cmap); in p9100_remove()
|
D | wm8505fb.c | 354 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in wm8505fb_probe() 367 if (fbi->fb.cmap.len) in wm8505fb_probe() 368 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_probe() 393 if (fbi->fb.cmap.len) in wm8505fb_remove() 394 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_remove()
|
D | vt8500lcdfb.c | 244 fb_set_cmap(&info->cmap, info); in vt8500lcd_blank() 397 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in vt8500lcd_probe() 435 if (fbi->fb.cmap.len) in vt8500lcd_probe() 436 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_probe() 459 if (fbi->fb.cmap.len) in vt8500lcd_remove() 460 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_remove()
|
D | hpfb.c | 92 if (regno >= info->cmap.len) in hpfb_setcolreg() 293 ret = fb_alloc_cmap(&fb_info.cmap, 1 << hpfb_defined.bits_per_pixel, 0); in hpfb_init_one() 306 fb_dealloc_cmap(&fb_info.cmap); in hpfb_init_one() 357 fb_dealloc_cmap(&fb_info.cmap); in hpfb_remove_one()
|
D | macfb.c | 173 nubus_writeb(info->cmap.red[i] >> 8, in dafb_setpalette() 176 nubus_writeb(info->cmap.green[i] >> 8, in dafb_setpalette() 179 nubus_writeb(info->cmap.blue[i] >> 8, in dafb_setpalette() 459 if (regno >= fb_info->cmap.len) in macfb_setcolreg() 909 err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); in macfb_init() 922 fb_dealloc_cmap(&fb_info.cmap); in macfb_init()
|
D | ocfb.c | 181 if (regno >= info->cmap.len) { in ocfb_setcolreg() 355 ret = fb_alloc_cmap(&fbdev->info.cmap, PALETTE_SIZE, 0); in ocfb_probe() 371 fb_dealloc_cmap(&fbdev->info.cmap); in ocfb_probe() 385 fb_dealloc_cmap(&fbdev->info.cmap); in ocfb_remove()
|
D | pmagb-b-fb.c | 104 if (regno >= info->cmap.len) in pmagbbfb_setcolreg() 268 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in pmagbbfb_probe() 349 fb_dealloc_cmap(&info->cmap); in pmagbbfb_probe() 370 fb_dealloc_cmap(&info->cmap); in pmagbbfb_remove()
|
/Linux-v4.19/Documentation/fb/ |
D | cmap_xfbdev.txt | 1 Understanding fbdev's cmap 4 These notes explain how X's dix layer uses fbdev's cmap structures. 6 *. example of relevant structures in fbdev as used for a 3-bit grayscale cmap 18 info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16; 19 memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8); 20 memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8); 49 directly from the info->cmap.red that was listed above. The prgb is the rgb 51 squares matching function. That's why the cmap entries can't be set to the left
|
/Linux-v4.19/drivers/video/fbdev/aty/ |
D | mach64_cursor.c | 131 fg = ((info->cmap.red[fg_idx] & 0xff) << 24) | in atyfb_cursor() 132 ((info->cmap.green[fg_idx] & 0xff) << 16) | in atyfb_cursor() 133 ((info->cmap.blue[fg_idx] & 0xff) << 8) | 0xff; in atyfb_cursor() 135 bg = ((info->cmap.red[bg_idx] & 0xff) << 24) | in atyfb_cursor() 136 ((info->cmap.green[bg_idx] & 0xff) << 16) | in atyfb_cursor() 137 ((info->cmap.blue[bg_idx] & 0xff) << 8); in atyfb_cursor()
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_fb_helper.c | 904 ret = fb_alloc_cmap(&info->cmap, 256, 0); in drm_fb_helper_alloc_fbi() 919 fb_dealloc_cmap(&info->cmap); in drm_fb_helper_alloc_fbi() 965 if (info->cmap.len) in drm_fb_helper_fini() 966 fb_dealloc_cmap(&info->cmap); in drm_fb_helper_fini() 1291 static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info) in setcmap_pseudo_palette() argument 1296 if (cmap->start + cmap->len > 16) in setcmap_pseudo_palette() 1299 for (i = 0; i < cmap->len; ++i) { in setcmap_pseudo_palette() 1300 u16 red = cmap->red[i]; in setcmap_pseudo_palette() 1301 u16 green = cmap->green[i]; in setcmap_pseudo_palette() 1302 u16 blue = cmap->blue[i]; in setcmap_pseudo_palette() [all …]
|
/Linux-v4.19/drivers/staging/sm750fb/ |
D | sm750.c | 135 fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) | in lynxfb_ops_cursor() 136 ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) | in lynxfb_ops_cursor() 137 ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11); in lynxfb_ops_cursor() 139 bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) | in lynxfb_ops_cursor() 140 ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) | in lynxfb_ops_cursor() 141 ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11); in lynxfb_ops_cursor() 911 info->cmap.start, info->cmap.len, in lynxfb_set_fbinfo() 912 info->cmap.red, info->cmap.green, info->cmap.blue, in lynxfb_set_fbinfo() 913 info->cmap.transp); in lynxfb_set_fbinfo() 915 ret = fb_alloc_cmap(&info->cmap, 256, 0); in lynxfb_set_fbinfo() [all …]
|
/Linux-v4.19/drivers/gpu/drm/qxl/ |
D | qxl_fb.c | 196 image->cmap.start = 0; in qxlfb_framebuffer_dirty() 197 image->cmap.len = 0; in qxlfb_framebuffer_dirty() 198 image->cmap.red = NULL; in qxlfb_framebuffer_dirty() 199 image->cmap.green = NULL; in qxlfb_framebuffer_dirty() 200 image->cmap.blue = NULL; in qxlfb_framebuffer_dirty() 201 image->cmap.transp = NULL; in qxlfb_framebuffer_dirty()
|
/Linux-v4.19/include/linux/ |
D | fb.h | 111 struct fb_cmap_user cmap; /* color map info */ member 282 int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info); 481 struct fb_cmap cmap; /* Current cmap */ member 778 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); 779 extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags); 780 extern void fb_dealloc_cmap(struct fb_cmap *cmap); 783 extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); 784 extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
|
/Linux-v4.19/drivers/media/platform/vivid/ |
D | vivid-osd.c | 200 if (regno >= info->cmap.len) in vivid_fb_setcolreg() 328 if (fb_alloc_cmap(&dev->fb_info.cmap, 256, 1)) { in vivid_fb_init_vidmode() 346 if (dev->fb_info.cmap.len) in vivid_fb_release_buffers() 347 fb_dealloc_cmap(&dev->fb_info.cmap); in vivid_fb_release_buffers()
|