Re: [PATCH v10 2/8] davinci vpbe: VPBE display driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux