Re: [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters
Hi Olli, Thanks for the patch. On Fri, Jan 16, 2015 at 12:35 PM, Olli Salonen olli.salo...@iki.fi wrote: This patch should is based on Antti's silabs branch. According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps. This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0. Cc-to: Antti Palosaari cr...@iki.fi Signed-off-by: Olli Salonen olli.salo...@iki.fi --- drivers/media/dvb-frontends/si2168.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7f966f3..7fef5ab 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -180,7 +180,12 @@ static int si2168_set_frontend(struct dvb_frontend *fe) goto err; } - if (c-bandwidth_hz = 500) + if (c-bandwidth_hz == 0) { + ret = -EINVAL; + dev_err(client-dev, automatic bandwidth not supported); + goto err; + } + else if (c-bandwidth_hz = 500) bandwidth = 0x05; Checkpatch should catch it. did you run checkpatch ? Thanks, --Prabhakar Lad -- 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
Re: [PATCH 2/2] si2168: add support for 1.7MHz bandwidth
Hi Olli, Thanks for the patch. On Fri, Jan 16, 2015 at 12:35 PM, Olli Salonen olli.salo...@iki.fi wrote: This patch is based on Antti's silabs branch. Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets. Signed-off-by: Olli Salonen olli.salo...@iki.fi --- drivers/media/dvb-frontends/si2168.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7fef5ab..ec893ee 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -185,6 +185,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe) dev_err(client-dev, automatic bandwidth not supported); goto err; } + else if (c-bandwidth_hz = 200) + bandwidth = 0x02; Please fix checkpatch errors for this patch aswel. Thanks, --Prabhakar Lad -- 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
Re: [PATCHv3 10/20] cx25840: fill the media controller entity
Hi Mauro, Thanks for the patch. On Tue, Jan 6, 2015 at 9:08 PM, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: Instead of keeping the media controller entity not initialized, fill it and create the pads for cx25840. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index 573e08826b9b..bdb5bb6b58da 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c @@ -5137,6 +5137,9 @@ static int cx25840_probe(struct i2c_client *client, int default_volume; u32 id; u16 device_id; +#if defined(CONFIG_MEDIA_CONTROLLER) + int ret; +#endif /* Check if the adapter supports the needed features */ if (!i2c_check_functionality(client-adapter, I2C_FUNC_SMBUS_BYTE_DATA)) @@ -5178,6 +5181,21 @@ static int cx25840_probe(struct i2c_client *client, sd = state-sd; v4l2_i2c_subdev_init(sd, client, cx25840_ops); +#if defined(CONFIG_MEDIA_CONTROLLER) + /* TODO: need to represent analog inputs too */ + state-pads[0].flags = MEDIA_PAD_FL_SINK; /* Tuner or input */ | MEDIA_PAD_FL_MUST_CONNECT ? + state-pads[1].flags = MEDIA_PAD_FL_SOURCE; /* Video */ + state-pads[2].flags = MEDIA_PAD_FL_SOURCE; /* VBI */ Macros for 0,1,2, and 3 would make it more readable. + sd-entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER; + + ret = media_entity_init(sd-entity, ARRAY_SIZE(state-pads), + state-pads, 0); + if (ret 0) { + v4l_info(client, failed to initialize media entity!\n); + kfree(state); Not required. + return -ENODEV; return ret; instead ? Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: ti-vpe: Use mem-to-mem ioctl helpers
Hi Hans, On Fri, Dec 19, 2014 at 4:42 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, I haven't seen any movement with Nikhil's patches, so it is probably better if you just post a new version of this patch based on the latest media_tree. I was about to do that, as I was not able to utilize my holidays in proper way :D Thanks, --Prabhakar Lad -- 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
Re: [RFC PATCH 1/8] v4l2 subdevs: replace get/set_crop by get/set_selection
On Thu, Dec 4, 2014 at 3:24 PM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com The crop and selection pad ops are duplicates. Replace all uses of get/set_crop by get/set_selection. This will make it possible to drop get/set_crop altogether. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Sylwester Nawrocki s.nawro...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Prabhakar Lad prabhakar.cse...@gmail.com Cc: Philipp Zabel p.za...@pengutronix.de Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/media/i2c/mt9m032.c | 42 --- drivers/media/i2c/mt9p031.c | 41 --- drivers/media/i2c/mt9t001.c | 41 --- drivers/media/i2c/mt9v032.c | 43 --- drivers/media/i2c/s5k6aa.c | 44 +--- drivers/staging/media/davinci_vpfe/dm365_isif.c | 69 + 6 files changed, 156 insertions(+), 124 deletions(-) diff --git a/drivers/media/i2c/mt9m032.c b/drivers/media/i2c/mt9m032.c index 45b3fca..7643122 100644 --- a/drivers/media/i2c/mt9m032.c +++ b/drivers/media/i2c/mt9m032.c @@ -422,22 +422,25 @@ done: return ret; } -static int mt9m032_get_pad_crop(struct v4l2_subdev *subdev, - struct v4l2_subdev_fh *fh, - struct v4l2_subdev_crop *crop) +static int mt9m032_get_pad_selection(struct v4l2_subdev *subdev, +struct v4l2_subdev_fh *fh, +struct v4l2_subdev_selection *sel) { struct mt9m032 *sensor = to_mt9m032(subdev); + if (sel-target != V4L2_SEL_TGT_CROP) + return -EINVAL; + mutex_lock(sensor-lock); - crop-rect = *__mt9m032_get_pad_crop(sensor, fh, crop-which); + sel-r = *__mt9m032_get_pad_crop(sensor, fh, sel-which); mutex_unlock(sensor-lock); return 0; } -static int mt9m032_set_pad_crop(struct v4l2_subdev *subdev, - struct v4l2_subdev_fh *fh, - struct v4l2_subdev_crop *crop) +static int mt9m032_set_pad_selection(struct v4l2_subdev *subdev, +struct v4l2_subdev_fh *fh, +struct v4l2_subdev_selection *sel) { struct mt9m032 *sensor = to_mt9m032(subdev); struct v4l2_mbus_framefmt *format; @@ -445,9 +448,12 @@ static int mt9m032_set_pad_crop(struct v4l2_subdev *subdev, struct v4l2_rect rect; int ret = 0; + if (sel-target != V4L2_SEL_TGT_CROP) + return -EINVAL; + mutex_lock(sensor-lock); - if (sensor-streaming crop-which == V4L2_SUBDEV_FORMAT_ACTIVE) { + if (sensor-streaming sel-which == V4L2_SUBDEV_FORMAT_ACTIVE) { ret = -EBUSY; goto done; } @@ -455,13 +461,13 @@ static int mt9m032_set_pad_crop(struct v4l2_subdev *subdev, /* Clamp the crop rectangle boundaries and align them to a multiple of 2 * pixels to ensure a GRBG Bayer pattern. */ - rect.left = clamp(ALIGN(crop-rect.left, 2), MT9M032_COLUMN_START_MIN, + rect.left = clamp(ALIGN(sel-r.left, 2), MT9M032_COLUMN_START_MIN, MT9M032_COLUMN_START_MAX); - rect.top = clamp(ALIGN(crop-rect.top, 2), MT9M032_ROW_START_MIN, + rect.top = clamp(ALIGN(sel-r.top, 2), MT9M032_ROW_START_MIN, MT9M032_ROW_START_MAX); - rect.width = clamp_t(unsigned int, ALIGN(crop-rect.width, 2), + rect.width = clamp_t(unsigned int, ALIGN(sel-r.width, 2), MT9M032_COLUMN_SIZE_MIN, MT9M032_COLUMN_SIZE_MAX); - rect.height = clamp_t(unsigned int, ALIGN(crop-rect.height, 2), + rect.height = clamp_t(unsigned int, ALIGN(sel-r.height, 2), MT9M032_ROW_SIZE_MIN, MT9M032_ROW_SIZE_MAX); rect.width = min_t(unsigned int, rect.width, @@ -469,21 +475,21 @@ static int mt9m032_set_pad_crop(struct v4l2_subdev *subdev, rect.height = min_t(unsigned int, rect.height, MT9M032_PIXEL_ARRAY_HEIGHT - rect.top); - __crop = __mt9m032_get_pad_crop(sensor, fh, crop-which); + __crop = __mt9m032_get_pad_crop(sensor, fh, sel-which); if (rect.width != __crop-width || rect.height != __crop-height) { /* Reset the output image size if the crop rectangle size has * been modified. */ - format = __mt9m032_get_pad_format(sensor, fh, crop-which); + format = __mt9m032_get_pad_format(sensor, fh, sel-which); format-width = rect.width; format-height = rect.height
Re: [RFC PATCH 2/8] v4l2-subdev: drop get/set_crop pad ops
On Thu, Dec 4, 2014 at 3:24 PM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Drop the duplicate get/set_crop pad ops and only use get/set_selection. It makes no sense to have two duplicate ops in the internal subdev API. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/media/v4l2-core/v4l2-subdev.c | 8 include/media/v4l2-subdev.h | 4 2 files changed, 12 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 543631c..19a034e 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -283,10 +283,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) if (rval) return rval; - rval = v4l2_subdev_call(sd, pad, get_crop, subdev_fh, crop); - if (rval != -ENOIOCTLCMD) - return rval; - memset(sel, 0, sizeof(sel)); sel.which = crop-which; sel.pad = crop-pad; @@ -308,10 +304,6 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) if (rval) return rval; - rval = v4l2_subdev_call(sd, pad, set_crop, subdev_fh, crop); - if (rval != -ENOIOCTLCMD) - return rval; - memset(sel, 0, sizeof(sel)); sel.which = crop-which; sel.pad = crop-pad; diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 5860292..b052184 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -503,10 +503,6 @@ struct v4l2_subdev_pad_ops { struct v4l2_subdev_format *format); int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_format *format); - int (*set_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, - struct v4l2_subdev_crop *crop); - int (*get_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, - struct v4l2_subdev_crop *crop); int (*get_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, struct v4l2_subdev_selection *sel); int (*set_selection)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, -- 2.1.3 -- 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
Re: [RFC PATCH 3/8] v4l2-subdev: drop unused op enum_mbus_fmt
On Thu, Dec 4, 2014 at 3:24 PM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Weird, this op isn't used at all. Seems to be orphaned code. Remove it. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- include/media/v4l2-subdev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index b052184..5beeb87 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -342,8 +342,6 @@ struct v4l2_subdev_video_ops { struct v4l2_dv_timings *timings); int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, u32 *code); - int (*enum_mbus_fsizes)(struct v4l2_subdev *sd, -struct v4l2_frmsizeenum *fsize); int (*g_mbus_fmt)(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *fmt); int (*try_mbus_fmt)(struct v4l2_subdev *sd, -- 2.1.3 -- 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
Re: [RFC PATCH 0/8] Removing duplicate video/pad ops
On Thu, Dec 4, 2014 at 3:24 PM, Hans Verkuil hverk...@xs4all.nl wrote: This patch series attempts to remove some of the duplicate video/pad ops. The first two patches have been posted before. The only thing changed is that the subdevs no longer add checks for pad values != 0 as suggested. The third patch removes an unused subdev op. Somehow we must have missed that one. The fourth replaces v4l2_subdev_fh by v4l2_subdev_pad_config. No other changes other than that. This patch paves the way for bridge drivers to call pad ops that need v4l2_subdev_pad_config since bridge drivers do not have a v4l2_subdev_fh struct. The fifth patch is a small Kconfig cleanup. The sixth patch causes v4l2_device_register_subdev() to initialize a v4l2_subdev_pad_config array for use in bridge drivers. Bridge drivers can then use sd-pad_configs as argument to the pad ops. It's done behind the scenes, so this requires no driver changes. One disadvantage, though: bridge drivers that never call those pad ops since they expect that userspace will call them are now allocating memory for this when they will never need it. Should I add a V4L2_FL_DONT_CREATE_PAD_CONFIGS flag that such drivers can set, prohibiting allocating this memory? Is the code I use to initialize the pad_configs correct? Is it something that subdev_fh_init() in v4l2-subdev.c should do as well? The seventh patch removes the video enum_framesizes/intervals ops. The last patch removes the video g/s_crop and cropcap ops. This especially affects soc_camera. Note that I only tested if it compiles, I have not tried this on my soc_camera board. I will try to get my renesas board up and running with this kernel to test it but more help with this would be much appreciated. FYI, I am on a holiday and out of reach of the hardware, will test it once I get from holiday after Christmas. Thanks, --Prabhakar Lad -- 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
Re: [PATCH v3] media: platform: add VPFE capture driver support for AM437X
Hi Hans, On Fri, Dec 5, 2014 at 12:24 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Sorry, there are still a few items that need to be fixed. If you can make a v4 with these issues addressed, then I can still make a pull request, although it depends on Mauro whether it is still accepted for 3.19. OK will post a v4 tonight fixing all the below issues. FYI: Looking at the response of Mauro on 'soc-camera: 1st set for 3.19' he wont accept it! Thanks, --Prabhakar Lad On 12/04/2014 12:12 AM, Lad, Prabhakar wrote: From: Benoit Parrot bpar...@ti.com This patch adds Video Processing Front End (VPFE) driver for AM437X family of devices Driver supports the following: - V4L2 API using MMAP buffer access based on videobuf2 api - Asynchronous sensor/decoder sub device registration - DT support Just to confirm: this driver only supports SDTV formats? No HDTV? I didn't see any VIDIOC_*_DV_TIMINGS support, so I assume it really isn't supported. Signed-off-by: Benoit Parrot bpar...@ti.com Signed-off-by: Darren Etheridge detheri...@ti.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- snip diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c new file mode 100644 index 000..25863e8 --- /dev/null +++ b/drivers/media/platform/am437x/am437x-vpfe.c snip + +static int +cmp_v4l2_format(const struct v4l2_format *lhs, const struct v4l2_format *rhs) +{ + return lhs-type == rhs-type + lhs-fmt.pix.width == rhs-fmt.pix.width + lhs-fmt.pix.height == rhs-fmt.pix.height + lhs-fmt.pix.pixelformat == rhs-fmt.pix.pixelformat + lhs-fmt.pix.field == rhs-fmt.pix.field + lhs-fmt.pix.colorspace == rhs-fmt.pix.colorspace; Add a check for pix.ycbcr_enc and pix.quantization. OK snip +/* + * vpfe_release : This function is based on the vb2_fop_release + * helper function. + * It has been augmented to handle module power management, + * by disabling/enabling h/w module fcntl clock when necessary. + */ +static int vpfe_release(struct file *file) +{ + struct vpfe_device *vpfe = video_drvdata(file); + int ret; + + vpfe_dbg(2, vpfe, vpfe_release\n); + + ret = _vb2_fop_release(file, NULL); This isn't going to work. _vb2_fop_release calls v4l2_fh_release(), so the v4l2_fh_is_singular_file(file) will be wrong and you release the fh once too many. I would do this: if (!v4l2_fh_is_singular_file(file)) return vb2_fop_release(file); mutex_lock(vpfe-lock); ret = _vb2_fop_release(file, NULL); vpfe_ccdc_close(vpfe-ccdc, vpfe-pdev); mutex_unlock(vpfe-lock); return ret; + + if (v4l2_fh_is_singular_file(file)) { + mutex_lock(vpfe-lock); + vpfe_ccdc_close(vpfe-ccdc, vpfe-pdev); + v4l2_fh_release(file); + mutex_unlock(vpfe-lock); + } + + return ret; +} snip +static int vpfe_enum_size(struct file *file, void *priv, + struct v4l2_frmsizeenum *fsize) +{ + struct vpfe_device *vpfe = video_drvdata(file); + struct v4l2_subdev_frame_size_enum fse; + struct vpfe_subdev_info *sdinfo; + struct v4l2_mbus_framefmt mbus; + struct v4l2_pix_format pix; + struct vpfe_fmt *fmt; + int ret; + + vpfe_dbg(2, vpfe, vpfe_enum_size\n); + + /* check for valid format */ + fmt = find_format_by_pix(fsize-pixel_format); + if (!fmt) { + vpfe_dbg(3, vpfe, Invalid pixel code: %x, default used instead\n, + fsize-pixel_format); + return -EINVAL; + } + + memset(fsize-reserved, 0x0, sizeof(fsize-reserved)); + + sdinfo = vpfe-current_subdev; + if (!sdinfo-sd) + return -EINVAL; + + memset(pix, 0x0, sizeof(pix)); + /* Construct pix from parameter and use default for the rest */ + pix.pixelformat = fsize-pixel_format; + pix.width = 640; + pix.height = 480; + pix.colorspace = V4L2_COLORSPACE_SRGB; + pix.field = V4L2_FIELD_NONE; + pix_to_mbus(vpfe, pix, mbus); + + memset(fse, 0x0, sizeof(fse)); + fse.index = fsize-index; + fse.pad = 0; + fse.code = mbus.code; + ret = v4l2_subdev_call(sdinfo-sd, pad, enum_frame_size, NULL, fse); FYI: strictly speaking this is wrong since this op theoretically expects a v4l2_subdev_fh pointer instead of a NULL argument. However, you do not have an alternative right now. As you know, I've been working on fixing this, so if that gets accepted, then you need to update this code as well in a later patch. + if (ret) + return -EINVAL; + + vpfe_dbg(1, vpfe, vpfe_enum_size: index: %d code: %x W:[%d,%d] H:[%d,%d]\n, + fse.index, fse.code, fse.min_width, fse.max_width, + fse.min_height, fse.max_height); + + fsize
Re: [PATCH v2] media: platform: add VPFE capture driver support for AM437X
: 75.796556s Buffer: 0 Sequence: 80 Field: None Timestamp: 75.819436s Buffer: 1 Sequence: 81 Field: None Timestamp: 75.842317s Buffer: 2 Sequence: 82 Field: None Timestamp: 75.865197s Buffer: 3 Sequence: 83 Field: None Timestamp: 75.888077s Buffer: 0 Sequence: 84 Field: None Timestamp: 75.910959s Buffer: 1 Sequence: 85 Field: None Timestamp: 75.933838s Buffer: 2 Sequence: 86 Field: None Timestamp: 75.956718s Buffer: 3 Sequence: 87 Field: None Timestamp: 75.979599s Buffer: 0 Sequence: 88 Field: None Timestamp: 76.002479s Buffer: 1 Sequence: 89 Field: None Timestamp: 76.025360s Buffer: 2 Sequence: 90 Field: None Timestamp: 76.048243s Buffer: 3 Sequence: 91 Field: None Timestamp: 76.071122s Buffer: 0 Sequence: 92 Field: None Timestamp: 76.094000s Buffer: 1 Sequence: 93 Field: None Timestamp: 76.116881s Buffer: 2 Sequence: 94 Field: None Timestamp: 76.139761s Buffer: 3 Sequence: 95 Field: None Timestamp: 76.162642s Buffer: 0 Sequence: 96 Field: None Timestamp: 76.185522s Buffer: 1 Sequence: 97 Field: None Timestamp: 76.208402s Buffer: 2 Sequence: 98 Field: None Timestamp: 76.231284s Buffer: 3 Sequence: 99 Field: None Timestamp: 76.254163s Buffer: 0 Sequence: 100 Field: None Timestamp: 76.277044s Buffer: 1 Sequence: 101 Field: None Timestamp: 76.299924s Buffer: 2 Sequence: 102 Field: None Timestamp: 76.322805s Buffer: 3 Sequence: 103 Field: None Timestamp: 76.345685s Buffer: 0 Sequence: 104 Field: None Timestamp: 76.368565s Buffer: 1 Sequence: 105 Field: None Timestamp: 76.391447s Buffer: 2 Sequence: 106 Field: None Timestamp: 76.414326s Buffer: 3 Sequence: 107 Field: None Timestamp: 76.437206s Buffer: 0 Sequence: 108 Field: None Timestamp: 76.460087s Buffer: 1 Sequence: 109 Field: None Timestamp: 76.482967s Buffer: 2 Sequence: 110 Field: None Timestamp: 76.505847s Buffer: 3 Sequence: 111 Field: None Timestamp: 76.528727s Buffer: 0 Sequence: 112 Field: None Timestamp: 76.551607s Buffer: 1 Sequence: 113 Field: None Timestamp: 76.574488s Buffer: 2 Sequence: 114 Field: None Timestamp: 76.597369s Buffer: 3 Sequence: 115 Field: None Timestamp: 76.620250s Buffer: 0 Sequence: 116 Field: None Timestamp: 76.643129s Buffer: 1 Sequence: 117 Field: None Timestamp: 76.666010s Buffer: 2 Sequence: 118 Field: None Timestamp: 76.688890s Buffer: 3 Sequence: 119 Field: None Timestamp: 76.711771s test MMAP: OK test USERPTR: OK (Not Supported) test DMABUF: Cannot test, specify --expbuf-device Total: 42, Succeeded: 42, Failed: 0, Warnings: 0 Thanks, --Prabhakar Lad -- 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
Re: [PATCH 1/2] v4l2 subdevs: replace get/set_crop by get/set_selection
Hi Hans, Thanks for the patch. On Tue, Dec 2, 2014 at 12:21 PM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com The crop and selection pad ops are duplicates. Replace all uses of get/set_crop by get/set_selection. This will make it possible to drop get/set_crop altogether. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Sylwester Nawrocki s.nawro...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Prabhakar Lad prabhakar.cse...@gmail.com Cc: Philipp Zabel p.za...@pengutronix.de --- drivers/media/i2c/mt9m032.c | 40 +++--- drivers/media/i2c/mt9p031.c | 40 +++--- drivers/media/i2c/mt9t001.c | 41 --- drivers/media/i2c/mt9v032.c | 43 --- drivers/media/i2c/s5k6aa.c | 44 +--- drivers/staging/media/davinci_vpfe/dm365_isif.c | 69 + Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: platform: add VPFE capture driver support for AM437X
Hi Hans, Thanks for the review. On Mon, Dec 1, 2014 at 10:11 AM, Hans Verkuil hverk...@xs4all.nl wrote: Hi all, Thanks for the patch, review comments are below. For the next version I would appreciate if someone can test this driver with the latest v4l2-compliance from the v4l-utils git repo. If possible test streaming as well (v4l2-compliance -s), ideally with both a sensor and a STD receiver input. But that depends on the available hardware of course. I'd like to see the v4l2-compliance output. It's always good to have that on record. Following is the compliance output, missed it post it along with patch: root@am437x-evm:~# ./v4l2-compliance -s -i 0 -v Driver Info: Driver name : vpfe Card type :[ 70.363908] vpfe 48326000.vpfe: = START STATUS = TI AM437x VPFE Bus info : platform:vpfe [ 70.375576] vpfe 48326000.vpfe: == END STATUS == 48326000.vpfe Driver version: 3.18.0 Capabil[ 70.388485] vpfe 48326000.vpfe: invalid input index: 1 ities : 0x8521 Video Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x0521 Video Capture Read/Write Streaming Extended Pix Format Compliance test for device /dev/video0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second video open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Test input 0: Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) test VIDIOC_QUERYCTRL: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: info: found 7 framesizes for pixel format 56595559 info: found 7 framesizes for pixel format 59565955 info: found 7 framesizes for pixel format 52424752 info: found 7 framesizes for pixel format 31384142 info: found 4 formats for buftype 1 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK info: Global format check succeeded for type 1 test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: info: test buftype Video Capture test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK Streaming ioctls: test read/write: OK Video Capture: Buffer: 0 Sequence: 0 Field: None Timestamp: 74.956437s Buffer: 1 Sequence: 0 Field: None Timestamp: 74.979310s Buffer: 2 Sequence: 0 Field: None Timestamp: 75.002191s Buffer: 3 Sequence: 0 Field: None Timestamp: 75.208114s Buffer: 0 Sequence: 0 Field: None Timestamp: 75.230998s Buffer: 1 Sequence: 0 Field: None Timestamp: 75.253877s Buffer: 2 Sequence: 0 Field: None Timestamp: 75.276756s Buffer: 3 Sequence: 0 Field: None Timestamp:
Re: [PATCH] media: platform: add VPFE capture driver support for AM437X
Hi Hans, On Mon, Dec 1, 2014 at 11:00 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 12/01/2014 11:11 AM, Hans Verkuil wrote: Hi all, Thanks for the patch, review comments are below. For the next version I would appreciate if someone can test this driver with the latest v4l2-compliance from the v4l-utils git repo. If possible test streaming as well (v4l2-compliance -s), ideally with both a sensor and a STD receiver input. But that depends on the available hardware of course. I'd like to see the v4l2-compliance output. It's always good to have that on record. On 11/24/2014 02:10 AM, Lad, Prabhakar wrote: From: Benoit Parrot bpar...@ti.com This patch adds Video Processing Front End (VPFE) driver for AM437X family of devices Driver supports the following: - V4L2 API using MMAP buffer access based on videobuf2 api - Asynchronous sensor/decoder sub device registration - DT support Signed-off-by: Benoit Parrot bpar...@ti.com Signed-off-by: Darren Etheridge detheri...@ti.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- .../devicetree/bindings/media/ti-am437xx-vpfe.txt | 61 + MAINTAINERS|9 + drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|2 + drivers/media/platform/am437x/Kconfig | 10 + drivers/media/platform/am437x/Makefile |2 + drivers/media/platform/am437x/vpfe.c | 2764 drivers/media/platform/am437x/vpfe.h | 286 ++ drivers/media/platform/am437x/vpfe_regs.h | 140 + include/uapi/linux/Kbuild |1 + include/uapi/linux/am437x_vpfe.h | 122 + 11 files changed, 3398 insertions(+) Can the source names be improved? There are too many 'vpfe' sources. Perhaps prefix all with 'am437x-'? I did think of it but, dropped it as anyway the source's are present in am437x folder, again naming the files am437x-xxx.x didn't make me feel good. If you still insists I'll do it. In general I prefer '-' over '_' in a source name: it's looks better IMHO. I am almost done with all the review comments, if we take a decision on this quickly I can post a v2 soon. One question, unrelated to this patch series: Prabhakar, would it make sense to look at the various existing TI sources as well and rename them to make it more explicit for which SoCs they are meant? Most are pretty vague with variations on vpe, vpif, vpfe, etc. but no reference to the actual SoC they are for. vpe - definitely needs to be changed. vpif - under davinci is common for (Davinci series dm6467/dm6467t/omapl138/am1808) vpfe - under davinci is common for (Davinci series dm36x/dm6446/dm355) I am falling short of names for renaming this common drivers :) Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: platform: add VPFE capture driver support for AM437X
Hi Hans, On Tue, Dec 2, 2014 at 7:26 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 12/01/2014 11:17 PM, Prabhakar Lad wrote: Hi Hans, Thanks for the review. On Mon, Dec 1, 2014 at 10:11 AM, Hans Verkuil hverk...@xs4all.nl wrote: Hi all, Thanks for the patch, review comments are below. For the next version I would appreciate if someone can test this driver with the latest v4l2-compliance from the v4l-utils git repo. If possible test streaming as well (v4l2-compliance -s), ideally with both a sensor and a STD receiver input. But that depends on the available hardware of course. I'd like to see the v4l2-compliance output. It's always good to have that on record. Following is the compliance output, missed it post it along with patch: root@am437x-evm:~# ./v4l2-compliance -s -i 0 -v Driver Info: Driver name : vpfe Card type :[ 70.363908] vpfe 48326000.vpfe: = START STATUS = TI AM437x VPFE Bus info : platform:vpfe [ 70.375576] vpfe 48326000.vpfe: == END STATUS == 48326000.vpfe Driver version: 3.18.0 Capabil[ 70.388485] vpfe 48326000.vpfe: invalid input index: 1 ities : 0x8521 Video Capture Read/Write Streaming Extended Pix Format Device Capabilities Device Caps : 0x0521 Video Capture Read/Write Streaming Extended Pix Format Compliance test for device /dev/video0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second video open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK Input ioctls: test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Test input 0: Control ioctls: test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) test VIDIOC_QUERYCTRL: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: info: found 7 framesizes for pixel format 56595559 info: found 7 framesizes for pixel format 59565955 info: found 7 framesizes for pixel format 52424752 info: found 7 framesizes for pixel format 31384142 info: found 4 formats for buftype 1 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK info: Global format check succeeded for type 1 test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: info: test buftype Video Capture test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK Streaming ioctls: test read/write: OK Video Capture: Buffer: 0 Sequence: 0 Field: None Timestamp: 74.956437s Buffer: 1 Sequence: 0 Field: None Timestamp: 74.979310s Buffer: 2 Sequence: 0 Field: None Timestamp: 75.002191s Buffer: 3 Sequence: 0 Field: None Timestamp: 75.208114s Buffer: 0 Sequence: 0 Field: None Timestamp
Re: [PATCH] media: platform: add VPFE capture driver support for AM437X
Hi Hans, On Tue, Dec 2, 2014 at 7:32 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 12/01/2014 11:27 PM, Prabhakar Lad wrote: Hi Hans, On Mon, Dec 1, 2014 at 11:00 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 12/01/2014 11:11 AM, Hans Verkuil wrote: Hi all, Thanks for the patch, review comments are below. For the next version I would appreciate if someone can test this driver with the latest v4l2-compliance from the v4l-utils git repo. If possible test streaming as well (v4l2-compliance -s), ideally with both a sensor and a STD receiver input. But that depends on the available hardware of course. I'd like to see the v4l2-compliance output. It's always good to have that on record. On 11/24/2014 02:10 AM, Lad, Prabhakar wrote: From: Benoit Parrot bpar...@ti.com This patch adds Video Processing Front End (VPFE) driver for AM437X family of devices Driver supports the following: - V4L2 API using MMAP buffer access based on videobuf2 api - Asynchronous sensor/decoder sub device registration - DT support Signed-off-by: Benoit Parrot bpar...@ti.com Signed-off-by: Darren Etheridge detheri...@ti.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- .../devicetree/bindings/media/ti-am437xx-vpfe.txt | 61 + MAINTAINERS|9 + drivers/media/platform/Kconfig |1 + drivers/media/platform/Makefile|2 + drivers/media/platform/am437x/Kconfig | 10 + drivers/media/platform/am437x/Makefile |2 + drivers/media/platform/am437x/vpfe.c | 2764 drivers/media/platform/am437x/vpfe.h | 286 ++ drivers/media/platform/am437x/vpfe_regs.h | 140 + include/uapi/linux/Kbuild |1 + include/uapi/linux/am437x_vpfe.h | 122 + 11 files changed, 3398 insertions(+) Can the source names be improved? There are too many 'vpfe' sources. Perhaps prefix all with 'am437x-'? I did think of it but, dropped it as anyway the source's are present in am437x folder, again naming the files am437x-xxx.x didn't make me feel good. If you still insists I'll do it. Yes, please do. If you look at most other drivers they all have a prefix. Another reason is that the media_build system expects unique names. OK makes sense I'll prefix it with 'am437x-'. probably fixing all the review comments i'll post a v2 end of the day. Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Hans, On Mon, Dec 1, 2014 at 11:26 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, On Sunday 30 November 2014 21:30:35 Prabhakar Lad wrote: On Sun, Nov 30, 2014 at 9:16 PM, Laurent Pinchart wrote: On Sunday 30 November 2014 21:05:50 Prabhakar Lad wrote: On Sat, Nov 29, 2014 at 7:12 PM, Laurent Pinchart wrote: Hi Prabhakar, [Snip] Sure. That's a better choice than removing the config option dependency of the fields struct v4l2_subdev. Decoupling CONFIG_VIDEO_V4L2_SUBDEV_API from the availability of the in-kernel pad format and selection rectangles helpers is definitely a good idea. I was thinking about decoupling the try format and rectangles from v4l2_subdev_fh by creating a kind of configuration store structure to store them, and embedding that structure in v4l2_subdev_fh. The pad-level operations would then take a pointer to the configuration store instead of the v4l2_subdev_fh. Bridge drivers that want to implement TRY_FMT based on pad-level operations would create a configuration store, use the pad-level operations, and destroy the configuration store. The userspace subdev API would use the configuration store from the file handle. are planning to work/post any time soon ? Or are you OK with suggestion from Hans ? I have no plan to work on that myself now, I was hoping you could implement it ;-) OK will implement it. Can you please elaborate a more on this The userspace subdev API would use the configuration store from the file handle. Basically, 1. Create a subdev pad configuration store structure to store the formats and selection rectangles for each pad. 2. Embed an instance of that structure in v4l2_subdev_fh. 3. Modify the subdev pad ops to take a configuration store pointer instead of a file handle pointer. The userspace API implementation (v4l2-subdev.c) would then pass fh-store to the pad operations instead of fh. Bridge drivers that need to implement TRY_FMT on top of pad ops would create a temporary store (or temporary stores when multiple subsdevs are involved), call the pad ops with a pointer to the temporary store to propagate TRY formats, destroy the store(s) and return the resulting format. Is that clear ? Yes thank you, I'll soon shoot a RFC version. Regards, --Prabhakar Lad -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Laurent, On Sat, Nov 29, 2014 at 7:12 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, [Snip] Sure. That's a better choice than removing the config option dependency of the fields struct v4l2_subdev. Decoupling CONFIG_VIDEO_V4L2_SUBDEV_API from the availability of the in-kernel pad format and selection rectangles helpers is definitely a good idea. I was thinking about decoupling the try format and rectangles from v4l2_subdev_fh by creating a kind of configuration store structure to store them, and embedding that structure in v4l2_subdev_fh. The pad-level operations would then take a pointer to the configuration store instead of the v4l2_subdev_fh. Bridge drivers that want to implement TRY_FMT based on pad-level operations would create a configuration store, use the pad-level operations, and destroy the configuration store. The userspace subdev API would use the configuration store from the file handle. are planning to work/post any time soon ? Or are you OK with suggestion from Hans ? Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Laurent, On Sun, Nov 30, 2014 at 9:16 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: On Sunday 30 November 2014 21:05:50 Prabhakar Lad wrote: On Sat, Nov 29, 2014 at 7:12 PM, Laurent Pinchart wrote: Hi Prabhakar, [Snip] Sure. That's a better choice than removing the config option dependency of the fields struct v4l2_subdev. Decoupling CONFIG_VIDEO_V4L2_SUBDEV_API from the availability of the in-kernel pad format and selection rectangles helpers is definitely a good idea. I was thinking about decoupling the try format and rectangles from v4l2_subdev_fh by creating a kind of configuration store structure to store them, and embedding that structure in v4l2_subdev_fh. The pad-level operations would then take a pointer to the configuration store instead of the v4l2_subdev_fh. Bridge drivers that want to implement TRY_FMT based on pad-level operations would create a configuration store, use the pad-level operations, and destroy the configuration store. The userspace subdev API would use the configuration store from the file handle. are planning to work/post any time soon ? Or are you OK with suggestion from Hans ? I have no plan to work on that myself now, I was hoping you could implement it ;-) OK will implement it. Can you please elaborate a more on this The userspace subdev API would use the configuration store from the file handle. Thanks, --Prabhakar Lad -- 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
Re: [PATCH v3] media: usb: uvc: use vb2_ops_wait_prepare/finish helper
Hi Laurent, On Sat, Nov 29, 2014 at 6:11 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, On Friday 28 November 2014 17:06:52 Prabhakar Lad wrote: On Thu, Nov 27, 2014 at 9:32 PM, Laurent Pinchart wrote: Hi Prabhakar, [Snip] + queue-queue.lock = queue-mutex; I'm a bit concerned that this would introduce future breakages. Setting the queue.lock pointer enables locking in all vb2_fop_* and vb2_ops_wait_* functions. The uvcvideo driver isn't ready for that, but doesn't use the vb2_fop_* functions yet, so that's not an issue. However, in the future, videobuf2 might use the lock in more places, including functions used by the uvcvideo driver. This could then cause breakages. Even if in future if videobuf2 uses this lock it would be in helpers mostly, so any way it doesn’t harm :) My concern is about vb2 starting using the lock in existing helpers used by the uvcvideo driver. I suppose we can deal with it later. It would be better to completely convert the uvcvideo driver to the vb2_fop_* functions if we want to use vb2_ops_*. I'm not sure how complex that would be though, and whether it would be possible while still keeping the fine-grained locking implemented by the uvcvideo driver. Do you think it should be attempted ? mmap poll should be fairly simple, looks like open release cannot be dropped as it does some usb_autopm_get/put_interface() calls which I am not aware of. I've looked at that, and there's a race condition in vb2_fop_poll() (for which I've already sent a patch) and possible in vb2_mmap() (raised the issue on #v4l today) as well that need to be fixed first. Anyway, for this patch Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Have you tested it by the way ? I have just compile tested it. Should I take it in my tree or will you send a pull request for the whole series ? Probably you can pick this up via your tree. Thanks, --Prabhakar Lad ret = vb2_queue_init(queue-queue); if (ret) return ret; -- Regards, Laurent Pinchart -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Laurent, On Tue, Nov 18, 2014 at 6:07 PM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Hans and Prabhakar, On Tue, Nov 18, 2014 at 10:39:24AM +0100, Hans Verkuil wrote: On 11/17/14 11:41, Lad, Prabhakar wrote: this patch removes the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*() functions. In cases where a subdev using v4l2_subdev_get_try_*() calls internally and the bridge using subdev pad ops which is not MC aware forces to select MEDIA_CONTROLLER, as VIDEO_V4L2_SUBDEV_API is dependent on it. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- include/media/v4l2-subdev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 5860292..076ca11 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -642,7 +642,6 @@ struct v4l2_subdev_fh { #define to_v4l2_subdev_fh(fh) \ container_of(fh, struct v4l2_subdev_fh, vfh) -#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) #define __V4L2_SUBDEV_MK_GET_TRY(rtype, fun_name, field_name) \ static inline struct rtype *\ v4l2_subdev_get_try_##fun_name(struct v4l2_subdev_fh *fh, \ @@ -656,7 +655,6 @@ struct v4l2_subdev_fh { __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, format, try_fmt) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, crop, try_crop) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, compose, try_compose) -#endif extern const struct v4l2_file_operations v4l2_subdev_fops; The problem is that v4l2_subdev_get_try_*() needs a v4l2_subdev_fh which you don't have if CONFIG_VIDEO_V4L2_SUBDEV_API is not defined. So I don't see how removing the guards help with that. What can be done is that if CONFIG_VIDEO_V4L2_SUBDEV_API is not defined, then these functions return NULL. Sure. That's a better choice than removing the config option dependency of the fields struct v4l2_subdev. BTW, one patch I will very happily accept is one where the __V4L2_SUBDEV_MK_GET_TRY is removed and these three try functions are just written as proper static inlines. I find it very obfuscated code. I originally wrote them like that in order to avoid writing essentially the same code three times over. If there will be more targets, the same repeats further, should one write those functions open for all different macro arguments. That's why it was a macro to begin with. In addition, because it is a macro you won't find the function definitions if you grep on the function name. True as well. You could simply change the macro to include the full function name. This was not suggested in review back then AFAIR. But any functional changes here need to be Acked by Laurent first. How do you want me to proceed on this ? Thanks, --Prabhakar Lad -- 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
Re: [PATCH v3] media: usb: uvc: use vb2_ops_wait_prepare/finish helper
Hi Laurent, Thanks for the review. On Thu, Nov 27, 2014 at 9:32 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, [Snip] + queue-queue.lock = queue-mutex; I'm a bit concerned that this would introduce future breakages. Setting the queue.lock pointer enables locking in all vb2_fop_* and vb2_ops_wait_* functions. The uvcvideo driver isn't ready for that, but doesn't use the vb2_fop_* functions yet, so that's not an issue. However, in the future, videobuf2 might use the lock in more places, including functions used by the uvcvideo driver. This could then cause breakages. Even if in future if videobuf2 uses this lock it would be in helpers mostly, so any way it doesn’t harm :) It would be better to completely convert the uvcvideo driver to the vb2_fop_* functions if we want to use vb2_ops_*. I'm not sure how complex that would be though, and whether it would be possible while still keeping the fine-grained locking implemented by the uvcvideo driver. Do you think it should be attempted ? mmap poll should be fairly simple, looks like open release cannot be dropped as it does some usb_autopm_get/put_interface() calls which I am not aware of. Thanks, --Prabhakar Lad ret = vb2_queue_init(queue-queue); if (ret) return ret; -- Regards, Laurent Pinchart -- 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
Re: [PATCH v2 11/11] media: usb: uvc: use vb2_ops_wait_prepare/finish helper
Hi Laurent, Thanks for the review. On Wed, Nov 26, 2014 at 10:59 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, Thank you for the patch. On Wednesday 26 November 2014 22:42:34 Lad, Prabhakar wrote: This patch drops driver specific wait_prepare() and wait_finish() callbacks from vb2_ops and instead uses the the helpers vb2_ops_wait_prepare/finish() provided by the vb2 core, the lock member of the queue needs to be initalized to a mutex so that vb2 helpers vb2_ops_wait_prepare/finish() can make use of it. The queue lock field isn't initialized by the uvcvideo driver, so you can't use vb2_ops_wait_prepare|finish(). Oops not sure what happened here I just took the patch from [1] and added commit message. anyway will post a single patch v3. [1] https://patchwork.kernel.org/patch/5327451/ Thanks, --Prabhakar Lad Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/usb/uvc/uvc_queue.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index cc96072..64147b5 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -143,20 +143,6 @@ static void uvc_buffer_finish(struct vb2_buffer *vb) uvc_video_clock_update(stream, vb-v4l2_buf, buf); } -static void uvc_wait_prepare(struct vb2_queue *vq) -{ - struct uvc_video_queue *queue = vb2_get_drv_priv(vq); - - mutex_unlock(queue-mutex); -} - -static void uvc_wait_finish(struct vb2_queue *vq) -{ - struct uvc_video_queue *queue = vb2_get_drv_priv(vq); - - mutex_lock(queue-mutex); -} - static int uvc_start_streaming(struct vb2_queue *vq, unsigned int count) { struct uvc_video_queue *queue = vb2_get_drv_priv(vq); @@ -195,8 +181,8 @@ static struct vb2_ops uvc_queue_qops = { .buf_prepare = uvc_buffer_prepare, .buf_queue = uvc_buffer_queue, .buf_finish = uvc_buffer_finish, - .wait_prepare = uvc_wait_prepare, - .wait_finish = uvc_wait_finish, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, .start_streaming = uvc_start_streaming, .stop_streaming = uvc_stop_streaming, }; -- Regards, Laurent Pinchart -- 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
Re: [PATCH 6/6] media/platform: fix querycap
Hi Hans, Thanks for the patch. On Mon, Nov 24, 2014 at 9:37 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. In addition, remove the CAPTURE and OUTPUT caps for M2M devices. These were already slated for removal, so it's time to do so. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Kamil Debski k.deb...@samsung.com Cc: Jacek Anaszewski j.anaszew...@samsung.com --- Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad drivers/media/platform/davinci/vpbe_display.c | 1 - drivers/media/platform/davinci/vpfe_capture.c | 4 ++-- drivers/media/platform/s5p-g2d/g2d.c | 10 ++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 9 ++--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 6 ++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++ 6 files changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 78b9ffe..21a5a56 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -639,7 +639,6 @@ static int vpbe_display_querycap(struct file *file, void *priv, struct vpbe_layer *layer = video_drvdata(file); struct vpbe_device *vpbe_dev = layer-disp_dev-vpbe_dev; - cap-version = VPBE_DISPLAY_VERSION_CODE; cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; snprintf(cap-driver, sizeof(cap-driver), %s, diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 3d0e3ae..271c460 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -930,8 +930,8 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); - cap-version = VPFE_CAPTURE_VERSION_CODE; - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index d79e214..51e4edc 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -297,14 +297,8 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, G2D_NAME, sizeof(cap-driver) - 1); strncpy(cap-card, G2D_NAME, sizeof(cap-card) - 1); cap-bus_info[0] = 0; - cap-version = KERNEL_VERSION(1, 0, 0); - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | - V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 6fcc7f0..d6f75b1 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1001,13 +1001,8 @@ static int s5p_jpeg_querycap(struct file *file, void *priv, sizeof(cap-card)); } cap-bus_info[0] = 0; - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M | - V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT; + cap-device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 74bcec8..c6c3452 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -269,15 +269,13 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, dev-plat_dev-name, sizeof(cap-driver) - 1
Re: [PATCH 2/6] staging/media: fix querycap
Hi Hans, Thanks for the patch. On Mon, Nov 24, 2014 at 9:37 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/staging/media/bcm2048/radio-bcm2048.c | 5 +++-- drivers/staging/media/davinci_vpfe/vpfe_video.c | 8 drivers/staging/media/dt3155v4l/dt3155v4l.c | 5 ++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index bdc6854..60a57b2 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2327,9 +2327,10 @@ static int bcm2048_vidioc_querycap(struct file *file, void *priv, strlcpy(capability-card, BCM2048_DRIVER_CARD, sizeof(capability-card)); snprintf(capability-bus_info, 32, I2C: 0x%X, bdev-client-addr); - capability-version = BCM2048_DRIVER_VERSION; - capability-capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO | + capability-device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_HW_FREQ_SEEK; + capability-capabilities = capability-device_caps | + V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 6f9171c..06d48d5 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -600,11 +600,11 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); if (video-type == V4L2_BUF_TYPE_VIDEO_CAPTURE) - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; else - cap-capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; - cap-device_caps = cap-capabilities; - cap-version = VPFE_CAPTURE_VERSION_CODE; + cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; + cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | + V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 4058022..293ffda 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -512,10 +512,9 @@ dt3155_ioc_querycap(struct file *filp, void *p, struct v4l2_capability *cap) strcpy(cap-driver, DT3155_NAME); strcpy(cap-card, DT3155_NAME frame grabber); sprintf(cap-bus_info, PCI:%s, pci_name(pd-pdev)); - cap-version = - KERNEL_VERSION(DT3155_VER_MAJ, DT3155_VER_MIN, DT3155_VER_EXT); - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | DT3155_CAPTURE_METHOD; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } -- 2.1.3 -- 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
Re: [PATCH] media: exynos-gsc: fix build warning
Hi Mauro, On Tue, Nov 25, 2014 at 3:04 PM, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: Em Tue, 18 Nov 2014 10:57:48 + [Snip] -static u32 get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index) +static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) { if (frm-addr.y == addr) { *index = 0; - return frm-addr.y; + *ret_addr = frm-addr.y; } else if (frm-addr.cb == addr) { *index = 1; - return frm-addr.cb; + *ret_addr = frm-addr.cb; } else if (frm-addr.cr == addr) { *index = 2; - return frm-addr.cr; + *ret_addr = frm-addr.cr; } else { pr_err(Plane address is wrong); return -EINVAL; } + return 0; the control wont reach here! may be you can remove the complete else part outside ? with that change, Reported-by: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad } void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) @@ -352,9 +353,11 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); - low_addr = get_plane_info(frm, t_min, low_plane); + if (get_plane_info(frm, t_min, low_plane, low_addr)) + return; t_max = max3(frm-addr.y, frm-addr.cb, frm-addr.cr); - high_addr = get_plane_info(frm, t_max, high_plane); + if (get_plane_info(frm, t_max, high_plane, high_addr)) + return; mid_plane = 3 - (low_plane + high_plane); if (mid_plane == 0) -- 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
Re: [PATCH] media: exynos-gsc: fix build warning
Hi, On Tue, Nov 25, 2014 at 3:18 PM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Mauro, On Tue, Nov 25, 2014 at 3:04 PM, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: Em Tue, 18 Nov 2014 10:57:48 + [Snip] -static u32 get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index) +static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) { if (frm-addr.y == addr) { *index = 0; - return frm-addr.y; + *ret_addr = frm-addr.y; } else if (frm-addr.cb == addr) { *index = 1; - return frm-addr.cb; + *ret_addr = frm-addr.cb; } else if (frm-addr.cr == addr) { *index = 2; - return frm-addr.cr; + *ret_addr = frm-addr.cr; } else { pr_err(Plane address is wrong); return -EINVAL; } + return 0; the control wont reach here! may be you can remove the complete else part outside ? Ah my bad :(, I missread 'ret_addr' to return. Thanks, --Prabhakar Lad with that change, Reported-by: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad } void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) @@ -352,9 +353,11 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); - low_addr = get_plane_info(frm, t_min, low_plane); + if (get_plane_info(frm, t_min, low_plane, low_addr)) + return; t_max = max3(frm-addr.y, frm-addr.cb, frm-addr.cr); - high_addr = get_plane_info(frm, t_max, high_plane); + if (get_plane_info(frm, t_max, high_plane, high_addr)) + return; mid_plane = 3 - (low_plane + high_plane); if (mid_plane == 0) -- 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
Re: [PATCH v2 0/4] VPE improvements
Hi Nikhil, On Fri, Nov 14, 2014 at 11:20 AM, Nikhil Devshatwar nikhil...@ti.com wrote: This patchset adds following improvements for the ti-vpe driver. * Support SEQ_TB format for interlaced buffers Some of the video decoders generate interlaced content in SEQ_TB format Y top, T bottom in one plane and UV top, UV bottom in another * Improve multi instance latency Improve m2m job scheduling in multi instance use cases Start processing even if all buffers aren't present * N frame de-interlace support For N input fields, generate N progressive frames While you are at it can you test the following 2 patches ? (had CCed to Archit but the mail bounced back) https://patchwork.kernel.org/patch/5328481/ https://patchwork.kernel.org/patch/5327801/ Thanks, --Prabhakar Lad -- 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
Re: [PATCH 06/12] media: marvell-ccic: use vb2_ops_wait_prepare/finish helper
Hi Jonathan, On Tue, Nov 18, 2014 at 1:03 PM, Jonathan Corbet cor...@lwn.net wrote: On Tue, 18 Nov 2014 11:23:35 + Lad, Prabhakar prabhakar.cse...@gmail.com wrote: drivers/media/platform/marvell-ccic/mcam-core.c | 29 + 1 file changed, 5 insertions(+), 24 deletions(-) So I'm not convinced that this patch improves things; it moves a tiny bit of code into another file where anybody reading the driver will have to go look to see what's going on. But I guess it doesn't really make things worse either; I won't try to stand in its way. It would be nice to see a real changelog on the patch, though. Sorry there is no movement of code to other file. And I dont see any reason why anybody reading will go haywire its a standard v4l2 thing. The subject explains it all, If you still want me to elaborate I can post a v2. Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Hans, On Tue, Nov 18, 2014 at 9:39 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 11/17/14 11:41, Lad, Prabhakar wrote: this patch removes the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*() functions. In cases where a subdev using v4l2_subdev_get_try_*() calls internally and the bridge using subdev pad ops which is not MC aware forces to select MEDIA_CONTROLLER, as VIDEO_V4L2_SUBDEV_API is dependent on it. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- include/media/v4l2-subdev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 5860292..076ca11 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -642,7 +642,6 @@ struct v4l2_subdev_fh { #define to_v4l2_subdev_fh(fh)\ container_of(fh, struct v4l2_subdev_fh, vfh) -#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) #define __V4L2_SUBDEV_MK_GET_TRY(rtype, fun_name, field_name) \ static inline struct rtype *\ v4l2_subdev_get_try_##fun_name(struct v4l2_subdev_fh *fh, \ @@ -656,7 +655,6 @@ struct v4l2_subdev_fh { __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, format, try_fmt) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, crop, try_crop) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, compose, try_compose) -#endif extern const struct v4l2_file_operations v4l2_subdev_fops; The problem is that v4l2_subdev_get_try_*() needs a v4l2_subdev_fh which you don't have if CONFIG_VIDEO_V4L2_SUBDEV_API is not defined. So I don't see how removing the guards help with that. Yes What can be done is that if CONFIG_VIDEO_V4L2_SUBDEV_API is not defined, then these functions return NULL. exactly. BTW, one patch I will very happily accept is one where the __V4L2_SUBDEV_MK_GET_TRY is removed and these three try functions are just written as proper static inlines. I find it very obfuscated code. the functions were initially inline itself which were changes into macro's later. In addition, because it is a macro you won't find the function definitions if you grep on the function name. But any functional changes here need to be Acked by Laurent first. Yes, ill probably wait until Laurent is back from his holidays. Thanks, --Prabhakar Lad -- 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
Re: [PATCH] media: v4l2-subdev.h: drop the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*()
Hi Sakari, On Mon, Nov 17, 2014 at 10:53 AM, Sakari Ailus sakari.ai...@linux.intel.com wrote: Hi Prabhakar, Thank you for the patch. Lad, Prabhakar wrote: this patch removes the guard CONFIG_VIDEO_V4L2_SUBDEV_API for v4l2_subdev_get_try_*() functions. In cases where a subdev using v4l2_subdev_get_try_*() calls internally and the bridge using subdev pad ops which is not MC aware forces to select MEDIA_CONTROLLER, as VIDEO_V4L2_SUBDEV_API is dependent on it. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- include/media/v4l2-subdev.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 5860292..076ca11 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -642,7 +642,6 @@ struct v4l2_subdev_fh { #define to_v4l2_subdev_fh(fh) \ container_of(fh, struct v4l2_subdev_fh, vfh) -#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) Wouldn't you need to drop these from struct v4l2_subdev_fh as well? The code won't compile if the fields aren't there. Ah missed it, thanks for the catch! Thanks, --Prabhakar Lad #define __V4L2_SUBDEV_MK_GET_TRY(rtype, fun_name, field_name) \ static inline struct rtype *\ v4l2_subdev_get_try_##fun_name(struct v4l2_subdev_fh *fh, \ @@ -656,7 +655,6 @@ struct v4l2_subdev_fh { __V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, format, try_fmt) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, crop, try_crop) __V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, compose, try_compose) -#endif extern const struct v4l2_file_operations v4l2_subdev_fops; -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com -- 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
Re: [PATCH v3 08/10] staging: media: Make use of MEDIA_BUS_FMT_ definitions
On Fri, Nov 7, 2014 at 2:07 PM, Boris Brezillon boris.brezil...@free-electrons.com wrote: In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all media drivers residing in staging. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 18 ++-- .../staging/media/davinci_vpfe/dm365_ipipe_hw.c| 26 +++--- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 100 ++--- drivers/staging/media/davinci_vpfe/dm365_isif.c| 90 +-- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 98 ++-- .../staging/media/davinci_vpfe/vpfe_mc_capture.c | 18 ++-- For all the above Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad drivers/staging/media/omap4iss/iss_csi2.c | 62 ++--- drivers/staging/media/omap4iss/iss_ipipe.c | 16 ++-- drivers/staging/media/omap4iss/iss_ipipeif.c | 28 +++--- drivers/staging/media/omap4iss/iss_resizer.c | 26 +++--- drivers/staging/media/omap4iss/iss_video.c | 78 drivers/staging/media/omap4iss/iss_video.h | 10 +-- 12 files changed, 285 insertions(+), 285 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index bdc7f00..704fa20 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -37,15 +37,15 @@ /* ipipe input format's */ static const unsigned int ipipe_input_fmts[] = { - V4L2_MBUS_FMT_UYVY8_2X8, - V4L2_MBUS_FMT_SGRBG12_1X12, - V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8, - V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8, + MEDIA_BUS_FMT_UYVY8_2X8, + MEDIA_BUS_FMT_SGRBG12_1X12, + MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, + MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, }; /* ipipe output format's */ static const unsigned int ipipe_output_fmts[] = { - V4L2_MBUS_FMT_UYVY8_2X8, + MEDIA_BUS_FMT_UYVY8_2X8, }; static int ipipe_validate_lutdpc_params(struct vpfe_ipipe_lutdpc *lutdpc) @@ -1457,7 +1457,7 @@ ipipe_try_format(struct vpfe_ipipe_device *ipipe, /* If not found, use SBGGR10 as default */ if (i = ARRAY_SIZE(ipipe_input_fmts)) - fmt-code = V4L2_MBUS_FMT_SGRBG12_1X12; + fmt-code = MEDIA_BUS_FMT_SGRBG12_1X12; } else if (pad == IPIPE_PAD_SOURCE) { for (i = 0; i ARRAY_SIZE(ipipe_output_fmts); i++) if (fmt-code == ipipe_output_fmts[i]) @@ -1465,7 +1465,7 @@ ipipe_try_format(struct vpfe_ipipe_device *ipipe, /* If not found, use UYVY as default */ if (i = ARRAY_SIZE(ipipe_output_fmts)) - fmt-code = V4L2_MBUS_FMT_UYVY8_2X8; + fmt-code = MEDIA_BUS_FMT_UYVY8_2X8; } fmt-width = clamp_t(u32, fmt-width, MIN_OUT_HEIGHT, max_out_width); @@ -1642,7 +1642,7 @@ ipipe_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) memset(format, 0, sizeof(format)); format.pad = IPIPE_PAD_SINK; format.which = fh ? V4L2_SUBDEV_FORMAT_TRY : V4L2_SUBDEV_FORMAT_ACTIVE; - format.format.code = V4L2_MBUS_FMT_SGRBG12_1X12; + format.format.code = MEDIA_BUS_FMT_SGRBG12_1X12; format.format.width = IPIPE_MAX_OUTPUT_WIDTH_A; format.format.height = IPIPE_MAX_OUTPUT_HEIGHT_A; ipipe_set_format(sd, fh, format); @@ -1650,7 +1650,7 @@ ipipe_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) memset(format, 0, sizeof(format)); format.pad = IPIPE_PAD_SOURCE; format.which = fh ? V4L2_SUBDEV_FORMAT_TRY : V4L2_SUBDEV_FORMAT_ACTIVE; - format.format.code = V4L2_MBUS_FMT_UYVY8_2X8; + format.format.code = MEDIA_BUS_FMT_UYVY8_2X8; format.format.width = IPIPE_MAX_OUTPUT_WIDTH_A; format.format.height = IPIPE_MAX_OUTPUT_HEIGHT_A; ipipe_set_format(sd, fh, format); diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index b2daf5e..6461de1 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c @@ -196,12 +196,12 @@ ipipe_setup_resizer(void *__iomem rsz_base, struct resizer_params *params) rsz_set_rsz_regs(rsz_base, RSZ_B, params); } -static u32 ipipe_get_color_pat(enum v4l2_mbus_pixelcode pix) +static u32 ipipe_get_color_pat(u32 pix) { switch (pix) { - case V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8: - case V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8: - case
Re: [PATCH v3 06/10] [media] platform: Make use of media_bus_format enum
Hi, Thanks for the patch, On Fri, Nov 7, 2014 at 2:07 PM, Boris Brezillon boris.brezil...@free-electrons.com wrote: In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- arch/arm/mach-davinci/board-dm355-evm.c| 2 +- arch/arm/mach-davinci/board-dm365-evm.c| 4 +- arch/arm/mach-davinci/dm355.c | 7 +- arch/arm/mach-davinci/dm365.c | 7 +- @Sekhar can you ack for the machine changes for davinci ? [Snip] drivers/media/platform/davinci/vpbe.c | 2 +- drivers/media/platform/davinci/vpfe_capture.c | 4 +- [snip] include/media/davinci/vpbe.h | 2 +- include/media/davinci/vpbe_venc.h | 5 +- For all the above. Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad -- 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
Re: [PATCH v3 04/10] [media] i2c: Make use of media_bus_format enum
On Fri, Nov 7, 2014 at 2:07 PM, Boris Brezillon boris.brezil...@free-electrons.com wrote: In order to have subsytem agnostic media bus format definitions we've moved media bus definitions to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Replace all references to the old definitions in i2c drivers. Signed-off-by: Boris Brezillon boris.brezil...@free-electrons.com --- [Snip] drivers/media/i2c/mt9p031.c | 8 ++-- [Snip] drivers/media/i2c/tvp514x.c | 12 +++--- drivers/media/i2c/tvp7002.c | 10 ++--- For all the above, Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad drivers/media/i2c/vs6624.c| 18 46 files changed, 382 insertions(+), 382 deletions(-) diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c index 04bb297..40a1a95 100644 --- a/drivers/media/i2c/adv7170.c +++ b/drivers/media/i2c/adv7170.c @@ -63,9 +63,9 @@ static inline struct adv7170 *to_adv7170(struct v4l2_subdev *sd) static char *inputs[] = { pass_through, play_back }; -static enum v4l2_mbus_pixelcode adv7170_codes[] = { - V4L2_MBUS_FMT_UYVY8_2X8, - V4L2_MBUS_FMT_UYVY8_1X16, +static u32 adv7170_codes[] = { + MEDIA_BUS_FMT_UYVY8_2X8, + MEDIA_BUS_FMT_UYVY8_1X16, }; /* --- */ @@ -263,7 +263,7 @@ static int adv7170_s_routing(struct v4l2_subdev *sd, } static int adv7170_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - enum v4l2_mbus_pixelcode *code) + u32 *code) { if (index = ARRAY_SIZE(adv7170_codes)) return -EINVAL; @@ -278,9 +278,9 @@ static int adv7170_g_fmt(struct v4l2_subdev *sd, u8 val = adv7170_read(sd, 0x7); if ((val 0x40) == (1 6)) - mf-code = V4L2_MBUS_FMT_UYVY8_1X16; + mf-code = MEDIA_BUS_FMT_UYVY8_1X16; else - mf-code = V4L2_MBUS_FMT_UYVY8_2X8; + mf-code = MEDIA_BUS_FMT_UYVY8_2X8; mf-colorspace = V4L2_COLORSPACE_SMPTE170M; mf-width = 0; @@ -297,11 +297,11 @@ static int adv7170_s_fmt(struct v4l2_subdev *sd, int ret; switch (mf-code) { - case V4L2_MBUS_FMT_UYVY8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: val = ~0x40; break; - case V4L2_MBUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_UYVY8_1X16: val |= 0x40; break; diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c index b88f3b3..d220af5 100644 --- a/drivers/media/i2c/adv7175.c +++ b/drivers/media/i2c/adv7175.c @@ -60,9 +60,9 @@ static inline struct adv7175 *to_adv7175(struct v4l2_subdev *sd) static char *inputs[] = { pass_through, play_back, color_bar }; -static enum v4l2_mbus_pixelcode adv7175_codes[] = { - V4L2_MBUS_FMT_UYVY8_2X8, - V4L2_MBUS_FMT_UYVY8_1X16, +static u32 adv7175_codes[] = { + MEDIA_BUS_FMT_UYVY8_2X8, + MEDIA_BUS_FMT_UYVY8_1X16, }; /* --- */ @@ -301,7 +301,7 @@ static int adv7175_s_routing(struct v4l2_subdev *sd, } static int adv7175_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - enum v4l2_mbus_pixelcode *code) + u32 *code) { if (index = ARRAY_SIZE(adv7175_codes)) return -EINVAL; @@ -316,9 +316,9 @@ static int adv7175_g_fmt(struct v4l2_subdev *sd, u8 val = adv7175_read(sd, 0x7); if ((val 0x40) == (1 6)) - mf-code = V4L2_MBUS_FMT_UYVY8_1X16; + mf-code = MEDIA_BUS_FMT_UYVY8_1X16; else - mf-code = V4L2_MBUS_FMT_UYVY8_2X8; + mf-code = MEDIA_BUS_FMT_UYVY8_2X8; mf-colorspace = V4L2_COLORSPACE_SMPTE170M; mf-width = 0; @@ -335,11 +335,11 @@ static int adv7175_s_fmt(struct v4l2_subdev *sd, int ret; switch (mf-code) { - case V4L2_MBUS_FMT_UYVY8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: val = ~0x40; break; - case V4L2_MBUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_UYVY8_1X16: val |= 0x40; break; diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 821178d..bffe6eb 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -422,12 +422,12 @@ static void adv7180_exit_controls(struct adv7180_state *state) } static int adv7180_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned int index, -enum v4l2_mbus_pixelcode *code) +u32 *code) { if (index 0) return -EINVAL
Re: [PATCH] media: davinci: vpbe: missing clk_put
Hi, Thanks for the patch! On Thu, Nov 6, 2014 at 1:04 PM, Sudip Mukherjee sudipm.mukher...@gmail.com wrote: we are getting struct clk using clk_get before calling clk_prepare_enable. but if clk_prepare_enable fails, then we are jumping to fail_mutex_unlock where we are just unlocking the mutex, but we are not freeing the clock source. this patch just adds a call to clk_put before jumping to fail_mutex_unlock. Signed-off-by: Sudip Mukherjee su...@vectorindia.org Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar --- drivers/media/platform/davinci/vpbe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 49d2de0..e5df991 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -625,6 +625,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) } if (clk_prepare_enable(vpbe_dev-dac_clk)) { ret = -ENODEV; + clk_put(vpbe_dev-dac_clk); goto fail_mutex_unlock; } } -- 1.8.1.2 -- 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
Re: [PATCH 10/15] media: davinci: vpbe: add support for VIDIOC_CREATE_BUFS
Hi Hans, On Wed, Oct 22, 2014 at 12:26 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, This patch series looks good, except for this one. If you add create_bufs support, then you should also update queue_setup. If the fmt argument to queue_setup is non-NULL, then check that the fmt.pix.sizeimage field is = the current format's sizeimage. If not, return -EINVAL. This prevents userspace from creating additional buffers that are smaller than the minimum required size. I'm just skipping this patch and queuing all the others for 3.19. Just post an updated version for this one and I'll pick it up later. I fixed it and posted the patch. To avoid conflicts I have rebased the patch on for-v3.19a branch of your tree. Thanks, --Prabhakar Lad -- 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
Re: [patch] [media] davinci: remove an unneeded check
Hi Dan, Thanks for the patch! On Mon, Sep 22, 2014 at 9:00 AM, Dan Carpenter dan.carpen...@oracle.com wrote: We don't need to check ret, we know it's zero. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index c557eb5..3eb6e4b 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -442,11 +442,10 @@ static int vpfe_config_image_format(struct vpfe_device *vpfe_dev, return ret; /* Update the values of sizeimage and bytesperline */ - if (!ret) { - pix-bytesperline = ccdc_dev-hw_ops.get_line_length(); - pix-sizeimage = pix-bytesperline * pix-height; - } - return ret; + pix-bytesperline = ccdc_dev-hw_ops.get_line_length(); + pix-sizeimage = pix-bytesperline * pix-height; + + return 0; } static int vpfe_initialize_device(struct vpfe_device *vpfe_dev) -- 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
Re: [PATCH 3/3] [media] vpif: Fix compilation with allmodconfig
On Tue, Sep 9, 2014 at 3:38 PM, Mauro Carvalho Chehab m.che...@samsung.com wrote: When vpif is compiled as module, those errors happen: ERROR: vpif_lock [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: vpif_lock [drivers/media/platform/davinci/vpif_capture.ko] undefined! That's because vpif_lock symbol is not exported. Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad Reported-by: Stephen Rothwell s...@canb.auug.org.au Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index cd08e5248387..3dad5bd7fe0a 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -38,6 +38,7 @@ MODULE_LICENSE(GPL); #define VPIF_CH3_MAX_MODES 2 spinlock_t vpif_lock; +EXPORT_SYMBOL_GPL(vpif_lock); void __iomem *vpif_base; EXPORT_SYMBOL_GPL(vpif_base); -- 1.9.3 -- 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
Re: [PATCH 39/46] [media] davinci: just return 0 instead of using a var
On Wed, Sep 3, 2014 at 9:33 PM, Mauro Carvalho Chehab m.che...@samsung.com wrote: Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index ed9dd27e3c63..c557eb5ebf6b 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -943,12 +943,11 @@ static int vpfe_g_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *fmt) { struct vpfe_device *vpfe_dev = video_drvdata(file); - int ret = 0; v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_g_fmt_vid_cap\n); /* Fill in the information about format */ *fmt = vpfe_dev-fmt; - return ret; + return 0; } static int vpfe_enum_fmt_vid_cap(struct file *file, void *priv, -- 1.9.3 -- 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
Re: [PATCH] [media] tvp7002: Don't update device-streaming if write to register fails
Hi Axel, Thanks for the patch! On Sat, Aug 16, 2014 at 7:57 AM, Axel Lin axel@ingics.com wrote: This ensures device-streaming has correct status. Signed-off-by: Axel Lin axel@ingics.com Acked-By: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/media/i2c/tvp7002.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 11f2387..51bac76 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -775,25 +775,20 @@ static int tvp7002_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index, static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable) { struct tvp7002 *device = to_tvp7002(sd); - int error = 0; + int error; if (device-streaming == enable) return 0; - if (enable) { - /* Set output state on (low impedance means stream on) */ - error = tvp7002_write(sd, TVP7002_MISC_CTL_2, 0x00); - device-streaming = enable; - } else { - /* Set output state off (high impedance means stream off) */ - error = tvp7002_write(sd, TVP7002_MISC_CTL_2, 0x03); - if (error) - v4l2_dbg(1, debug, sd, Unable to stop streaming\n); - - device-streaming = enable; + /* low impedance: on, high impedance: off */ + error = tvp7002_write(sd, TVP7002_MISC_CTL_2, enable ? 0x00 : 0x03); + if (error) { + v4l2_dbg(1, debug, sd, Fail to set streaming\n); + return error; } - return error; + device-streaming = enable; + return 0; } /* -- 1.9.1 -- 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
Re: [PATCH] drivers: media: platform: Makefile: Add build dependency for davinci/
Hi Andreas, On Fri, Aug 15, 2014 at 6:10 PM, Andreas Ruprecht rup...@einserver.de wrote: In the davinci/ subdirectory, all drivers but one depend on CONFIG_ARCH_DAVINCI. The only exception, selected by CONFIG_VIDEO_DM6446_CCDC, is also available on CONFIG_ARCH_OMAP3. Thus, it is not necessary to always descend into davinci/. It is sufficient to do this only if CONFIG_ARCH_OMAP3 or CONFIG_ARCH_DAVINCI is selected. While the latter is already present, this patch changes the dependency from obj-y to obj-$(CONFIG_ARCH_OMAP3). I have submitted a proper fix [1], so NACK. [1] https://patchwork.kernel.org/patch/4730111/ Regards, --Prabhakar Lad Signed-off-by: Andreas Ruprecht rup...@einserver.de --- drivers/media/platform/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile index e5269da..d32e79a 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -47,7 +47,7 @@ obj-$(CONFIG_SOC_CAMERA) += soc_camera/ obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1/ -obj-y += davinci/ +obj-$(CONFIG_ARCH_OMAP3) += davinci/ obj-$(CONFIG_ARCH_OMAP)+= omap/ -- 1.9.1 -- 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 -- 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
Re: [PATCH] [media] saa6752hs: Convert to devm_kzalloc()
On Sun, Aug 10, 2014 at 10:41 AM, Axel Lin axel@ingics.com wrote: Using the managed function the kfree() calls can be removed from the probe error path and the remove handler. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad --- drivers/media/i2c/saa6752hs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/saa6752hs.c b/drivers/media/i2c/saa6752hs.c index 04e9e55..4024ea6 100644 --- a/drivers/media/i2c/saa6752hs.c +++ b/drivers/media/i2c/saa6752hs.c @@ -660,7 +660,7 @@ static const struct v4l2_subdev_ops saa6752hs_ops = { static int saa6752hs_probe(struct i2c_client *client, const struct i2c_device_id *id) { - struct saa6752hs_state *h = kzalloc(sizeof(*h), GFP_KERNEL); + struct saa6752hs_state *h; struct v4l2_subdev *sd; struct v4l2_ctrl_handler *hdl; u8 addr = 0x13; @@ -668,6 +668,8 @@ static int saa6752hs_probe(struct i2c_client *client, v4l_info(client, chip found @ 0x%x (%s)\n, client-addr 1, client-adapter-name); + + h = devm_kzalloc(client-dev, sizeof(*h), GFP_KERNEL); if (h == NULL) return -ENOMEM; sd = h-sd; @@ -752,7 +754,6 @@ static int saa6752hs_probe(struct i2c_client *client, int err = hdl-error; v4l2_ctrl_handler_free(hdl); - kfree(h); return err; } v4l2_ctrl_cluster(3, h-video_bitrate_mode); @@ -767,7 +768,6 @@ static int saa6752hs_remove(struct i2c_client *client) v4l2_device_unregister_subdev(sd); v4l2_ctrl_handler_free(to_state(sd)-hdl); - kfree(to_state(sd)); return 0; } -- 1.9.1 -- 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
Re: [RFC/PATCH 0/5] Add Video Processing Front End Support
On Tue, Jul 15, 2014 at 6:56 PM, Felipe Balbi ba...@ti.com wrote: Hi all, the following patches add suport for AM43xx's Video Processing Front End (VPFE). Full documentation is available at [1] chapter 14. This driver has been tested with linux-next from yesterday, plus my (already queued) am437x starter kit patches, plus these patches, plus the sensor driver which, saddly enough, we're not allowed to release :-( This driver has almost full v4l2-compliance with only 2 failures (I'll take hints on how to properly fix them) as below: fail: v4l2-compliance.cpp(419): !doioctl(node2, VIDIOC_S_PRIORITY, prio) test VIDIOC_G/S_PRIORITY: FAIL fail: v4l2-test-formats.cpp(319): pixelformat != V4L2_PIX_FMT_JPEG colorspace == V4L2_COLORSPACE_JPEG fail: v4l2-test-formats.cpp(418): testColorspace(pix.pixelformat, pix.colorspace) test VIDIOC_G_FMT: FAIL I have also tested with gst-launch using fbdevsink and I can see my ugly mug just fine. Please give this a thorough review and let me know of any problems which need to be sorted out and I'll try to help out as time allows. cheers [1] http://www.ti.com/lit/pdf/spruhl7 Benoit Parrot (4): Media: platform: Add ti-vpfe driver for AM437x device arm: omap: hwmod: add hwmod entries for AM437x VPFE arm: boot: dts: am4372: add vpfe DTS entries arm: dts: am43x-epos: Add VPFE DTS entries Darren Etheridge (1): ARM: dts: am437x-sk-evm: add vpfe support and ov2659 sensor arch/arm/boot/dts/am4372.dtsi | 16 + arch/arm/boot/dts/am437x-sk-evm.dts | 63 + arch/arm/boot/dts/am43x-epos-evm.dts | 54 + arch/arm/mach-omap2/omap_hwmod_43xx_data.c| 56 + arch/arm/mach-omap2/prcm43xx.h|3 +- drivers/media/platform/Kconfig|1 + drivers/media/platform/Makefile |2 + drivers/media/platform/ti-vpfe/Kconfig| 12 + drivers/media/platform/ti-vpfe/Makefile |2 + drivers/media/platform/ti-vpfe/am437x_isif.c | 1053 + drivers/media/platform/ti-vpfe/am437x_isif.h | 355 +++ drivers/media/platform/ti-vpfe/am437x_isif_regs.h | 144 ++ drivers/media/platform/ti-vpfe/vpfe_capture.c | 2478 + drivers/media/platform/ti-vpfe/vpfe_capture.h | 263 +++ 14 files changed, 4501 insertions(+), 1 deletion(-) Missing documentation for DT ? Thanks, --Prabhakar Lad create mode 100644 drivers/media/platform/ti-vpfe/Kconfig create mode 100644 drivers/media/platform/ti-vpfe/Makefile create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif.c create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif.h create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif_regs.h create mode 100644 drivers/media/platform/ti-vpfe/vpfe_capture.c create mode 100644 drivers/media/platform/ti-vpfe/vpfe_capture.h -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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
Re: davinci compiler warnings
Hi Hans On Thu, Jul 17, 2014 at 8:41 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Can you take a look at these new warnings? I've just upgraded my compiler for the daily build to 4.9.1, so that's probably why they weren't seen before. Ok will look at it. BTW are these errors from the media/master branch or from your tree ? Thanks, --Prabhakar Lad Regards, Hans /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop for (i = 0; i VPIF_DISPLAY_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop for (i = 0; i VPIF_CAPTURE_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript is above array bounds [-Warray-bounds] common = ch-common[i]; ^ -- 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
Re: [PATCH] [media] davinci-vpfe: Fix retcode check
Hi Andrey, Thanks for the patch! On Tue, Jul 8, 2014 at 3:58 PM, Andrey Utkin andrey.krieger.ut...@gmail.com wrote: 2014-07-08 17:32 GMT+03:00 Levente Kurusa lkur...@redhat.com: Hmm, while it is true that get_ipipe_mode returns an int, but the consequent call to regw_ip takes an u32 as its second argument. Did it cause a build warning for you? (Can't really check since I don't have ARM cross compilers close-by) If not, then: Cannot say for sure would compiler complain. I also haven't really checked it, and unfortunately even haven't succeeded to make a config that would build that code. But i believe that warning is still better than misbehaviour. It wont cause any compile warning. Applied for v3.17 Thanks, --Prabhakar Lad -- 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
Re: [patch v2] [media] davinci: vpif: missing unlocks on error
Hi Hans, On Mon, Jun 16, 2014 at 10:48 AM, Hans Verkuil hverk...@xs4all.nl wrote: Prabhakar, Are you going to make a pull request for this, or shall I take it? Should it be applied to 3.16? As this is not a critical bug, I was planning to wait for v3.17 as v3.16 is almost closed. Regards, --Prabhakar Lad Regards, Hans On 06/13/2014 08:13 PM, Prabhakar Lad wrote: On Thu, Jun 12, 2014 at 8:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com Applied! Thanks, --Prabhakar Lad --- v2: move the unlock so the list_for_each_entry_safe() loop is protected diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a7ed164..1e4ec69 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -269,6 +269,7 @@ err: list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); } + spin_unlock_irqrestore(common-irqlock, flags); return ret; } diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 5bb085b..b431b58 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -233,6 +233,7 @@ err: list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); } + spin_unlock_irqrestore(common-irqlock, flags); return ret; } -- 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 -- 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
Re: [patch v2] [media] davinci: vpif: missing unlocks on error
On Thu, Jun 12, 2014 at 8:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com Applied! Thanks, --Prabhakar Lad --- v2: move the unlock so the list_for_each_entry_safe() loop is protected diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a7ed164..1e4ec69 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -269,6 +269,7 @@ err: list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); } + spin_unlock_irqrestore(common-irqlock, flags); return ret; } diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 5bb085b..b431b58 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -233,6 +233,7 @@ err: list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); } + spin_unlock_irqrestore(common-irqlock, flags); return ret; } -- 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
Re: [PATCH v3.1 2/4] smiapp: Add driver-specific test pattern menu item definitions
On Wed, Jun 11, 2014 at 7:36 AM, Sakari Ailus sakari.ai...@linux.intel.com wrote: Add numeric definitions for menu items used in the smiapp driver's test pattern menu. Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- since v3: - Add Kbuild entry for the header include/uapi/linux/Kbuild | 1 + include/uapi/linux/smiapp.h | 29 + 2 files changed, 30 insertions(+) create mode 100644 include/uapi/linux/smiapp.h diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 6929571..a3ee163 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -352,6 +352,7 @@ header-y += serio.h header-y += shm.h header-y += signal.h header-y += signalfd.h +header-y += smiapp.h header-y += snmp.h header-y += sock_diag.h header-y += socket.h diff --git a/include/uapi/linux/smiapp.h b/include/uapi/linux/smiapp.h new file mode 100644 index 000..53938f4 --- /dev/null +++ b/include/uapi/linux/smiapp.h @@ -0,0 +1,29 @@ +/* + * include/uapi/linux/smiapp.h + * + * Generic driver for SMIA/SMIA++ compliant camera modules + * + * Copyright (C) 2014 Intel Corporation + * Contact: Sakari Ailus sakari.ai...@iki.fi + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#ifndef __UAPI_LINUX_SMIAPP_H_ +#define __UAPI_LINUX_SMIAPP_H_ + +#define V4L2_SMIAPP_TEST_PATTERN_MODE_DISABLED 0 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_SOLID_COLOUR 1 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS 2 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS_GREY 3 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_PN9 4 + +#endif /* __UAPI_LINUX_SMIAPP_H_ */ -- 1.8.3.2 -- 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
Re: [patch] [media] davinci: vpif: missing unlocks on error
Hi Dan, Thanks for the patch. On Wed, Jun 11, 2014 at 8:31 AM, Dan Carpenter dan.carpen...@oracle.com wrote: We recently changed some locking around so we need some new unlocks on the error paths. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Please review this one carefully. I don't know if the unlock should go before or after the list_for_each_entry_safe() loop. Yes the unlock should go after the list_for_each_entry_safe() loop please respin another version fixing it. Thanks, --Prabhakar Lad diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a7ed164..2c08fbd 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -265,6 +265,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) return 0; err: + spin_unlock_irqrestore(common-irqlock, flags); + list_for_each_entry_safe(buf, tmp, common-dma_queue, list) { list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 5bb085b..b7b2bdf 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -229,6 +229,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) return 0; err: + spin_unlock_irqrestore(common-irqlock, flags); + list_for_each_entry_safe(buf, tmp, common-dma_queue, list) { list_del(buf-list); vb2_buffer_done(buf-vb, VB2_BUF_STATE_QUEUED); -- 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
Re: [patch] [media] davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK
Hi Dan, Thanks for the patch. On Mon, Jun 9, 2014 at 4:10 PM, Dan Carpenter dan.carpen...@oracle.com wrote: The RSZ_LPF_INT_MASK define is cut and pasted twice so we can remove the second instance. Applied. Regards, --Prabhakar Lad Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h index 010fdb2..81176fb 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h @@ -479,7 +479,6 @@ #define RSZ_TYP_Y_SHIFT0 #define RSZ_TYP_C_SHIFT1 #define RSZ_LPF_INT_MASK 0x3f -#define RSZ_LPF_INT_MASK 0x3f #define RSZ_LPF_INT_C_SHIFT6 #define RSZ_H_PHS_MASK 0x3fff #define RSZ_H_DIF_MASK 0x3fff -- 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 -- 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
Re: [PATCH v3 2/3] smiapp: Add driver-specific test pattern menu item definitions
Hi Sakari, On Thu, May 29, 2014 at 3:40 PM, Sakari Ailus sakari.ai...@linux.intel.com wrote: Add numeric definitions for menu items used in the smiapp driver's test pattern menu. Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com --- include/uapi/linux/smiapp.h | 29 + Don't you need to add an entry in Kbuild file for this ? Regards, --Prabhakar Lad 1 file changed, 29 insertions(+) create mode 100644 include/uapi/linux/smiapp.h diff --git a/include/uapi/linux/smiapp.h b/include/uapi/linux/smiapp.h new file mode 100644 index 000..53938f4 --- /dev/null +++ b/include/uapi/linux/smiapp.h @@ -0,0 +1,29 @@ +/* + * include/uapi/linux/smiapp.h + * + * Generic driver for SMIA/SMIA++ compliant camera modules + * + * Copyright (C) 2014 Intel Corporation + * Contact: Sakari Ailus sakari.ai...@iki.fi + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#ifndef __UAPI_LINUX_SMIAPP_H_ +#define __UAPI_LINUX_SMIAPP_H_ + +#define V4L2_SMIAPP_TEST_PATTERN_MODE_DISABLED 0 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_SOLID_COLOUR 1 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS 2 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_COLOUR_BARS_GREY 3 +#define V4L2_SMIAPP_TEST_PATTERN_MODE_PN9 4 + +#endif /* __UAPI_LINUX_SMIAPP_H_ */ -- 1.8.3.2 -- 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 -- 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
Re: [PATCH] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code that putting values to the same variable twice
Hi Rickard, Thanks for the patch. On Sat, Jun 7, 2014 at 1:31 AM, Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: Instead of putting the same variable twice, was rather intended to set this value to two different variable. This was partly found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se The commit message and header needs to be improved, apart from that rest of the patch looks good. Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/media/v4l2-core/v4l2-dv-timings.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index 48b20df..eb3850c 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -599,10 +599,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait) aspect.denominator = 9; } else if (ratio == 34) { aspect.numerator = 4; - aspect.numerator = 3; + aspect.denominator = 3; } else if (ratio == 68) { aspect.numerator = 15; - aspect.numerator = 9; + aspect.denominator = 9; } else { aspect.numerator = hor_landscape + 99; aspect.denominator = 100; -- 1.7.10.4 -- 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
Re: [PATCH] [media] dm644x_ccdc: remove check for CONFIG_DM644X_VIDEO_PORT_ENABLE
Hi Paul, Thanks for the patch. On Thu, May 22, 2014 at 8:42 PM, Paul Bolle pebo...@tiscali.nl wrote: A check for CONFIG_DM644X_VIDEO_PORT_ENABLE was added in v2.6.32. The related Kconfig symbol was never added so this check has always evaluated to false. Remove that check. Applied. Thanks, --Prabhakar Lad Signed-off-by: Paul Bolle pebo...@tiscali.nl --- Untested. Related, trivial, cleanup: make ccdc_enable_vport() a oneliner. drivers/media/platform/davinci/dm644x_ccdc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c index 30fa08405d61..07e98df3d867 100644 --- a/drivers/media/platform/davinci/dm644x_ccdc.c +++ b/drivers/media/platform/davinci/dm644x_ccdc.c @@ -581,13 +581,8 @@ void ccdc_config_raw(void) config_params-alaw.enable) syn_mode |= CCDC_DATA_PACK_ENABLE; -#ifdef CONFIG_DM644X_VIDEO_PORT_ENABLE - /* enable video port */ - val = CCDC_ENABLE_VIDEO_PORT; -#else /* disable video port */ val = CCDC_DISABLE_VIDEO_PORT; -#endif if (config_params-data_sz == CCDC_DATA_8BITS) val |= (CCDC_DATA_10BITS CCDC_FMTCFG_VPIN_MASK) -- 1.9.0 -- 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
Re: [GIT PULL FOR v3.16] davinci updates
Hi Hans, On Sun, May 25, 2014 at 2:48 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 05/24/2014 09:59 PM, Mauro Carvalho Chehab wrote: [snip] reverted patch and resubmit the remaining ones: media: davinci: vpif_capture: drop unneeded module params media: davinci: vpif_capture: fix v4l-complinace issues Ah, please fix the typo there: complinace. Prabhakar, do you have time to create a proper description of the drop unneeded module params patch? I know you are going to relocate, so if you don't, then let me know and I will try to make a good description on Monday. The second patch depends on the first, so rather than trying to fix the second patch it is easier to just create a proper description for the first so that the can be applied in order. Please go ahead and make the changes and thanks for the help :) Thanks, --Prabhakar Lad Regards, Hans -- 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
Re: [PATCH v5 04/49] media: davinci: vpif_display: release buffers in case start_streaming() call back fails
Hi Hans, Thanks for the review. On Fri, May 23, 2014 at 2:05 PM, Hans Verkuil hverk...@xs4all.nl wrote: On 05/16/2014 03:33 PM, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com this patch adds support to release the buffer by calling vb2_buffer_done(), with state marked as VB2_BUF_STATE_QUEUED if start_streaming() call back fails. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/platform/davinci/vpif_display.c | 42 +++-- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 8bb9f02..1a17a45 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -196,26 +196,16 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) struct channel_obj *ch = vb2_get_drv_priv(vq); struct common_obj *common = ch-common[VPIF_VIDEO_INDEX]; struct vpif_params *vpif = ch-vpifparams; - unsigned long addr = 0; - unsigned long flags; + struct vpif_disp_buffer *buf, *tmp; + unsigned long addr, flags; int ret; spin_lock_irqsave(common-irqlock, flags); - /* Get the next frame from the buffer queue */ - common-next_frm = common-cur_frm = - list_entry(common-dma_queue.next, -struct vpif_disp_buffer, list); - - list_del(common-cur_frm-list); - spin_unlock_irqrestore(common-irqlock, flags); - /* Mark state of the current frame to active */ - common-cur_frm-vb.state = VB2_BUF_STATE_ACTIVE; - /* Initialize field_id and started member */ ch-field_id = 0; common-started = 1; - addr = vb2_dma_contig_plane_dma_addr(common-cur_frm-vb, 0); + /* Calculate the offset for Y and C data in the buffer */ vpif_calculate_offsets(ch); @@ -225,7 +215,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) || (!ch-vpifparams.std_info.frm_fmt (common-fmt.fmt.pix.field == V4L2_FIELD_NONE))) { vpif_err(conflict in field format and std format\n); - return -EINVAL; + ret = -EINVAL; + goto err; } /* clock settings */ @@ -234,17 +225,28 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) ycmux_mode, ch-vpifparams.std_info.hd_sd); if (ret 0) { vpif_err(can't set clock\n); - return ret; + goto err; } } /* set the parameters and addresses */ ret = vpif_set_video_params(vpif, ch-channel_id + 2); if (ret 0) - return ret; + goto err; common-started = ret; vpif_config_addr(ch, ret); + /* Get the next frame from the buffer queue */ + common-next_frm = common-cur_frm = + list_entry(common-dma_queue.next, +struct vpif_disp_buffer, list); + + list_del(common-cur_frm-list); + spin_unlock_irqrestore(common-irqlock, flags); + /* Mark state of the current frame to active */ + common-cur_frm-vb.state = VB2_BUF_STATE_ACTIVE; There is no need to set this, all buffers queued to the driver are always in state ACTIVE. The vb2 core sets that for you. In general drivers never need to change the state manually. It happens twice in this driver and in both cases the assignment can be removed. OK, will drop this. Regards, --Prabhakar Lad -- 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
Re: [PATCH v5 00/49] DaVinci: vpif: upgrade with v4l helpers and v4l compliance fixes
Hi Hans, Thanks for the review from 2 patches to 50 :) On Fri, May 23, 2014 at 2:00 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Thanks for this patch series, it looks good to me and I'll make a pull request for this. Thanks. I did find a few issues, but they are all pre-existing problems, so they can be fixed in follow-up patches. I'll comment on those in the relevant patches. Since display and capture are so similar I will only comment on the display patches, but it's valid for both. Ok will fix them up soon I am relocating next week so will take me at-least 2-3 weeks for me to get back the boards and get in action. Regards, --Prabhakar Lad Regards, Hans On 05/16/2014 03:33 PM, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com Hi, This patch series upgrades the vpif capture display driver with the all the helpers provided by v4l, this makes the driver much simpler and cleaner. This also includes few checkpatch issues. Changes for v2: a Added a copyright. b Dropped buf_init() callback from vb2_ops. c Fixed enabling disabling of interrupts in case of HD formats. Changes for v3: a Fixed review comments pointed by Hans. Changes for v4: Rebased the patches on media tree. Changes for v5: Split up the patches Following is the output of v4l-compliance for capture: -- ./v4l2-compliance -d /dev/video0 -i 0 -s -v --expbuf-device=2 Driver Info: Driver name : vpif_capture Card type : DA850/OMAP-L138 Video Capture Bus info : platform:vpif_capture Driver version: 3.15.0 Capabilities : 0x8401 Video Capture Streaming Device Capabilities Device Caps : 0x0401 Video Capture Streaming Compliance test for device /dev/video0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second video open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK Input ioctls: test VIDIOC_G/S_TUNER: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Test input 0: Control ioctls: test VIDIOC_QUERYCTRL/MENU: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: info: found 1 formats for buftype 1 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK fail: v4l2-test-formats.cpp(1003): cap-readbuffers test VIDIOC_G/S_PARM: FAIL test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK test VIDIOC_TRY_FMT: OK test VIDIOC_S_FMT: OK test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: info: test buftype Video Capture test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK test read/write: OK (Not Supported) Video Capture: Buffer: 0 Sequence: 0 Field: Interlaced Timestamp: 145.509130s Buffer: 1 Sequence: 0 Field: Interlaced Timestamp: 145.549125s Buffer: 2 Sequence: 0 Field: Interlaced Timestamp: 145.589148s Buffer: 3 Sequence: 0 Field: Interlaced Timestamp: 145.629106s Buffer: 0 Sequence: 0 Field: Interlaced Timestamp: 145.669110s
Re: [PATCH v5 41/49] media: davinci: vpif_capture: drop unneeded module params
Hi Mauro, On Sat, May 24, 2014 at 4:08 AM, Mauro Carvalho Chehab m.che...@samsung.com wrote: Em Fri, 16 May 2014 19:03:47 +0530 Lad, Prabhakar prabhakar.cse...@gmail.com escreveu: From: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com -ENOPATCHDESCRIPTION Why to remove those parameters? Please _ALWAYS_ describe your patches. My bad! will take care next time. Thanks, --Prabhakar Lad My crystal ball is malfunctioning today, so I was unable to scry the reasons for this patch. Thanks, Mauro --- drivers/media/platform/davinci/vpif_capture.c | 54 + drivers/media/platform/davinci/vpif_capture.h | 11 - 2 files changed, 1 insertion(+), 64 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index d452eaf..e967cf7 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -38,32 +38,10 @@ MODULE_VERSION(VPIF_CAPTURE_VERSION); v4l2_dbg(level, debug, vpif_obj.v4l2_dev, fmt, ## arg) static int debug = 1; -static u32 ch0_numbuffers = 3; -static u32 ch1_numbuffers = 3; -static u32 ch0_bufsize = 1920 * 1080 * 2; -static u32 ch1_bufsize = 720 * 576 * 2; module_param(debug, int, 0644); -module_param(ch0_numbuffers, uint, S_IRUGO); -module_param(ch1_numbuffers, uint, S_IRUGO); -module_param(ch0_bufsize, uint, S_IRUGO); -module_param(ch1_bufsize, uint, S_IRUGO); MODULE_PARM_DESC(debug, Debug level 0-1); -MODULE_PARM_DESC(ch2_numbuffers, Channel0 buffer count (default:3)); -MODULE_PARM_DESC(ch3_numbuffers, Channel1 buffer count (default:3)); -MODULE_PARM_DESC(ch2_bufsize, Channel0 buffer size (default:1920 x 1080 x 2)); -MODULE_PARM_DESC(ch3_bufsize, Channel1 buffer size (default:720 x 576 x 2)); - -static struct vpif_config_params config_params = { - .min_numbuffers = 3, - .numbuffers[0] = 3, - .numbuffers[1] = 3, - .min_bufsize[0] = 720 * 480 * 2, - .min_bufsize[1] = 720 * 480 * 2, - .channel_bufsize[0] = 1920 * 1080 * 2, - .channel_bufsize[1] = 720 * 576 * 2, -}; #define VPIF_DRIVER_NAME vpif_capture @@ -609,9 +587,6 @@ static void vpif_config_format(struct channel_obj *ch) vpif_dbg(2, debug, vpif_config_format\n); common-fmt.fmt.pix.field = V4L2_FIELD_ANY; - common-fmt.fmt.pix.sizeimage - = config_params.channel_bufsize[ch-channel_id]; - if (ch-vpifparams.iface.if_type == VPIF_IF_RAW_BAYER) common-fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8; else @@ -1358,36 +1333,9 @@ static struct v4l2_file_operations vpif_fops = { */ static int initialize_vpif(void) { - int err = 0, i, j; + int err, i, j; int free_channel_objects_index; - /* Default number of buffers should be 3 */ - if ((ch0_numbuffers 0) - (ch0_numbuffers config_params.min_numbuffers)) - ch0_numbuffers = config_params.min_numbuffers; - if ((ch1_numbuffers 0) - (ch1_numbuffers config_params.min_numbuffers)) - ch1_numbuffers = config_params.min_numbuffers; - - /* Set buffer size to min buffers size if it is invalid */ - if (ch0_bufsize config_params.min_bufsize[VPIF_CHANNEL0_VIDEO]) - ch0_bufsize = - config_params.min_bufsize[VPIF_CHANNEL0_VIDEO]; - if (ch1_bufsize config_params.min_bufsize[VPIF_CHANNEL1_VIDEO]) - ch1_bufsize = - config_params.min_bufsize[VPIF_CHANNEL1_VIDEO]; - - config_params.numbuffers[VPIF_CHANNEL0_VIDEO] = ch0_numbuffers; - config_params.numbuffers[VPIF_CHANNEL1_VIDEO] = ch1_numbuffers; - if (ch0_numbuffers) { - config_params.channel_bufsize[VPIF_CHANNEL0_VIDEO] - = ch0_bufsize; - } - if (ch1_numbuffers) { - config_params.channel_bufsize[VPIF_CHANNEL1_VIDEO] - = ch1_bufsize; - } - /* Allocate memory for six channel objects */ for (i = 0; i VPIF_CAPTURE_MAX_DEVICES; i++) { vpif_obj.dev[i] = diff --git a/drivers/media/platform/davinci/vpif_capture.h b/drivers/media/platform/davinci/vpif_capture.h index 4960504..537076a 100644 --- a/drivers/media/platform/davinci/vpif_capture.h +++ b/drivers/media/platform/davinci/vpif_capture.h @@ -125,16 +125,5 @@ struct vpif_device { struct vpif_capture_config *config; }; -struct vpif_config_params { - u8 min_numbuffers; - u8 numbuffers[VPIF_CAPTURE_NUM_CHANNELS]; - s8 device_type; - u32 min_bufsize[VPIF_CAPTURE_NUM_CHANNELS]; - u32 channel_bufsize[VPIF_CAPTURE_NUM_CHANNELS]; - u8 default_device[VPIF_CAPTURE_NUM_CHANNELS]; - u32 video_limit[VPIF_CAPTURE_NUM_CHANNELS]; - u8 max_device_type; -}; - #endif /* End of __KERNEL__ */ #endif
Re: [PATCH v4 1/2] media: davinci: vpif capture: upgrade the driver with v4l offerings
Hi Hans, Thanks for the review. On Mon, May 12, 2014 at 3:20 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Thanks for the patch, but I have a few comments... On 05/12/2014 10:58 AM, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com This patch upgrades the vpif display driver with v4l helpers, this patch does the following, 1: initialize the vb2 queue and context at the time of probe and removes context at remove() callback. 2: uses vb2_ioctl_*() helpers. 3: uses vb2_fop_*() helpers. 4: uses SIMPLE_DEV_PM_OPS. 5: uses vb2_ioctl_*() helpers. 6: vidioc_g/s_priority is now handled by v4l core. 7: removed driver specific fh and now using one provided by v4l. 8: fixes checkpatch warnings. This really packs too much in one patch. At the very least 1, 4, 6 and 8 can be done in separate patches. 2 and 5 are duplicates, BTW. The way it is now makes this hard to review. So it would be much appreciated if you can split it up. Ok, I have started working on splitting them up. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- root@da850-omapl138-evm:/usr# ./v4l2-compliance -d /dev/video0 -i -s -v Driver Info: Driver name : vpif_capture vpif_capture vpif_capture: = START STATUS = Bus info : platform:vpif_capture Drivervpif_capture vpif_capture: == END STATUS == version: 3.15.0 Capabilities : 0x8401 Video Capture Streaming Device Capabilities Device Caps : 0x0401 Video Capture Streaming Compliance test for device /dev/video0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second video open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK Input ioctls: test VIDIOC_G/S_TUNER: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported) test VIDIOC_G/S/ENUMINPUT: OK test VIDIOC_G/S_AUDIO: OK (Not Supported) Inputs: 1 Audio Inputs: 0 Tuners: 0 Output ioctls: test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported) Outputs: 0 Audio Outputs: 0 Modulators: 0 Input/Output configuration ioctls: test VIDIOC_ENUM/G/S/QUERY_STD: OK test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported) Test input 0: Control ioctls: test VIDIOC_QUERYCTRL/MENU: OK (Not Supported) test VIDIOC_G/S_CTRL: OK (Not Supported) test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported) test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported) test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 0 Private Controls: 0 Format ioctls: info: found 1 formats for buftype 1 test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK fail: v4l2-test-formats.cpp(1003): cap-readbuffers Just set readbuffers to the minimum number of buffers that queue_setup uses. OK. test VIDIOC_G/S_PARM: FAIL test VIDIOC_G_FBUF: OK (Not Supported) fail: v4l2-test-formats.cpp(405): !pix.sizeimage Highly dubious. You need to investigate this! Fixed it. test VIDIOC_G_FMT: FAIL test VIDIOC_TRY_FMT: OK (Not Supported) test VIDIOC_S_FMT: OK (Not Supported) test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) Codec ioctls: test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK fail: v4l2-test-buffers.cpp(506): q.has_expbuf() This is weird. I'm not sure why this happens since you seem to have VB2_DMABUF set and also vb2_ioctl_expbuf. test VIDIOC_EXPBUF: FAIL Total: 38, Succeeded: 35, Failed: 3, Warnings: 0 Also test with 'v4l2-compliance -s' (streaming). The '-i' option is available to test streaming from a specific input. BTW the output is with -s option set. Thanks, --Prabhakar Lad -- To unsubscribe from this list: send the line unsubscribe linux-media
Re: [PATCH] v4l: subdev: Move [gs]_std operation to video ops
Hi Laurent, Thanks for the patch. On Tue, Mar 11, 2014 at 3:44 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- [snip] drivers/media/i2c/tvp514x.c | 2 +- drivers/media/platform/davinci/vpfe_capture.c | 2 +- drivers/media/platform/davinci/vpif_capture.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 +- include/media/v4l2-subdev.h | 6 +++--- }; For the above: Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad -- 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
Re: [PATCHv4 1/3] vb2: stop_streaming should return void
Hi Hans, Thanks for the patch. On Thu, Apr 17, 2014 at 2:51 PM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could actually fail, but that's really not the case. The pwc amd sdr-msi3101 drivers both had this construction: if (mutex_lock_interruptible(s-v4l2_lock)) return -ERESTARTSYS; This has been updated to just call mutex_lock(). The stop_streaming op expects this to really stop streaming and I very much doubt this will work reliably if stop_streaming just returns without really stopping the DMA. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Pawel Osciak pa...@osciak.com Acked-by: Sakari Ailus sakari.ai...@linux.intel.com --- [snip] drivers/media/platform/davinci/vpbe_display.c | 5 ++--- drivers/media/platform/davinci/vpif_capture.c | 6 ++ drivers/media/platform/davinci/vpif_display.c | 6 ++ [snip] drivers/staging/media/davinci_vpfe/vpfe_video.c| 3 +-- For the above all, Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad drivers/staging/media/dt3155v4l/dt3155v4l.c| 3 +-- drivers/staging/media/go7007/go7007-v4l2.c | 3 +-- drivers/staging/media/msi3101/sdr-msi3101.c| 24 -- drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 7 ++- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 3 +-- drivers/staging/media/solo6x10/solo6x10-v4l2.c | 3 +-- include/media/videobuf2-core.h | 2 +- 41 files changed, 69 insertions(+), 128 deletions(-) diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c index 80251dc..53dd346 100644 --- a/Documentation/video4linux/v4l2-pci-skeleton.c +++ b/Documentation/video4linux/v4l2-pci-skeleton.c @@ -269,7 +269,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued * and passed on to the vb2 framework marked as STATE_ERROR. */ -static int stop_streaming(struct vb2_queue *vq) +static void stop_streaming(struct vb2_queue *vq) { struct skeleton *skel = vb2_get_drv_priv(vq); @@ -277,7 +277,6 @@ static int stop_streaming(struct vb2_queue *vq) /* Release all active buffers */ return_all_buffers(skel, VB2_BUF_STATE_ERROR); - return 0; } /* diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index bb11443..7559951 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -357,7 +357,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) } /* abort streaming and wait for last buffer */ -static int stop_streaming(struct vb2_queue *vq) +static void stop_streaming(struct vb2_queue *vq) { struct sta2x11_vip *vip = vb2_get_drv_priv(vq); struct vip_buffer *vip_buf, *node; @@ -374,7 +374,6 @@ static int stop_streaming(struct vb2_queue *vq) list_del(vip_buf-list); } spin_unlock(vip-lock); - return 0; } static struct vb2_ops vip_video_qops = { diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index 200bec9..dfb09d4 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c @@ -427,7 +427,7 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count) return 0; } -static int bcap_stop_streaming(struct vb2_queue *vq) +static void bcap_stop_streaming(struct vb2_queue *vq) { struct bcap_device *bcap_dev = vb2_get_drv_priv(vq); struct ppi_if *ppi = bcap_dev-ppi; @@ -452,7 +452,6 @@ static int bcap_stop_streaming(struct vb2_queue *vq) list_del(bcap_dev-cur_frm-list); vb2_buffer_done(bcap_dev-cur_frm-vb, VB2_BUF_STATE_ERROR); } - return 0; } static struct vb2_ops bcap_video_qops = { diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 3e5199e..d9b1a04 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2269,7 +2269,7 @@ out: return ret; } -static int coda_stop_streaming(struct vb2_queue *q) +static void coda_stop_streaming(struct vb2_queue *q) { struct coda_ctx *ctx = vb2_get_drv_priv(q); struct coda_dev *dev = ctx-dev; @@ -2295,8 +2295,6 @@ static int coda_stop_streaming(struct vb2_queue *q) ctx-bitstream.vaddr, ctx-bitstream.size
Re: [PATCHv4 0/3] vb2: stop_streaming should return void
Hi Hans, On Thu, Apr 17, 2014 at 2:51 PM, Hans Verkuil hverk...@xs4all.nl wrote: Split off the removal of the vb2_is_streaming check as requested. Note that the davinci drivers still have this unnecessary check, but Prabhakar will remove that himself. Yes will post the patch, doping the check for davinci drivers. Thanks, --Prabhakar -- 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
Re: [PATCH] v4l2-pci-skeleton: fix typo while retrieving the skel_buffer
Hi Hans, On Wed, Apr 2, 2014 at 3:08 PM, Hans Verkuil hverk...@xs4all.nl wrote: On 03/24/14 18:51, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- Documentation/video4linux/v4l2-pci-skeleton.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c index 3a1c0d2..61a56f4 100644 --- a/Documentation/video4linux/v4l2-pci-skeleton.c +++ b/Documentation/video4linux/v4l2-pci-skeleton.c @@ -87,7 +87,7 @@ struct skel_buffer { static inline struct skel_buffer *to_skel_buffer(struct vb2_buffer *vb2) { - return container_of(vb2, struct skel_buffer, vb); + return container_of(vb2, struct skel_buffer, vb2); Why is this a type? The vb2_buffer member in struct skel_buffer is called 'vb', so this should be correct. Oops may be I overlooked, sorry for the noise. Thanks, --Prabhakar Lad -- 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
Re: [PATCH] v4l2-compliance: fix function pointer prototype
Hi Hans, On Tue, Apr 1, 2014 at 7:20 PM, Hans Verkuil hansv...@cisco.com wrote: Hi Prabhakar, On 04/01/14 15:45, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com There was a conflict between the mmap function pointer prototype of struct v4l_fd and the actual function used. Make sure it is in sync with the prototype of v4l2_mmap. The prototype of v4l2_mmap uses int64_t, so I don't understand this patch. Actual prototype of mmap is, void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); But where as the prototype in v4l_fd mmap the last parameter type is int64_t but that should have been off_t and same applies with test_mmap(). Thanks, --Prabhakar Lad -- 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
Re: [PATCH] v4l2-compliance: fix function pointer prototype
Hi Hans, On Tue, Apr 1, 2014 at 8:12 PM, Hans Verkuil hverk...@xs4all.nl wrote: On 04/01/14 16:26, Hans Verkuil wrote: On 04/01/14 16:06, Prabhakar Lad wrote: Hi Hans, On Tue, Apr 1, 2014 at 7:20 PM, Hans Verkuil hansv...@cisco.com wrote: Hi Prabhakar, On 04/01/14 15:45, Lad, Prabhakar wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com There was a conflict between the mmap function pointer prototype of struct v4l_fd and the actual function used. Make sure it is in sync with the prototype of v4l2_mmap. The prototype of v4l2_mmap uses int64_t, so I don't understand this patch. Actual prototype of mmap is, void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); But where as the prototype in v4l_fd mmap the last parameter type is int64_t but that should have been off_t and same applies with test_mmap(). The problem is that v4l2_mmap (in lib/include/libv4l2.h) uses int64_t. So the function pointer uses int64_t as well as does test_mmap. I don't see how the current v4l-utils tree can cause a compile error. For the record, I know you can't assign mmap to fd-mmap, you would have to make a wrapper. Unfortunately mmap and v4l2_mmap do not have the same prototype and I had to pick one (I'm not sure why they don't use the same prototype). Most applications would typically have to use v4l2_mmap, so I went with that one. I missed that mmap is assigned to v4l_fd_init(). Since mmap and v4l2_mmap have different prototypes the only solution is to make a wrapper. Does this work? Yes it compiles now with the below patch. Thanks, --Prabhakar Lad diff --git a/utils/v4l2-compliance/v4l-helpers.h b/utils/v4l2-compliance/v4l-helpers.h index 48ea602..e718a24 100644 --- a/utils/v4l2-compliance/v4l-helpers.h +++ b/utils/v4l2-compliance/v4l-helpers.h @@ -14,11 +14,21 @@ struct v4l_fd { int (*munmap)(void *addr, size_t length); }; +/* + * mmap has a different prototype compared to v4l2_mmap. Because of + * this we have to make a wrapper for it. + */ +static inline void *v4l_fd_mmap(void *addr, size_t length, int prot, int flags, + int fd, int64_t offset) +{ + return mmap(addr, length, prot, flags, fd, offset); +} + static inline void v4l_fd_init(struct v4l_fd *f, int fd) { f-fd = fd; f-ioctl = ioctl; - f-mmap = mmap; + f-mmap = v4l_fd_mmap; f-munmap = munmap; } On a 64-bit system the types are the same, it's only on a 32-bit system that this will fail. Regards, Hans -- 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
Re: [PATCH 1/2] media: davinci: vpif capture: upgrade the driver with v4l offerings
. Yes can be dropped, will remove in next version. Thanks, --Prabhakar Lad -- 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
[GIT PULL FOR v3.15] Davinci media fixes
Hi Mauro, Please pull the following patches which are fixes for various davinci media drivers. Thanks, --Prabhakar Lad The following changes since commit 8432164ddf7bfe40748ac49995356ab4dfda43b7: [media] Sensoray 2255 uses videobuf2 (2014-03-24 17:23:43 -0300) are available in the git repository at: git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git for_mauro for you to fetch changes up to ef981f26167ec6afc8c9038a99ed28a149bac819: staging: media: davinci: vpfe: make sure all the buffers are released (2014-03-25 11:08:24 +0530) Lad, Prabhakar (5): media: davinci: vpif_capture: fix releasing of active buffers media: davinci: vpif_display: fix releasing of active buffers media: davinci: vpbe_display: fix releasing of active buffers media: davinci: vpfe: make sure all the buffers unmapped and released staging: media: davinci: vpfe: make sure all the buffers are released drivers/media/platform/davinci/vpbe_display.c | 16 ++- drivers/media/platform/davinci/vpfe_capture.c |2 ++ drivers/media/platform/davinci/vpif_capture.c | 34 +++--- drivers/media/platform/davinci/vpif_display.c | 35 +++ drivers/staging/media/davinci_vpfe/vpfe_video.c | 13 +++-- 5 files changed, 74 insertions(+), 26 deletions(-) -- 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
Re: [PATCH v2 12/48] ths8200: Add pad-level DV timings operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video enum_dv_timings and dv_timings_cap operations are deprecated. Implement the pad-level version of those operations to prepare for the removal of the video version. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/media/i2c/ths8200.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index f72561e..c4ec8b2 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -410,6 +410,9 @@ static int ths8200_g_dv_timings(struct v4l2_subdev *sd, static int ths8200_enum_dv_timings(struct v4l2_subdev *sd, struct v4l2_enum_dv_timings *timings) { + if (timings-pad != 0) + return -EINVAL; + return v4l2_enum_dv_timings_cap(timings, ths8200_timings_cap, NULL, NULL); } @@ -417,6 +420,9 @@ static int ths8200_enum_dv_timings(struct v4l2_subdev *sd, static int ths8200_dv_timings_cap(struct v4l2_subdev *sd, struct v4l2_dv_timings_cap *cap) { + if (cap-pad != 0) + return -EINVAL; + *cap = ths8200_timings_cap; return 0; } @@ -430,10 +436,16 @@ static const struct v4l2_subdev_video_ops ths8200_video_ops = { .dv_timings_cap = ths8200_dv_timings_cap, }; +static const struct v4l2_subdev_pad_ops ths8200_pad_ops = { + .enum_dv_timings = ths8200_enum_dv_timings, + .dv_timings_cap = ths8200_dv_timings_cap, +}; + /* V4L2 top level operation handlers */ static const struct v4l2_subdev_ops ths8200_ops = { .core = ths8200_core_ops, .video = ths8200_video_ops, + .pad = ths8200_pad_ops, }; static int ths8200_probe(struct i2c_client *client, -- 1.8.3.2 -- 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 -- 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
Re: [PATCH v2 24/48] tvp7002: Remove deprecated video-level DV timings operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video enum_dv_timings and dv_timings_cap operations are deprecated and unused. Remove them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/media/i2c/tvp7002.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 9f56fd5..fa901a9 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -926,7 +926,6 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = { static const struct v4l2_subdev_video_ops tvp7002_video_ops = { .g_dv_timings = tvp7002_g_dv_timings, .s_dv_timings = tvp7002_s_dv_timings, - .enum_dv_timings = tvp7002_enum_dv_timings, .query_dv_timings = tvp7002_query_dv_timings, .s_stream = tvp7002_s_stream, .g_mbus_fmt = tvp7002_mbus_fmt, -- 1.8.3.2 -- 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 -- 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
Re: [PATCH v2 13/48] tvp7002: Add pad-level DV timings operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video enum_dv_timings operation is deprecated. Implement the pad-level version of the operation to prepare for the removal of the video version. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/media/i2c/tvp7002.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index 912e1cc..9f56fd5 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -832,6 +832,9 @@ static int tvp7002_log_status(struct v4l2_subdev *sd) static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd, struct v4l2_enum_dv_timings *timings) { + if (timings-pad != 0) + return -EINVAL; + /* Check requested format index is within range */ if (timings-index = NUM_TIMINGS) return -EINVAL; @@ -937,6 +940,7 @@ static const struct v4l2_subdev_pad_ops tvp7002_pad_ops = { .enum_mbus_code = tvp7002_enum_mbus_code, .get_fmt = tvp7002_get_pad_format, .set_fmt = tvp7002_set_pad_format, + .enum_dv_timings = tvp7002_enum_dv_timings, }; /* V4L2 top level operation handlers */ -- 1.8.3.2 -- 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 -- 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
Re: [PATCH v2 23/48] ths8200: Remove deprecated video-level DV timings operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video enum_dv_timings and dv_timings_cap operations are deprecated and unused. Remove them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/media/i2c/ths8200.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index c4ec8b2..656d889 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -432,8 +432,6 @@ static const struct v4l2_subdev_video_ops ths8200_video_ops = { .s_stream = ths8200_s_stream, .s_dv_timings = ths8200_s_dv_timings, .g_dv_timings = ths8200_g_dv_timings, - .enum_dv_timings = ths8200_enum_dv_timings, - .dv_timings_cap = ths8200_dv_timings_cap, }; static const struct v4l2_subdev_pad_ops ths8200_pad_ops = { -- 1.8.3.2 -- 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 -- 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
Re: [PATCH v2 15/48] media: davinci: vpif: Switch to pad-level DV operations
Hi Laurent, Thanks for the patch. On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video-level enum_dv_timings and dv_timings_cap operations are deprecated in favor of the pad-level versions. All subdev drivers implement the pad-level versions, switch to them. Cc: Prabhakar Lad prabhakar.cse...@gmail.com Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/media/platform/davinci/vpif_capture.c | 4 +++- drivers/media/platform/davinci/vpif_display.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index cd6da8b..16a1958 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1723,7 +1723,9 @@ vpif_enum_dv_timings(struct file *file, void *priv, struct channel_obj *ch = fh-channel; int ret; - ret = v4l2_subdev_call(ch-sd, video, enum_dv_timings, timings); + timings-pad = 0; + + ret = v4l2_subdev_call(ch-sd, pad, enum_dv_timings, timings); if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -EINVAL; return ret; diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index fd68236..e1edefe 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -1380,7 +1380,9 @@ vpif_enum_dv_timings(struct file *file, void *priv, struct channel_obj *ch = fh-channel; int ret; - ret = v4l2_subdev_call(ch-sd, video, enum_dv_timings, timings); + timings-pad = 0; + + ret = v4l2_subdev_call(ch-sd, pad, enum_dv_timings, timings); if (ret == -ENOIOCTLCMD || ret == -ENODEV) return -EINVAL; return ret; -- 1.8.3.2 -- 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
Re: [PATCH v2 16/48] media: staging: davinci: vpfe: Switch to pad-level DV operations
Hi Laurent, Thanks for the patch. On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video-level enum_dv_timings and dv_timings_cap operations are deprecated in favor of the pad-level versions. All subdev drivers implement the pad-level versions, switch to them. Cc: Prabhakar Lad prabhakar.cse...@gmail.com Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- drivers/staging/media/davinci_vpfe/vpfe_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 1f3b0f9..a1655a8 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -987,8 +987,10 @@ vpfe_enum_dv_timings(struct file *file, void *fh, struct vpfe_device *vpfe_dev = video-vpfe_dev; struct v4l2_subdev *subdev = video-current_ext_subdev-subdev; + timings-pad = 0; + v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_enum_dv_timings\n); - return v4l2_subdev_call(subdev, video, enum_dv_timings, timings); + return v4l2_subdev_call(subdev, pad, enum_dv_timings, timings); } /* -- 1.8.3.2 -- 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
Re: [PATCH v2 39/48] v4l: subdev: Remove deprecated video-level DV timings operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: The video enum_dv_timings and dv_timings_cap operations are deprecated and unused. Remove them. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Reviewed-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Sakari Ailus sakari.ai...@linux.intel.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- include/media/v4l2-subdev.h | 4 1 file changed, 4 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 2b5ec32..ab2b59d 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -330,12 +330,8 @@ struct v4l2_subdev_video_ops { struct v4l2_dv_timings *timings); int (*g_dv_timings)(struct v4l2_subdev *sd, struct v4l2_dv_timings *timings); - int (*enum_dv_timings)(struct v4l2_subdev *sd, - struct v4l2_enum_dv_timings *timings); int (*query_dv_timings)(struct v4l2_subdev *sd, struct v4l2_dv_timings *timings); - int (*dv_timings_cap)(struct v4l2_subdev *sd, - struct v4l2_dv_timings_cap *cap); int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, enum v4l2_mbus_pixelcode *code); int (*enum_mbus_fsizes)(struct v4l2_subdev *sd, -- 1.8.3.2 -- 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 -- 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
Re: [PATCH v2 06/48] v4l: Add pad-level DV timings subdev operations
On Tue, Mar 11, 2014 at 4:45 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar lad --- include/media/v4l2-subdev.h| 4 include/uapi/linux/videodev2.h | 10 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 1752530..2b5ec32 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -509,6 +509,10 @@ struct v4l2_subdev_pad_ops { struct v4l2_subdev_selection *sel); int (*get_edid)(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid); int (*set_edid)(struct v4l2_subdev *sd, struct v4l2_subdev_edid *edid); + int (*dv_timings_cap)(struct v4l2_subdev *sd, + struct v4l2_dv_timings_cap *cap); + int (*enum_dv_timings)(struct v4l2_subdev *sd, + struct v4l2_enum_dv_timings *timings); #ifdef CONFIG_MEDIA_CONTROLLER int (*link_validate)(struct v4l2_subdev *sd, struct media_link *link, struct v4l2_subdev_format *source_fmt, diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 17acba8..72fbbd4 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1103,12 +1103,15 @@ struct v4l2_dv_timings { /** struct v4l2_enum_dv_timings - DV timings enumeration * @index: enumeration index + * @pad: the pad number for which to enumerate timings (used with + * v4l-subdev nodes only) * @reserved: must be zeroed * @timings: the timings for the given index */ struct v4l2_enum_dv_timings { __u32 index; - __u32 reserved[3]; + __u32 pad; + __u32 reserved[2]; struct v4l2_dv_timings timings; }; @@ -1146,11 +1149,14 @@ struct v4l2_bt_timings_cap { /** struct v4l2_dv_timings_cap - DV timings capabilities * @type: the type of the timings (same as in struct v4l2_dv_timings) + * @pad: the pad number for which to query capabilities (used with + * v4l-subdev nodes only) * @bt:the BT656/1120 timings capabilities */ struct v4l2_dv_timings_cap { __u32 type; - __u32 reserved[3]; + __u32 pad; + __u32 reserved[2]; union { struct v4l2_bt_timings_cap bt; __u32 raw_data[32]; -- 1.8.3.2 -- 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 -- 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
Re: [PATCH 1/2] [media] tvp5150: Fix type mismatch warning in clamp macro
Hi Philipp, Thanks for the patch. On Thu, Feb 27, 2014 at 10:14 PM, Philipp Zabel p.za...@pengutronix.de wrote: This patch fixes the following warning: drivers/media/i2c/tvp5150.c: In function '__tvp5150_try_crop': include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (__val == __min); \ ^ drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp' rect-width = clamp(rect-width, ^ include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (__val == __max); \ ^ drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp' rect-width = clamp(rect-width, ^ include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (__val == __min); \ ^ drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp' rect-height = clamp(rect-height, ^ include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void) (__val == __max); \ ^ drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp' rect-height = clamp(rect-height, ^ Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad -- 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
Re: [PATCH 2/2] [media] tvp5150: Make debug module parameter visible in sysfs
Hi Philipp, Thanks for the patch. On Thu, Feb 27, 2014 at 10:14 PM, Philipp Zabel p.za...@pengutronix.de wrote: Set permissions on the debug module parameter to make it appear in sysfs. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad -- 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
Re: [GIT PULL FOR v3.15] Davinci VPFE Patches
Hi Mauro On Thu, Feb 20, 2014 at 12:21 PM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Mauro, Please pull the following patch for davinci vpfe driver. I have included one more patch from Michael, with a fresh pull request. Thanks, --Prabhakar Lad The following changes since commit efab6b6a6ea9364ececb955f69a9d3ffc6b782a1: [media] vivi: queue_setup improvements (2014-02-24 10:59:15 -0300) are available in the git repository at: git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git for_mauro for you to fetch changes up to b744c55dd23bf61072ae7743e656d515c645f9ff: davinci: vpfe: remove deprecated IRQF_DISABLED (2014-02-25 11:11:14 +0530) Levente Kurusa (1): staging: davinci_vpfe: fix error check Michael Opdenacker (1): davinci: vpfe: remove deprecated IRQF_DISABLED .../staging/media/davinci_vpfe/dm365_ipipe_hw.c|2 +- .../staging/media/davinci_vpfe/vpfe_mc_capture.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) -- 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
Re: [PATCH][RESEND] [media] davinci: vpfe: remove deprecated IRQF_DISABLED
Hi Michael, On Mon, Feb 24, 2014 at 11:01 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Michael, On Thu, Feb 20, 2014 at 6:47 PM, Michael Opdenacker michael.opdenac...@free-electrons.com wrote: Hi Laurent, On 02/20/2014 12:36 PM, Laurent Pinchart wrote: Hi Michael, What's the status of this patch ? Do expect Prabhakar to pick it up, or do you plan to push all your IRQF_DISABLED removal patches in one go ? It's true a good number of my patches haven't been picked up yet, even after multiple resends. I was planning to ask the community tomorrow about what to do to finally get rid of IRQF_DISABLED. Effectively, pushing all the remaining changes in one go (or removing the definition of IRQF_DISABLED) may be the final solution. I hope to be able to answer your question by the end of the week. gentle ping. should I pick it up ? I've picked it up. Thanks, --Prabhakar Lad -- 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
Re: [PATCH][RESEND] [media] davinci: vpfe: remove deprecated IRQF_DISABLED
Hi Michael, On Thu, Feb 20, 2014 at 6:47 PM, Michael Opdenacker michael.opdenac...@free-electrons.com wrote: Hi Laurent, On 02/20/2014 12:36 PM, Laurent Pinchart wrote: Hi Michael, What's the status of this patch ? Do expect Prabhakar to pick it up, or do you plan to push all your IRQF_DISABLED removal patches in one go ? It's true a good number of my patches haven't been picked up yet, even after multiple resends. I was planning to ask the community tomorrow about what to do to finally get rid of IRQF_DISABLED. Effectively, pushing all the remaining changes in one go (or removing the definition of IRQF_DISABLED) may be the final solution. I hope to be able to answer your question by the end of the week. gentle ping. should I pick it up ? Regards, --Prabhakar Lad -- 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
[PATCH 2/3] media: omap3isp: ispccdc: remove unwanted comments
From: Lad, Prabhakar prabhakar.cse...@gmail.com this patch removes the description of members which does not exists for ispccdc_lsc structure. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/platform/omap3isp/ispccdc.h |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispccdc.h b/drivers/media/platform/omap3isp/ispccdc.h index a5da9e1..9d24e41 100644 --- a/drivers/media/platform/omap3isp/ispccdc.h +++ b/drivers/media/platform/omap3isp/ispccdc.h @@ -63,12 +63,6 @@ struct ispccdc_lsc_config_req { /* * ispccdc_lsc - CCDC LSC parameters - * @update_config: Set when user changes config - * @request_enable: Whether LSC is requested to be enabled - * @config: LSC config set by user - * @update_table: Set when user provides a new LSC table to table_new - * @table_new: LSC table set by user, ISP address - * @table_inuse: LSC table currently in use, ISP address */ struct ispccdc_lsc { enum ispccdc_lsc_state state; -- 1.7.9.5 -- 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
[PATCH 3/3] media: omap3isp: rename the variable names in description
From: Lad, Prabhakar prabhakar.cse...@gmail.com this patch renames the variable in the description to match it appropriately to function definition. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/platform/omap3isp/isp.h| 12 ++-- drivers/media/platform/omap3isp/ispccdc.c|8 drivers/media/platform/omap3isp/ispccp2.c|2 +- drivers/media/platform/omap3isp/isphist.c|2 +- drivers/media/platform/omap3isp/isppreview.c |9 + drivers/media/platform/omap3isp/ispresizer.c |6 +++--- drivers/media/platform/omap3isp/ispvideo.c |4 ++-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h index 081f5ec..6d5e697 100644 --- a/drivers/media/platform/omap3isp/isp.h +++ b/drivers/media/platform/omap3isp/isp.h @@ -265,7 +265,7 @@ void omap3isp_unregister_entities(struct platform_device *pdev); /* * isp_reg_readl - Read value of an OMAP3 ISP register - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. * @isp_mmio_range: Range to which the register offset refers to. * @reg_offset: Register offset to read from. * @@ -280,7 +280,7 @@ u32 isp_reg_readl(struct isp_device *isp, enum isp_mem_resources isp_mmio_range, /* * isp_reg_writel - Write value to an OMAP3 ISP register - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. * @reg_value: 32 bit value to write to the register. * @isp_mmio_range: Range to which the register offset refers to. * @reg_offset: Register offset to write into. @@ -293,8 +293,8 @@ void isp_reg_writel(struct isp_device *isp, u32 reg_value, } /* - * isp_reg_and - Clear individual bits in an OMAP3 ISP register - * @dev: Device pointer specific to the OMAP3 ISP. + * isp_reg_clr - Clear individual bits in an OMAP3 ISP register + * @isp: Device pointer specific to the OMAP3 ISP. * @mmio_range: Range to which the register offset refers to. * @reg: Register offset to work on. * @clr_bits: 32 bit value which would be cleared in the register. @@ -310,7 +310,7 @@ void isp_reg_clr(struct isp_device *isp, enum isp_mem_resources mmio_range, /* * isp_reg_set - Set individual bits in an OMAP3 ISP register - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. * @mmio_range: Range to which the register offset refers to. * @reg: Register offset to work on. * @set_bits: 32 bit value which would be set in the register. @@ -326,7 +326,7 @@ void isp_reg_set(struct isp_device *isp, enum isp_mem_resources mmio_range, /* * isp_reg_clr_set - Clear and set invidial bits in an OMAP3 ISP register - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. * @mmio_range: Range to which the register offset refers to. * @reg: Register offset to work on. * @clr_bits: 32 bit value which would be cleared in the register. diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index 7160e4a..4d920c8 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -674,7 +674,7 @@ static void ccdc_config_imgattr(struct isp_ccdc_device *ccdc, u32 colptn) /* * ccdc_config - Set CCDC configuration from userspace * @ccdc: Pointer to ISP CCDC device. - * @userspace_add: Structure containing CCDC configuration sent from userspace. + * @ccdc_struct: Structure containing CCDC configuration sent from userspace. * * Returns 0 if successful, -EINVAL if the pointer to the configuration * structure is null, or the copy_from_user function fails to copy user space @@ -793,7 +793,7 @@ static void ccdc_apply_controls(struct isp_ccdc_device *ccdc) /* * omap3isp_ccdc_restore_context - Restore values of the CCDC module registers - * @dev: Pointer to ISP device + * @isp: Pointer to ISP device */ void omap3isp_ccdc_restore_context(struct isp_device *isp) { @@ -2525,7 +2525,7 @@ error_video: /* * omap3isp_ccdc_init - CCDC module initialization. - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. * * TODO: Get the initialisation values from platform data. * @@ -2564,7 +2564,7 @@ int omap3isp_ccdc_init(struct isp_device *isp) /* * omap3isp_ccdc_cleanup - CCDC module cleanup. - * @dev: Device pointer specific to the OMAP3 ISP. + * @isp: Device pointer specific to the OMAP3 ISP. */ void omap3isp_ccdc_cleanup(struct isp_device *isp) { diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index c81ca8f..b30b67d 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c @@ -211,7 +211,7 @@ static void ccp2_mem_enable(struct isp_ccp2_device *ccp2, u8 enable) /* *
[PATCH 1/3] media: omap3isp: fix typos
From: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/platform/omap3isp/isp.c|2 +- drivers/media/platform/omap3isp/ispccdc.c|2 +- drivers/media/platform/omap3isp/ispccp2.c|4 ++-- drivers/media/platform/omap3isp/isphist.c|2 +- drivers/media/platform/omap3isp/isppreview.c |4 ++-- drivers/media/platform/omap3isp/ispqueue.c |2 +- drivers/media/platform/omap3isp/ispresizer.h |4 ++-- drivers/media/platform/omap3isp/ispstat.c|4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 5807185..65a9b1d 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -391,7 +391,7 @@ static void isp_disable_interrupts(struct isp_device *isp) * @isp: OMAP3 ISP device * @idle: Consider idle state. * - * Set the power settings for the ISP and SBL bus and cConfigure the HS/VS + * Set the power settings for the ISP and SBL bus and configure the HS/VS * interrupt source. * * We need to configure the HS/VS interrupt source before interrupts get diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index 5db2c88..7160e4a 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -293,7 +293,7 @@ static int __ccdc_lsc_enable(struct isp_ccdc_device *ccdc, int enable) isp_reg_clr(isp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_LSC_CONFIG, ISPCCDC_LSC_ENABLE); ccdc-lsc.state = LSC_STATE_STOPPED; - dev_warn(to_device(ccdc), LSC prefecth timeout\n); + dev_warn(to_device(ccdc), LSC prefetch timeout\n); return -ETIMEDOUT; } ccdc-lsc.state = LSC_STATE_RUNNING; diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index e84fe05..c81ca8f 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c @@ -518,7 +518,7 @@ static void ccp2_mem_configure(struct isp_ccp2_device *ccp2, ISPCCP2_LCM_IRQSTATUS_EOF_IRQ, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_IRQSTATUS); - /* Enable LCM interupts */ + /* Enable LCM interrupts */ isp_reg_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCM_IRQENABLE, ISPCCP2_LCM_IRQSTATUS_EOF_IRQ | ISPCCP2_LCM_IRQSTATUS_OCPERROR_IRQ); @@ -1096,7 +1096,7 @@ static int ccp2_init_entities(struct isp_ccp2_device *ccp2) * implementation we use a fixed 32 bytes alignment regardless of the * input format and width. If strict 128 bits alignment support is * required ispvideo will need to be made aware of this special dual -* alignement requirements. +* alignment requirements. */ ccp2-video_in.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ccp2-video_in.bpl_alignment = 32; diff --git a/drivers/media/platform/omap3isp/isphist.c b/drivers/media/platform/omap3isp/isphist.c index e070c24..6db6cfb 100644 --- a/drivers/media/platform/omap3isp/isphist.c +++ b/drivers/media/platform/omap3isp/isphist.c @@ -351,7 +351,7 @@ static int hist_validate_params(struct ispstat *hist, void *new_conf) buf_size = hist_get_buf_size(user_cfg); if (buf_size user_cfg-buf_size) - /* User's buf_size request wasn't enoght */ + /* User's buf_size request wasn't enough */ user_cfg-buf_size = buf_size; else if (user_cfg-buf_size OMAP3ISP_HIST_MAX_BUF_SIZE) user_cfg-buf_size = OMAP3ISP_HIST_MAX_BUF_SIZE; diff --git a/drivers/media/platform/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c index 1c776c1..e8fb008 100644 --- a/drivers/media/platform/omap3isp/isppreview.c +++ b/drivers/media/platform/omap3isp/isppreview.c @@ -122,7 +122,7 @@ static struct omap3isp_prev_csc flr_prev_csc = { #define PREV_MAX_OUT_WIDTH_REV_15 4096 /* - * Coeficient Tables for the submodules in Preview. + * Coefficient Tables for the submodules in Preview. * Array is initialised with the values from.the tables text file. */ @@ -1363,7 +1363,7 @@ static void preview_init_params(struct isp_prev_device *prev) } /* - * preview_max_out_width - Handle previewer hardware ouput limitations + * preview_max_out_width - Handle previewer hardware output limitations * @isp_revision : ISP revision * returns maximum width output for current isp revision */ diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c index 5f0f8fa..a5e6585 100644 --- a/drivers/media/platform/omap3isp/ispqueue.c +++ b/drivers/media/platform/omap3isp/ispqueue.c @@ -597,7
[PATCH 0/3] media: omap3isp: trivial cleanup
From: Lad, Prabhakar prabhakar.cse...@gmail.com This patch series include fixing some typos and removal of unwanted comments. Lad, Prabhakar (3): media: omap3isp: fix typos media: omap3isp: ispccdc: remove unwanted comments media: omap3isp: rename the variable names in description drivers/media/platform/omap3isp/isp.c|2 +- drivers/media/platform/omap3isp/isp.h| 12 ++-- drivers/media/platform/omap3isp/ispccdc.c| 10 +- drivers/media/platform/omap3isp/ispccdc.h|6 -- drivers/media/platform/omap3isp/ispccp2.c|6 +++--- drivers/media/platform/omap3isp/isphist.c|4 ++-- drivers/media/platform/omap3isp/isppreview.c | 13 +++-- drivers/media/platform/omap3isp/ispqueue.c |2 +- drivers/media/platform/omap3isp/ispresizer.c |6 +++--- drivers/media/platform/omap3isp/ispresizer.h |4 ++-- drivers/media/platform/omap3isp/ispstat.c|4 ++-- drivers/media/platform/omap3isp/ispvideo.c |4 ++-- 12 files changed, 34 insertions(+), 39 deletions(-) -- 1.7.9.5 -- 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
[GIT PULL FOR v3.15] Davinci VPFE Patches
Hi Mauro, Please pull the following patch for davinci vpfe driver. Regards, --Prabhakar Lad The following changes since commit 37e59f876bc710d67a30b660826a5e83e07101ce: [media, edac] Change my email address (2014-02-07 08:03:07 -0200) are available in the git repository at: git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git for_mauro for you to fetch changes up to 01275d96c4a59e37835c345006fbaf2a02c04ccf: staging: davinci_vpfe: fix error check (2014-02-20 12:10:06 +0530) Levente Kurusa (1): staging: davinci_vpfe: fix error check .../staging/media/davinci_vpfe/dm365_ipipe_hw.c|2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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
Re: [PATCH] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for adv7*
Hi Marcus, On Wed, Feb 5, 2014 at 9:26 PM, Marcus Folkesson marcus.folkes...@gmail.com wrote: These chips makes use of the media_entity in the v4l2_subdev struct and is therefor dependent of the MEDIA_CONTROLLER config. NAK, as you can currently see these drivers depend on VIDEO_V4L2_SUBDEV_API config and if you see VIDEO_V4L2_SUBDEV_API depends on MEDIA_CONTROLLER config so there is no point in adding this dependency. Thanks, --Prabhakar Lad Signed-off-by: Marcus Folkesson marcus.folkes...@gmail.com --- drivers/media/i2c/Kconfig |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index d18be19..1771b77 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -196,7 +196,7 @@ config VIDEO_ADV7183 config VIDEO_ADV7604 tristate Analog Devices ADV7604 decoder - depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API + depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API MEDIA_CONTROLLER ---help--- Support for the Analog Devices ADV7604 video decoder. @@ -208,7 +208,7 @@ config VIDEO_ADV7604 config VIDEO_ADV7842 tristate Analog Devices ADV7842 decoder - depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API + depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API MEDIA_CONTROLLER ---help--- Support for the Analog Devices ADV7842 video decoder. @@ -431,7 +431,7 @@ config VIDEO_ADV7393 config VIDEO_ADV7511 tristate Analog Devices ADV7511 encoder - depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API + depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API MEDIA_CONTROLLER ---help--- Support for the Analog Devices ADV7511 video encoder. -- 1.7.10.4 -- 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
Re: [PATCH 1/2] [media] v4l2: Add settings for Horizontal and Vertical MV Search Range
On Tue, Feb 4, 2014 at 3:29 PM, Amit Grover amit.gro...@samsung.com wrote: Adding V4L2 controls for horizontal and vertical search range in pixels for motion estimation module in video encoder. Signed-off-by: Swami Nathan swaminat...@samsung.com Signed-off-by: Amit Grover amit.gro...@samsung.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- Documentation/DocBook/media/v4l/controls.xml | 20 drivers/media/v4l2-core/v4l2-ctrls.c |6 ++ include/uapi/linux/v4l2-controls.h |2 ++ 3 files changed, 28 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index a5a3188..0e1770c 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -2258,6 +2258,26 @@ Applicable to the MPEG1, MPEG2, MPEG4 encoders./entry VBV buffer control./entry /row + rowentry/entry/row + row id=v4l2-mpeg-video-hor-search-range + entry spanname=idconstantV4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE/constantnbsp;/entry + entryinteger/entry + /row + rowentry spanname=descrHorizontal search range defines maximum horizontal search area in pixels +to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set +horizontal search range for motion estimation module in video encoder./entry + /row + +rowentry/entry/row + row id=v4l2-mpeg-video-vert-search-range + entry spanname=idconstantV4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE/constantnbsp;/entry + entryinteger/entry + /row + rowentry spanname=descrVertical search range defines maximum vertical search area in pixels +to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set +vertical search range for motion estimation module in video encoder./entry + /row + rowentry/entry/row row entry spanname=idconstantV4L2_CID_MPEG_VIDEO_H264_CPB_SIZE/constantnbsp;/entry diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 6ff002b..e9e12c4 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -735,6 +735,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_DEC_PTS: return Video Decoder PTS; case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return Video Decoder Frame Count; case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return Initial Delay for VBV Control; + case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: return Horizontal MV Search Range; + case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: return Vertical MV Search Range; case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER: return Repeat Sequence Header; /* VPX controls */ @@ -910,6 +912,10 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, *min = 0; *max = *step = 1; break; + case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: + case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: + *type = V4L2_CTRL_TYPE_INTEGER; + break; case V4L2_CID_PAN_RESET: case V4L2_CID_TILT_RESET: case V4L2_CID_FLASH_STROBE: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 2cbe605..cda6fa0 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -376,6 +376,8 @@ enum v4l2_mpeg_video_multi_slice_mode { #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226) +#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227) +#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) -- 1.7.9.5 -- 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
Re: [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range for Video Macro Blocks
Hi Swaminathan, On Thu, Jan 23, 2014 at 10:49 AM, swaminathan swaminat...@samsung.com wrote: Hi All, Is there any review Comments for the patch [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range for Video Macro Blocks posted on 30-Dec-2013 ? Just a side note, please don’t top post and always reply as plain text. [Snip] Subject: [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range for Video Macro Blocks This patch adds Controls to set Horizontal and Vertical search range for Motion Estimation block for Samsung MFC video Encoders. Signed-off-by: Swami Nathan swaminat...@samsung.com Signed-off-by: Amit Grover amit.gro...@samsung.com --- Documentation/DocBook/media/v4l/controls.xml| 14 + drivers/media/platform/s5p-mfc/s5p_mfc_common.h |2 ++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 24 +++ drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c |8 ++-- drivers/media/v4l2-core/v4l2-ctrls.c| 14 + include/uapi/linux/v4l2-controls.h |2 ++ 6 files changed, 58 insertions(+), 6 deletions(-) This patch from the outset looks OK, but you need to split up into two, first adding a v4l control and second one using it up in the driver. Regards, --Prabhakar Lad -- 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
[PATCH v2] media: i2c: mt9p031: Check return value of clk_prepare_enable/clk_set_rate
From: Lad, Prabhakar prabhakar.cse...@gmail.com clk_set_rate(), clk_prepare_enable() functions can fail, so check the return values to avoid surprises. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- Changes for v2: 1: Called regulator_bulk_disable() in the error path drivers/media/i2c/mt9p031.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index e5ddf47..05278f5 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -222,12 +222,15 @@ static int mt9p031_clk_setup(struct mt9p031 *mt9p031) struct i2c_client *client = v4l2_get_subdevdata(mt9p031-subdev); struct mt9p031_platform_data *pdata = mt9p031-pdata; + int ret; mt9p031-clk = devm_clk_get(client-dev, NULL); if (IS_ERR(mt9p031-clk)) return PTR_ERR(mt9p031-clk); - clk_set_rate(mt9p031-clk, pdata-ext_freq); + ret = clk_set_rate(mt9p031-clk, pdata-ext_freq); + if (ret 0) + return ret; mt9p031-pll.ext_clock = pdata-ext_freq; mt9p031-pll.pix_clock = pdata-target_freq; @@ -286,8 +289,14 @@ static int mt9p031_power_on(struct mt9p031 *mt9p031) return ret; /* Emable clock */ - if (mt9p031-clk) - clk_prepare_enable(mt9p031-clk); + if (mt9p031-clk) { + ret = clk_prepare_enable(mt9p031-clk); + if (ret) { + regulator_bulk_disable(ARRAY_SIZE(mt9p031-regulators), + mt9p031-regulators); + return ret; + } + } /* Now RESET_BAR must be high */ if (gpio_is_valid(mt9p031-reset)) { -- 1.7.9.5 -- 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
[PATCH] media: i2c: mt9p031: Check return value of clk_prepare_enable/clk_set_rate
From: Lad, Prabhakar prabhakar.cse...@gmail.com clk_set_rate(), clk_prepare_enable() functions can fail, so check the return values to avoid surprises. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/i2c/mt9p031.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index e5ddf47..dbe34d7 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c @@ -222,12 +222,15 @@ static int mt9p031_clk_setup(struct mt9p031 *mt9p031) struct i2c_client *client = v4l2_get_subdevdata(mt9p031-subdev); struct mt9p031_platform_data *pdata = mt9p031-pdata; + int ret; mt9p031-clk = devm_clk_get(client-dev, NULL); if (IS_ERR(mt9p031-clk)) return PTR_ERR(mt9p031-clk); - clk_set_rate(mt9p031-clk, pdata-ext_freq); + ret = clk_set_rate(mt9p031-clk, pdata-ext_freq); + if (ret 0) + return ret; mt9p031-pll.ext_clock = pdata-ext_freq; mt9p031-pll.pix_clock = pdata-target_freq; @@ -286,8 +289,11 @@ static int mt9p031_power_on(struct mt9p031 *mt9p031) return ret; /* Emable clock */ - if (mt9p031-clk) - clk_prepare_enable(mt9p031-clk); + if (mt9p031-clk) { + ret = clk_prepare_enable(mt9p031-clk); + if (ret) + return ret; + } /* Now RESET_BAR must be high */ if (gpio_is_valid(mt9p031-reset)) { -- 1.7.9.5 -- 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
[PATCH] media: i2c: mt9v032: Check return value of clk_prepare_enable/clk_set_rate
From: Lad, Prabhakar prabhakar.cse...@gmail.com clk_set_rate(), clk_prepare_enable() functions can fail, so check the return values to avoid surprises. Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/i2c/mt9v032.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/mt9v032.c b/drivers/media/i2c/mt9v032.c index 36c504b..40172b8 100644 --- a/drivers/media/i2c/mt9v032.c +++ b/drivers/media/i2c/mt9v032.c @@ -317,8 +317,14 @@ static int mt9v032_power_on(struct mt9v032 *mt9v032) struct i2c_client *client = v4l2_get_subdevdata(mt9v032-subdev); int ret; - clk_set_rate(mt9v032-clk, mt9v032-sysclk); - clk_prepare_enable(mt9v032-clk); + ret = clk_set_rate(mt9v032-clk, mt9v032-sysclk); + if (ret 0) + return ret; + + ret = clk_prepare_enable(mt9v032-clk); + if (ret) + return ret; + udelay(1); /* Reset the chip and stop data read out */ -- 1.7.9.5 -- 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
[PATCH] Update the link pointing the patch for porting the application to libv4l2
From: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- README.libv4l |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.libv4l b/README.libv4l index 0be503f..ffe6366 100644 --- a/README.libv4l +++ b/README.libv4l @@ -169,4 +169,4 @@ A: Just replace the open call for your device by v4l2_open and all Q: I still need an example how to convert my application! A: Check out the patches for the VLC media player: https://trac.videolan.org/vlc/attachment/ticket/1804/vlc-0.8.6-libv4l1.patch - https://trac.videolan.org/vlc/attachment/ticket/1804/vlc-0.8.6-libv4l2.patch + https://trac.videolan.org/vlc/attachment/ticket/1804/vlc-0.9.3-libv4l2.patch -- 1.7.9.5 -- 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
Re: [PATCH] media: davinci_vpfe: fix build error
Hi Hans, On Tue, Dec 17, 2013 at 8:55 PM, Lad, Prabhakar prabhakar.cse...@gmail.com wrote: From: Lad, Prabhakar prabhakar.cse...@gmail.com This patch includes linux/delay.h required for msleep, which fixes following build error. dm365_isif.c: In function ‘isif_enable’: dm365_isif.c:129:2: error: implicit declaration of function ‘msleep’ Will you pick this patch or shall I go ahead and issue a pull to Mauro ? Regards, --Prabhakar Lad -- 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
Re: [PATCH] media: davinci_vpfe: fix build error
Hi Hans, On Fri, Dec 20, 2013 at 6:23 PM, Hans Verkuil hverk...@xs4all.nl wrote: I just made a patch myself that I added to the pull request I just posted. You didn't CC me or CC the linux-media list when you posted your patch, so I never saw it. I dont know why this patch didnt make up in linux-media but its present DLOS [1]. I posted it the same day when you pinged me about this issue. Anyway your patch too didnt reach me and I also cannot find it in the ML. May be you directly issued the pull ? [1] https://patchwork.kernel.org/patch/3362211/ Regards, --Prabhakar Lad -- 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
Re: [PATCH] media: davinci_vpfe: fix build error
Hi Hans, On Fri, Dec 20, 2013 at 7:00 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, On 12/20/2013 02:02 PM, Prabhakar Lad wrote: Hi Hans, On Fri, Dec 20, 2013 at 6:23 PM, Hans Verkuil hverk...@xs4all.nl wrote: I just made a patch myself that I added to the pull request I just posted. You didn't CC me or CC the linux-media list when you posted your patch, so I never saw it. I dont know why this patch didnt make up in linux-media but its present DLOS [1]. If it's not mailed to linux-media, then it doesn't end up in linux-media patchwork, and then I won't see it when I process pending patches. While I am subscribed to DLOS I do not actually read it unless I know there is something that I need to pay attention to. This didnt land into linux-media becuase may be I sent it throught TI's network I usually send it via my home network. I posted it the same day when you pinged me about this issue. I was a bit surprised that I didn't see a patch for this, you are very prompt normally :-) :) Anyway your patch too didnt reach me and I also cannot find it in the ML. May be you directly issued the pull ? I directly issued the pull. It was such a trivial change. No problem as long as its fixed :) Thanks, --Prabhakar Lad -- 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
Re: [PATCH v3] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c
Hi Lisa, Thanks for the patch. On Wed, Dec 11, 2013 at 11:39 AM, Lisa Nguyen l...@xenapiadmin.com wrote: Rewrite the return statement in vpfe_video.c. This will prevent the checkpatch.pl script from generating a warning saying to remove () from this particular return statement. Signed-off-by: Lisa Nguyen l...@xenapiadmin.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Will be queueing it for 3.14. Regrads, --Prabhakar Lad --- Changes since v3: - Removed () from return statement per Laurent Pinchart's suggestion drivers/staging/media/davinci_vpfe/vpfe_video.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 24d98a6..3b036be 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -346,7 +346,7 @@ static int vpfe_pipeline_disable(struct vpfe_pipeline *pipe) } mutex_unlock(mdev-graph_mutex); - return (ret == 0) ? ret : -ETIMEDOUT ; + return ret ? -ETIMEDOUT : 0; } /* -- 1.7.9.5 -- 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
[GIT PULL FOR v3.14] DaVinci VPFE trivial fixes
Hi Mauro, Please pull the following patches for davinci vpfe driver. Regards, --Prabhakar Lad The following changes since commit 989af88339db26345e23271dae1089d949c4a0f1: [media] v4l: vsp1: Add LUT support (2013-12-11 09:25:20 -0200) are available in the git repository at: http://linuxtv.org/git/mhadli/v4l-dvb-davinci_devices.git for_mauro for you to fetch changes up to 189ac0f9249a6d4856531ecc60b65f77f50210a0: staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c (2013-12-11 22:32:12 +0530) Lisa Nguyen (2): staging: media: davinci_vpfe: Remove spaces before semicolons staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c drivers/staging/media/davinci_vpfe/dm365_ipipe.c |2 +- .../staging/media/davinci_vpfe/dm365_ipipe_hw.c|4 ++-- drivers/staging/media/davinci_vpfe/dm365_isif.c|2 +- drivers/staging/media/davinci_vpfe/vpfe_video.c|2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 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
Re: [RFCv4 PATCH 7/8] vb2: return ENODATA in start_streaming in case of too few buffers.
Hi Hans, On Tue, Dec 10, 2013 at 1:21 PM, Hans Verkuil hverk...@xs4all.nl wrote: As Guennadi mentioned in his review, ENODATA will be replaced by ENOBUFS, which is more appropriate. Prabhakar, Kamil, Tomasz, are you OK with this patch provided s/ENODATA/ENOBUFS/ ? +1 for ENOBUFS. Regards, --Prabhakar Lad Regards, Hans On 12/09/2013 02:43 PM, Hans Verkuil wrote: From: Hans Verkuil hans.verk...@cisco.com This works together with the retry_start_streaming mechanism to allow userspace to start streaming even if not all required buffers have been queued. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Tomasz Stanislawski t.stanisl...@samsung.com Cc: Kyungmin Park kyungmin.p...@samsung.com Cc: Kamil Debski k.deb...@samsung.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de --- drivers/media/platform/davinci/vpbe_display.c | 2 +- drivers/media/platform/davinci/vpif_capture.c | 2 +- drivers/media/platform/davinci/vpif_display.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c| 2 +- drivers/media/platform/s5p-tv/mixer_video.c | 2 +- drivers/media/platform/soc_camera/mx2_camera.c | 2 +- drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 ++ 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index eac472b..53be7fc 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -347,7 +347,7 @@ static int vpbe_start_streaming(struct vb2_queue *vq, unsigned int count) /* If buffer queue is empty, return error */ if (list_empty(layer-dma_queue)) { v4l2_err(vpbe_dev-v4l2_dev, buffer queue is empty\n); - return -EINVAL; + return -ENODATA; } /* Get the next frame from the buffer queue */ layer-next_frm = layer-cur_frm = list_entry(layer-dma_queue.next, diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 52ac5e6..4b04a27 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -277,7 +277,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) if (list_empty(common-dma_queue)) { spin_unlock_irqrestore(common-irqlock, flags); vpif_dbg(1, debug, buffer queue is empty\n); - return -EIO; + return -ENODATA; } /* Get the next frame from the buffer queue */ diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index c31bcf1..c5070dc 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -239,7 +239,7 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) if (list_empty(common-dma_queue)) { spin_unlock_irqrestore(common-irqlock, flags); vpif_err(buffer queue is empty\n); - return -EIO; + return -ENODATA; } /* Get the next frame from the buffer queue */ diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index 4ff3b6c..3bdfe85 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -1863,7 +1863,7 @@ static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count) if (ctx-src_bufs_cnt ctx-pb_count) { mfc_err(Need minimum %d OUTPUT buffers\n, ctx-pb_count); - return -EINVAL; + return -ENODATA; } } diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index 81b97db..220ec31 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -948,7 +948,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) if (count == 0) { mxr_dbg(mdev, no output buffers queued\n); - return -EINVAL; + return -ENODATA; } /* block any changes in output configuration */ diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 45a0276..587e3d1 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c @@ -659,7 +659,7 @@ static int mx2_start_streaming(struct vb2_queue *q, unsigned int count) unsigned long flags; if (count 2) - return -EINVAL; + return -ENODATA; spin_lock_irqsave(pcdev-lock, flags); diff --git a/drivers/staging/media
Re: [RFCv4 PATCH 7/8] vb2: return ENODATA in start_streaming in case of too few buffers.
On Tue, Dec 10, 2013 at 3:26 PM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Hans, On Tue, Dec 10, 2013 at 1:21 PM, Hans Verkuil hverk...@xs4all.nl wrote: As Guennadi mentioned in his review, ENODATA will be replaced by ENOBUFS, which is more appropriate. Prabhakar, Kamil, Tomasz, are you OK with this patch provided s/ENODATA/ENOBUFS/ ? +1 for ENOBUFS. Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regrads, --Prabhakar Lad -- 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
Re: [PATCH 2/2] staging: media: davinci_vpfe: Remove spaces before semicolons
Hi Laurent, On Tue, Dec 10, 2013 at 7:34 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, On Wednesday 30 October 2013 13:20:25 Prabhakar Lad wrote: On Tue, Oct 29, 2013 at 2:53 AM, Lisa Nguyen l...@xenapiadmin.com wrote: Remove unnecessary spaces before semicolons to meet kernel coding style. Signed-off-by: Lisa Nguyen l...@xenapiadmin.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Do you plan to send a pull request for these two patches ? I had asked for a change in the first patch but Lisa never turned back :( anyway I'll fix it and issue a pull request today to Mauro. Thanks, --Prabhakar Lad -- 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
Re: [PATCH 2/2] staging: media: davinci_vpfe: Remove spaces before semicolons
Hi Lisa, On Tue, Dec 10, 2013 at 8:27 PM, Lisa Nguyen l...@xenapiadmin.com wrote: Hi everyone, On Tue, Dec 10, 2013 at 6:34 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Laurent, On Tue, Dec 10, 2013 at 7:34 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, On Wednesday 30 October 2013 13:20:25 Prabhakar Lad wrote: On Tue, Oct 29, 2013 at 2:53 AM, Lisa Nguyen l...@xenapiadmin.com wrote: Remove unnecessary spaces before semicolons to meet kernel coding style. Signed-off-by: Lisa Nguyen l...@xenapiadmin.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Do you plan to send a pull request for these two patches ? I had asked for a change in the first patch but Lisa never turned back :( anyway I'll fix it and issue a pull request today to Mauro. My apologies. What happened was that I originally had sent these two patches to the staging mailing list. Greg KH advised me to send these to Mauro and the linux-media mailing list instead. As a result, there was a debate about the way the return statement was written in my first patch between Greg and a fellow developer, so I wasn't sure who to listen to. I was in the midst of changing jobs, so this didn't take top priority. Ok, do you plan to post it now ? Regards, --Prabhakar Lad -- 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
Re: [PATCH 2/2] staging: media: davinci_vpfe: Remove spaces before semicolons
Hi Lisa, On Tue, Dec 10, 2013 at 8:38 PM, Lisa Nguyen l...@xenapiadmin.com wrote: Hi Prabhakar, On Tue, Dec 10, 2013 at 7:04 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Lisa, On Tue, Dec 10, 2013 at 8:27 PM, Lisa Nguyen l...@xenapiadmin.com wrote: Hi everyone, On Tue, Dec 10, 2013 at 6:34 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Laurent, On Tue, Dec 10, 2013 at 7:34 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Prabhakar, On Wednesday 30 October 2013 13:20:25 Prabhakar Lad wrote: On Tue, Oct 29, 2013 at 2:53 AM, Lisa Nguyen l...@xenapiadmin.com wrote: Remove unnecessary spaces before semicolons to meet kernel coding style. Signed-off-by: Lisa Nguyen l...@xenapiadmin.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Do you plan to send a pull request for these two patches ? I had asked for a change in the first patch but Lisa never turned back :( anyway I'll fix it and issue a pull request today to Mauro. My apologies. What happened was that I originally had sent these two patches to the staging mailing list. Greg KH advised me to send these to Mauro and the linux-media mailing list instead. As a result, there was a debate about the way the return statement was written in my first patch between Greg and a fellow developer, so I wasn't sure who to listen to. I was in the midst of changing jobs, so this didn't take top priority. Ok, do you plan to post it now ? To be clear, I'd only have to update the first patch, correct? Yes! Regards, --Prabhakar Lad -- 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