Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1064825rdf; Wed, 22 Nov 2023 04:57:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkwBvtjBUAJe4dwD8+iV3Q/axB0U+AXclzapbjWuF5UH96pTECWfsO+Va9crvy8jx3oyjV X-Received: by 2002:a17:90b:1b4f:b0:280:2652:d45 with SMTP id nv15-20020a17090b1b4f00b0028026520d45mr2136423pjb.20.1700657829745; Wed, 22 Nov 2023 04:57:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700657829; cv=none; d=google.com; s=arc-20160816; b=vs2PSdXSDN/m4ADlViiAWGnny37yjyvtpDd6e7O6WjXuaiTye7QrAfR82y0O9MQh2B /EFyqqSgAsbl5VM68YcREDoszZWevRwtyXDb73ey2Wa3ovee/SfT7OkZNJ2iOaoViF0K wwaIZly2YmsWL8zHOkD1EcpCP62GH0A/jooaPDwnfCRbCiATre/vckhtdHZvjiG8o9+3 5M8uc9sBTCMu+TUaKumJd88k3X9sAlRRPOzNO+WXMNW7B4S5WDC/dMWXxmK4rVQdcWJ+ j2V1TeNjfpxRxgE3+RFeuM09ysdGGWdy3aHAN3OqrcaCrcTTKsdCxznZQPUGRfJ5wfiv QYTw== 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=6otUM/47Tf3xP3DWibrhyyFMgkpC7ZW06/QSkEgQJjQ=; fh=cjsv5ohN1TaMP82Yqeh0WKQ1fJXsn/LNnakMe8VYEy4=; b=Hv+d52r8KkIZ7J295aPWWIrRoZ3+BE3Ocb7EtrxKIi8TU9s1kJqGZSqJ29J2Y7uPwr ArsfZC2tF6RsKkUtTFKAntQ3NsDrB25CRJiSl/87nrNR9MDGxhqDROkTe7AqFg4eBU4q 9oCV5n44CVWFsvEE+wdk6wYiOkOdtExIou/u1Eu+3lycUthhjZG1OlArj5V6icoXsK3X c8QWkyJfoRycZM2XH7Gyi+odGxyeQzGh67uYEEj9ZRI5GQP5MxChagwq6Dait3uKtahA +lT0XKDnsQZENL64n0+1Hj80fsiKhf/tCN9lF0Oz/7ZLb9kQ21NX3m4TcJdpYXoWqnd5 rmOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=JWAxZ5kH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id e10-20020a17090a4a0a00b0028525cfb9f9si1355632pjh.105.2023.11.22.04.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:57:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=JWAxZ5kH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id ACCBE808D496; Wed, 22 Nov 2023 04:56:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343956AbjKVMzX (ORCPT + 99 others); Wed, 22 Nov 2023 07:55:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344022AbjKVMzQ (ORCPT ); Wed, 22 Nov 2023 07:55:16 -0500 Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.220]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19729D65; Wed, 22 Nov 2023 04:55:06 -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=6otUM /47Tf3xP3DWibrhyyFMgkpC7ZW06/QSkEgQJjQ=; b=JWAxZ5kHif3HgKYhiECJW tBdkra2uE1y5II7GxxyjRsZfYyNq5uJvzYfPmp6buxD5bJkdC2M3QTZS1UR7kQXu TPymlgxdnVdHNGtNzx96pxZ8AfZNxaKLVU+Uyx7KXlM9hg2QmgJPokxhjP6TCZ0j XeBMKCOq0ZNZ7elxhWf0ps= Received: from ProDesk.. (unknown [58.22.7.114]) by zwqz-smtp-mta-g1-0 (Coremail) with SMTP id _____wDn784C+l1lfIunAw--.35392S2; Wed, 22 Nov 2023 20:54:30 +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, s.hauer@pengutronix.de, Andy Yan Subject: [PATCH v2 04/12] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode Date: Wed, 22 Nov 2023 20:54:25 +0800 Message-Id: <20231122125425.3454549-1-andyshrk@163.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231122125316.3454268-1-andyshrk@163.com> References: <20231122125316.3454268-1-andyshrk@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wDn784C+l1lfIunAw--.35392S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKr47Aw18Jr1fCr4kAw1xAFb_yoWkWrc_Wa 47uwn8GF1vgwn8Cw1UA343C39Fyan29F4rGa1ktas8ZF1vvw40y3s7Xw1UWr15uFWrCr4D GayUWF13uFnxGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0AMaUUUUUU== X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/xtbBnAowXlghlh76hQAAs2 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:56:16 -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. Signed-off-by: Andy Yan --- (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