Hello,Hadli, On Thu, Dec 23, 2010 at 7:54 PM, Manjunath Hadli <manjunath.hadli@xxxxxx> 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.hadli@xxxxxx> > Acked-by: Muralidharan Karicheri <m-karicheri2@xxxxxx> > Acked-by: Hans Verkuil <hverkuil@xxxxxxxxx> > --- > Â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-source@xxxxxxxxxxxxxxxxxxxx > 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html