Lines Matching refs:p64

56 static int get_v4l2_window32(struct v4l2_window *p64,  in get_v4l2_window32()  argument
64 *p64 = (struct v4l2_window) { in get_v4l2_window32()
74 if (p64->clipcount > 2048) in get_v4l2_window32()
76 if (!p64->clipcount) in get_v4l2_window32()
77 p64->clips = NULL; in get_v4l2_window32()
82 static int put_v4l2_window32(struct v4l2_window *p64, in put_v4l2_window32() argument
89 .w = p64->w, in put_v4l2_window32()
90 .field = p64->field, in put_v4l2_window32()
91 .chromakey = p64->chromakey, in put_v4l2_window32()
92 .clips = (uintptr_t)p64->clips, in put_v4l2_window32()
93 .clipcount = p64->clipcount, in put_v4l2_window32()
94 .bitmap = ptr_to_compat(p64->bitmap), in put_v4l2_window32()
95 .global_alpha = p64->global_alpha, in put_v4l2_window32()
144 static int get_v4l2_format32(struct v4l2_format *p64, in get_v4l2_format32() argument
147 if (get_user(p64->type, &p32->type)) in get_v4l2_format32()
150 switch (p64->type) { in get_v4l2_format32()
153 return copy_from_user(&p64->fmt.pix, &p32->fmt.pix, in get_v4l2_format32()
154 sizeof(p64->fmt.pix)) ? -EFAULT : 0; in get_v4l2_format32()
157 return copy_from_user(&p64->fmt.pix_mp, &p32->fmt.pix_mp, in get_v4l2_format32()
158 sizeof(p64->fmt.pix_mp)) ? -EFAULT : 0; in get_v4l2_format32()
161 return get_v4l2_window32(&p64->fmt.win, &p32->fmt.win); in get_v4l2_format32()
164 return copy_from_user(&p64->fmt.vbi, &p32->fmt.vbi, in get_v4l2_format32()
165 sizeof(p64->fmt.vbi)) ? -EFAULT : 0; in get_v4l2_format32()
168 return copy_from_user(&p64->fmt.sliced, &p32->fmt.sliced, in get_v4l2_format32()
169 sizeof(p64->fmt.sliced)) ? -EFAULT : 0; in get_v4l2_format32()
172 return copy_from_user(&p64->fmt.sdr, &p32->fmt.sdr, in get_v4l2_format32()
173 sizeof(p64->fmt.sdr)) ? -EFAULT : 0; in get_v4l2_format32()
176 return copy_from_user(&p64->fmt.meta, &p32->fmt.meta, in get_v4l2_format32()
177 sizeof(p64->fmt.meta)) ? -EFAULT : 0; in get_v4l2_format32()
183 static int get_v4l2_create32(struct v4l2_create_buffers *p64, in get_v4l2_create32() argument
186 if (copy_from_user(p64, p32, in get_v4l2_create32()
189 if (copy_from_user(&p64->flags, &p32->flags, sizeof(p32->flags))) in get_v4l2_create32()
191 return get_v4l2_format32(&p64->format, &p32->format); in get_v4l2_create32()
194 static int put_v4l2_format32(struct v4l2_format *p64, in put_v4l2_format32() argument
197 switch (p64->type) { in put_v4l2_format32()
200 return copy_to_user(&p32->fmt.pix, &p64->fmt.pix, in put_v4l2_format32()
201 sizeof(p64->fmt.pix)) ? -EFAULT : 0; in put_v4l2_format32()
204 return copy_to_user(&p32->fmt.pix_mp, &p64->fmt.pix_mp, in put_v4l2_format32()
205 sizeof(p64->fmt.pix_mp)) ? -EFAULT : 0; in put_v4l2_format32()
208 return put_v4l2_window32(&p64->fmt.win, &p32->fmt.win); in put_v4l2_format32()
211 return copy_to_user(&p32->fmt.vbi, &p64->fmt.vbi, in put_v4l2_format32()
212 sizeof(p64->fmt.vbi)) ? -EFAULT : 0; in put_v4l2_format32()
215 return copy_to_user(&p32->fmt.sliced, &p64->fmt.sliced, in put_v4l2_format32()
216 sizeof(p64->fmt.sliced)) ? -EFAULT : 0; in put_v4l2_format32()
219 return copy_to_user(&p32->fmt.sdr, &p64->fmt.sdr, in put_v4l2_format32()
220 sizeof(p64->fmt.sdr)) ? -EFAULT : 0; in put_v4l2_format32()
223 return copy_to_user(&p32->fmt.meta, &p64->fmt.meta, in put_v4l2_format32()
224 sizeof(p64->fmt.meta)) ? -EFAULT : 0; in put_v4l2_format32()
230 static int put_v4l2_create32(struct v4l2_create_buffers *p64, in put_v4l2_create32() argument
233 if (copy_to_user(p32, p64, in put_v4l2_create32()
235 put_user(p64->capabilities, &p32->capabilities) || in put_v4l2_create32()
236 put_user(p64->flags, &p32->flags) || in put_v4l2_create32()
237 copy_to_user(p32->reserved, p64->reserved, sizeof(p64->reserved))) in put_v4l2_create32()
239 return put_v4l2_format32(&p64->format, &p32->format); in put_v4l2_create32()
251 static int get_v4l2_standard32(struct v4l2_standard *p64, in get_v4l2_standard32() argument
255 return get_user(p64->index, &p32->index); in get_v4l2_standard32()
258 static int put_v4l2_standard32(struct v4l2_standard *p64, in put_v4l2_standard32() argument
261 if (put_user(p64->index, &p32->index) || in put_v4l2_standard32()
262 put_user(p64->id, &p32->id) || in put_v4l2_standard32()
263 copy_to_user(p32->name, p64->name, sizeof(p32->name)) || in put_v4l2_standard32()
264 copy_to_user(&p32->frameperiod, &p64->frameperiod, in put_v4l2_standard32()
266 put_user(p64->framelines, &p32->framelines) || in put_v4l2_standard32()
267 copy_to_user(p32->reserved, p64->reserved, sizeof(p32->reserved))) in put_v4l2_standard32()
339 static int get_v4l2_plane32(struct v4l2_plane *p64, in get_v4l2_plane32() argument
344 typeof(p64->m) m = {}; in get_v4l2_plane32()
362 memset(p64, 0, sizeof(*p64)); in get_v4l2_plane32()
363 *p64 = (struct v4l2_plane) { in get_v4l2_plane32()
373 static int put_v4l2_plane32(struct v4l2_plane *p64, in put_v4l2_plane32() argument
381 .bytesused = p64->bytesused, in put_v4l2_plane32()
382 .length = p64->length, in put_v4l2_plane32()
383 .data_offset = p64->data_offset, in put_v4l2_plane32()
389 plane32.m.mem_offset = p64->m.mem_offset; in put_v4l2_plane32()
392 plane32.m.userptr = (uintptr_t)(p64->m.userptr); in put_v4l2_plane32()
395 plane32.m.fd = p64->m.fd; in put_v4l2_plane32()
600 static int get_v4l2_framebuffer32(struct v4l2_framebuffer *p64, in get_v4l2_framebuffer32() argument
606 get_user(p64->capability, &p32->capability) || in get_v4l2_framebuffer32()
607 get_user(p64->flags, &p32->flags) || in get_v4l2_framebuffer32()
608 copy_from_user(&p64->fmt, &p32->fmt, sizeof(p64->fmt))) in get_v4l2_framebuffer32()
610 p64->base = (void __force *)compat_ptr(tmp); in get_v4l2_framebuffer32()
615 static int put_v4l2_framebuffer32(struct v4l2_framebuffer *p64, in put_v4l2_framebuffer32() argument
618 if (put_user((uintptr_t)p64->base, &p32->base) || in put_v4l2_framebuffer32()
619 put_user(p64->capability, &p32->capability) || in put_v4l2_framebuffer32()
620 put_user(p64->flags, &p32->flags) || in put_v4l2_framebuffer32()
621 copy_to_user(&p32->fmt, &p64->fmt, sizeof(p64->fmt))) in put_v4l2_framebuffer32()
643 static inline int get_v4l2_input32(struct v4l2_input *p64, in get_v4l2_input32() argument
646 if (copy_from_user(p64, p32, sizeof(*p32))) in get_v4l2_input32()
651 static inline int put_v4l2_input32(struct v4l2_input *p64, in put_v4l2_input32() argument
654 if (copy_to_user(p32, p64, sizeof(*p32))) in put_v4l2_input32()
709 static int get_v4l2_ext_controls32(struct v4l2_ext_controls *p64, in get_v4l2_ext_controls32() argument
717 *p64 = (struct v4l2_ext_controls) { in get_v4l2_ext_controls32()
729 static int put_v4l2_ext_controls32(struct v4l2_ext_controls *p64, in put_v4l2_ext_controls32() argument
736 .which = p64->which, in put_v4l2_ext_controls32()
737 .count = p64->count, in put_v4l2_ext_controls32()
738 .error_idx = p64->error_idx, in put_v4l2_ext_controls32()
739 .request_fd = p64->request_fd, in put_v4l2_ext_controls32()
740 .reserved[0] = p64->reserved[0], in put_v4l2_ext_controls32()
741 .controls = (uintptr_t)p64->controls, in put_v4l2_ext_controls32()
771 static int put_v4l2_event32(struct v4l2_event *p64, in put_v4l2_event32() argument
774 if (put_user(p64->type, &p32->type) || in put_v4l2_event32()
775 copy_to_user(&p32->u, &p64->u, sizeof(p64->u)) || in put_v4l2_event32()
776 put_user(p64->pending, &p32->pending) || in put_v4l2_event32()
777 put_user(p64->sequence, &p32->sequence) || in put_v4l2_event32()
778 put_user(p64->timestamp.tv_sec, &p32->timestamp.tv_sec) || in put_v4l2_event32()
779 put_user(p64->timestamp.tv_nsec, &p32->timestamp.tv_nsec) || in put_v4l2_event32()
780 put_user(p64->id, &p32->id) || in put_v4l2_event32()
781 copy_to_user(p32->reserved, p64->reserved, sizeof(p32->reserved))) in put_v4l2_event32()
802 static int put_v4l2_event32_time32(struct v4l2_event *p64, in put_v4l2_event32_time32() argument
805 if (put_user(p64->type, &p32->type) || in put_v4l2_event32_time32()
806 copy_to_user(&p32->u, &p64->u, sizeof(p64->u)) || in put_v4l2_event32_time32()
807 put_user(p64->pending, &p32->pending) || in put_v4l2_event32_time32()
808 put_user(p64->sequence, &p32->sequence) || in put_v4l2_event32_time32()
809 put_user(p64->timestamp.tv_sec, &p32->timestamp.tv_sec) || in put_v4l2_event32_time32()
810 put_user(p64->timestamp.tv_nsec, &p32->timestamp.tv_nsec) || in put_v4l2_event32_time32()
811 put_user(p64->id, &p32->id) || in put_v4l2_event32_time32()
812 copy_to_user(p32->reserved, p64->reserved, sizeof(p32->reserved))) in put_v4l2_event32_time32()
826 static int get_v4l2_edid32(struct v4l2_edid *p64, in get_v4l2_edid32() argument
831 if (copy_from_user(p64, p32, offsetof(struct v4l2_edid32, edid)) || in get_v4l2_edid32()
835 p64->edid = (void __force *)compat_ptr(edid); in get_v4l2_edid32()
839 static int put_v4l2_edid32(struct v4l2_edid *p64, in put_v4l2_edid32() argument
842 if (copy_to_user(p32, p64, offsetof(struct v4l2_edid32, edid))) in put_v4l2_edid32()
1080 struct v4l2_plane *p64 = mbuf; in v4l2_compat_get_array_args() local
1090 err = get_v4l2_plane32(p64, p32, b64->memory); in v4l2_compat_get_array_args()
1093 ++p64; in v4l2_compat_get_array_args()
1172 struct v4l2_plane *p64 = mbuf; in v4l2_compat_put_array_args() local
1182 err = put_v4l2_plane32(p64, p32, b64->memory); in v4l2_compat_put_array_args()
1185 ++p64; in v4l2_compat_put_array_args()