Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp931128ybi; Fri, 31 May 2019 10:58:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiPcy198Oj1XQ8GqByWNwgiTTBH+mjmoL6Ke34pMezedC0Z0R+3obO1M8xThwK7/J0BdCA X-Received: by 2002:a17:90a:bd8b:: with SMTP id z11mr10617649pjr.39.1559325482679; Fri, 31 May 2019 10:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559325482; cv=none; d=google.com; s=arc-20160816; b=HdiEO9P2JfW2+O/Im+wTsCSgRKina8/OeyTXlyp3DtB9/FGpY3x8Y2nJl+Dr4UnHcF 3efbjbiaw52SGFjsIOY1EGMSL1VSbkTtqllv+HqSwoefqMTdV8pV4F7K4d2x3MXEhQqM OsMeOCWZZDrRWsLoeFwdIdXlPzRWHPguILeDfxlsQScRIHdVAXx7XYVchn2NfL8o/Qeh 0SaQM4q7G4+PP041UwP0VermQ5ld57w1vMMzpgDMxUf2ztE5Wlu9uGaXZHqRb2pjTyNt ulJvPdhaAMoJeeDcYslZFhQU8MneCOil9yFAe6m1AzHvgilSlDtzxySG+6WB+kcW46hC DioA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8lbvXxV2I9wKlK6AoN+2OqvLiWU+5ClVbYmT8Pxzqvg=; b=xdumZTTW/8yLw2KUMOcYuQnlJxY6NKjRxoWg1LNVfBP55odqUgS9O5P4hCq812UKNJ vXgwZM3W/wNmZXvt2Vg4npQF1GJriDRR4rbfTuf3o6sZp+LEnqHfaO7WcDtrqXFGpL0Y tjU0Yz53uq2wV0No7UQmBusIih9RKLuvnD9lCYxgM61eYJHNtWcCaSiV7+37qSr6IOLe ulI3zno2Zq6t7wN2EfRWpgOa/+5MOEtinybaP9tHm0NMcO+JGfek2BCGqaoDGAuh32jw TnXUi8kqN7+/uZfvx3L2u1kbBNDRWVX+OeCShCEsXCjgh34YCzwVTOqOz730zD3ABxrf XjoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9a+AlHO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l36si7153070plg.411.2019.05.31.10.57.46; Fri, 31 May 2019 10:58:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9a+AlHO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726965AbfEaR4i (ORCPT + 99 others); Fri, 31 May 2019 13:56:38 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38643 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbfEaR4i (ORCPT ); Fri, 31 May 2019 13:56:38 -0400 Received: by mail-lf1-f67.google.com with SMTP id b11so8622210lfa.5; Fri, 31 May 2019 10:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8lbvXxV2I9wKlK6AoN+2OqvLiWU+5ClVbYmT8Pxzqvg=; b=S9a+AlHOP6AqqdTUudPclvi3EeIjMj3M/Y2aQJPWdLwjWn+LUtdq6e01oBE4j5oCYD p9iGZNlVNNomjyyAGjDapDZEe7dGULyAMqEBqZM/531gG0Hg2FKVwn2iNqQ1TDp+LwCF iuK4ONk63AG9VqhwQwpj3+xH/UJ5idGZUwC4iXIs2N6rJVgYeyx6bIMMIRxx0IOLexhe iiLakWoee78hk9VgOyrdk/f4/h2RAC8PnulltbjGLZbXHBpFPAjc+rqWnwdZPd0ObWtS 0wQhCOeLtJKGNOm+6xpKPgh3TM2amz/6vBmg3AG2YIvnMBKk0SVjhWCAYD4onJpsq5KD hakw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8lbvXxV2I9wKlK6AoN+2OqvLiWU+5ClVbYmT8Pxzqvg=; b=lJzPoOS7VQy9h56qyPVyU77xGi7tM0zEYnb+vWdCLG7J9lfK9mkS2CaOjCiS3hqyS6 oCQee4klW6cin/taiphlvLLfA4SXdNxVXkEW7G5Fg4QMnc1mCEbJmUJRp6xAZZ3BTldl fccHQ8f+N3MWPv6BIqNzK+M3+uGhB3wdZh9bR+toGLCZx6adla4h/Wq2Op2o03aqReCm acNyGo2DeMs6xL9tNgRK59FppvA434PuIlleAI4Aig825haDezCYRBtKnbFviB/rO7Qu 1/aoQ7UtVYmpjjbjjQN78/OGpg6TorTU7vL2iwbZ3nB939vYAxmZaMT3hqsQU6XihO3n J1iQ== X-Gm-Message-State: APjAAAWR+adclrorHYAR1HY0v4abASIDfEjdcdYkIvOzhg5T4lYgZR+D O/Xwm6jvlSdEVH0Yf5zYNis= X-Received: by 2002:a05:6512:519:: with SMTP id o25mr6189734lfb.71.1559325396418; Fri, 31 May 2019 10:56:36 -0700 (PDT) Received: from z50.localnet (109241207190.gdansk.vectranet.pl. [109.241.207.190]) by smtp.gmail.com with ESMTPSA id y10sm1285752lfy.66.2019.05.31.10.56.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 10:56:35 -0700 (PDT) From: Janusz Krzysztofik To: Sakari Ailus Cc: Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: Re: [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop Date: Fri, 31 May 2019 19:56:33 +0200 Message-ID: <1933971.yMpNBnsSgY@z50> In-Reply-To: <20190531114258.6bvsqzlexqnelu5u@valkosipuli.retiisi.org.uk> References: <20190526204758.1904-1-jmkrzyszt@gmail.com> <20190526204758.1904-5-jmkrzyszt@gmail.com> <20190531114258.6bvsqzlexqnelu5u@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sakari, On Friday, May 31, 2019 1:42:58 PM CEST Sakari Ailus wrote: > Hi Janusz, > > On Sun, May 26, 2019 at 10:47:57PM +0200, Janusz Krzysztofik wrote: > > According to V4L2 subdevice interface specification, frame scaling > > factors should be reset to default values on modification of input frame > > format. Assuming that requirement also applies in case of crop > > rectangle modification unless V4L2_SEL_FLAG_KEEP_CONFIG is requested, > > the driver now does not respect it. > > > > The KEEP_CONFIG case is already implemented, fix the other path. > > > > Signed-off-by: Janusz Krzysztofik > > --- > > drivers/media/i2c/ov6650.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c > > index 47590cd51190..cc70d8952999 100644 > > --- a/drivers/media/i2c/ov6650.c > > +++ b/drivers/media/i2c/ov6650.c > > @@ -472,6 +472,8 @@ static int ov6650_get_selection(struct v4l2_subdev *sd, > > } > > } > > > > +static int ov6650_s_fmt(struct v4l2_subdev *sd, u32 code, bool half_scale); > > + > > Would it be possible to rearrange the functions in the file so you wouldn't > need extra prototypes? Preferrably that'd be a new patch. Sure. I've intentionally done it like that for better readability of the patches, but I have a task in my queue for rearrangement of functions order as soon as other modifications are in place. > > static int ov6650_set_selection(struct v4l2_subdev *sd, > > struct v4l2_subdev_pad_config *cfg, > > struct v4l2_subdev_selection *sel) > > @@ -515,7 +517,13 @@ static int ov6650_set_selection(struct v4l2_subdev *sd, > > } > > if (!ret) > > priv->rect.height = sel->r.height; > > + else > > + return ret; > > if (ret) > return ret; OK Perhaps you will have more comments on other patches so I'll wait a bit and then resubmit the series as v2. Thanks, Janusz > ... > > > > > + if (priv->half_scale) { > > + /* turn off half scaling, preserve media bus format */ > > + ret = ov6650_s_fmt(sd, priv->code, false); > > + } > > return ret; > > } > > > >