Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3148267pxp; Mon, 14 Mar 2022 11:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBw3NwBwHVwVqijCkA3NrbrHcWQaW+l/vLJPUs7UEpjhwu0hOvjYyJ/Oi8t3PiCHn+kjLr X-Received: by 2002:a62:1d48:0:b0:4f6:b805:4bad with SMTP id d69-20020a621d48000000b004f6b8054badmr25417027pfd.67.1647284107628; Mon, 14 Mar 2022 11:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647284107; cv=none; d=google.com; s=arc-20160816; b=FREMtDa49PCMUqWzJC5gta20BWVbawsUbZMeK2Z/f9zXu9zf9LXGp7B5Y0dihn/9+D fSlo9KGg/XCMpsWu4/EGTOgfPd5sNKhDZs1+8N6bFNhm7z2dBA/hyd480iNuHqtqdfPJ ytN0tG3/3oHZ6/bDu2Slf2iS8TY0iefZLXG0hEAiCnS4n7oG+ygkSnAX7n/Di6ZTg9MQ jJfWH4V6OJv9c82p7P0SzI21b6IdNoMTMAdN9tQas4ULJB1gsIWe+t4N0cSXBsTG3iQ6 HicUJMkueU7MeyuFceC4xwSL+Ikr1R3K/dI4j/sTWggKlBbTnyJeODo2Rv/r29Shn3xS eUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TN2T3pV/RSYPJmQU4+Rpzf9IHps10qbPty7fqrdTQLg=; b=lhQV7BLfIfSN/KPoJ7XQOQ3Fu55KLB4YINdk4hTUXOOkBJjO6vv7k/spA4mYwn0etC o9ejpHdXIwi71/zSNpSltZkPwKvYYqx5kxE7We7LaANDrdW1QlLJDGgZk36y0vEMLn5E LKLkgHsuPwdo+ZqK2gYFd5YLe1i+cvbtSKsn2T5jSXF5hlTOADG7Vy1G0NaioGsTiGZu RRvknK5K7EyqQ6plFFUBb+WX+BWQswHCQmN/2fjuPS+87hrsXJ+vT04eh+5ltpg3fw/V 0lW6lRMJXPHwONbvwMn1N56M5XmJU1ZER81MMxDeGPSo73OfgQsshtKGJhwP86+mhzLT 77+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OqhH3EQI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020a170902f29500b00151a41d551fsi13931751plc.458.2022.03.14.11.54.45; Mon, 14 Mar 2022 11:55:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OqhH3EQI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbiCNKRH (ORCPT + 99 others); Mon, 14 Mar 2022 06:17:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238444AbiCNKRE (ORCPT ); Mon, 14 Mar 2022 06:17:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42AB33CFF8 for ; Mon, 14 Mar 2022 03:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647252954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TN2T3pV/RSYPJmQU4+Rpzf9IHps10qbPty7fqrdTQLg=; b=OqhH3EQIgxgHcbRXf47ArJ1c4W57x7W/vm4tKXCKdRlvtXoYQkhSwWu8ou18EC9gIFhQ+s etbg2f5XwajS6+BWxMkicXKQbcvcuFyfjd/6GFXjW5kBmz32kQeWJbJX+rhBcTwfhNX+rw 2xgLNXhEGCoqDYZYLtAz/64Fm/+Mk2g= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-653-B5x3RyY_PcyA-qn-QsZVnQ-1; Mon, 14 Mar 2022 06:15:51 -0400 X-MC-Unique: B5x3RyY_PcyA-qn-QsZVnQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2A0DC29A9CCB; Mon, 14 Mar 2022 10:15:50 +0000 (UTC) Received: from kate-fedora.redhat.com (unknown [10.2.16.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 587C34AE323; Mon, 14 Mar 2022 10:15:47 +0000 (UTC) From: Kate Hsuan To: Sakari Ailus , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Jean-Michel Hautbois , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, hdegoede@redhat.com, Kate Hsuan Subject: [PATCH v3 2/2] staging: media: ipu3: fixing stripe1 x_end is greater than BDS width Date: Mon, 14 Mar 2022 18:15:23 +0800 Message-Id: <20220314101523.129672-2-hpa@redhat.com> In-Reply-To: <20220314101523.129672-1-hpa@redhat.com> References: <20220314101523.129672-1-hpa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 If both stripes are enabled, an improper AF grid configuration leads the AF scene width to be wilder than the BDS width. Also, the second stripe x_end is estimated based on the remaining AF scene width. Therefore, the second stripe x_end will be greater than the second stripe BDS width. In this patch, if the second stripe x_end is greater than BDS width, x_end will be set to BDS width. 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 5a8c07f34756..8923760aa913 100644 --- a/drivers/staging/media/ipu3/ipu3-css-params.c +++ b/drivers/staging/media/ipu3/ipu3-css-params.c @@ -2593,6 +2593,10 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int pipe, acc->af.stripes[1].grid_cfg.width, b_w_log2); + if (acc->af.stripes[1].grid_cfg.x_end >= acc->stripe.bds_out_stripes[1].width) + acc->af.stripes[1].grid_cfg.x_end = + acc->stripe.bds_out_stripes[1].width - min_overlap; + /* * To reduce complexity of debubbling and loading statistics * fix grid_height_per_slice to 1 for both stripes -- 2.35.1