[v5,04/16] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode
Message ID | 20231211115741.1784954-1-andyshrk@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6988973vqy; Mon, 11 Dec 2023 03:59:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwOqfAmoWO35SqF/vtqT3EblaDQKkYxqRgiQAddR0ypMmQEN0y64nuOUguohF9ObEC2xyp X-Received: by 2002:a17:902:ce83:b0:1cf:cf34:d504 with SMTP id f3-20020a170902ce8300b001cfcf34d504mr4542277plg.36.1702295978896; Mon, 11 Dec 2023 03:59:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702295978; cv=none; d=google.com; s=arc-20160816; b=nnYW/Gej/zR8SV8GVxfevsbEYkYgISUzXrbJeYEbRP41tbDlZ0p8J9aTDy9plJAh0Y c2MIpwcaKWUJGhcv0c5jiR4NcSduZtlav29x32DZvVDwBUx9uqCYw7Y5wYbxVEhXy5le mdGh92eYjzrQiiXcTz7FRK6Le/2u9iqAKuFv0s/6QfWMFBELtU1Pgk9bHlFCVJyjRyWm CUuyA/qhlXMKDx9uECTTGaAPOleKC4xReku6NrwAweLd2pJsD+j0QeNP/E52xgKLF9xw BcidjLRoDDhvCYiT4J0jUuuNug3F0vjh+6/EwOPn7fkmHzfOPC6hFftFdhsiOjnouyyO C0og== 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 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s11-20020a170902ea0b00b001ce5ba27888si6170232plg.211.2023.12.11.03.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; 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 2620:137:e000::3:8 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 481D480879D7; Mon, 11 Dec 2023 03:59:34 -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 <rfc822;dexuan.linux@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <andyshrk@163.com> 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 <andy.yan@rock-chips.com>, Sascha Hauer <s.hauer@pengutronix.de> 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: <linux-kernel.vger.kernel.org> 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:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784986708051457523 X-GMAIL-MSGID: 1784986708051457523 |
Series |
Add VOP2 support on rk3588
|
|
Commit Message
Andy Yan
Dec. 11, 2023, 11:57 a.m. UTC
From: Andy Yan <andy.yan@rock-chips.com> 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 <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> --- (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)); }