1 From 20d79137ecaa6c7dad007d9ea1d7be5550db4839 Mon Sep 17 00:00:00 2001
2 From: Vaibhav Hiremath <hvaibhav@ti.com>
3 Date: Fri, 13 Feb 2009 15:40:25 +0530
4 Subject: [PATCH 2/2] Resizer bug fixes on top of 1.0.2 release
6 This commit contains resizer bug fixes on top of
8 - 4096 aligned address constraint
9 - workaround for extra page allocation for page aligned
12 Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
14 drivers/media/video/isp/omap_resizer.c | 417 ++++++++++++++++++++++++--------
15 include/linux/omap_resizer.h | 3 +-
16 2 files changed, 321 insertions(+), 99 deletions(-)
18 diff --git a/drivers/media/video/isp/omap_resizer.c b/drivers/media/video/isp/omap_resizer.c
19 index 54bc425..8059c70 100644
20 --- a/drivers/media/video/isp/omap_resizer.c
21 +++ b/drivers/media/video/isp/omap_resizer.c
23 #include <linux/platform_device.h>
25 #include <linux/uaccess.h>
26 +#include <linux/pci.h>
27 #include <media/v4l2-dev.h>
28 #include <asm/cacheflush.h>
31 #define MAX_COEF_COUNTER 16
32 #define COEFF_ADDRESS_OFFSET 0x04
34 +#define RSZ_DEF_REQ_EXP 0xE /* Default read operation expand
35 + * for the Resizer driver; value
36 + * taken from Davinci.
38 /* Global structure which contains information about number of channels
39 and protection variables */
40 struct device_params {
41 @@ -85,6 +90,7 @@ struct device_params {
42 struct mutex reszwrap_mutex; /* Semaphore for array */
44 struct videobuf_queue_ops vbq_ops; /* videobuf queue operations */
45 + unsigned long extra_page_addr;
48 /* Register mapped structure which contains the every register
49 @@ -126,6 +132,9 @@ struct resizer_config {
50 u32 rsz_yehn; /* yehn(luma)register mapping
53 + u32 sdr_req_exp; /* Configuration for Non
54 + * real time read expand
59 @@ -179,6 +188,7 @@ struct channel_config {
60 * channel is busy or not
62 struct mutex chanprotection_mutex;
63 + int buf_address[VIDEO_MAX_FRAME];
64 enum config_done config_state;
67 @@ -200,8 +210,6 @@ struct rsz_fh {
68 struct videobuf_queue vbq;
69 struct device_params *device;
71 - dma_addr_t isp_addr_read; /* Input/Output address */
72 - dma_addr_t isp_addr_write; /* Input/Output address */
73 u32 rsz_bufsize; /* channel specific buffersize
76 @@ -227,6 +235,10 @@ static int rsz_set_ratio(struct rsz_mult *multipass,
77 static void rsz_config_ratio(struct rsz_mult *multipass,
78 struct channel_config *rsz_conf_chan);
80 +static void inline rsz_set_exp(unsigned int exp)
82 + omap_writel(((exp & 0x3FF) << 10), OMAP3ISP_SBL_REG(0xF8));
85 * rsz_hardware_setup - Sets hardware configuration registers
86 * @rsz_conf_chan: Structure containing channel configuration
87 @@ -271,12 +283,15 @@ static void rsz_hardware_setup(struct channel_config *rsz_conf_chan)
89 coeffoffset = coeffoffset + COEFF_ADDRESS_OFFSET;
91 + /* Configure the read expand register */
92 + rsz_set_exp(rsz_conf_chan->register_config.sdr_req_exp);
96 * rsz_start - Enables Resizer Wrapper
97 * @arg: Currently not used.
98 - * @device: Structure containing ISP resizer wrapper global information
99 + * @fh: File structure containing ISP resizer information specific to
102 * Submits a resizing task specified by the rsz_resize structure. The call can
103 * either be blocked until the task is completed or returned immediately based
104 @@ -292,12 +307,18 @@ int rsz_start(int *arg, struct rsz_fh *fh)
105 struct channel_config *rsz_conf_chan = fh->config;
106 struct rsz_mult *multipass = fh->multipass;
107 struct videobuf_queue *q = &fh->vbq;
108 + struct videobuf_buffer *buf;
111 if (rsz_conf_chan->config_state) {
112 dev_err(rsz_device, "State not configured \n");
115 + if (!rsz_conf_chan->register_config.rsz_sdr_inadd ||
116 + !rsz_conf_chan->register_config.rsz_sdr_outadd) {
117 + dev_err(rsz_device, "address is null\n");
121 rsz_conf_chan->status = CHANNEL_BUSY;
123 @@ -325,33 +346,22 @@ mult:
127 - if (fh->isp_addr_read) {
128 - ispmmu_vunmap(fh->isp_addr_read);
129 - fh->isp_addr_read = 0;
131 - if (fh->isp_addr_write) {
132 - ispmmu_vunmap(fh->isp_addr_write);
133 - fh->isp_addr_write = 0;
136 rsz_conf_chan->status = CHANNEL_FREE;
137 - q->bufs[rsz_conf_chan->input_buf_index]->state = VIDEOBUF_NEEDS_INIT;
138 - q->bufs[rsz_conf_chan->output_buf_index]->state = VIDEOBUF_NEEDS_INIT;
139 rsz_conf_chan->register_config.rsz_sdr_outadd = 0;
140 rsz_conf_chan->register_config.rsz_sdr_inadd = 0;
142 - /* Unmap and free the DMA memory allocated for buffers */
143 - videobuf_dma_unmap(q, videobuf_to_dma(
144 - q->bufs[rsz_conf_chan->input_buf_index]));
145 - videobuf_dma_unmap(q, videobuf_to_dma(
146 - q->bufs[rsz_conf_chan->output_buf_index]));
147 - videobuf_dma_free(videobuf_to_dma(
148 - q->bufs[rsz_conf_chan->input_buf_index]));
149 - videobuf_dma_free(videobuf_to_dma(
150 - q->bufs[rsz_conf_chan->output_buf_index]));
152 isp_unset_callback(CBK_RESZ_DONE);
154 + /* Empty the Videobuf queue which was filled during the qbuf */
155 + buf = q->bufs[rsz_conf_chan->input_buf_index];
156 + buf->state = VIDEOBUF_IDLE;
157 + list_del(&buf->stream);
158 + if (rsz_conf_chan->input_buf_index != rsz_conf_chan->output_buf_index) {
159 + buf = q->bufs[rsz_conf_chan->output_buf_index];
160 + buf->state = VIDEOBUF_IDLE;
161 + list_del(&buf->stream);
167 @@ -359,6 +369,8 @@ err_einval:
170 * rsz_set_multipass - Set resizer multipass
171 + * @multipass: Structure containing channel configuration
172 + for multipass support
173 * @rsz_conf_chan: Structure containing channel configuration
176 @@ -384,6 +396,8 @@ static int rsz_set_multipass(struct rsz_mult *multipass,
179 * rsz_copy_data - Copy data
180 + * @multipass: Structure containing channel configuration
181 + for multipass support
182 * @params: Structure containing the Resizer Wrapper parameters
185 @@ -413,6 +427,8 @@ static void rsz_copy_data(struct rsz_mult *multipass, struct rsz_params *params)
188 * rsz_set_params - Set parameters for resizer wrapper
189 + * @multipass: Structure containing channel configuration
190 + for multipass support
191 * @params: Structure containing the Resizer Wrapper parameters
192 * @rsz_conf_chan: Structure containing channel configuration
194 @@ -524,6 +540,8 @@ static int rsz_set_params(struct rsz_mult *multipass, struct rsz_params *params,
197 rsz_config_ratio(multipass, rsz_conf_chan);
198 + /* Default value for read expand:Taken from Davinci */
199 + rsz_conf_chan->register_config.sdr_req_exp = RSZ_DEF_REQ_EXP;
201 rsz_conf_chan->config_state = STATE_CONFIGURED;
203 @@ -534,6 +552,8 @@ err_einval:
206 * rsz_set_ratio - Set ratio
207 + * @multipass: Structure containing channel configuration
208 + for multipass support
209 * @rsz_conf_chan: Structure containing channel configuration
211 * Returns 0 if successful, -EINVAL if invalid output size, upscaling ratio is
212 @@ -548,7 +568,8 @@ static int rsz_set_ratio(struct rsz_mult *multipass,
214 if ((multipass->out_hsize > MAX_IMAGE_WIDTH) ||
215 (multipass->out_vsize > MAX_IMAGE_WIDTH)) {
216 - dev_err(rsz_device, "Invalid output size!");
217 + dev_err(rsz_device, "Invalid output size! - %d", \
218 + multipass->out_hsize);
221 if (multipass->cbilin) {
222 @@ -758,6 +779,8 @@ err_einval:
225 * rsz_config_ratio - Configure ratio
226 + * @multipass: Structure containing channel configuration
227 + for multipass support
228 * @rsz_conf_chan: Structure containing channel configuration
231 @@ -789,6 +812,20 @@ static void rsz_config_ratio(struct rsz_mult *multipass,
232 ((vsize << ISPRSZ_IN_SIZE_VERT_SHIFT)
233 & ISPRSZ_IN_SIZE_VERT_MASK);
235 + /* This is another workaround for the ISP-MMU translation fault.
236 + For the parameters whose image size comes exactly to PAGE_SIZE
237 + generates ISP-MMU translation fault. The root-cause is the equation
238 + input width = (32*sph + (ow - 1)*hrsz + 16) >> 8 + 7
239 + = (64*sph + (ow - 1)*hrsz + 32) >> 8 + 7
240 + input height = (32*spv + (oh - 1)*vrsz + 16) >> 8 + 4
241 + = (64*spv + (oh - 1)*vrsz + 32) >> 8 + 7
243 + we are adjusting the input width to suit for Resizer module,
244 + application should use this configuration henceforth.
246 + multipass->in_hsize = hsize;
247 + multipass->in_vsize = vsize;
249 for (coeffcounter = 0; coeffcounter < MAX_COEF_COUNTER;
251 if (multipass->num_htap) {
252 @@ -990,24 +1027,15 @@ static void rsz_calculate_crop(struct channel_config *rsz_conf_chan,
253 static void rsz_vbq_release(struct videobuf_queue *q,
254 struct videobuf_buffer *vb)
257 struct rsz_fh *fh = q->priv_data;
258 + struct videobuf_dmabuf *dma = NULL;
260 - for (i = 0; i < VIDEO_MAX_FRAME; i++) {
261 - struct videobuf_dmabuf *dma = NULL;
264 - if (q->bufs[i]->memory != V4L2_MEMORY_MMAP)
266 - dma = videobuf_to_dma(q->bufs[i]);
267 - videobuf_dma_unmap(q, dma);
268 - videobuf_dma_free(dma);
270 + dma = videobuf_to_dma(q->bufs[vb->i]);
271 + videobuf_dma_unmap(q, dma);
272 + videobuf_dma_free(dma);
273 + ispmmu_vunmap(fh->config->buf_address[vb->i]);
274 + fh->config->buf_address[vb->i] = 0;
276 - ispmmu_vunmap(fh->isp_addr_read);
277 - ispmmu_vunmap(fh->isp_addr_write);
278 - fh->isp_addr_read = 0;
279 - fh->isp_addr_write = 0;
280 spin_lock(&fh->vbq_lock);
281 vb->state = VIDEOBUF_NEEDS_INIT;
282 spin_unlock(&fh->vbq_lock);
283 @@ -1062,7 +1090,105 @@ err_einval:
284 spin_unlock(&fh->vbq_lock);
288 + * This function is work around for the videobuf_iolock API,
289 + * for User memory allocated with ioremap (VM_IO flag) the API
290 + * get_user_pages fails.
292 + * To fulfill this requirement, we have completely ignored VM layer of
293 + * Linux, and configuring the ISP MMU with physical address.
295 +static int omap_videobuf_dma_init_user(struct videobuf_buffer *vb,
296 + unsigned long physp, unsigned long asize)
298 + struct videobuf_dmabuf *dma;
299 + struct scatterlist *sglist;
300 + unsigned long data, first, last;
303 + dma = videobuf_to_dma(vb);
306 + first = (data & PAGE_MASK) >> PAGE_SHIFT;
307 + last = ((data+asize-1) & PAGE_MASK) >> PAGE_SHIFT;
308 + dma->offset = data & ~PAGE_MASK;
309 + dma->nr_pages = last-first+1;
311 + dma->direction = PCI_DMA_FROMDEVICE;
313 + * Allocate array of sglen + 1, to add entry of extra page
314 + * for input buffer. Driver always uses 0th buffer as input buffer.
316 + len = dma->nr_pages + (vb->i ? 0 : 1);
317 + sglist = kcalloc(len, sizeof(*sglist), GFP_KERNEL);
318 + if (NULL == sglist)
321 + sglist[0].offset = 0;
322 + sglist[0].length = PAGE_SIZE - dma->offset;
323 + sglist[0].dma_address = (dma_addr_t)physp;
324 + physp += sglist[0].length;
326 + * Iterate in a loop for the number of pages
328 + for (i = 1; i < (len - (vb->i ? 0 : 1)); i++) {
329 + sglist[i].offset = 0;
330 + sglist[i].length = PAGE_SIZE;
331 + sglist[i].dma_address = (dma_addr_t)physp;
332 + physp += PAGE_SIZE;
335 + sglist[i].offset = 0;
336 + sglist[i].length = PAGE_SIZE;
337 + sglist[i].dma_address =
338 + (dma_addr_t)device_config->extra_page_addr;
340 + dma->sglist = sglist;
346 + * This function is workaround for the issue, where ISP-MMU generated
347 + * translation fault for specific params whose size is aligned to PAGE_SIZE.
349 + * As a workaround we are padding one extra page for input buffer. This page
350 + * we are allocating during init time and will not be released through-out
351 + * life time of resizer driver. Please note that Resizer module only reads
352 + * from this extra page.
354 +int omap_create_sg(struct videobuf_queue *q, struct videobuf_dmabuf *dma)
356 + struct scatterlist *sglist;
359 + sglen = dma->sglen;
360 + sglist = kcalloc(sglen + 1, sizeof(*sglist), GFP_KERNEL);
361 + if (NULL == sglist)
364 + * Copy the sglist locally
366 + memcpy(sglist, dma->sglist, sglen * sizeof(*sglist));
368 + * Release the old sglist, since we already copied it locally
370 + videobuf_dma_unmap(q, dma);
372 + * Add extra entry to sglist to work with specific params, whose
373 + * buffer address alined to PAGE_SIZE.
375 + sglist[sglen].offset = 0;
376 + sglist[sglen].length = PAGE_SIZE;
377 + sglist[sglen].dma_address = (dma_addr_t)device_config->extra_page_addr;
380 + * Save the sglist for mapping to ISP-MMU space
382 + dma->sglist = sglist;
383 + dma->sglen = sglen;
387 * rsz_vbq_prepare - Videobuffer is prepared and mmapped.
388 * @q: Structure containing the videobuffer queue file handle, and device
389 @@ -1079,19 +1205,24 @@ static int rsz_vbq_prepare(struct videobuf_queue *q,
391 struct rsz_fh *fh = q->priv_data;
392 struct channel_config *rsz_conf_chan = fh->config;
393 - struct rsz_mult *multipass = fh->multipass;
395 unsigned int isp_addr, insize, outsize;
396 - struct videobuf_dmabuf *dma = videobuf_to_dma(vb);
398 + struct rsz_mult *multipass = fh->multipass;
399 spin_lock(&fh->vbq_lock);
401 + /* Check for 32 byte alignement */
402 + if (vb->baddr != (vb->baddr & ~0x1F)) {
403 + spin_unlock(&fh->vbq_lock);
404 + dev_err(rsz_device, "Buffer address should be aligned \
408 vb->size = fh->rsz_bufsize;
409 vb->bsize = fh->rsz_bufsize;
411 spin_unlock(&fh->vbq_lock);
412 dev_err(rsz_device, "No user buffer allocated\n");
417 vb->width = fh->params->out_hsize;
418 @@ -1103,55 +1234,128 @@ static int rsz_vbq_prepare(struct videobuf_queue *q,
421 spin_unlock(&fh->vbq_lock);
423 + * Calculate input and output sizes, will be used while mapping
426 + outsize = multipass->out_pitch * multipass->out_vsize;
427 + insize = multipass->in_pitch * multipass->in_vsize;
429 if (vb->state == VIDEOBUF_NEEDS_INIT) {
430 - err = videobuf_iolock(q, vb, NULL);
432 - isp_addr = ispmmu_vmap(dma->sglist, dma->sglen);
437 - rsz_conf_chan->register_config.
440 - fh->isp_addr_write = isp_addr;
441 - rsz_conf_chan->output_buf_index = vb->i;
443 + struct videobuf_dmabuf *dma;
444 + struct vm_area_struct *vma;
445 + spin_lock(&fh->vbq_lock);
446 + dma = videobuf_to_dma(vb);
447 + vma = find_vma(current->mm, vb->baddr);
448 + if ((vma) && (vma->vm_flags & VM_IO) && (vma->vm_pgoff)) {
449 + /* This will catch ioremaped buffers to the kernel.
450 + * It gives two possible scenarios -
451 + * - Driver allocates buffer using either
452 + * dma_alloc_coherent or get_free_pages,
453 + * and maps to user space using
454 + * io_remap_pfn_range/remap_pfn_range
455 + * - Drivers maps memory outside from Linux using
458 + unsigned long physp = 0, asize;
459 + asize = vb->i ? outsize : insize;
460 + if ((vb->baddr + asize) > vma->vm_end) {
461 + spin_unlock(&fh->vbq_lock);
462 + dev_err(rsz_device, "User Buffer Allocation:" \
464 + (vma->vm_end - vb->baddr), asize);
467 + physp = (vma->vm_pgoff << PAGE_SHIFT) +
468 + (vb->baddr - vma->vm_start);
469 + err = omap_videobuf_dma_init_user(vb, physp, asize);
470 + spin_unlock(&fh->vbq_lock);
474 + err = videobuf_iolock(q, vb, NULL);
476 + * In case of user pointer mode, the get_user_pages
477 + * will fail if user has allocated less memory than
478 + * vb->size. But it is not error from resizer driver
479 + * point of view. so handled seperately
481 + if ((err < 0) && (dma->nr_pages > 0))
482 + err = videobuf_dma_map(q, dma);
486 + * Add one extra page for input buffer
489 + err = omap_create_sg(q, dma);
492 + spin_unlock(&fh->vbq_lock);
494 + isp_addr = ispmmu_vmap(dma->sglist, dma->sglen);
499 + rsz_conf_chan->buf_address[vb->i] = isp_addr;
500 + rsz_conf_chan->register_config.
503 + rsz_conf_chan->output_buf_index = vb->i;
505 + rsz_conf_chan->buf_address[vb->i] = isp_addr;
506 + rsz_conf_chan->register_config.
509 + rsz_conf_chan->input_buf_index = vb->i;
510 + if (outsize < insize && rsz_conf_chan->
512 + rsz_sdr_outadd == 0) {
513 rsz_conf_chan->register_config.
516 - rsz_conf_chan->input_buf_index = vb->i;
517 - outsize = multipass->out_pitch *
518 - multipass->out_vsize;
519 - insize = multipass->in_pitch *
520 - multipass->in_vsize;
521 - if (outsize < insize) {
522 - rsz_conf_chan->register_config.
530 - fh->isp_addr_read = isp_addr;
543 + rsz_conf_chan->register_config.
545 + rsz_conf_chan->buf_address[vb->i];
546 + rsz_conf_chan->output_buf_index = vb->i;
548 + rsz_conf_chan->register_config.
550 + rsz_conf_chan->buf_address[vb->i];
551 + rsz_conf_chan->input_buf_index = vb->i;
552 + if(outsize < insize && rsz_conf_chan->
554 + rsz_sdr_outadd == 0) {
555 + rsz_conf_chan->register_config.
557 + = rsz_conf_chan->buf_address[vb->i];
558 + rsz_conf_chan->output_buf_index = vb->i;
565 spin_lock(&fh->vbq_lock);
566 vb->state = VIDEOBUF_PREPARED;
567 spin_unlock(&fh->vbq_lock);
568 - flush_cache_user_range(NULL, vb->baddr, (vb->baddr
571 rsz_vbq_release(q, vb);
576 + spin_unlock(&fh->vbq_lock);
577 + rsz_vbq_release(q, vb);
581 @@ -1255,7 +1459,8 @@ err_enomem0:
583 static int rsz_release(struct inode *inode, struct file *filp)
587 + unsigned int timeout = 0;
588 struct rsz_fh *fh = filp->private_data;
589 struct channel_config *rsz_conf_chan = fh->config;
590 struct rsz_params *params = fh->params;
591 @@ -1266,17 +1471,17 @@ static int rsz_release(struct inode *inode, struct file *filp)
595 - if (mutex_lock_interruptible(&device_config->reszwrap_mutex))
597 - device_config->opened--;
598 - mutex_unlock(&device_config->reszwrap_mutex);
599 - /* This will Free memory allocated to the buffers,
600 - * and flushes the queue
602 - videobuf_queue_cancel(q);
605 + /* Free memory allocated to the buffers */
606 + for (i = 0 ; i < VIDEO_MAX_FRAME ; i++) {
607 + struct videobuf_dmabuf *dma = NULL;
610 + dma = videobuf_to_dma(q->bufs[i]);
611 + videobuf_dma_unmap(q, dma);
612 + videobuf_dma_free(dma);
615 + videobuf_mmap_free(q);
617 filp->private_data = NULL;
619 @@ -1286,7 +1491,8 @@ static int rsz_release(struct inode *inode, struct file *filp)
629 @@ -1353,6 +1559,12 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
630 chanprotection_mutex))
632 ret = videobuf_reqbufs(&fh->vbq, (void *)&req_buf);
634 + if (copy_to_user((struct v4l2_requestbuffers *)arg,
635 + &req_buf, sizeof(struct
636 + v4l2_requestbuffers)))
639 mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
642 @@ -1394,11 +1606,7 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
643 sizeof(struct rsz_params))) {
646 - if (mutex_lock_interruptible(&rsz_conf_chan->
647 - chanprotection_mutex))
649 - ret = rsz_set_params(fh->multipass, params, rsz_conf_chan);
650 - mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
651 + ret = rsz_set_params(fh->multipass, fh->params, rsz_conf_chan);
655 @@ -1433,6 +1641,12 @@ static long rsz_unlocked_ioctl(struct file *file, unsigned int cmd,
656 rsz_calculate_crop(rsz_conf_chan, (struct rsz_cropsize *)arg);
660 + if (mutex_lock_interruptible(&rsz_conf_chan->chanprotection_mutex))
662 + rsz_conf_chan->register_config.sdr_req_exp = *((unsigned int *)arg);
663 + mutex_unlock(&rsz_conf_chan->chanprotection_mutex);
666 dev_err(rsz_device, "resizer_ioctl: Invalid Command Value");
668 @@ -1535,14 +1749,18 @@ static int __init omap_rsz_init(void)
673 + device->extra_page_addr = __get_free_pages(GFP_KERNEL | GFP_DMA, 0);
674 + if (!device->extra_page_addr) {
675 + dev_err(rsz_device, OMAP_REZR_NAME ":Allocation failed. ");
679 ret = alloc_chrdev_region(&dev, 0, 1, OMAP_REZR_NAME);
681 dev_err(rsz_device, OMAP_REZR_NAME ": intialization failed. "
682 "Could not allocate region "
683 "for character device\n");
689 /* Register the driver in the kernel */
690 @@ -1608,6 +1826,8 @@ fail3:
693 unregister_chrdev_region(dev, 1);
695 + free_pages((unsigned long)device->extra_page_addr, 0);
699 @@ -1623,6 +1843,7 @@ void __exit omap_rsz_exit(void)
700 platform_driver_unregister(&omap_resizer_driver);
702 unregister_chrdev_region(dev, 1);
703 + free_pages((unsigned long)device_config->extra_page_addr, 0);
704 kfree(device_config);
707 diff --git a/include/linux/omap_resizer.h b/include/linux/omap_resizer.h
708 index 5ac0c88..47b8dd8 100644
709 --- a/include/linux/omap_resizer.h
710 +++ b/include/linux/omap_resizer.h
713 /* ioctls definition */
714 #define RSZ_IOC_BASE 'R'
715 -#define RSZ_IOC_MAXNR 8
716 +#define RSZ_IOC_MAXNR 9
718 /*Ioctl options which are to be passed while calling the ioctl*/
719 #define RSZ_REQBUF _IOWR(RSZ_IOC_BASE, 1,\
721 #define RSZ_G_STATUS _IOWR(RSZ_IOC_BASE, 6, struct rsz_status)
722 #define RSZ_QUEUEBUF _IOWR(RSZ_IOC_BASE, 7, struct v4l2_buffer)
723 #define RSZ_GET_CROPSIZE _IOWR(RSZ_IOC_BASE, 8, struct rsz_cropsize)
724 +#define RSZ_S_EXP _IOWR(RSZ_IOC_BASE, 9, __s32)
726 #define RSZ_INTYPE_YCBCR422_16BIT 0
727 #define RSZ_INTYPE_PLANAR_8BIT 1