mirror of https://gitee.com/openkylin/linux.git
[media] v4l: omap4iss: Restrict line lengths to 80 characters where possible
Pure CodingStyle fixes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
499226fb19
commit
a0fe029ccc
|
@ -178,7 +178,8 @@ int omap4iss_csiphy_config(struct iss_device *iss,
|
||||||
if (lanes->data[i].pos == 0)
|
if (lanes->data[i].pos == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lanes->data[i].pol > 1 || lanes->data[i].pos > (csi2->phy->max_data_lanes + 1))
|
if (lanes->data[i].pol > 1 ||
|
||||||
|
lanes->data[i].pos > (csi2->phy->max_data_lanes + 1))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (used_lanes & (1 << lanes->data[i].pos))
|
if (used_lanes & (1 << lanes->data[i].pos))
|
||||||
|
@ -188,7 +189,8 @@ int omap4iss_csiphy_config(struct iss_device *iss,
|
||||||
csi2->phy->used_data_lanes++;
|
csi2->phy->used_data_lanes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lanes->clk.pol > 1 || lanes->clk.pos > (csi2->phy->max_data_lanes + 1))
|
if (lanes->clk.pol > 1 ||
|
||||||
|
lanes->clk.pos > (csi2->phy->max_data_lanes + 1))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (lanes->clk.pos == 0 || used_lanes & (1 << lanes->clk.pos))
|
if (lanes->clk.pos == 0 || used_lanes & (1 << lanes->clk.pos))
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
#include "iss_regs.h"
|
#include "iss_regs.h"
|
||||||
#include "iss_ipipeif.h"
|
#include "iss_ipipeif.h"
|
||||||
|
|
||||||
static struct v4l2_mbus_framefmt *
|
|
||||||
__ipipeif_get_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
|
|
||||||
unsigned int pad, enum v4l2_subdev_format_whence which);
|
|
||||||
|
|
||||||
static const unsigned int ipipeif_fmts[] = {
|
static const unsigned int ipipeif_fmts[] = {
|
||||||
V4L2_MBUS_FMT_SGRBG10_1X10,
|
V4L2_MBUS_FMT_SGRBG10_1X10,
|
||||||
V4L2_MBUS_FMT_SRGGB10_1X10,
|
V4L2_MBUS_FMT_SRGGB10_1X10,
|
||||||
|
@ -274,7 +270,8 @@ static void ipipeif_isif0_isr(struct iss_ipipeif_device *ipipeif)
|
||||||
*/
|
*/
|
||||||
void omap4iss_ipipeif_isr(struct iss_ipipeif_device *ipipeif, u32 events)
|
void omap4iss_ipipeif_isr(struct iss_ipipeif_device *ipipeif, u32 events)
|
||||||
{
|
{
|
||||||
if (omap4iss_module_sync_is_stopping(&ipipeif->wait, &ipipeif->stopping))
|
if (omap4iss_module_sync_is_stopping(&ipipeif->wait,
|
||||||
|
&ipipeif->stopping))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (events & ISP5_IRQ_ISIF0)
|
if (events & ISP5_IRQ_ISIF0)
|
||||||
|
@ -285,7 +282,8 @@ void omap4iss_ipipeif_isr(struct iss_ipipeif_device *ipipeif, u32 events)
|
||||||
* ISP video operations
|
* ISP video operations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int ipipeif_video_queue(struct iss_video *video, struct iss_buffer *buffer)
|
static int ipipeif_video_queue(struct iss_video *video,
|
||||||
|
struct iss_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct iss_ipipeif_device *ipipeif = container_of(video,
|
struct iss_ipipeif_device *ipipeif = container_of(video,
|
||||||
struct iss_ipipeif_device, video_out);
|
struct iss_ipipeif_device, video_out);
|
||||||
|
@ -385,8 +383,9 @@ static int ipipeif_set_stream(struct v4l2_subdev *sd, int enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct v4l2_mbus_framefmt *
|
static struct v4l2_mbus_framefmt *
|
||||||
__ipipeif_get_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
|
__ipipeif_get_format(struct iss_ipipeif_device *ipipeif,
|
||||||
unsigned int pad, enum v4l2_subdev_format_whence which)
|
struct v4l2_subdev_fh *fh, unsigned int pad,
|
||||||
|
enum v4l2_subdev_format_whence which)
|
||||||
{
|
{
|
||||||
if (which == V4L2_SUBDEV_FORMAT_TRY)
|
if (which == V4L2_SUBDEV_FORMAT_TRY)
|
||||||
return v4l2_subdev_get_try_format(fh, pad);
|
return v4l2_subdev_get_try_format(fh, pad);
|
||||||
|
@ -402,8 +401,9 @@ __ipipeif_get_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *
|
||||||
* @fmt: Format
|
* @fmt: Format
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ipipeif_try_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
|
ipipeif_try_format(struct iss_ipipeif_device *ipipeif,
|
||||||
unsigned int pad, struct v4l2_mbus_framefmt *fmt,
|
struct v4l2_subdev_fh *fh, unsigned int pad,
|
||||||
|
struct v4l2_mbus_framefmt *fmt,
|
||||||
enum v4l2_subdev_format_whence which)
|
enum v4l2_subdev_format_whence which)
|
||||||
{
|
{
|
||||||
struct v4l2_mbus_framefmt *format;
|
struct v4l2_mbus_framefmt *format;
|
||||||
|
@ -413,8 +413,8 @@ ipipeif_try_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh
|
||||||
|
|
||||||
switch (pad) {
|
switch (pad) {
|
||||||
case IPIPEIF_PAD_SINK:
|
case IPIPEIF_PAD_SINK:
|
||||||
/* TODO: If the IPIPEIF output formatter pad is connected directly
|
/* TODO: If the IPIPEIF output formatter pad is connected
|
||||||
* to the resizer, only YUV formats can be used.
|
* directly to the resizer, only YUV formats can be used.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < ARRAY_SIZE(ipipeif_fmts); i++) {
|
for (i = 0; i < ARRAY_SIZE(ipipeif_fmts); i++) {
|
||||||
if (fmt->code == ipipeif_fmts[i])
|
if (fmt->code == ipipeif_fmts[i])
|
||||||
|
@ -431,7 +431,8 @@ ipipeif_try_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPIPEIF_PAD_SOURCE_ISIF_SF:
|
case IPIPEIF_PAD_SOURCE_ISIF_SF:
|
||||||
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK, which);
|
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK,
|
||||||
|
which);
|
||||||
memcpy(fmt, format, sizeof(*fmt));
|
memcpy(fmt, format, sizeof(*fmt));
|
||||||
|
|
||||||
/* The data formatter truncates the number of horizontal output
|
/* The data formatter truncates the number of horizontal output
|
||||||
|
@ -445,7 +446,8 @@ ipipeif_try_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPIPEIF_PAD_SOURCE_VP:
|
case IPIPEIF_PAD_SOURCE_VP:
|
||||||
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK, which);
|
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK,
|
||||||
|
which);
|
||||||
memcpy(fmt, format, sizeof(*fmt));
|
memcpy(fmt, format, sizeof(*fmt));
|
||||||
|
|
||||||
fmt->width = clamp_t(u32, width, 32, fmt->width);
|
fmt->width = clamp_t(u32, width, 32, fmt->width);
|
||||||
|
@ -514,7 +516,8 @@ static int ipipeif_enum_frame_size(struct v4l2_subdev *sd,
|
||||||
format.code = fse->code;
|
format.code = fse->code;
|
||||||
format.width = 1;
|
format.width = 1;
|
||||||
format.height = 1;
|
format.height = 1;
|
||||||
ipipeif_try_format(ipipeif, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
|
ipipeif_try_format(ipipeif, fh, fse->pad, &format,
|
||||||
|
V4L2_SUBDEV_FORMAT_TRY);
|
||||||
fse->min_width = format.width;
|
fse->min_width = format.width;
|
||||||
fse->min_height = format.height;
|
fse->min_height = format.height;
|
||||||
|
|
||||||
|
@ -524,7 +527,8 @@ static int ipipeif_enum_frame_size(struct v4l2_subdev *sd,
|
||||||
format.code = fse->code;
|
format.code = fse->code;
|
||||||
format.width = -1;
|
format.width = -1;
|
||||||
format.height = -1;
|
format.height = -1;
|
||||||
ipipeif_try_format(ipipeif, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
|
ipipeif_try_format(ipipeif, fh, fse->pad, &format,
|
||||||
|
V4L2_SUBDEV_FORMAT_TRY);
|
||||||
fse->max_width = format.width;
|
fse->max_width = format.width;
|
||||||
fse->max_height = format.height;
|
fse->max_height = format.height;
|
||||||
|
|
||||||
|
@ -578,13 +582,15 @@ static int ipipeif_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
|
||||||
|
|
||||||
/* Propagate the format from sink to source */
|
/* Propagate the format from sink to source */
|
||||||
if (fmt->pad == IPIPEIF_PAD_SINK) {
|
if (fmt->pad == IPIPEIF_PAD_SINK) {
|
||||||
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF,
|
format = __ipipeif_get_format(ipipeif, fh,
|
||||||
|
IPIPEIF_PAD_SOURCE_ISIF_SF,
|
||||||
fmt->which);
|
fmt->which);
|
||||||
*format = fmt->format;
|
*format = fmt->format;
|
||||||
ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF, format,
|
ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF,
|
||||||
fmt->which);
|
format, fmt->which);
|
||||||
|
|
||||||
format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_VP,
|
format = __ipipeif_get_format(ipipeif, fh,
|
||||||
|
IPIPEIF_PAD_SOURCE_VP,
|
||||||
fmt->which);
|
fmt->which);
|
||||||
*format = fmt->format;
|
*format = fmt->format;
|
||||||
ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_VP, format,
|
ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_VP, format,
|
||||||
|
@ -594,7 +600,8 @@ static int ipipeif_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ipipeif_link_validate(struct v4l2_subdev *sd, struct media_link *link,
|
static int ipipeif_link_validate(struct v4l2_subdev *sd,
|
||||||
|
struct media_link *link,
|
||||||
struct v4l2_subdev_format *source_fmt,
|
struct v4l2_subdev_format *source_fmt,
|
||||||
struct v4l2_subdev_format *sink_fmt)
|
struct v4l2_subdev_format *sink_fmt)
|
||||||
{
|
{
|
||||||
|
@ -618,7 +625,8 @@ static int ipipeif_link_validate(struct v4l2_subdev *sd, struct media_link *link
|
||||||
* formats are initialized on the file handle. Otherwise active formats are
|
* formats are initialized on the file handle. Otherwise active formats are
|
||||||
* initialized on the device.
|
* initialized on the device.
|
||||||
*/
|
*/
|
||||||
static int ipipeif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
static int ipipeif_init_formats(struct v4l2_subdev *sd,
|
||||||
|
struct v4l2_subdev_fh *fh)
|
||||||
{
|
{
|
||||||
struct v4l2_subdev_format format;
|
struct v4l2_subdev_format format;
|
||||||
|
|
||||||
|
@ -778,7 +786,8 @@ static int ipipeif_init_entities(struct iss_ipipeif_device *ipipeif)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Connect the IPIPEIF subdev to the video node. */
|
/* Connect the IPIPEIF subdev to the video node. */
|
||||||
ret = media_entity_create_link(&ipipeif->subdev.entity, IPIPEIF_PAD_SOURCE_ISIF_SF,
|
ret = media_entity_create_link(&ipipeif->subdev.entity,
|
||||||
|
IPIPEIF_PAD_SOURCE_ISIF_SF,
|
||||||
&ipipeif->video_out.video.entity, 0, 0);
|
&ipipeif->video_out.video.entity, 0, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -23,10 +23,6 @@
|
||||||
#include "iss_regs.h"
|
#include "iss_regs.h"
|
||||||
#include "iss_resizer.h"
|
#include "iss_resizer.h"
|
||||||
|
|
||||||
static struct v4l2_mbus_framefmt *
|
|
||||||
__resizer_get_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
|
|
||||||
unsigned int pad, enum v4l2_subdev_format_whence which);
|
|
||||||
|
|
||||||
static const unsigned int resizer_fmts[] = {
|
static const unsigned int resizer_fmts[] = {
|
||||||
V4L2_MBUS_FMT_UYVY8_1X16,
|
V4L2_MBUS_FMT_UYVY8_1X16,
|
||||||
V4L2_MBUS_FMT_YUYV8_1X16,
|
V4L2_MBUS_FMT_YUYV8_1X16,
|
||||||
|
@ -329,7 +325,8 @@ void omap4iss_resizer_isr(struct iss_resizer_device *resizer, u32 events)
|
||||||
pipe->error = true;
|
pipe->error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (omap4iss_module_sync_is_stopping(&resizer->wait, &resizer->stopping))
|
if (omap4iss_module_sync_is_stopping(&resizer->wait,
|
||||||
|
&resizer->stopping))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (events & ISP5_IRQ_RSZ_INT_DMA)
|
if (events & ISP5_IRQ_RSZ_INT_DMA)
|
||||||
|
@ -340,7 +337,8 @@ void omap4iss_resizer_isr(struct iss_resizer_device *resizer, u32 events)
|
||||||
* ISS video operations
|
* ISS video operations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int resizer_video_queue(struct iss_video *video, struct iss_buffer *buffer)
|
static int resizer_video_queue(struct iss_video *video,
|
||||||
|
struct iss_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct iss_resizer_device *resizer = container_of(video,
|
struct iss_resizer_device *resizer = container_of(video,
|
||||||
struct iss_resizer_device, video_out);
|
struct iss_resizer_device, video_out);
|
||||||
|
@ -453,8 +451,9 @@ static int resizer_set_stream(struct v4l2_subdev *sd, int enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct v4l2_mbus_framefmt *
|
static struct v4l2_mbus_framefmt *
|
||||||
__resizer_get_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
|
__resizer_get_format(struct iss_resizer_device *resizer,
|
||||||
unsigned int pad, enum v4l2_subdev_format_whence which)
|
struct v4l2_subdev_fh *fh, unsigned int pad,
|
||||||
|
enum v4l2_subdev_format_whence which)
|
||||||
{
|
{
|
||||||
if (which == V4L2_SUBDEV_FORMAT_TRY)
|
if (which == V4L2_SUBDEV_FORMAT_TRY)
|
||||||
return v4l2_subdev_get_try_format(fh, pad);
|
return v4l2_subdev_get_try_format(fh, pad);
|
||||||
|
@ -470,8 +469,9 @@ __resizer_get_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *
|
||||||
* @fmt: Format
|
* @fmt: Format
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
resizer_try_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
|
resizer_try_format(struct iss_resizer_device *resizer,
|
||||||
unsigned int pad, struct v4l2_mbus_framefmt *fmt,
|
struct v4l2_subdev_fh *fh, unsigned int pad,
|
||||||
|
struct v4l2_mbus_framefmt *fmt,
|
||||||
enum v4l2_subdev_format_whence which)
|
enum v4l2_subdev_format_whence which)
|
||||||
{
|
{
|
||||||
enum v4l2_mbus_pixelcode pixelcode;
|
enum v4l2_mbus_pixelcode pixelcode;
|
||||||
|
@ -498,7 +498,8 @@ resizer_try_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh
|
||||||
|
|
||||||
case RESIZER_PAD_SOURCE_MEM:
|
case RESIZER_PAD_SOURCE_MEM:
|
||||||
pixelcode = fmt->code;
|
pixelcode = fmt->code;
|
||||||
format = __resizer_get_format(resizer, fh, RESIZER_PAD_SINK, which);
|
format = __resizer_get_format(resizer, fh, RESIZER_PAD_SINK,
|
||||||
|
which);
|
||||||
memcpy(fmt, format, sizeof(*fmt));
|
memcpy(fmt, format, sizeof(*fmt));
|
||||||
|
|
||||||
if ((pixelcode == V4L2_MBUS_FMT_YUYV8_1_5X8) &&
|
if ((pixelcode == V4L2_MBUS_FMT_YUYV8_1_5X8) &&
|
||||||
|
@ -586,7 +587,8 @@ static int resizer_enum_frame_size(struct v4l2_subdev *sd,
|
||||||
format.code = fse->code;
|
format.code = fse->code;
|
||||||
format.width = 1;
|
format.width = 1;
|
||||||
format.height = 1;
|
format.height = 1;
|
||||||
resizer_try_format(resizer, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
|
resizer_try_format(resizer, fh, fse->pad, &format,
|
||||||
|
V4L2_SUBDEV_FORMAT_TRY);
|
||||||
fse->min_width = format.width;
|
fse->min_width = format.width;
|
||||||
fse->min_height = format.height;
|
fse->min_height = format.height;
|
||||||
|
|
||||||
|
@ -596,7 +598,8 @@ static int resizer_enum_frame_size(struct v4l2_subdev *sd,
|
||||||
format.code = fse->code;
|
format.code = fse->code;
|
||||||
format.width = -1;
|
format.width = -1;
|
||||||
format.height = -1;
|
format.height = -1;
|
||||||
resizer_try_format(resizer, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
|
resizer_try_format(resizer, fh, fse->pad, &format,
|
||||||
|
V4L2_SUBDEV_FORMAT_TRY);
|
||||||
fse->max_width = format.width;
|
fse->max_width = format.width;
|
||||||
fse->max_height = format.height;
|
fse->max_height = format.height;
|
||||||
|
|
||||||
|
@ -650,7 +653,8 @@ static int resizer_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
|
||||||
|
|
||||||
/* Propagate the format from sink to source */
|
/* Propagate the format from sink to source */
|
||||||
if (fmt->pad == RESIZER_PAD_SINK) {
|
if (fmt->pad == RESIZER_PAD_SINK) {
|
||||||
format = __resizer_get_format(resizer, fh, RESIZER_PAD_SOURCE_MEM,
|
format = __resizer_get_format(resizer, fh,
|
||||||
|
RESIZER_PAD_SOURCE_MEM,
|
||||||
fmt->which);
|
fmt->which);
|
||||||
*format = fmt->format;
|
*format = fmt->format;
|
||||||
resizer_try_format(resizer, fh, RESIZER_PAD_SOURCE_MEM, format,
|
resizer_try_format(resizer, fh, RESIZER_PAD_SOURCE_MEM, format,
|
||||||
|
@ -660,7 +664,8 @@ static int resizer_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int resizer_link_validate(struct v4l2_subdev *sd, struct media_link *link,
|
static int resizer_link_validate(struct v4l2_subdev *sd,
|
||||||
|
struct media_link *link,
|
||||||
struct v4l2_subdev_format *source_fmt,
|
struct v4l2_subdev_format *source_fmt,
|
||||||
struct v4l2_subdev_format *sink_fmt)
|
struct v4l2_subdev_format *sink_fmt)
|
||||||
{
|
{
|
||||||
|
@ -684,7 +689,8 @@ static int resizer_link_validate(struct v4l2_subdev *sd, struct media_link *link
|
||||||
* formats are initialized on the file handle. Otherwise active formats are
|
* formats are initialized on the file handle. Otherwise active formats are
|
||||||
* initialized on the device.
|
* initialized on the device.
|
||||||
*/
|
*/
|
||||||
static int resizer_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
static int resizer_init_formats(struct v4l2_subdev *sd,
|
||||||
|
struct v4l2_subdev_fh *fh)
|
||||||
{
|
{
|
||||||
struct v4l2_subdev_format format;
|
struct v4l2_subdev_format format;
|
||||||
|
|
||||||
|
@ -833,7 +839,8 @@ static int resizer_init_entities(struct iss_resizer_device *resizer)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Connect the RESIZER subdev to the video node. */
|
/* Connect the RESIZER subdev to the video node. */
|
||||||
ret = media_entity_create_link(&resizer->subdev.entity, RESIZER_PAD_SOURCE_MEM,
|
ret = media_entity_create_link(&resizer->subdev.entity,
|
||||||
|
RESIZER_PAD_SOURCE_MEM,
|
||||||
&resizer->video_out.video.entity, 0, 0);
|
&resizer->video_out.video.entity, 0, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -282,7 +282,8 @@ iss_video_check_format(struct iss_video *video, struct iss_video_fh *vfh)
|
||||||
* Video queue operations
|
* Video queue operations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int iss_video_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
|
static int iss_video_queue_setup(struct vb2_queue *vq,
|
||||||
|
const struct v4l2_format *fmt,
|
||||||
unsigned int *count, unsigned int *num_planes,
|
unsigned int *count, unsigned int *num_planes,
|
||||||
unsigned int sizes[], void *alloc_ctxs[])
|
unsigned int sizes[], void *alloc_ctxs[])
|
||||||
{
|
{
|
||||||
|
@ -298,7 +299,7 @@ static int iss_video_queue_setup(struct vb2_queue *vq, const struct v4l2_format
|
||||||
|
|
||||||
alloc_ctxs[0] = video->alloc_ctx;
|
alloc_ctxs[0] = video->alloc_ctx;
|
||||||
|
|
||||||
*count = min(*count, (unsigned int)(video->capture_mem / PAGE_ALIGN(sizes[0])));
|
*count = min(*count, video->capture_mem / PAGE_ALIGN(sizes[0]));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -425,11 +426,13 @@ struct iss_buffer *omap4iss_video_buffer_next(struct iss_video *video)
|
||||||
* first, so the input number might lag behind by 1 in some cases.
|
* first, so the input number might lag behind by 1 in some cases.
|
||||||
*/
|
*/
|
||||||
if (video == pipe->output && !pipe->do_propagation)
|
if (video == pipe->output && !pipe->do_propagation)
|
||||||
buf->vb.v4l2_buf.sequence = atomic_inc_return(&pipe->frame_number);
|
buf->vb.v4l2_buf.sequence =
|
||||||
|
atomic_inc_return(&pipe->frame_number);
|
||||||
else
|
else
|
||||||
buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number);
|
buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number);
|
||||||
|
|
||||||
vb2_buffer_done(&buf->vb, pipe->error ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
|
vb2_buffer_done(&buf->vb, pipe->error ?
|
||||||
|
VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
|
||||||
pipe->error = false;
|
pipe->error = false;
|
||||||
|
|
||||||
spin_lock_irqsave(&video->qlock, flags);
|
spin_lock_irqsave(&video->qlock, flags);
|
||||||
|
|
Loading…
Reference in New Issue