From patchwork Sat Dec 14 08:15:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 13908335 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 6D2D6E7716A for ; Sat, 14 Dec 2024 08:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YZ9GWKNSe5Q4SpmNFAR731nEVnSWU+0lMOwCbJrbkM0=; b=uD5CRkTF+ABXQv SdATdIK84JCM34RtKaQ19sYBTFxKIDNfLhV9XQKkCX70jjMHFM2v7NqABySXgV5vzg1szhAD24n3X 5cm5E1y89WxuUgpAc69kyqdHWA+R+S0alY/tqTxQ464NLtDy+X4Zmd/6sxMezZfsSV6jj+RxJXt9J gTIFwe56OmvAedfHVrYcd5vKY+rSri/2i7lYEUc08ECp8W++DKBKPgG6AlG6l5mfiAQzWxIanvKhb aJstcNQDVvEWU4FToI3JbfSAmYiptR3efwTD2vK1wxj0J6IB9cFu/ZumQB7QIEvVUpQpEWJtxer09 1qVq8qQ4hNSt68/uqa8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tMNKg-00000005xvv-07aC; Sat, 14 Dec 2024 08:17:02 +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 1tMNJZ-00000005xZZ-02BV; Sat, 14 Dec 2024 08:15:54 +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=j+qcT Ukc/BnBCDtZ2o87bQo2kXQ62aGX4577Kc8A3m8=; b=BS/5ATpR7cL4kqJYq0t04 DEr+7rdVHzzzeDhI88YGop6Q+in2N3FJktzb94DLQf7dgAtnrGkZP3Ud92Yn+X67 BzdXwcOHSB6bE1kdgarW4fwrI7VO9mrLODn2tmTrCD6K4TM3obXrkFilh3RXWl/q 3Rxn6qgbK4s7LjcxF4Ki10= Received: from ProDesk.. (unknown []) by gzga-smtp-mtada-g1-2 (Coremail) with SMTP id _____wD3vwGjPl1n3T_wAQ--.16730S7; Sat, 14 Dec 2024 16:15:39 +0800 (CST) From: Andy Yan To: heiko@sntech.de Cc: hjc@rock-chips.com, krzk+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, detlev.casanova@collabora.com, Andy Yan Subject: [PATCH v6 05/16] drm/rockchip: vop2: Check linear format for Cluster windows on rk3566/8 Date: Sat, 14 Dec 2024 16:15:13 +0800 Message-ID: <20241214081529.3330243-6-andyshrk@163.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241214081529.3330243-1-andyshrk@163.com> References: <20241209122943.2781431-1-andyshrk@163.com> <20241214081529.3330243-1-andyshrk@163.com> MIME-Version: 1.0 X-CM-TRANSID: _____wD3vwGjPl1n3T_wAQ--.16730S7 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gw4xKF1UZr1DWFW8Aw18Zrb_yoWktrX_Ca 4xXw13Wrs7KFn8X3W29ayfWrZFyan29F48tF48ta4ktF1Dua97t3sayFW7Gas8CFWfGFnr ua4UXF10kF9xGjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0wZ23UUUUU== X-Originating-IP: [58.22.7.114] X-CM-SenderInfo: 5dqg52xkunqiywtou0bp/1tbiMxW1XmddNBynnQABsk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241214_001553_421401_6E855076 X-CRM114-Status: UNSURE ( 8.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Andy Yan The Cluster windows on rk3566/8 only support afbc mode. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan --- Changes in v6: - Move the linear check to format_mod_supported() hook Changes in v5: - Added in V5 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index f143df2b13a1..94f77faf14d1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -593,6 +593,16 @@ static bool rockchip_vop2_mod_supported(struct drm_plane *plane, u32 format, if (modifier == DRM_FORMAT_MOD_INVALID) return false; + if (vop2->data->soc_id == 3568 || vop2->data->soc_id == 3566) { + if (vop2_cluster_window(win)) { + if (modifier == DRM_FORMAT_MOD_LINEAR) { + drm_dbg_kms(vop2->drm, + "Cluster window only support format with afbc\n"); + return false; + } + } + } + if (modifier == DRM_FORMAT_MOD_LINEAR) return true;