Hello,Hadli,

On Thu, Dec 23, 2010 at 7:54 PM, Manjunath Hadli <manjunath.ha...@ti.com> wrote:
> This patch implements the coe functionality of the dislay driver,
> mainly controlling the VENC and other encoders, and acting as
> the one point interface for the man V4L2 driver.This implements
> the cre of each of the V4L2 IOCTLs.
>
> Signed-off-by: Manjunath Hadli <manjunath.ha...@ti.com>
> Acked-by: Muralidharan Karicheri <m-kariche...@ti.com>
> Acked-by: Hans Verkuil <hverk...@xs4all.nl>
> ---
>  drivers/media/video/davinci/vpbe.c |  836 
> ++++++++++++++++++++++++++++++++++++
>  include/media/davinci/vpbe.h       |  186 ++++++++
>  2 files changed, 1022 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/media/video/davinci/vpbe.c
>  create mode 100644 include/media/davinci/vpbe.h
>
> diff --git a/drivers/media/video/davinci/vpbe.c 
> b/drivers/media/video/davinci/vpbe.c
> new file mode 100644
> index 0000000..aa0aac9
> --- /dev/null
> +++ b/drivers/media/video/davinci/vpbe.c

...

> +static __init int vpbe_probe(struct platform_device *pdev)
> +{
> +       struct vpbe_display_config *vpbe_config;
> +       struct vpbe_device *vpbe_dev;
> +
> +       int ret = -EINVAL;
> +
> +       if (NULL == pdev->dev.platform_data) {
> +               v4l2_err(pdev->dev.driver, "Unable to get vpbe config\n");
> +               return -ENODEV;
> +       }
> +
> +       if (pdev->dev.platform_data == NULL) {
> +               v4l2_err(pdev->dev.driver, "No platform data\n");
> +               return -ENODEV;
> +       }

code duplicate?

> +       vpbe_config = pdev->dev.platform_data;
> +
> +       if (!vpbe_config->module_name[0] ||
> +           !vpbe_config->osd.module_name[0] ||
> +           !vpbe_config->venc.module_name[0]) {
> +               v4l2_err(pdev->dev.driver, "vpbe display module names not"
> +                        " defined\n");
> +               return ret;
> +       }
> +
> +       vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);
> +       if (vpbe_dev == NULL) {
> +               v4l2_err(pdev->dev.driver, "Unable to allocate memory"
> +                        " for vpbe_device\n");
> +               return -ENOMEM;
> +       }
> +       vpbe_dev->cfg = vpbe_config;
> +       vpbe_dev->ops = vpbe_dev_ops;
> +       vpbe_dev->pdev = &pdev->dev;
> +
> +       if (vpbe_config->outputs->num_modes > 0)
> +               vpbe_dev->current_timings = 
> vpbe_dev->cfg->outputs[0].modes[0];
> +       else
> +               return -ENODEV;
> +
> +       /* set the driver data in platform device */
> +       platform_set_drvdata(pdev, vpbe_dev);
> +       mutex_init(&vpbe_dev->lock);
> +       return 0;
> +}
> +


> _______________________________________________
> Davinci-linux-open-source mailing list
> davinci-linux-open-sou...@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>

-- 
Kaspter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to