Home
last modified time | relevance | path

Searched refs:cmap (Results 1 – 25 of 131) sorted by relevance

123456

/linux/drivers/video/fbdev/core/
H A Dfbcmap.c105 if (!cmap->red) in fb_alloc_cmap_gfp()
108 if (!cmap->green) in fb_alloc_cmap_gfp()
111 if (!cmap->blue) in fb_alloc_cmap_gfp()
121 cmap->start = 0; in fb_alloc_cmap_gfp()
122 cmap->len = len; in fb_alloc_cmap_gfp()
149 kfree(cmap->red); in fb_dealloc_cmap()
154 cmap->red = cmap->green = cmap->blue = cmap->transp = NULL; in fb_dealloc_cmap()
155 cmap->len = 0; in fb_dealloc_cmap()
237 red = cmap->red; in fb_set_cmap()
262 fb_copy_cmap(cmap, &info->cmap); in fb_set_cmap()
[all …]
H A Dfb_chrdev.c69 struct fb_cmap_user cmap; in do_fb_ioctl() local
108 if (copy_from_user(&cmap, argp, sizeof(cmap))) in do_fb_ioctl()
110 ret = fb_set_user_cmap(&cmap, info); in do_fb_ioctl()
113 if (copy_from_user(&cmap, argp, sizeof(cmap))) in do_fb_ioctl()
116 cmap_from = info->cmap; in do_fb_ioctl()
118 ret = fb_cmap_to_user(&cmap_from, &cmap); in do_fb_ioctl()
204 struct fb_cmap_user cmap; in fb_getput_cmap() local
209 cmap = (struct fb_cmap_user) { in fb_getput_cmap()
219 return fb_set_user_cmap(&cmap, info); in fb_getput_cmap()
222 cmap_from = info->cmap; in fb_getput_cmap()
[all …]
/linux/drivers/video/fbdev/
H A Dsbuslib.c135 cmap.len = 1; in sbusfb_ioctl_helper()
136 cmap.red = &red; in sbusfb_ioctl_helper()
138 cmap.blue = &blue; in sbusfb_ioctl_helper()
139 cmap.transp = NULL; in sbusfb_ioctl_helper()
164 struct fb_cmap *cmap = &info->cmap; in sbusfb_ioctl_helper() local
175 if (index > cmap->len || count > cmap->len - index) in sbusfb_ioctl_helper()
228 cmap.len = 1; in sbusfb_compat_ioctl()
229 cmap.red = &red; in sbusfb_compat_ioctl()
231 cmap.blue = &blue; in sbusfb_compat_ioctl()
257 struct fb_cmap *cmap = &info->cmap; in sbusfb_compat_ioctl() local
[all …]
H A Dcg3.c83 struct bt_regs cmap; member
137 struct bt_regs __iomem *bt = &par->regs->cmap; in cg3_setcolreg()
336 regp = (u8 __iomem *)&par->regs->cmap.addr; in cg3_do_default_mode()
338 regp = (u8 __iomem *)&par->regs->cmap.control; in cg3_do_default_mode()
395 err = fb_alloc_cmap(&info->cmap, 256, 0); in cg3_probe()
399 fb_set_cmap(&info->cmap, info); in cg3_probe()
415 fb_dealloc_cmap(&info->cmap); in cg3_probe()
436 fb_dealloc_cmap(&info->cmap); in cg3_remove()
H A Dpmag-ba-fb.c100 if (regno >= info->cmap.len) in pmagbafb_setcolreg()
157 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in pmagbafb_probe()
226 fb_dealloc_cmap(&info->cmap); in pmagbafb_probe()
247 fb_dealloc_cmap(&info->cmap); in pmagbafb_remove()
H A Dmetronomefb.c650 retval = fb_alloc_cmap(&info->cmap, 8, 0); in metronomefb_probe()
658 info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16; in metronomefb_probe()
659 memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8); in metronomefb_probe()
660 memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8); in metronomefb_probe()
675 fb_dealloc_cmap(&info->cmap); in metronomefb_probe()
698 fb_dealloc_cmap(&info->cmap); in metronomefb_remove()
H A Duvesafb.c997 if (regno >= info->cmap.len) in uvesafb_setcolreg()
1047 if (cmap->start + cmap->len > info->cmap.start + in uvesafb_setcmap()
1048 info->cmap.len || cmap->start < info->cmap.start) in uvesafb_setcmap()
1056 for (i = 0; i < cmap->len; i++) { in uvesafb_setcmap()
1057 entries[i].red = cmap->red[i] >> shift; in uvesafb_setcmap()
1062 err = uvesafb_setpalette(entries, cmap->len, cmap->start, info); in uvesafb_setcmap()
1070 for (i = 0; i < cmap->len; i++) { in uvesafb_setcmap()
1071 err |= uvesafb_setcolreg(cmap->start + i, cmap->red[i], in uvesafb_setcmap()
1072 cmap->green[i], cmap->blue[i], in uvesafb_setcmap()
1766 fb_dealloc_cmap(&info->cmap); in uvesafb_probe()
[all …]
H A Dpm2fb.c771 info->cmap.len = 256; in pm2fb_set_par()
1303 struct fb_cmap cmap = info->cmap; in pm2vfb_cursor() local
1308 cmap.red[bg_idx] >> 8 ); in pm2vfb_cursor()
1312 cmap.blue[bg_idx] >> 8 ); in pm2vfb_cursor()
1315 cmap.red[fg_idx] >> 8 ); in pm2vfb_cursor()
1319 cmap.blue[fg_idx] >> 8 ); in pm2vfb_cursor()
1416 info->cmap.red[bg_idx] >> 8); in pm2fb_cursor()
1420 info->cmap.blue[bg_idx] >> 8); in pm2fb_cursor()
1423 info->cmap.red[fg_idx] >> 8); in pm2fb_cursor()
1710 fb_dealloc_cmap(&info->cmap); in pm2fb_probe()
[all …]
H A Dq40fb.c104 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in q40fb_probe()
113 fb_dealloc_cmap(&info->cmap); in q40fb_probe()
H A Dp9100.c287 if (fb_alloc_cmap(&info->cmap, 256, 0)) in p9100_probe()
296 fb_set_cmap(&info->cmap, info); in p9100_probe()
307 fb_dealloc_cmap(&info->cmap); in p9100_probe()
328 fb_dealloc_cmap(&info->cmap); in p9100_remove()
H A Dwm8505fb.c351 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in wm8505fb_probe()
364 if (fbi->fb.cmap.len) in wm8505fb_probe()
365 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_probe()
384 if (fbi->fb.cmap.len) in wm8505fb_remove()
385 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_remove()
H A Dvt8500lcdfb.c237 fb_set_cmap(&info->cmap, info); in vt8500lcd_blank()
390 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in vt8500lcd_probe()
428 if (fbi->fb.cmap.len) in vt8500lcd_probe()
429 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_probe()
452 if (fbi->fb.cmap.len) in vt8500lcd_remove()
453 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_remove()
H A Dmacfb.c166 nubus_writeb(info->cmap.red[i] >> 8, in dafb_setpalette()
169 nubus_writeb(info->cmap.green[i] >> 8, in dafb_setpalette()
172 nubus_writeb(info->cmap.blue[i] >> 8, in dafb_setpalette()
443 if (regno >= fb_info->cmap.len) in macfb_setcolreg()
878 err = fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); in macfb_init()
891 fb_dealloc_cmap(&fb_info.cmap); in macfb_init()
H A Dhpfb.c93 if (regno >= info->cmap.len) in hpfb_setcolreg()
295 ret = fb_alloc_cmap(&fb_info.cmap, 1 << hpfb_defined.bits_per_pixel, 0); in hpfb_init_one()
308 fb_dealloc_cmap(&fb_info.cmap); in hpfb_init_one()
359 fb_dealloc_cmap(&fb_info.cmap); in hpfb_remove_one()
H A Dpmagb-b-fb.c104 if (regno >= info->cmap.len) in pmagbbfb_setcolreg()
264 if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { in pmagbbfb_probe()
344 fb_dealloc_cmap(&info->cmap); in pmagbbfb_probe()
365 fb_dealloc_cmap(&info->cmap); in pmagbbfb_remove()
/linux/include/trace/events/
H A Dirq_matrix.h68 struct cpumap *cmap),
70 TP_ARGS(bit, cpu, matrix, cmap),
88 __entry->online = cmap->online;
91 __entry->managed = cmap->managed;
146 TP_ARGS(bit, cpu, matrix, cmap)
154 TP_ARGS(bit, cpu, matrix, cmap)
162 TP_ARGS(bit, cpu, matrix, cmap)
170 TP_ARGS(bit, cpu, matrix, cmap)
178 TP_ARGS(bit, cpu, matrix, cmap)
186 TP_ARGS(bit, cpu, matrix, cmap)
[all …]
/linux/kernel/bpf/
H A Dcpumap.c87 struct bpf_cpu_map *cmap; in cpu_map_alloc() local
100 cmap = bpf_map_area_alloc(sizeof(*cmap), NUMA_NO_NODE); in cpu_map_alloc()
101 if (!cmap) in cpu_map_alloc()
107 cmap->cpu_map = bpf_map_area_alloc(cmap->map.max_entries * in cpu_map_alloc()
109 cmap->map.numa_node); in cpu_map_alloc()
110 if (!cmap->cpu_map) { in cpu_map_alloc()
111 bpf_map_area_free(cmap); in cpu_map_alloc()
115 return &cmap->map; in cpu_map_alloc()
594 bpf_map_area_free(cmap->cpu_map); in cpu_map_free()
595 bpf_map_area_free(cmap); in cpu_map_free()
[all …]
/linux/Documentation/fb/
H A Dcmap_xfbdev.rst2 Understanding fbdev's cmap
5 These notes explain how X's dix layer uses fbdev's cmap structures.
7 - example of relevant structures in fbdev as used for a 3-bit grayscale cmap::
20 info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/16;
21 memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*8);
22 memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*8);
53 directly from the info->cmap.red that was listed above. The prgb is the rgb
55 squares matching function. That's why the cmap entries can't be set to the left
/linux/drivers/gpu/drm/
H A Ddrm_fb_helper.c806 if (cmap->start + cmap->len > 16) in setcmap_pseudo_palette()
858 memcpy(r + cmap->start, cmap->red, cmap->len * sizeof(*r)); in setcmap_legacy()
859 memcpy(g + cmap->start, cmap->green, cmap->len * sizeof(*g)); in setcmap_legacy()
860 memcpy(b + cmap->start, cmap->blue, cmap->len * sizeof(*b)); in setcmap_legacy()
882 if (!size || cmap->start + cmap->len > size) in setcmap_new_gamma_lut()
890 if (cmap->start || cmap->len != size) { in setcmap_new_gamma_lut()
908 lut[cmap->start + i].red = cmap->red[i]; in setcmap_new_gamma_lut()
910 lut[cmap->start + i].blue = cmap->blue[i]; in setcmap_new_gamma_lut()
981 memcpy(r + cmap->start, cmap->red, cmap->len * sizeof(*r)); in setcmap_atomic()
982 memcpy(g + cmap->start, cmap->green, cmap->len * sizeof(*g)); in setcmap_atomic()
[all …]
/linux/fs/xfs/
H A Dxfs_reflink.c313 struct xfs_bmbt_irec *cmap, in xfs_find_trim_cow_extent() argument
329 if (cmap->br_startoff > offset_fsb) { in xfs_find_trim_cow_extent()
337 xfs_trim_extent(imap, cmap->br_startoff, cmap->br_blockcount); in xfs_find_trim_cow_extent()
351 struct xfs_bmbt_irec *cmap, in xfs_reflink_convert_unwritten() argument
375 cmap->br_state = XFS_EXT_NORM; in xfs_reflink_convert_unwritten()
384 struct xfs_bmbt_irec *cmap, in xfs_reflink_fill_cow_hole() argument
445 struct xfs_bmbt_irec *cmap, in xfs_reflink_fill_delalloc() argument
485 cmap->br_blockcount, in xfs_reflink_fill_delalloc()
487 cmap, &nimaps); in xfs_reflink_fill_delalloc()
495 } while (cmap->br_startoff + cmap->br_blockcount <= imap->br_startoff); in xfs_reflink_fill_delalloc()
[all …]
H A Dxfs_iomap.c798 struct xfs_bmbt_irec imap, cmap; in xfs_direct_write_iomap_begin() local
912 length = XFS_FSB_TO_B(mp, cmap.br_startoff + cmap.br_blockcount); in xfs_direct_write_iomap_begin()
974 struct xfs_bmbt_irec imap, cmap; in xfs_buffered_write_iomap_begin() local
1061 &ccur, &cmap); in xfs_buffered_write_iomap_begin()
1062 if (!cow_eof && cmap.br_startoff <= offset_fsb) { in xfs_buffered_write_iomap_begin()
1063 trace_xfs_reflink_cow_found(ip, &cmap); in xfs_buffered_write_iomap_begin()
1154 allocfork == XFS_DATA_FORK ? &imap : &cmap, in xfs_buffered_write_iomap_begin()
1211 return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, in xfs_buffered_write_iomap_begin()
1331 struct xfs_bmbt_irec imap, cmap; in xfs_seek_iomap_begin() local
1364 cow_fsb = cmap.br_startoff; in xfs_seek_iomap_begin()
[all …]
/linux/drivers/video/fbdev/aty/
H A Dmach64_cursor.c131 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/drivers/staging/sm750fb/
H A Dsm750.c136 fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) | in lynxfb_ops_cursor()
138 ((info->cmap.blue[fbcursor->image.fg_color] & 0xf800) >> 11); in lynxfb_ops_cursor()
140 bg = ((info->cmap.red[fbcursor->image.bg_color] & 0xf800)) | in lynxfb_ops_cursor()
142 ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11); in lynxfb_ops_cursor()
886 info->cmap.start, info->cmap.len, in lynxfb_set_fbinfo()
887 info->cmap.red, info->cmap.green, info->cmap.blue, in lynxfb_set_fbinfo()
888 info->cmap.transp); in lynxfb_set_fbinfo()
890 ret = fb_alloc_cmap(&info->cmap, 256, 0); in lynxfb_set_fbinfo()
897 info->cmap.start, info->cmap.len, in lynxfb_set_fbinfo()
898 info->cmap.red, info->cmap.green, info->cmap.blue, in lynxfb_set_fbinfo()
[all …]
/linux/drivers/media/test-drivers/vivid/
H A Dvivid-osd.c200 if (regno >= info->cmap.len) in vivid_fb_setcolreg()
324 if (fb_alloc_cmap(&dev->fb_info.cmap, 256, 1)) { in vivid_fb_init_vidmode()
342 if (dev->fb_info.cmap.len) in vivid_fb_release_buffers()
343 fb_dealloc_cmap(&dev->fb_info.cmap); in vivid_fb_release_buffers()
/linux/include/linux/
H A Dfb.h115 struct fb_cmap_user cmap; /* color map info */ member
272 int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
468 struct fb_cmap cmap; /* Current cmap */ member
815 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
816 extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
817 extern void fb_dealloc_cmap(struct fb_cmap *cmap);
820 extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
821 extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);

123456