projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
media
/
video
/
smiapp
/
smiapp-core.c
diff --git
a/drivers/media/video/smiapp/smiapp-core.c
b/drivers/media/video/smiapp/smiapp-core.c
index 9cf5bda35fbe1cfe332e8b18ae3d9218b3e8f54b..f466a7edcb2a8381378439b57abfa61327c526ab 100644
(file)
--- a/
drivers/media/video/smiapp/smiapp-core.c
+++ b/
drivers/media/video/smiapp/smiapp-core.c
@@
-39,9
+39,9
@@
#include "smiapp.h"
#include "smiapp.h"
-#define SMIAPP_ALIGN_DIM(dim, flags)
\
- ((flags) & V4L2_S
UBDEV_SEL_FLAG_SIZE_GE
\
- ? ALIGN((dim), 2)
\
+#define SMIAPP_ALIGN_DIM(dim, flags) \
+ ((flags) & V4L2_S
EL_FLAG_GE
\
+ ? ALIGN((dim), 2) \
: (dim) & ~1)
/*
: (dim) & ~1)
/*
@@
-1631,7
+1631,7
@@
static void smiapp_propagate(struct v4l2_subdev *subdev,
smiapp_get_crop_compose(subdev, fh, crops, &comp, which);
switch (target) {
smiapp_get_crop_compose(subdev, fh, crops, &comp, which);
switch (target) {
- case V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
:
+ case V4L2_S
EL_TGT_CROP
:
comp->width = crops[SMIAPP_PAD_SINK]->width;
comp->height = crops[SMIAPP_PAD_SINK]->height;
if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
comp->width = crops[SMIAPP_PAD_SINK]->width;
comp->height = crops[SMIAPP_PAD_SINK]->height;
if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
@@
-1647,7
+1647,7
@@
static void smiapp_propagate(struct v4l2_subdev *subdev,
}
}
/* Fall through */
}
}
/* Fall through */
- case V4L2_S
UBDEV_SEL_TGT_COMPOSE_ACTUAL
:
+ case V4L2_S
EL_TGT_COMPOSE
:
*crops[SMIAPP_PAD_SRC] = *comp;
break;
default:
*crops[SMIAPP_PAD_SRC] = *comp;
break;
default:
@@
-1723,7
+1723,7
@@
static int smiapp_set_format(struct v4l2_subdev *subdev,
if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
ssd->sink_fmt = *crops[ssd->sink_pad];
smiapp_propagate(subdev, fh, fmt->which,
if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
ssd->sink_fmt = *crops[ssd->sink_pad];
smiapp_propagate(subdev, fh, fmt->which,
- V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
);
+ V4L2_S
EL_TGT_CROP
);
mutex_unlock(&sensor->mutex);
mutex_unlock(&sensor->mutex);
@@
-1748,14
+1748,14
@@
static int scaling_goodness(struct v4l2_subdev *subdev, int w, int ask_w,
h &= ~1;
ask_h &= ~1;
h &= ~1;
ask_h &= ~1;
- if (flags & V4L2_S
UBDEV_SEL_FLAG_SIZE
_GE) {
+ if (flags & V4L2_S
EL_FLAG
_GE) {
if (w < ask_w)
val -= SCALING_GOODNESS;
if (h < ask_h)
val -= SCALING_GOODNESS;
}
if (w < ask_w)
val -= SCALING_GOODNESS;
if (h < ask_h)
val -= SCALING_GOODNESS;
}
- if (flags & V4L2_S
UBDEV_SEL_FLAG_SIZE
_LE) {
+ if (flags & V4L2_S
EL_FLAG
_LE) {
if (w > ask_w)
val -= SCALING_GOODNESS;
if (h > ask_h)
if (w > ask_w)
val -= SCALING_GOODNESS;
if (h > ask_h)
@@
-1958,7
+1958,7
@@
static int smiapp_set_compose(struct v4l2_subdev *subdev,
*comp = sel->r;
smiapp_propagate(subdev, fh, sel->which,
*comp = sel->r;
smiapp_propagate(subdev, fh, sel->which,
- V4L2_S
UBDEV_SEL_TGT_COMPOSE_ACTUAL
);
+ V4L2_S
EL_TGT_COMPOSE
);
if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE)
return smiapp_update_mode(sensor);
if (sel->which == V4L2_SUBDEV_FORMAT_ACTIVE)
return smiapp_update_mode(sensor);
@@
-1974,8
+1974,8
@@
static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
/* We only implement crop in three places. */
switch (sel->target) {
/* We only implement crop in three places. */
switch (sel->target) {
- case V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
:
- case V4L2_S
UBDEV_S
EL_TGT_CROP_BOUNDS:
+ case V4L2_S
EL_TGT_CROP
:
+ case V4L2_SEL_TGT_CROP_BOUNDS:
if (ssd == sensor->pixel_array
&& sel->pad == SMIAPP_PA_PAD_SRC)
return 0;
if (ssd == sensor->pixel_array
&& sel->pad == SMIAPP_PA_PAD_SRC)
return 0;
@@
-1988,8
+1988,8
@@
static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
== SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
return 0;
return -EINVAL;
== SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
return 0;
return -EINVAL;
- case V4L2_S
UBDEV_SEL_TGT_COMPOSE_ACTUAL
:
- case V4L2_S
UBDEV_S
EL_TGT_COMPOSE_BOUNDS:
+ case V4L2_S
EL_TGT_COMPOSE
:
+ case V4L2_SEL_TGT_COMPOSE_BOUNDS:
if (sel->pad == ssd->source_pad)
return -EINVAL;
if (ssd == sensor->binner)
if (sel->pad == ssd->source_pad)
return -EINVAL;
if (ssd == sensor->binner)
@@
-2051,7
+2051,7
@@
static int smiapp_set_crop(struct v4l2_subdev *subdev,
if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK)
smiapp_propagate(subdev, fh, sel->which,
if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK)
smiapp_propagate(subdev, fh, sel->which,
- V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
);
+ V4L2_S
EL_TGT_CROP
);
return 0;
}
return 0;
}
@@
-2085,7
+2085,7
@@
static int __smiapp_get_selection(struct v4l2_subdev *subdev,
}
switch (sel->target) {
}
switch (sel->target) {
- case V4L2_S
UBDEV_S
EL_TGT_CROP_BOUNDS:
+ case V4L2_SEL_TGT_CROP_BOUNDS:
if (ssd == sensor->pixel_array) {
sel->r.width =
sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;
if (ssd == sensor->pixel_array) {
sel->r.width =
sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;
@@
-2097,11
+2097,11
@@
static int __smiapp_get_selection(struct v4l2_subdev *subdev,
sel->r = *comp;
}
break;
sel->r = *comp;
}
break;
- case V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
:
- case V4L2_S
UBDEV_S
EL_TGT_COMPOSE_BOUNDS:
+ case V4L2_S
EL_TGT_CROP
:
+ case V4L2_SEL_TGT_COMPOSE_BOUNDS:
sel->r = *crops[sel->pad];
break;
sel->r = *crops[sel->pad];
break;
- case V4L2_S
UBDEV_SEL_TGT_COMPOSE_ACTUAL
:
+ case V4L2_S
EL_TGT_COMPOSE
:
sel->r = *comp;
break;
}
sel->r = *comp;
break;
}
@@
-2148,10
+2148,10
@@
static int smiapp_set_selection(struct v4l2_subdev *subdev,
sel->r.height);
switch (sel->target) {
sel->r.height);
switch (sel->target) {
- case V4L2_S
UBDEV_SEL_TGT_CROP_ACTUAL
:
+ case V4L2_S
EL_TGT_CROP
:
ret = smiapp_set_crop(subdev, fh, sel);
break;
ret = smiapp_set_crop(subdev, fh, sel);
break;
- case V4L2_S
UBDEV_SEL_TGT_COMPOSE_ACTUAL
:
+ case V4L2_S
EL_TGT_COMPOSE
:
ret = smiapp_set_compose(subdev, fh, sel);
break;
default:
ret = smiapp_set_compose(subdev, fh, sel);
break;
default: