aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-06-25 04:59:23 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-28 14:03:38 -0400
commit79275a994c2e672b2c3a893a1e2840a204adc3f7 (patch)
tree6a17ded3250b22676b5b36aad47b3e937b9fe2d3
parent22e0099ac9a968a4a67fc681864a9ff453bd929f (diff)
[media] V4L2: soc-camera: remove several CEU references in the generic scaler
The scaling / cropping library, that has been extracted from the CEU driver still contained a couple of references to the original hardware. Clean them up. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/platform/soc_camera/soc_scale_crop.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
index be7067f55a29..cbd3a34f4f3f 100644
--- a/drivers/media/platform/soc_camera/soc_scale_crop.c
+++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
@@ -221,7 +221,7 @@ static int client_s_fmt(struct soc_camera_device *icd,
221 struct device *dev = icd->parent; 221 struct device *dev = icd->parent;
222 unsigned int width = mf->width, height = mf->height, tmp_w, tmp_h; 222 unsigned int width = mf->width, height = mf->height, tmp_w, tmp_h;
223 struct v4l2_cropcap cap; 223 struct v4l2_cropcap cap;
224 bool ceu_1to1; 224 bool host_1to1;
225 int ret; 225 int ret;
226 226
227 ret = v4l2_device_call_until_err(sd->v4l2_dev, 227 ret = v4l2_device_call_until_err(sd->v4l2_dev,
@@ -234,11 +234,11 @@ static int client_s_fmt(struct soc_camera_device *icd,
234 234
235 if (width == mf->width && height == mf->height) { 235 if (width == mf->width && height == mf->height) {
236 /* Perfect! The client has done it all. */ 236 /* Perfect! The client has done it all. */
237 ceu_1to1 = true; 237 host_1to1 = true;
238 goto update_cache; 238 goto update_cache;
239 } 239 }
240 240
241 ceu_1to1 = false; 241 host_1to1 = false;
242 if (!host_can_scale) 242 if (!host_can_scale)
243 goto update_cache; 243 goto update_cache;
244 244
@@ -282,7 +282,7 @@ update_cache:
282 if (ret < 0) 282 if (ret < 0)
283 return ret; 283 return ret;
284 284
285 if (ceu_1to1) 285 if (host_1to1)
286 *subrect = *rect; 286 *subrect = *rect;
287 else 287 else
288 update_subrect(rect, subrect); 288 update_subrect(rect, subrect);
@@ -338,7 +338,7 @@ int soc_camera_client_scale(struct soc_camera_device *icd,
338 mf->colorspace = mf_tmp.colorspace; 338 mf->colorspace = mf_tmp.colorspace;
339 339
340 /* 340 /*
341 * 8. Calculate new CEU crop - apply camera scales to previously 341 * 8. Calculate new host crop - apply camera scales to previously
342 * updated "effective" crop. 342 * updated "effective" crop.
343 */ 343 */
344 *width = soc_camera_shift_scale(subrect->width, shift, scale_h); 344 *width = soc_camera_shift_scale(subrect->width, shift, scale_h);
@@ -353,7 +353,7 @@ EXPORT_SYMBOL(soc_camera_client_scale);
353/* 353/*
354 * Calculate real client output window by applying new scales to the current 354 * Calculate real client output window by applying new scales to the current
355 * client crop. New scales are calculated from the requested output format and 355 * client crop. New scales are calculated from the requested output format and
356 * CEU crop, mapped backed onto the client input (subrect). 356 * host crop, mapped backed onto the client input (subrect).
357 */ 357 */
358void soc_camera_calc_client_output(struct soc_camera_device *icd, 358void soc_camera_calc_client_output(struct soc_camera_device *icd,
359 struct v4l2_rect *rect, struct v4l2_rect *subrect, 359 struct v4l2_rect *rect, struct v4l2_rect *subrect,
@@ -384,7 +384,8 @@ void soc_camera_calc_client_output(struct soc_camera_device *icd,
384 384
385 /* 385 /*
386 * TODO: CEU cannot scale images larger than VGA to smaller than SubQCIF 386 * TODO: CEU cannot scale images larger than VGA to smaller than SubQCIF
387 * (128x96) or larger than VGA 387 * (128x96) or larger than VGA. This and similar limitations have to be
388 * taken into account here.
388 */ 389 */
389 scale_h = soc_camera_calc_scale(subrect->width, shift, pix->width); 390 scale_h = soc_camera_calc_scale(subrect->width, shift, pix->width);
390 scale_v = soc_camera_calc_scale(subrect->height, shift, pix->height); 391 scale_v = soc_camera_calc_scale(subrect->height, shift, pix->height);