Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3912473rdb; Mon, 11 Dec 2023 03:59:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEU6y/6Hz2qubnvpRifLG1cMNafCB4gv498vqQetQoHhXG9nu61SG76WMwGIMYTJj5TWkmg X-Received: by 2002:a17:903:40ce:b0:1cf:7bf7:e655 with SMTP id t14-20020a17090340ce00b001cf7bf7e655mr5146012pld.8.1702295989323; Mon, 11 Dec 2023 03:59:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702295989; cv=none; d=google.com; s=arc-20160816; b=HahzhMBODkXaO3chB3W95UMdSO1z8FoMp838mWhjbnKHnhNnT7tHerGGA31ddq498g /sl41evqq0tIUM9gdTBDZ9NNVmU3ychImMetQJm3zcP/oqsVkln8XRN+44/jWMisAbwE kLEz/dup8SnIoYdSb8N57zUokB/ZlF0EjthXihBo5OE3CVOHW3MieM0KGOPZcOzqCTW8 RpxihUiryX63JnOcqf7OU3bD1v78mkwcttAV9iOKyjzgFXtHCG0e//LfZnIuPH8gR9Xt chDuxNJBdrywEAwgE84ZhviiloyFR53yAoZ6mswC21/u9E5eJYgb9XXsDSxd4CnzSJAr LUIg== 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=Td+LzCnDufyx7oVqqISSq2HtUyJVLz3TRe7We2nKB2jaONV9oKt5KFtCS1hFYKp/m6 Dn6xRDqfQGQqeMPU7tDKQx1JUhky4VC5NSHcKIw8wgtle2A2SwhoTb4mEtHJyJsfphAt C6PI65TVhtkkhCGeGl8gUWJC2IZUI1pXYZ0zdgTgVGkD62dCMW5NMnBW3RhwoDHtd4Em Bfk+n0j6q5W7tYKMolA4HNNi4sbEtX9TAjvLKezrbXJXwQZnikgUDcvZn+Cfjepyc5Xq C/j0+8zopY8kUBW2MFPYG97LTBetswQSjXeAYZoVEbmLM7hV0P+Eh+9cuK5b1O71aL/Y 0aSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=C1CvKWI3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n15-20020a170903110f00b001d0891f986asi6055247plh.525.2023.12.11.03.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:59:49 -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; dkim=pass header.i=@163.com header.s=s110527 header.b=C1CvKWI3; 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; 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 fry.vger.email (Postfix) with ESMTP id 2931C80879C2; Mon, 11 Dec 2023 03:59:44 -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 S234482AbjLKL7Z (ORCPT + 99 others); Mon, 11 Dec 2023 06:59:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234640AbjLKL7N (ORCPT ); Mon, 11 Dec 2023 06:59:13 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8852BF7; Mon, 11 Dec 2023 03:59:18 -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=C1CvKWI3xPtN6h/ppqw4g XMvbOcLI/3nkb/kYHX2mblq3tz5mSZUxjAigHmKbYK4nX8rFfd0PLHXTvB8Ltskb XRGvQ3w+86lymfrl9sQsyUX50klT5q6iT0koxZY2i9sE70J+i0N/jeydjtEVvfPC ASQxmaNZo3gV0Nm2ON1Y8c= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g4-2 (Coremail) with SMTP id _____wDnLww2+XZlDNOBFQ--.2979S2; Mon, 11 Dec 2023 19:57:45 +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 v5 04/16] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode Date: Mon, 11 Dec 2023 19:57:41 +0800 Message-Id: <20231211115741.1784954-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231211115547.1784587-1-andyshrk@163.com> References: <20231211115547.1784587-1-andyshrk@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wDnLww2+XZlDNOBFQ--.2979S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZrW3WF1DuFyrWryfXrWkZwb_yoW8Gr1kpr W5AFWqqr4xK3yqqa1DJF9xZFZYk3ZFkayxWrZ7JwnFgFWUKa4kG3Z0kryDJrWUJ3WagF48 trn3JrW7ZFWYvr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jTtC7UUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbBnB5DXlghl75aVAAAsB 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 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, 11 Dec 2023 03:59:44 -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