Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1494091rdb; Thu, 7 Dec 2023 00:01:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVcATolVrRV34YY67URCQEH4UPoHwisIqsE+CQhR/YWV8QpLuh/wCcKu4YPYciNEQY1VL9 X-Received: by 2002:a05:6a00:408a:b0:6ce:2dde:bbe4 with SMTP id bw10-20020a056a00408a00b006ce2ddebbe4mr2559690pfb.66.1701936115712; Thu, 07 Dec 2023 00:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701936115; cv=none; d=google.com; s=arc-20160816; b=kCwj07ZmgS9G+VG58jV3aogvinKAXnVrJD6S7Rt5Rkyf/RUIY3kCI77OzG1y14UNWf kUCUFSD57YYjTmHgbyYbIF/Z7uKQRjJyU3tWcFtHDeG+7k28GC2xpl7Y+rYU9vC8bblR TGT2IJrv3jsc1uGs2lD3VocZRiOhrekRkU0OOaITu3nD5pvYaeHHOLATuTqOXesi0Mc6 QYSnbB7PAECoG0FqBsnh6P98zA/GZPe+EUc+oGp/GteYnH3R+neXpAIbU01zQ2Ow8qTE rcUJLPCdjsKhawPMI7FhdWX/65mZQAtGX/qBBjBT2Y32HE9AyzdKzSLknBkcHVgFvXKQ Q1Cw== 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=c7kjHjIQ4/nlmiPUxBorZmmivgfaJAOI5Gw9Jj5OowE=; fh=+5kJMU8Psdtt0Ga5ffI2YagkhMdQc/rz38hgRcNs5u0=; b=g+Fxd43uIZhe0RU/PTLAy3nVu3CLUdYj1smLp/3Vfvmr1WD+yr5kFjvg2w0KINvLfx Myt/u1lVcuLe3t/0x67VyCFEOSk+A9CByMKpHvFAA6WzjbOjB9CHm0VgTAa4bh/Cw/uh 8pV4DqfyDtP+/y4xvFygY/IQlr4Mnx3Q0g0O0oB2A3GIQB8Lq+UmM2MzXY66XKJ4rxRW FdTZ/UTTCZbbRmBGBGSPZoCd2OM9OTxrCd80Tyi61Gwztxz/dVghjSjNsMWRaGEqQEY7 RugBYOAMe4uJF7PYMo8pKnaasB69SPJqXnizGRTHXIxBUpC5iMevjGgojlmeIwwE+wiH oERg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=OKq28FKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ch1-20020a056a0208c100b005bdfd3a269fsi784538pgb.581.2023.12.07.00.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 00:01:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=OKq28FKF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8C06E83328CE; Thu, 7 Dec 2023 00:01:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbjLGIBg (ORCPT + 99 others); Thu, 7 Dec 2023 03:01:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbjLGIBa (ORCPT ); Thu, 7 Dec 2023 03:01:30 -0500 Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 048EDDD; Thu, 7 Dec 2023 00:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=c7kjH jIQ4/nlmiPUxBorZmmivgfaJAOI5Gw9Jj5OowE=; b=OKq28FKFyYa6b2htLqGNk 7n0gxfW6w4Ry12uVjON3FpSilpH14JBP3fdiTWFYnHcexD/F51X/S85Cmm/nzXnn pBXP1x4uqZ/Yps9Q/ryfaNJKiws5IClqDgOZJXYhOHvPqkNEyQzG0PtGYW+L3vLV qwW5eY00Ifora/G/WGoNX8= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g2-2 (Coremail) with SMTP id _____wD3f3ORe3FlNJyiAg--.51521S2; Thu, 07 Dec 2023 16:00:20 +0800 (CST) From: Andy Yan To: heiko@sntech.de Cc: 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 , Sascha Hauer Subject: [PATCH v4 04/17] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode Date: Thu, 7 Dec 2023 16:00:16 +0800 Message-Id: <20231207080016.652051-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207075906.651771-1-andyshrk@163.com> References: <20231207075906.651771-1-andyshrk@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wD3f3ORe3FlNJyiAg--.51521S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZrW3WF1DuFyrWryfXrWkZwb_yoW8Gr1kpr W5AFWqqr4xK3yqqa1DJF9xZFZYk3ZFkayxWrZ7JwnFgFWUKa4kG3Z0kryDJrWUJ3WagF48 trn3JrW7ZFWYvr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jSwZ7UUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbBEhg-XmVOA0WxpgAAsR X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 00:01:53 -0800 (PST) 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 on rk3588 which cluster windows switch between afbc and linear mode. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer --- (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