diff options
author | Sylwester Nawrocki <sylvester.nawrocki@gmail.com> | 2012-05-20 10:17:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-06 19:13:30 -0400 |
commit | c133482300113b3b71fa4a1fd2118531e765b36a (patch) | |
tree | 795edef9f10d5016c64edf1e7959669b26d7bf51 | |
parent | 936148a71e5e55a301b274e98b0ad8b246a6f11b (diff) |
[media] V4L: Remove "_ACTIVE" from the selection target name definitions
This patch drops the _ACTIVE part from the selection target names
as a prerequisite to unify the selection target names across the subdev
and regular video node API.
The meaning of V4L2_SEL_TGT_*_ACTIVE and V4L2_SUBDEV_SEL_TGT_*_ACTUAL
selection targets is logically the same. Different names add to confusion
where both APIs are used in a single driver or an application. For some
system configurations different names may lead to interoperability issues.
For backwards compatibility V4L2_SEL_TGT_CROP_ACTIVE and
V4L2_SEL_TGT_COMPOSE_ACTIVE are defined as aliases to V4L2_SEL_TGT_CROP
and V4L2_SEL_TGT_COMPOSE. These aliases will be removed after deprecation
period, according to Documentation/feature-removal-schedule.txt.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/DocBook/media/v4l/selection-api.xml | 24 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-selection.xml | 15 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 14 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-lite.c | 4 | ||||
-rw-r--r-- | drivers/media/video/s5p-jpeg/jpeg-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/s5p-tv/mixer_video.c | 8 | ||||
-rw-r--r-- | include/linux/videodev2.h | 8 |
7 files changed, 41 insertions, 36 deletions
diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml index b299e4779354..ac013e50e0bd 100644 --- a/Documentation/DocBook/media/v4l/selection-api.xml +++ b/Documentation/DocBook/media/v4l/selection-api.xml | |||
@@ -91,7 +91,7 @@ top/left corner at position <constant> (0,0) </constant>. The rectangle's | |||
91 | coordinates are expressed in pixels.</para> | 91 | coordinates are expressed in pixels.</para> |
92 | 92 | ||
93 | <para>The top left corner, width and height of the source rectangle, that is | 93 | <para>The top left corner, width and height of the source rectangle, that is |
94 | the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP_ACTIVE | 94 | the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP |
95 | </constant> target. It uses the same coordinate system as <constant> | 95 | </constant> target. It uses the same coordinate system as <constant> |
96 | V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie | 96 | V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie |
97 | completely inside the capture boundaries. The driver may further adjust the | 97 | completely inside the capture boundaries. The driver may further adjust the |
@@ -111,7 +111,7 @@ height are equal to the image size set by <constant> VIDIOC_S_FMT </constant>. | |||
111 | </para> | 111 | </para> |
112 | 112 | ||
113 | <para>The part of a buffer into which the image is inserted by the hardware is | 113 | <para>The part of a buffer into which the image is inserted by the hardware is |
114 | controlled by the <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. | 114 | controlled by the <constant> V4L2_SEL_TGT_COMPOSE </constant> target. |
115 | The rectangle's coordinates are also expressed in the same coordinate system as | 115 | The rectangle's coordinates are also expressed in the same coordinate system as |
116 | the bounds rectangle. The composing rectangle must lie completely inside bounds | 116 | the bounds rectangle. The composing rectangle must lie completely inside bounds |
117 | rectangle. The driver must adjust the composing rectangle to fit to the | 117 | rectangle. The driver must adjust the composing rectangle to fit to the |
@@ -125,7 +125,7 @@ bounding rectangle.</para> | |||
125 | 125 | ||
126 | <para>The part of a buffer that is modified by the hardware is given by | 126 | <para>The part of a buffer that is modified by the hardware is given by |
127 | <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels | 127 | <constant> V4L2_SEL_TGT_COMPOSE_PADDED </constant>. It contains all pixels |
128 | defined using <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> plus all | 128 | defined using <constant> V4L2_SEL_TGT_COMPOSE </constant> plus all |
129 | padding data modified by hardware during insertion process. All pixels outside | 129 | padding data modified by hardware during insertion process. All pixels outside |
130 | this rectangle <emphasis>must not</emphasis> be changed by the hardware. The | 130 | this rectangle <emphasis>must not</emphasis> be changed by the hardware. The |
131 | content of pixels that lie inside the padded area but outside active area is | 131 | content of pixels that lie inside the padded area but outside active area is |
@@ -153,7 +153,7 @@ specified using <constant> VIDIOC_S_FMT </constant> ioctl.</para> | |||
153 | 153 | ||
154 | <para>The top left corner, width and height of the source rectangle, that is | 154 | <para>The top left corner, width and height of the source rectangle, that is |
155 | the area from which image date are processed by the hardware, is given by the | 155 | the area from which image date are processed by the hardware, is given by the |
156 | <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant>. Its coordinates are expressed | 156 | <constant> V4L2_SEL_TGT_CROP </constant>. Its coordinates are expressed |
157 | in in the same coordinate system as the bounds rectangle. The active cropping | 157 | in in the same coordinate system as the bounds rectangle. The active cropping |
158 | area must lie completely inside the crop boundaries and the driver may further | 158 | area must lie completely inside the crop boundaries and the driver may further |
159 | adjust the requested size and/or position according to hardware | 159 | adjust the requested size and/or position according to hardware |
@@ -165,7 +165,7 @@ bounding rectangle.</para> | |||
165 | 165 | ||
166 | <para>The part of a video signal or graphics display where the image is | 166 | <para>The part of a video signal or graphics display where the image is |
167 | inserted by the hardware is controlled by <constant> | 167 | inserted by the hardware is controlled by <constant> |
168 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target. The rectangle's coordinates | 168 | V4L2_SEL_TGT_COMPOSE </constant> target. The rectangle's coordinates |
169 | are expressed in pixels. The composing rectangle must lie completely inside the | 169 | are expressed in pixels. The composing rectangle must lie completely inside the |
170 | bounds rectangle. The driver must adjust the area to fit to the bounding | 170 | bounds rectangle. The driver must adjust the area to fit to the bounding |
171 | limits. Moreover, the driver can perform other adjustments according to | 171 | limits. Moreover, the driver can perform other adjustments according to |
@@ -184,7 +184,7 @@ such a padded area is driver-dependent feature not covered by this document. | |||
184 | Driver developers are encouraged to keep padded rectangle equal to active one. | 184 | Driver developers are encouraged to keep padded rectangle equal to active one. |
185 | The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED | 185 | The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED |
186 | </constant> identifier. It must contain all pixels from the <constant> | 186 | </constant> identifier. It must contain all pixels from the <constant> |
187 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> | 187 | V4L2_SEL_TGT_COMPOSE </constant> target.</para> |
188 | 188 | ||
189 | </section> | 189 | </section> |
190 | 190 | ||
@@ -193,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> target.</para> | |||
193 | <title>Scaling control</title> | 193 | <title>Scaling control</title> |
194 | 194 | ||
195 | <para>An application can detect if scaling is performed by comparing the width | 195 | <para>An application can detect if scaling is performed by comparing the width |
196 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP_ACTIVE | 196 | and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP |
197 | </constant> and <constant> V4L2_SEL_TGT_COMPOSE_ACTIVE </constant> targets. If | 197 | </constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If |
198 | these are not equal then the scaling is applied. The application can compute | 198 | these are not equal then the scaling is applied. The application can compute |
199 | the scaling ratios using these values.</para> | 199 | the scaling ratios using these values.</para> |
200 | 200 | ||
@@ -252,7 +252,7 @@ area)</para> | |||
252 | ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel); | 252 | ret = ioctl(fd, &VIDIOC-G-SELECTION;, &sel); |
253 | if (ret) | 253 | if (ret) |
254 | exit(-1); | 254 | exit(-1); |
255 | sel.target = V4L2_SEL_TGT_CROP_ACTIVE; | 255 | sel.target = V4L2_SEL_TGT_CROP; |
256 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); | 256 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); |
257 | if (ret) | 257 | if (ret) |
258 | exit(-1); | 258 | exit(-1); |
@@ -281,7 +281,7 @@ area)</para> | |||
281 | r.left = sel.r.width / 4; | 281 | r.left = sel.r.width / 4; |
282 | r.top = sel.r.height / 4; | 282 | r.top = sel.r.height / 4; |
283 | sel.r = r; | 283 | sel.r = r; |
284 | sel.target = V4L2_SEL_TGT_COMPOSE_ACTIVE; | 284 | sel.target = V4L2_SEL_TGT_COMPOSE; |
285 | sel.flags = V4L2_SEL_FLAG_LE; | 285 | sel.flags = V4L2_SEL_FLAG_LE; |
286 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); | 286 | ret = ioctl(fd, &VIDIOC-S-SELECTION;, &sel); |
287 | if (ret) | 287 | if (ret) |
@@ -298,11 +298,11 @@ V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para> | |||
298 | 298 | ||
299 | &v4l2-selection; compose = { | 299 | &v4l2-selection; compose = { |
300 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, | 300 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, |
301 | .target = V4L2_SEL_TGT_COMPOSE_ACTIVE, | 301 | .target = V4L2_SEL_TGT_COMPOSE, |
302 | }; | 302 | }; |
303 | &v4l2-selection; crop = { | 303 | &v4l2-selection; crop = { |
304 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, | 304 | .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, |
305 | .target = V4L2_SEL_TGT_CROP_ACTIVE, | 305 | .target = V4L2_SEL_TGT_CROP, |
306 | }; | 306 | }; |
307 | double hscale, vscale; | 307 | double hscale, vscale; |
308 | 308 | ||
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml index bb04eff75f45..6376e57ff576 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml | |||
@@ -65,8 +65,8 @@ Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | |||
65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
67 | setting the value of &v4l2-selection; <structfield>target</structfield> field | 67 | setting the value of &v4l2-selection; <structfield>target</structfield> field |
68 | to <constant> V4L2_SEL_TGT_CROP_ACTIVE </constant> (<constant> | 68 | to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> |
69 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 69 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref |
70 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 70 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional |
71 | targets. The <structfield>flags</structfield> and <structfield>reserved | 71 | targets. The <structfield>flags</structfield> and <structfield>reserved |
72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled | 72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled |
@@ -86,8 +86,8 @@ use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | |||
86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of |
87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is |
88 | setting the value of &v4l2-selection; <structfield>target</structfield> to | 88 | setting the value of &v4l2-selection; <structfield>target</structfield> to |
89 | <constant>V4L2_SEL_TGT_CROP_ACTIVE</constant> (<constant> | 89 | <constant>V4L2_SEL_TGT_CROP</constant> (<constant> |
90 | V4L2_SEL_TGT_COMPOSE_ACTIVE </constant>). Please refer to table <xref | 90 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref |
91 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional | 91 | linkend="v4l2-sel-target" /> or <xref linkend="selection-api" /> for additional |
92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be | 92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be |
93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved | 93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved |
@@ -161,7 +161,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
161 | &cs-def; | 161 | &cs-def; |
162 | <tbody valign="top"> | 162 | <tbody valign="top"> |
163 | <row> | 163 | <row> |
164 | <entry><constant>V4L2_SEL_TGT_CROP_ACTIVE</constant></entry> | 164 | <entry><constant>V4L2_SEL_TGT_CROP</constant></entry> |
165 | <entry>0x0000</entry> | 165 | <entry>0x0000</entry> |
166 | <entry>The area that is currently cropped by hardware.</entry> | 166 | <entry>The area that is currently cropped by hardware.</entry> |
167 | </row> | 167 | </row> |
@@ -176,7 +176,7 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
176 | <entry>Limits for the cropping rectangle.</entry> | 176 | <entry>Limits for the cropping rectangle.</entry> |
177 | </row> | 177 | </row> |
178 | <row> | 178 | <row> |
179 | <entry><constant>V4L2_SEL_TGT_COMPOSE_ACTIVE</constant></entry> | 179 | <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> |
180 | <entry>0x0100</entry> | 180 | <entry>0x0100</entry> |
181 | <entry>The area to which data is composed by hardware.</entry> | 181 | <entry>The area to which data is composed by hardware.</entry> |
182 | </row> | 182 | </row> |
@@ -193,7 +193,8 @@ exist no rectangle </emphasis> that satisfies the constraints.</para> | |||
193 | <row> | 193 | <row> |
194 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> | 194 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> |
195 | <entry>0x0103</entry> | 195 | <entry>0x0103</entry> |
196 | <entry>The active area and all padding pixels that are inserted or modified by hardware.</entry> | 196 | <entry>The active area and all padding pixels that are inserted or |
197 | modified by hardware.</entry> | ||
197 | </row> | 198 | </row> |
198 | </tbody> | 199 | </tbody> |
199 | </tgroup> | 200 | </tgroup> |
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 62ce5399c4cf..a3cd78d33913 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -655,7 +655,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx, | |||
655 | r->left = r->top = 0; | 655 | r->left = r->top = 0; |
656 | return; | 656 | return; |
657 | } | 657 | } |
658 | if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { | 658 | if (target == V4L2_SEL_TGT_COMPOSE) { |
659 | if (ctx->rotation != 90 && ctx->rotation != 270) | 659 | if (ctx->rotation != 90 && ctx->rotation != 270) |
660 | align_h = 1; | 660 | align_h = 1; |
661 | max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3)); | 661 | max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3)); |
@@ -682,7 +682,7 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx, | |||
682 | rotate ? sink->f_height : sink->f_width); | 682 | rotate ? sink->f_height : sink->f_width); |
683 | max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height); | 683 | max_h = min_t(u32, FIMC_CAMIF_MAX_HEIGHT, sink->f_height); |
684 | 684 | ||
685 | if (target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { | 685 | if (target == V4L2_SEL_TGT_COMPOSE) { |
686 | min_w = min_t(u32, max_w, sink->f_width / max_sc_h); | 686 | min_w = min_t(u32, max_w, sink->f_width / max_sc_h); |
687 | min_h = min_t(u32, max_h, sink->f_height / max_sc_v); | 687 | min_h = min_t(u32, max_h, sink->f_height / max_sc_v); |
688 | if (rotate) { | 688 | if (rotate) { |
@@ -1147,9 +1147,9 @@ static int fimc_cap_g_selection(struct file *file, void *fh, | |||
1147 | s->r.height = f->o_height; | 1147 | s->r.height = f->o_height; |
1148 | return 0; | 1148 | return 0; |
1149 | 1149 | ||
1150 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 1150 | case V4L2_SEL_TGT_COMPOSE: |
1151 | f = &ctx->d_frame; | 1151 | f = &ctx->d_frame; |
1152 | case V4L2_SEL_TGT_CROP_ACTIVE: | 1152 | case V4L2_SEL_TGT_CROP: |
1153 | s->r.left = f->offs_h; | 1153 | s->r.left = f->offs_h; |
1154 | s->r.top = f->offs_v; | 1154 | s->r.top = f->offs_v; |
1155 | s->r.width = f->width; | 1155 | s->r.width = f->width; |
@@ -1185,9 +1185,9 @@ static int fimc_cap_s_selection(struct file *file, void *fh, | |||
1185 | if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) | 1185 | if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) |
1186 | return -EINVAL; | 1186 | return -EINVAL; |
1187 | 1187 | ||
1188 | if (s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE) | 1188 | if (s->target == V4L2_SEL_TGT_COMPOSE) |
1189 | f = &ctx->d_frame; | 1189 | f = &ctx->d_frame; |
1190 | else if (s->target == V4L2_SEL_TGT_CROP_ACTIVE) | 1190 | else if (s->target == V4L2_SEL_TGT_CROP) |
1191 | f = &ctx->s_frame; | 1191 | f = &ctx->s_frame; |
1192 | else | 1192 | else |
1193 | return -EINVAL; | 1193 | return -EINVAL; |
@@ -1483,7 +1483,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd, | |||
1483 | return -EINVAL; | 1483 | return -EINVAL; |
1484 | 1484 | ||
1485 | mutex_lock(&fimc->lock); | 1485 | mutex_lock(&fimc->lock); |
1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP_ACTIVE); | 1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP); |
1487 | 1487 | ||
1488 | switch (sel->target) { | 1488 | switch (sel->target) { |
1489 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: | 1489 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: |
diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c index 400d701aef04..52ede56e0758 100644 --- a/drivers/media/video/s5p-fimc/fimc-lite.c +++ b/drivers/media/video/s5p-fimc/fimc-lite.c | |||
@@ -871,7 +871,7 @@ static int fimc_lite_g_selection(struct file *file, void *fh, | |||
871 | sel->r.height = f->f_height; | 871 | sel->r.height = f->f_height; |
872 | return 0; | 872 | return 0; |
873 | 873 | ||
874 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 874 | case V4L2_SEL_TGT_COMPOSE: |
875 | sel->r = f->rect; | 875 | sel->r = f->rect; |
876 | return 0; | 876 | return 0; |
877 | } | 877 | } |
@@ -888,7 +888,7 @@ static int fimc_lite_s_selection(struct file *file, void *fh, | |||
888 | unsigned long flags; | 888 | unsigned long flags; |
889 | 889 | ||
890 | if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE || | 890 | if (sel->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE || |
891 | sel->target != V4L2_SEL_TGT_COMPOSE_ACTIVE) | 891 | sel->target != V4L2_SEL_TGT_COMPOSE) |
892 | return -EINVAL; | 892 | return -EINVAL; |
893 | 893 | ||
894 | fimc_lite_try_compose(fimc, &rect); | 894 | fimc_lite_try_compose(fimc, &rect); |
diff --git a/drivers/media/video/s5p-jpeg/jpeg-core.c b/drivers/media/video/s5p-jpeg/jpeg-core.c index e40e79b33df6..95f23024b17d 100644 --- a/drivers/media/video/s5p-jpeg/jpeg-core.c +++ b/drivers/media/video/s5p-jpeg/jpeg-core.c | |||
@@ -824,10 +824,10 @@ static int s5p_jpeg_g_selection(struct file *file, void *priv, | |||
824 | 824 | ||
825 | /* For JPEG blob active == default == bounds */ | 825 | /* For JPEG blob active == default == bounds */ |
826 | switch (s->target) { | 826 | switch (s->target) { |
827 | case V4L2_SEL_TGT_CROP_ACTIVE: | 827 | case V4L2_SEL_TGT_CROP: |
828 | case V4L2_SEL_TGT_CROP_BOUNDS: | 828 | case V4L2_SEL_TGT_CROP_BOUNDS: |
829 | case V4L2_SEL_TGT_CROP_DEFAULT: | 829 | case V4L2_SEL_TGT_CROP_DEFAULT: |
830 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 830 | case V4L2_SEL_TGT_COMPOSE: |
831 | case V4L2_SEL_TGT_COMPOSE_DEFAULT: | 831 | case V4L2_SEL_TGT_COMPOSE_DEFAULT: |
832 | s->r.width = ctx->out_q.w; | 832 | s->r.width = ctx->out_q.w; |
833 | s->r.height = ctx->out_q.h; | 833 | s->r.height = ctx->out_q.h; |
diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/video/s5p-tv/mixer_video.c index 33fde2a763ec..6c74b05d1f95 100644 --- a/drivers/media/video/s5p-tv/mixer_video.c +++ b/drivers/media/video/s5p-tv/mixer_video.c | |||
@@ -367,7 +367,7 @@ static int mxr_g_selection(struct file *file, void *fh, | |||
367 | return -EINVAL; | 367 | return -EINVAL; |
368 | 368 | ||
369 | switch (s->target) { | 369 | switch (s->target) { |
370 | case V4L2_SEL_TGT_CROP_ACTIVE: | 370 | case V4L2_SEL_TGT_CROP: |
371 | s->r.left = geo->src.x_offset; | 371 | s->r.left = geo->src.x_offset; |
372 | s->r.top = geo->src.y_offset; | 372 | s->r.top = geo->src.y_offset; |
373 | s->r.width = geo->src.width; | 373 | s->r.width = geo->src.width; |
@@ -380,7 +380,7 @@ static int mxr_g_selection(struct file *file, void *fh, | |||
380 | s->r.width = geo->src.full_width; | 380 | s->r.width = geo->src.full_width; |
381 | s->r.height = geo->src.full_height; | 381 | s->r.height = geo->src.full_height; |
382 | break; | 382 | break; |
383 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 383 | case V4L2_SEL_TGT_COMPOSE: |
384 | case V4L2_SEL_TGT_COMPOSE_PADDED: | 384 | case V4L2_SEL_TGT_COMPOSE_PADDED: |
385 | s->r.left = geo->dst.x_offset; | 385 | s->r.left = geo->dst.x_offset; |
386 | s->r.top = geo->dst.y_offset; | 386 | s->r.top = geo->dst.y_offset; |
@@ -449,11 +449,11 @@ static int mxr_s_selection(struct file *file, void *fh, | |||
449 | res.height = geo->dst.full_height; | 449 | res.height = geo->dst.full_height; |
450 | break; | 450 | break; |
451 | 451 | ||
452 | case V4L2_SEL_TGT_CROP_ACTIVE: | 452 | case V4L2_SEL_TGT_CROP: |
453 | target = &geo->src; | 453 | target = &geo->src; |
454 | stage = MXR_GEOMETRY_CROP; | 454 | stage = MXR_GEOMETRY_CROP; |
455 | break; | 455 | break; |
456 | case V4L2_SEL_TGT_COMPOSE_ACTIVE: | 456 | case V4L2_SEL_TGT_COMPOSE: |
457 | case V4L2_SEL_TGT_COMPOSE_PADDED: | 457 | case V4L2_SEL_TGT_COMPOSE_PADDED: |
458 | target = &geo->dst; | 458 | target = &geo->dst; |
459 | stage = MXR_GEOMETRY_COMPOSE; | 459 | stage = MXR_GEOMETRY_COMPOSE; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a61edb353273..ac1ad33ba3e0 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -767,13 +767,13 @@ struct v4l2_crop { | |||
767 | /* Selection targets */ | 767 | /* Selection targets */ |
768 | 768 | ||
769 | /* Current cropping area */ | 769 | /* Current cropping area */ |
770 | #define V4L2_SEL_TGT_CROP_ACTIVE 0x0000 | 770 | #define V4L2_SEL_TGT_CROP 0x0000 |
771 | /* Default cropping area */ | 771 | /* Default cropping area */ |
772 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 | 772 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 |
773 | /* Cropping bounds */ | 773 | /* Cropping bounds */ |
774 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 | 774 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 |
775 | /* Current composing area */ | 775 | /* Current composing area */ |
776 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE 0x0100 | 776 | #define V4L2_SEL_TGT_COMPOSE 0x0100 |
777 | /* Default composing area */ | 777 | /* Default composing area */ |
778 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 | 778 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 |
779 | /* Composing bounds */ | 779 | /* Composing bounds */ |
@@ -781,6 +781,10 @@ struct v4l2_crop { | |||
781 | /* Current composing area plus all padding pixels */ | 781 | /* Current composing area plus all padding pixels */ |
782 | #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 | 782 | #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 |
783 | 783 | ||
784 | /* Backward compatibility definitions */ | ||
785 | #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP | ||
786 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE | ||
787 | |||
784 | /** | 788 | /** |
785 | * struct v4l2_selection - selection info | 789 | * struct v4l2_selection - selection info |
786 | * @type: buffer type (do not use *_MPLANE types) | 790 | * @type: buffer type (do not use *_MPLANE types) |