Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp965689pxp; Wed, 16 Mar 2022 22:52:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKVS9TFY/9YVWalKiesskSc7VtO/Bji3zAVVnXWqSdYld0J0X1jIK0WQLyOoiC5NFeCo8H X-Received: by 2002:aa7:888b:0:b0:4f7:68d3:16b9 with SMTP id z11-20020aa7888b000000b004f768d316b9mr2857729pfe.0.1647496374249; Wed, 16 Mar 2022 22:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647496374; cv=none; d=google.com; s=arc-20160816; b=X3NM2/RF/pnG0ZF6t1rfyhb+VnfMsC1AhFriGHNc5yO0596BCJKopiuII59MEXhj0d C71mIJLdxC29MOQ/CL9fQ8ruX9SPrMDiC8GUr6GG/Y3J2zU3EdNnszBqs/pESG/STLRJ ulqB3kxdob7TlzBlt6SIdXYwp0kDYBFr5K6B/0gECM1yZDy3FvwqRqhb1yLQGELTOTCT KbwnGbcpycDoENyduAo59R5ucLdL64e3IVxMsxNSeknFFuZvXAFbvjYGQjcmjALetI0U HY4R5DosP4vsvmS2c3welhkmRL1SL+lBq04HfbBQ4xFe+vignLsXJOC6UkQfcnXT1rgW XBgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X+lcstgk9RB2/C4oX0IxPU6imD3Py6ZrzZrPJjU5bQU=; b=Jfcfy1uv3Ubar06pykcipR/HFsjJamMHwqdQUaPNqSjFqdBuaCAMMJH3Cnm/LaC8cJ CiSKrBCfcQZHyuabI0znE4qiLLOFmM/2VA0ont+mUjAlaiLM+An5tFUU9UVFH647NHQd 1AXJClBNGezgyQ+J+3eVZXHBAVtfKzloaTWndLVy38Usq4A5xyoM2J/HCbplLZW0H2+b 1Jwrvi15v4Q3TBsjwRkipRLGISkflLwU3yXh0FI5/gvENAU7eNB0dg+FlgKZTTINqX3j DJ/jHqPjdZB2+KnxlGVUdjL3CnhvzHnoq8pO9LmC39Nzvew7BAGYo5eggAetQ3pt2MvW o5Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L3f9jcWA; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u9-20020a056a00124900b004f74532d736si3984242pfi.371.2022.03.16.22.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:52:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L3f9jcWA; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 360A1165BB1; Wed, 16 Mar 2022 21:47:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354765AbiCPJD3 (ORCPT + 99 others); Wed, 16 Mar 2022 05:03:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354743AbiCPJD0 (ORCPT ); Wed, 16 Mar 2022 05:03:26 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA39C6517F; Wed, 16 Mar 2022 02:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647421332; x=1678957332; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LOX9uW5s+vqsnfBIseHFWmznTuk/lp2t/LhmcHS4Clg=; b=L3f9jcWAMi7EKvLCFeukcjvvnUlASAFwO3EkUpEytSqLAaleiKy75d9J VYAAl9vpHkWmDmro9Twx27cfvfymdnS4uHslUVJvAVLSciETx4D0yOGar aoBZbbrORkEYWsYAgFzAH8ScC4dR6y+XIL3LJWH/4mQrKq0mowuCL0USg 6XG4ne8wk6Wcamfnk9Je2pMsoUc6jzr7qgH9Zki6Dh7w38rIcUzhMEEYa 7Hc72t6ULhOACPVNW7oXTAOiB6X/4bC2s8L7HcjnUoCh7yUCqFsP2Hy7t kHj1JpoqNgmqhiqDZH49g/Gc1sk4Zz3MRL5BRL1+0KLcxLzfobATvxj4c Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="243982621" X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="243982621" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 02:02:12 -0700 X-IronPort-AV: E=Sophos;i="5.90,186,1643702400"; d="scan'208";a="783392162" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 02:02:08 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id BBFB5201B6; Wed, 16 Mar 2022 11:01:36 +0200 (EET) Date: Wed, 16 Mar 2022 11:01:36 +0200 From: Sakari Ailus To: Kate Hsuan Cc: Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Greg Kroah-Hartman , Jean-Michel Hautbois , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, hdegoede@redhat.com Subject: Re: [PATCH v3 1/2] staging: media: ipu3: Fix AF x_start position when rightmost stripe is used Message-ID: References: <20220314101523.129672-1-hpa@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220314101523.129672-1-hpa@redhat.com> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kate, On Mon, Mar 14, 2022 at 06:15:22PM +0800, Kate Hsuan wrote: > For the AF configuration, if the rightmost stripe is used, the AF scene > will be at the incorrect location of the sensor. > > The AF coordinate may be set to the right part of the sensor. This > configuration would lead to x_start being greater than the > down_scaled_stripes offset and the leftmost stripe would be disabled > and only the rightmost stripe is used to control the AF coordinate. If > the x_start doesn't perform any adjustments, the AF coordinate will be > at the wrong place of the sensor since down_scaled_stripes offset > would be the new zero of the coordinate system. > > In this patch, if only the rightmost stripe is used, x_start should > minus down_scaled_stripes offset to maintain its correctness of AF > scene coordinate. > > Changes in v2: > 1. Remove the setting of the first stripe. > > Signed-off-by: Kate Hsuan > --- > drivers/staging/media/ipu3/ipu3-css-params.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c > index d9e3c3785075..5a8c07f34756 100644 > --- a/drivers/staging/media/ipu3/ipu3-css-params.c > +++ b/drivers/staging/media/ipu3/ipu3-css-params.c > @@ -2556,6 +2556,10 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int pipe, > /* Enable only for rightmost stripe, disable left */ > acc->af.stripes[0].grid_cfg.y_start &= > ~IPU3_UAPI_GRID_Y_START_EN; > + acc->af.stripes[1].grid_cfg.x_start -= > + acc->stripe.down_scaled_stripes[1].offset; > + acc->af.stripes[1].grid_cfg.x_end -= > + acc->stripe.down_scaled_stripes[1].offset; Could you calculate the values the same way as for the two stripes case, as I've been asking since v1? > } else if (acc->af.config.grid_cfg.x_end <= > acc->stripe.bds_out_stripes[0].width - min_overlap) { > /* Enable only for leftmost stripe, disable right */ -- Regards, Sakari Ailus