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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 BD1AFCCD195 for ; Wed, 15 Oct 2025 11:00:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6E5A10E77D; Wed, 15 Oct 2025 11:00:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="ldAPwhTZ"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AA4310E77D for ; Wed, 15 Oct 2025 11:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1760526049; bh=pFrbe3wGLYfVrE89uR4Kb7AWJMKxzolKIah8v8D2Djs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ldAPwhTZH0ucND5XFyqXhONWkxe/MSpptbDCxmrVxvHQal4ryD2kplDOenKK6BlWH 68m5ZX7Y0XD+fZJ97ycb0teP53kMtu2CAs/cRmjV3Q1WhxU3s6teviuMSz9G2LxDay YT1o5MlfVHHUUQI0jaXtFnzO/YoFpJK1o3ohbbub1GzhmsKIZpzPbETshXnJ2nDvVw 56D4NR09Y5HsKm98wQlyT6/7oXZLnHZ4HG4gXw5aGodwlXqct+xSUwJeMzJCMZ10Da 0rl+4ik5rxECym1rOxUxZ+WUB6VSSQG9n2g4MiokBey3yUmHos/8QUEocMTjYteNLd Dk3Hc5dGhvBFg== Received: from reinforced.mynet (unknown [IPv6:2a01:4b00:be1d:c600:6089:8bab:34a0:d4c5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: daniels) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3557A17E361D; Wed, 15 Oct 2025 13:00:49 +0200 (CEST) From: Daniel Stone To: dri-devel@lists.freedesktop.org Cc: andy.yan@rock-chips.com, hjc@rock-chips.com, heiko@sntech.de, cristian.ciocaltea@collabora.com Subject: [PATCH 12/13] drm/rockchip: Use drm_is_afbc helper function Date: Wed, 15 Oct 2025 12:00:41 +0100 Message-ID: <20251015110042.41273-13-daniels@collabora.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251015110042.41273-1-daniels@collabora.com> References: <20251015110042.41273-1-daniels@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We don't need to do a long open-coded walk here; we can simply check the modifier value. Signed-off-by: Daniel Stone --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 36e5864f7e37..e2a18c303357 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1205,7 +1205,7 @@ static void vop2_plane_atomic_update(struct drm_plane *plane, return; } - afbc_en = rockchip_afbc(plane, fb->modifier); + afbc_en = drm_is_afbc(fb->modifier); offset = (src->x1 >> 16) * fb->format->cpp[0]; -- 2.51.0