diff mbox

kernel BUG in VPFE with DM365

Message ID A69FA2915331DC488A831521EAE36FE4016A6EBECC@dlee06.ent.ti.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Murali Karicheri March 17, 2010, 2:11 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/davinci/isif.c b/drivers/media/video/davinci/is
index 29c29c6..4412a43 100644
--- a/drivers/media/video/davinci/isif.c
+++ b/drivers/media/video/davinci/isif.c
@@ -861,6 +861,36 @@  static void isif_setfbaddr(unsigned long addr)
        regw((addr >> 5) & 0x0ffff, CADL);
 }

+/* Parameter operations */
+/* TODO from dm355 ccdc_set_params */
+static int isif_set_params(void __user *params)
+{
+#if 0
+       struct ccdc_config_params_raw ccdc_raw_params;
+       int x;
+
+       /* only raw module parameters can be set through the IOCTL */
+       if (ccdc_cfg.if_type != VPFE_RAW_BAYER)
+               return -EINVAL;
+
+       x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params));
+       if (x) {
+               dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdc"
+                       "params, %d\n", x);
+               return -EFAULT;
+       }
+
+       if (!validate_ccdc_param(&ccdc_raw_params)) {
+               memcpy(&ccdc_cfg.bayer.config_params,
+                       &ccdc_raw_params,
+                       sizeof(ccdc_raw_params));
+               return 0;
+       }
+       return -EINVAL;
+#else
+       return 0;
+#endif
+}
 static int isif_set_hw_if_params(struct vpfe_hw_if_param *params)
 {
        isif_cfg.if_type = params->if_type;
@@ -1015,6 +1045,7 @@  static struct ccdc_hw_device isif_hw_dev = {
                .enable = isif_enable,
                .enable_out_to_sdram = isif_enable_output_to_sdram,
                .set_hw_if_params = isif_set_hw_if_params,
+               .set_params = isif_set_params,
                .configure = isif_configure,
                .set_buftype = isif_set_buftype,
                .get_buftype = isif_get_buftype,