[04/11] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode
Message ID | 20231114112742.1771060-1-andyshrk@163.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1792606vqg; Tue, 14 Nov 2023 03:29:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8aAt9vXTEu8FtIDglyonJQ9EHOXEccmg2Tzf9JvopCMG7YPQIymgE3a9JuVGyqOJy23yM X-Received: by 2002:a05:6830:2b10:b0:6d6:47c7:1abb with SMTP id l16-20020a0568302b1000b006d647c71abbmr2025775otv.22.1699961341962; Tue, 14 Nov 2023 03:29:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699961341; cv=none; d=google.com; s=arc-20160816; b=kvWHngRwdIpcl7fDPqyGaWRwKAufUdm5fMWr64LkXUGmusLDR+8EOBHYFl9xTglvo6 iWrFgLu/HOXCDhlQxbIhKojE7eKqJu29yjbTz3sftN+Jop4QDpeuMw6APen4rtyCLk5m rn5osYuFzngYm8nj/0eVFJu8CHI3O9r1WciHgvAHTcokKlWlDAEYrKoNESivODpNEZ4V t5OzmGP/jhqUD4G0TgIGu8yXDW5VgcKdQN8bEXBn27VKyCboF9RxY9fUqsOUKosZvgk/ 2rzo2G6lUwEua4HsDtt6t+8icchCyRgdBDjfNkEsQGVpxr9mZJp7yVIfP5Nm1wtzplbA 2Asw== 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=4fsvHLLIllNYap7ogZZzNxpS2uJ/Rut3Yt8ehtoDXa0=; fh=cjsv5ohN1TaMP82Yqeh0WKQ1fJXsn/LNnakMe8VYEy4=; b=SkpoKetDIidvGKgWccdzV8owQx9qbcy91x5xGCGcSdJWwEFEcW9hdDe+udZxxN46wd ei/A3HHb2us/Q0D+rtOtLHHVV4kMDN329OMwRt4SdCKJ2sFfQ8tYhVWnNOapKYuFCc/G NX8kJtIKhB/hR8xq1IJ2vIdGN4Sc6ouNi3weeKXTSUxpjRVIFmYAJRPiF8LqnemQv6xJ pyCUB/hR2uXAT+s3e2UlPR4zFuPJBaqb/0Yfzex13izlFtGeGUvkOQWVXHPSkhahYM0f 7PZ/XRcGXRhL2OUzep8fh2kd2xdHW/eFKbjxi6ooyWVBy9dvnVpgH5IY+PB7XS7tt54Y d9LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=hsFgS82T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x188-20020a6363c5000000b0054fd947f66dsi7543292pgb.210.2023.11.14.03.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 03:29:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=hsFgS82T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 173F5801B3AE; Tue, 14 Nov 2023 03:29:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232924AbjKNL2y (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 06:28:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjKNL2i (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 06:28:38 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.215]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC606193; Tue, 14 Nov 2023 03:28:33 -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=4fsvH LLIllNYap7ogZZzNxpS2uJ/Rut3Yt8ehtoDXa0=; b=hsFgS82T83GZCZHG0FVzS 8ZYIIGgbDm3f+tNjwg9FpqHUYpxdnxMPTPnnH8blHPpSdREClScQirojumyzlvM4 P1I1Jg+O2vqcHNb6UWTzHnf8WO46/iuyfhW/O3zagwRJwkKv+Yfydq+M1XJ+qGqj Axr+SvJPit0yhbSScponCM= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wB3H6uvWVNl3TYPBQ--.53935S2; Tue, 14 Nov 2023 19:27:47 +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, s.hauer@pengutronix.de, Andy Yan <andy.yan@rock-chips.com> Subject: [PATCH 04/11] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode Date: Tue, 14 Nov 2023 19:27:42 +0800 Message-Id: <20231114112742.1771060-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231114112534.1770731-1-andyshrk@163.com> References: <20231114112534.1770731-1-andyshrk@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wB3H6uvWVNl3TYPBQ--.53935S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKr47Aw18Jr1fZryrur1DGFg_yoWkGrX_Wa 47uwnxGF1v9wn8Cw1UA343CrZFyan29F4rGa18t3Z8XF1kZw40y3s7Xw17Wr45uF4rCr4D GayUWF13uFnxGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0AMaUUUUUU== X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbBnBcoXlghlUyfxQAAsH X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L4, 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 lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 14 Nov 2023 03:29:01 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782538663653109223 X-GMAIL-MSGID: 1782538663653109223 |
Series |
Add VOP2 support on rk3588
|
|
Commit Message
Andy Yan
Nov. 14, 2023, 11:27 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. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> --- 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 0f7b68c5fdf2..02b76a85f22f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1307,6 +1307,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)); }