Home
last modified time | relevance | path

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

123456

/openbmc/linux/drivers/video/fbdev/core/
H A Dfbcmap.c92 int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags) in fb_alloc_cmap_gfp() argument
99 if (cmap->len != len) { in fb_alloc_cmap_gfp()
100 fb_dealloc_cmap(cmap); in fb_alloc_cmap_gfp()
104 cmap->red = kzalloc(size, flags); in fb_alloc_cmap_gfp()
105 if (!cmap->red) in fb_alloc_cmap_gfp()
107 cmap->green = kzalloc(size, flags); in fb_alloc_cmap_gfp()
108 if (!cmap->green) in fb_alloc_cmap_gfp()
110 cmap->blue = kzalloc(size, flags); in fb_alloc_cmap_gfp()
111 if (!cmap->blue) in fb_alloc_cmap_gfp()
114 cmap->transp = kzalloc(size, flags); in fb_alloc_cmap_gfp()
[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 …]
/openbmc/linux/drivers/video/fbdev/
H A Dsbuslib.c119 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 > cmap->len || count > cmap->len - index) in sbusfb_ioctl_helper()
[all …]
H A Dcg3.c90 struct bt_regs cmap; member
144 struct bt_regs __iomem *bt = &par->regs->cmap; in cg3_setcolreg()
343 regp = (u8 __iomem *)&par->regs->cmap.addr; in cg3_do_default_mode()
345 regp = (u8 __iomem *)&par->regs->cmap.control; in cg3_do_default_mode()
402 err = fb_alloc_cmap(&info->cmap, 256, 0); in cg3_probe()
406 fb_set_cmap(&info->cmap, info); in cg3_probe()
422 fb_dealloc_cmap(&info->cmap); in cg3_probe()
443 fb_dealloc_cmap(&info->cmap); in cg3_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 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 Duvesafb.c997 if (regno >= info->cmap.len) in uvesafb_setcolreg()
1040 static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info) in uvesafb_setcmap() argument
1047 if (cmap->start + cmap->len > info->cmap.start + in uvesafb_setcmap()
1048 info->cmap.len || cmap->start < info->cmap.start) in uvesafb_setcmap()
1051 entries = kmalloc_array(cmap->len, sizeof(*entries), 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()
1058 entries[i].green = cmap->green[i] >> shift; in uvesafb_setcmap()
1059 entries[i].blue = cmap->blue[i] >> shift; in uvesafb_setcmap()
1062 err = uvesafb_setpalette(entries, cmap->len, cmap->start, info); in uvesafb_setcmap()
[all …]
H A Dpm2fb.c771 info->cmap.len = 256; in pm2fb_set_par()
879 if (regno >= info->cmap.len) /* no. of hw registers */ in pm2fb_setcolreg()
1303 struct fb_cmap cmap = info->cmap; in pm2vfb_cursor() local
1308 cmap.red[bg_idx] >> 8 ); in pm2vfb_cursor()
1310 cmap.green[bg_idx] >> 8 ); in pm2vfb_cursor()
1312 cmap.blue[bg_idx] >> 8 ); in pm2vfb_cursor()
1315 cmap.red[fg_idx] >> 8 ); in pm2vfb_cursor()
1317 cmap.green[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()
[all …]
H A Dp9100.c295 if (fb_alloc_cmap(&info->cmap, 256, 0)) in p9100_probe()
304 fb_set_cmap(&info->cmap, info); in p9100_probe()
315 fb_dealloc_cmap(&info->cmap); in p9100_probe()
336 fb_dealloc_cmap(&info->cmap); in p9100_remove()
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 Dvt8500lcdfb.c237 fb_set_cmap(&info->cmap, info); in vt8500lcd_blank()
389 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in vt8500lcd_probe()
427 if (fbi->fb.cmap.len) in vt8500lcd_probe()
428 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_probe()
451 if (fbi->fb.cmap.len) in vt8500lcd_remove()
452 fb_dealloc_cmap(&fbi->fb.cmap); in vt8500lcd_remove()
H A Dwm8505fb.c349 if (fb_alloc_cmap(&fbi->fb.cmap, 256, 0) < 0) { in wm8505fb_probe()
362 if (fbi->fb.cmap.len) in wm8505fb_probe()
363 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_probe()
382 if (fbi->fb.cmap.len) in wm8505fb_remove()
383 fb_dealloc_cmap(&fbi->fb.cmap); in wm8505fb_remove()
/openbmc/linux/include/trace/events/
H A Dirq_matrix.h68 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 …]
/openbmc/linux/kernel/bpf/
H A Dcpumap.c86 struct bpf_cpu_map *cmap; in cpu_map_alloc() local
99 cmap = bpf_map_area_alloc(sizeof(*cmap), NUMA_NO_NODE); in cpu_map_alloc()
100 if (!cmap) in cpu_map_alloc()
103 bpf_map_init_from_attr(&cmap->map, attr); in cpu_map_alloc()
106 cmap->cpu_map = bpf_map_area_alloc(cmap->map.max_entries * in cpu_map_alloc()
108 cmap->map.numa_node); in cpu_map_alloc()
109 if (!cmap->cpu_map) { in cpu_map_alloc()
110 bpf_map_area_free(cmap); in cpu_map_alloc()
114 return &cmap->map; in cpu_map_alloc()
501 static void __cpu_map_entry_replace(struct bpf_cpu_map *cmap, in __cpu_map_entry_replace() argument
[all …]
/openbmc/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
/openbmc/linux/drivers/gpu/drm/
H A Ddrm_fb_helper.c530 ret = fb_alloc_cmap(&info->cmap, 256, 0); in drm_fb_helper_alloc_info()
562 if (info->cmap.len) in drm_fb_helper_release_info()
563 fb_dealloc_cmap(&info->cmap); in drm_fb_helper_release_info()
815 static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info) in setcmap_pseudo_palette() argument
820 if (cmap->start + cmap->len > 16) in setcmap_pseudo_palette()
823 for (i = 0; i < cmap->len; ++i) { in setcmap_pseudo_palette()
824 u16 red = cmap->red[i]; in setcmap_pseudo_palette()
825 u16 green = cmap->green[i]; in setcmap_pseudo_palette()
826 u16 blue = cmap->blue[i]; in setcmap_pseudo_palette()
841 palette[cmap->start + i] = value; in setcmap_pseudo_palette()
[all …]
/openbmc/linux/fs/xfs/
H A Dxfs_reflink.c312 struct xfs_bmbt_irec *cmap, in xfs_find_trim_cow_extent() argument
326 if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, cmap)) in xfs_find_trim_cow_extent()
327 cmap->br_startoff = offset_fsb + count_fsb; in xfs_find_trim_cow_extent()
328 if (cmap->br_startoff > offset_fsb) { in xfs_find_trim_cow_extent()
330 cmap->br_startoff - imap->br_startoff); in xfs_find_trim_cow_extent()
335 if (isnullstartblock(cmap->br_startblock)) { in xfs_find_trim_cow_extent()
336 xfs_trim_extent(imap, cmap->br_startoff, cmap->br_blockcount); in xfs_find_trim_cow_extent()
341 xfs_trim_extent(cmap, offset_fsb, count_fsb); in xfs_find_trim_cow_extent()
350 struct xfs_bmbt_irec *cmap, in xfs_reflink_convert_unwritten() argument
360 xfs_trim_extent(cmap, offset_fsb, count_fsb); in xfs_reflink_convert_unwritten()
[all …]
H A Dxfs_iomap.c776 struct xfs_bmbt_irec imap, cmap; in xfs_direct_write_iomap_begin() local
813 error = xfs_reflink_allocate_cow(ip, &imap, &cmap, &shared, in xfs_direct_write_iomap_begin()
890 length = XFS_FSB_TO_B(mp, cmap.br_startoff + cmap.br_blockcount); in xfs_direct_write_iomap_begin()
891 trace_xfs_iomap_found(ip, offset, length - offset, XFS_COW_FORK, &cmap); in xfs_direct_write_iomap_begin()
900 return xfs_bmbt_to_iomap(ip, iomap, &cmap, flags, IOMAP_F_SHARED, seq); in xfs_direct_write_iomap_begin()
950 struct xfs_bmbt_irec imap, cmap; in xfs_buffered_write_iomap_begin() local
1038 &ccur, &cmap); in xfs_buffered_write_iomap_begin()
1039 if (!cow_eof && cmap.br_startoff <= offset_fsb) { in xfs_buffered_write_iomap_begin()
1040 trace_xfs_reflink_cow_found(ip, &cmap); in xfs_buffered_write_iomap_begin()
1130 end_fsb - offset_fsb, prealloc_blocks, &cmap, in xfs_buffered_write_iomap_begin()
[all …]
/openbmc/u-boot/drivers/video/
H A Dvideo_bmp.c21 static void draw_unencoded_bitmap(ushort **fbp, uchar *bmap, ushort *cmap, in draw_unencoded_bitmap() argument
25 *(*fbp)++ = cmap[*bmap++]; in draw_unencoded_bitmap()
42 struct bmp_image *bmp, ushort *cmap, in video_display_rle8_bitmap() argument
96 bmap, cmap, cnt); in video_display_rle8_bitmap()
121 cmap[bmap[1]], cnt); in video_display_rle8_bitmap()
178 ushort *cmap = priv->cmap; in video_set_cmap() local
182 *cmap = ((cte->red << 8) & 0xf800) | in video_set_cmap()
185 cmap++; in video_set_cmap()
269 cmap_base = priv->cmap; in video_bmp_display()
/openbmc/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()
/openbmc/linux/drivers/staging/sm750fb/
H A Dsm750.c136 fg = ((info->cmap.red[fbcursor->image.fg_color] & 0xf800)) | in lynxfb_ops_cursor()
137 ((info->cmap.green[fbcursor->image.fg_color] & 0xfc00) >> 5) | 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()
141 ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) | in lynxfb_ops_cursor()
142 ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11); in lynxfb_ops_cursor()
847 info->cmap.start, info->cmap.len, in lynxfb_set_fbinfo()
848 info->cmap.red, info->cmap.green, info->cmap.blue, in lynxfb_set_fbinfo()
849 info->cmap.transp); in lynxfb_set_fbinfo()
851 ret = fb_alloc_cmap(&info->cmap, 256, 0); in lynxfb_set_fbinfo()
[all …]
/openbmc/u-boot/common/
H A Dlcd.c331 ushort *cmap = configuration_get_cmap(); in lcd_logo_set_cmap() local
334 *cmap++ = bmp_logo_palette[i]; in lcd_logo_set_cmap()
408 static void draw_unencoded_bitmap(ushort **fbp, uchar *bmap, ushort *cmap, in draw_unencoded_bitmap() argument
412 *(*fbp)++ = cmap[*bmap++]; in draw_unencoded_bitmap()
444 static void lcd_display_rle8_bitmap(struct bmp_image *bmp, ushort *cmap, in lcd_display_rle8_bitmap() argument
496 bmap, cmap, cnt); in lcd_display_rle8_bitmap()
521 cmap[bmap[1]], cnt); in lcd_display_rle8_bitmap()
548 ushort *cmap = configuration_get_cmap(); in lcd_set_cmap() local
552 *cmap = (((cte.red) << 8) & 0xf800) | in lcd_set_cmap()
555 cmap++; in lcd_set_cmap()
/openbmc/u-boot/include/linux/
H A Dfb.h230 struct fb_cmap cmap; /* color map info */ member
355 struct fb_cmap_user cmap; /* color map info */ member
502 struct fb_cmap cmap; /* Current cmap */ member
589 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
590 extern void fb_dealloc_cmap(struct fb_cmap *cmap);
593 extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
594 extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
/openbmc/linux/include/linux/
H A Dfb.h113 struct fb_cmap_user cmap; /* color map info */ member
264 int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
460 struct fb_cmap cmap; /* Current cmap */ member
802 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
803 extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
804 extern void fb_dealloc_cmap(struct fb_cmap *cmap);
807 extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
808 extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
/openbmc/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()

123456