From patchwork Fri Sep 20 08:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13808330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 451BFCF58F1 for ; Fri, 20 Sep 2024 08:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pssPvOn+4Ieo8JXCdj0k3N11a+VxA4LtocfM2lHt8OE=; b=U3xEkwNZT/giH/AqsGfuLjfpkE yOwVmTru14Sj20L2tktId/c8mWKboJYJWjJt1Bn/a1i7PDSTgQ431QctpnsTpwEdAZZs+cr8qZCXk j08FjK2I+LT7L2ZlIo3GKQJwHVG57cQWUkRB1iuNSd3tsnGA4x5cjtcEeSoNGlCMEplhRNhzBFvYG 5zwSdZkcN+U3e/CCXP4cGW5NmdWZ3xY8KL5B1LfwsS+kdKIA1tpuYQ2ggeWMZ6Cpat6ifYJVG2hIB VrqXszyuAfAlmgPOga3tvWyn036UOCYN9eRhdugWoYYwrGrnrWDLZBZBO9s0qU5/aDJe0Ir+i2m8q FHuLflDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srZFs-0000000BoVR-2puw; Fri, 20 Sep 2024 08:44:44 +0000 Received: from m16.mail.163.com ([117.135.210.4]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srYv2-0000000BkO5-0nyg; Fri, 20 Sep 2024 08:23:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=pssPv On+4Ieo8JXCdj0k3N11a+VxA4LtocfM2lHt8OE=; b=cxlYDHHqN6gHPczPCrCzj EOIi95Ao05cvnzsQYNhve+gEUMZMrQrBsdIQb7+1b0mWTEA0m/FQba1Ss46vkR+d Olo5yinXYBr4FFCEgfsr9EZwAydjyXBUOQzHGt0amzjcPiTyjBrOuCzrAIZA414w g7YC6poKQ6BUPVoXiyT4UI= Received: from ProDesk.. (unknown [58.22.7.114]) by gzga-smtp-mta-g3-2 (Coremail) with SMTP id _____wCXDpvcMO1mQpM6KA--.41288S2; Fri, 20 Sep 2024 16:22:56 +0800 (CST) From: Andy Yan To: heiko@sntech.de Cc: hjc@rock-chips.com, krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, s.hauer@pengutronix.de, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, derek.foreman@collabora.com, minhuadotchen@gmail.com, detlev.casanova@collabora.com, Andy Yan Subject: [PATCH v3 13/15] drm/rockchip: vop2: Add uv swap for cluster window Date: Fri, 20 Sep 2024 16:22:40 +0800 Message-ID: <20240920082251.6952-1-andyshrk@163.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240920081626.6433-1-andyshrk@163.com> References: <20240920081626.6433-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wCXDpvcMO1mQpM6KA--.41288S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tFW8Ww1kAF4UAw47JFy7ZFb_yoW8Gr4kpw 43ZrWqgrW5Kw4Iq34kJFZ8ZFWfCwnxKayxZws7tw109ry3KFyDK3ZIkFWUAr1qya12kF47 tFn3A3y7Zr1jvrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j7fHUUUUUU= X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiqRhgXmVODBHm+gABsk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240920_012312_604204_DE23A5D9 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Andy Yan The Cluster windows of upcoming VOP on rk3576 also support linear YUV support, we need to set uv swap bit for it. As the VOP2_WIN_UV_SWA register defined on rk3568/rk3588 is 0xffffffff, so this register will not be touched on these two platforms. Signed-off-by: Andy Yan --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 9603bd8491bc..84c67f5d267f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1284,10 +1284,8 @@ static void vop2_plane_atomic_update(struct drm_plane *plane, rb_swap = vop2_win_rb_swap(fb->format->format); vop2_win_write(win, VOP2_WIN_RB_SWAP, rb_swap); - if (!vop2_cluster_window(win)) { - uv_swap = vop2_win_uv_swap(fb->format->format); - vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap); - } + uv_swap = vop2_win_uv_swap(fb->format->format); + vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap); if (fb->format->is_yuv) { vop2_win_write(win, VOP2_WIN_UV_VIR, DIV_ROUND_UP(fb->pitches[1], 4));