Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3085405rdh; Mon, 27 Nov 2023 06:17:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKFRJzJPb3fDGveUPv3u2YvwAM9gvetQsBiHKojO+JgWgmOW4gb1kL0WMTaBsWZHPbXvsj X-Received: by 2002:a05:6a00:e8b:b0:6cb:e1ba:5709 with SMTP id bo11-20020a056a000e8b00b006cbe1ba5709mr11239430pfb.18.1701094637165; Mon, 27 Nov 2023 06:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701094637; cv=none; d=google.com; s=arc-20160816; b=U0Pa1bphTSG0KMRFsppoef1JvM6fUg1QC+SR1YRQZWpnPfbgYgtohLu/SkC0HQkw7B 2HuYxa09NEAKUeyN6G5shhWkoZaoHuyyDPMXd7uJTesubNeG18jDwlgRhP1vRJCseP+z 7jO9cHKTTMI3HPcDxqSpOy3RA+6hmFG9YQ93rcwMm079UY25XWZd+b+sMaReawmRx2ql usvGRsT4QO4GDgT0GF4/e1KSIyKS4kSHwN2eaZMQQpKMGZrcBpCRo4I7HOBQ4Y85ErwM ZANgDVzazknZbsYOM3XoXj+hU7P9YTqTDwpkFqzQ6+tK7vWBtZpZXQsdx2sDWy3tnhuu L5fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=33AiWQZQHsJ3IEfHVCM4j1IhChmOFfKbCTDXRlMdnPU=; fh=g17TTV3IAh7upqWYUv7HGC34+Nx1v9H4Zz+OCPOH6/U=; b=QjXD8PTTu+CU9oBUAHd1zf2CeadUjqP+Qf1CTR9J31N9Doldyga1t5UEsbhTzjBOer 0ORVXQTLv/zNK3mv9+W6INLRg/YTpolkE/xFOSFQu6yfwpRML46ac/2nRYf4TGI+69QV P0lRHavhGlqtULagQKazGIM8/jpGI+ix3WStFSKQedi3oEtRtc28DheK1djLScxZKI+W VTWb6MPb2deyz/7LYUSZlkei06mNJupESPnO1JqSZtQ4mHPWGSDmdtcGIxW79+yfFhB9 ZNejxA1eRuNVBz9hGNWS1aYMP/m3Sq0bN4Br3rqEffzttMNjIM5uzQNoUsV8LMczz1s3 Du/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id 75-20020a63014e000000b005c1ce3c9614si9923143pgb.892.2023.11.27.06.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:17:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 74FF98079303; Mon, 27 Nov 2023 06:17:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233657AbjK0OQi (ORCPT + 99 others); Mon, 27 Nov 2023 09:16:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233381AbjK0OQR (ORCPT ); Mon, 27 Nov 2023 09:16:17 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFDF55254 for ; Mon, 27 Nov 2023 06:04:45 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r7cE3-0006eI-SP; Mon, 27 Nov 2023 15:04:39 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7cE3-00BxQe-Ei; Mon, 27 Nov 2023 15:04:39 +0100 Received: from sha by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1r7cE3-0046xO-Bx; Mon, 27 Nov 2023 15:04:39 +0100 Date: Mon, 27 Nov 2023 15:04:39 +0100 From: Sascha Hauer To: Andy Yan Cc: heiko@sntech.de, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, kever.yang@rock-chips.com, chris.obbard@collabora.com, Andy Yan Subject: Re: [PATCH v2 04/12] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode Message-ID: <20231127140439.GE977968@pengutronix.de> References: <20231122125316.3454268-1-andyshrk@163.com> <20231122125425.3454549-1-andyshrk@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122125425.3454549-1-andyshrk@163.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:17:13 -0800 (PST) On Wed, Nov 22, 2023 at 08:54:25PM +0800, Andy Yan wrote: > From: Andy Yan > > The enable bit and transform offset of cluster windows should be > cleared when it work at linear mode, or we may have a iommu fault > issue. > > Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Sascha > --- > > (no changes since v1) > > drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > index 639dfebc6bd1..a019cc9bbd54 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c > @@ -1312,6 +1312,11 @@ static void vop2_plane_atomic_update(struct drm_plane *plane, > vop2_win_write(win, VOP2_WIN_AFBC_ROTATE_270, rotate_270); > vop2_win_write(win, VOP2_WIN_AFBC_ROTATE_90, rotate_90); > } else { > + if (vop2_cluster_window(win)) { > + vop2_win_write(win, VOP2_WIN_AFBC_ENABLE, 0); > + vop2_win_write(win, VOP2_WIN_AFBC_TRANSFORM_OFFSET, 0); > + } > + > vop2_win_write(win, VOP2_WIN_YRGB_VIR, DIV_ROUND_UP(fb->pitches[0], 4)); > } > > -- > 2.34.1 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |