From patchwork Tue Jun 25 09:12:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2775481 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0CF3C0AB1 for ; Tue, 25 Jun 2013 09:13:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 011C1201BB for ; Tue, 25 Jun 2013 09:13:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F904201BA for ; Tue, 25 Jun 2013 09:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752309Ab3FYJM4 (ORCPT ); Tue, 25 Jun 2013 05:12:56 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:57311 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985Ab3FYJMx (ORCPT ); Tue, 25 Jun 2013 05:12:53 -0400 Received: from axis700.grange (dslb-088-076-066-124.pools.arcor-ip.net [88.76.66.124]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MabPt-1UXFtK1lIv-00Kq2f; Tue, 25 Jun 2013 11:12:51 +0200 Received: by axis700.grange (Postfix, from userid 1000) id BF56240BB4; Tue, 25 Jun 2013 11:12:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id B45D140BB3 for ; Tue, 25 Jun 2013 11:12:50 +0200 (CEST) Date: Tue, 25 Jun 2013 11:12:50 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List Subject: [PATCH] V4L2: soc-camera: remove several CEU references in the generic scaler Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:ISCaukjafdB8QbL1vn0uMlFrCthvpyIlAPCMNlq3tHb I2ebVJQcc1dC6J67Qxsg90U94Mx9KR4q1Xu4EAr+EBe1EbQG42 MhYhDLVyTMq9Lk7YF//rEHN3Rnkiygxd35gR8cFFVD5I7hT/J7 M6bZKQPWZW0TfYm4FbCqwSrTBMBnL8LC+Tkwt37kvZWMf9sAI6 VA7U3f/+QFX7Xgdb4w3pXAjCrHh6dq0XjfxYYPHoJMrdHJ3FDk CPKOJpOCURoohCe9AhYU1Qp4xeXVH7fDq2txgD8ajTMpAH8mrB S90IET6UZpq5OoKygvCSJW0h16dpMsjoRRXvWp8wX43PCY1ZD8 nZbUwUpjjYSJm0Fiux+ZS+XzMsrXLXKkpIH0DSzBmh+3n8X2Hg 5TSoAHmL2ymqA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- A cosmetic fix, goes on top of https://patchwork.linuxtv.org/patch/18209/ https://patchwork.linuxtv.org/patch/18210/ I'll be pushing them together with other V4L2 asynchronous probing hick up fixes later today. drivers/media/platform/soc_camera/soc_scale_crop.c | 15 ++++++++------- 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 be7067f..cbd3a34 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, struct device *dev = icd->parent; unsigned int width = mf->width, height = mf->height, tmp_w, tmp_h; struct v4l2_cropcap cap; - bool ceu_1to1; + bool host_1to1; int ret; ret = v4l2_device_call_until_err(sd->v4l2_dev, @@ -234,11 +234,11 @@ static int client_s_fmt(struct soc_camera_device *icd, if (width == mf->width && height == mf->height) { /* Perfect! The client has done it all. */ - ceu_1to1 = true; + host_1to1 = true; goto update_cache; } - ceu_1to1 = false; + host_1to1 = false; if (!host_can_scale) goto update_cache; @@ -282,7 +282,7 @@ update_cache: if (ret < 0) return ret; - if (ceu_1to1) + if (host_1to1) *subrect = *rect; else update_subrect(rect, subrect); @@ -338,7 +338,7 @@ int soc_camera_client_scale(struct soc_camera_device *icd, mf->colorspace = mf_tmp.colorspace; /* - * 8. Calculate new CEU crop - apply camera scales to previously + * 8. Calculate new host crop - apply camera scales to previously * updated "effective" crop. */ *width = soc_camera_shift_scale(subrect->width, shift, scale_h); @@ -353,7 +353,7 @@ EXPORT_SYMBOL(soc_camera_client_scale); /* * Calculate real client output window by applying new scales to the current * client crop. New scales are calculated from the requested output format and - * CEU crop, mapped backed onto the client input (subrect). + * host crop, mapped backed onto the client input (subrect). */ void soc_camera_calc_client_output(struct soc_camera_device *icd, struct v4l2_rect *rect, struct v4l2_rect *subrect, @@ -384,7 +384,8 @@ void soc_camera_calc_client_output(struct soc_camera_device *icd, /* * TODO: CEU cannot scale images larger than VGA to smaller than SubQCIF - * (128x96) or larger than VGA + * (128x96) or larger than VGA. This and similar limitations have to be + * taken into account here. */ scale_h = soc_camera_calc_scale(subrect->width, shift, pix->width); scale_v = soc_camera_calc_scale(subrect->height, shift, pix->height);