• Home
  • Raw
  • Download

Lines Matching refs:image

55     struct vic_image *image;  in vic_image_new()  local
61 image = calloc(1, sizeof(*image)); in vic_image_new()
62 if (!image) in vic_image_new()
66 image->align = 256; in vic_image_new()
68 image->align = 256; /* XXX */ in vic_image_new()
70 image->width = width; in vic_image_new()
71 image->stride = ALIGN(width, image->align); in vic_image_new()
72 image->pitch = image->stride * info->cpp; in vic_image_new()
73 image->height = height; in vic_image_new()
74 image->format = format; in vic_image_new()
75 image->kind = kind; in vic_image_new()
77 image->size = image->pitch * image->height; in vic_image_new()
80 image->width, image->height, image->align, image->stride, in vic_image_new()
81 image->pitch, image->size); in vic_image_new()
83 err = drm_tegra_bo_new(vic->drm, 0, image->size, &image->bo); in vic_image_new()
85 free(image); in vic_image_new()
89 err = drm_tegra_channel_map(vic->channel, image->bo, flags, &image->map); in vic_image_new()
91 drm_tegra_bo_unref(image->bo); in vic_image_new()
92 free(image); in vic_image_new()
96 *imagep = image; in vic_image_new()
100 void vic_image_free(struct vic_image *image) in vic_image_free() argument
102 if (image) { in vic_image_free()
103 drm_tegra_channel_unmap(image->map); in vic_image_free()
104 drm_tegra_bo_unref(image->bo); in vic_image_free()
105 free(image); in vic_image_free()
109 void vic_image_dump(struct vic_image *image, FILE *fp) in vic_image_dump() argument
115 err = drm_tegra_bo_map(image->bo, &ptr); in vic_image_dump()
119 for (j = 0; j < image->height; j++) { in vic_image_dump()
120 uint32_t *pixels = (uint32_t *)((unsigned long)ptr + j * image->pitch); in vic_image_dump()
124 for (i = 0; i < image->width; i++) in vic_image_dump()
130 drm_tegra_bo_unmap(image->bo); in vic_image_dump()