From patchwork Fri Jul 29 16:35:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12932683 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 C153EC00144 for ; Fri, 29 Jul 2022 16:48:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 62A1E113F31; Fri, 29 Jul 2022 16:48:17 +0000 (UTC) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B5F410F40F for ; Fri, 29 Jul 2022 16:45:48 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id BFF1B58098C; Fri, 29 Jul 2022 12:37:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 29 Jul 2022 12:37:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1659112622; x= 1659119822; bh=XckcpoELRAAukT+qCBdvHaSrqmBkD7IAU61uNE+rv7c=; b=j 5OTEe9/ikhzjIBEHcRVP3n4XSH68mICFLAMWOa+MfxgmIge1F1uPH/lXRx7eP/ec a165ZF/rRh8AYgzmv1nxuDYXqGJE5OSWR90UrReF+MmMxaB9alL09MfiVa89ustS Q9aB0l78V6v5itSekOqdN4mB4IShHItwWBSuKvOabMY3IK1jzLhDh1LAdkVphfl8 jtUvlN/LhBbEn3eHl+psxH/hUfsFUisNKB/NGdYSax+B+lDkSOA6wLE7+QDu+lEN eRXj1jPdjAftUz9TB+4NVh0iuTeRGYv2dEHlXGLNvLpRYCUVK483utVd1CX0f5GE Lr2t3LoV7Zc2dHkOssqIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1659112622; x= 1659119822; bh=XckcpoELRAAukT+qCBdvHaSrqmBkD7IAU61uNE+rv7c=; b=s AF3Da3EY5YoxK1fo01f536wWejrgWzd7TM9jGrQ0CYJHqvxt2KzjQfi1mwA11OAR S1Wnwtze6MRqp2ARoA64gZHvD01fHTSNXHvD9ZcFApL/MeaQC/A4oSCd1w8CdRUg KjbuB1ynEgEWO2RqN6oaYCUDquksz+Ilf18fbiirVn3t/9M3vRHBAFYyAkv8+LbT mNsUvlM0G4PwDQKiIiP6jCdaTw8lKF2xyKWbpbjKIKOu4hDbU5NsGQb2QLNU0ZzK SkVuuJTyufbW653qDIAGQfdxrK2nut5YL5rDo4pMTUAhN6Jhb+2DWcymWJbN8o5/ SgMSDGu0mhyk/4ntzinrw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddujedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtoffgsehtkeertdertdejnecuhfhrohhmpefo rgigihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecugg ftrfgrthhtvghrnhepgfffgfetffduudelhfevieffffduleevgfegkeeutefgffejheel leekjeefhfejnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrh homhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Jul 2022 12:37:00 -0400 (EDT) From: Maxime Ripard To: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , Maxime Ripard Subject: [PATCH v1 26/35] drm/sun4i: tv: Convert to atomic hooks Date: Fri, 29 Jul 2022 18:35:09 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v1-26-3d53ae722097@cerno.tech> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> MIME-Version: 1.0 X-Mailer: b4 0.10.0-dev-49460 X-Developer-Signature: v=1; a=openpgp-sha256; l=1623; i=maxime@cerno.tech; h=from:subject:message-id; bh=rHEOub477XlbL+5lo6Ff+MJpYcQ5tUS9w6PRTcDJwtg=; b=owGbwMvMwCHc4XzqmfnC7acZT6slMSQ94VFyZDbY0vu+cOkaQx7r9NN+Hyvr/17ekrb1G3tE7TpV rumuHaUsDMIcDLJiiizXBd/a8YVFuUXwfNgMM4eVCWQIAxenAEzklSHDXzmtmae1W/5G/3/v3ucfo/ Qp7kRd43Yf0WOvInrWMwcc2sbwv2SV9Yy2n8IzTe+cFdTdvetm4Kyf7+r7bbc5c1g1WvQYawIA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D 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: , Cc: Dom Cobley , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mateusz Kwiatkowski , Geert Uytterhoeven , Maxime Ripard , linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The VC4 VEC driver still uses legacy enable and disable hook implementation. Let's convert to the atomic variants. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index 53152d77c392..f7aad995ab5b 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c @@ -339,7 +339,8 @@ static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode, mode->vtotal = mode->vsync_end + tv_mode->vback_porch; } -static void sun4i_tv_disable(struct drm_encoder *encoder) +static void sun4i_tv_disable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder); struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc); @@ -353,7 +354,8 @@ static void sun4i_tv_disable(struct drm_encoder *encoder) sunxi_engine_disable_color_correction(crtc->engine); } -static void sun4i_tv_enable(struct drm_encoder *encoder) +static void sun4i_tv_enable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder); struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc); @@ -469,8 +471,8 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder, } static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = { - .disable = sun4i_tv_disable, - .enable = sun4i_tv_enable, + .atomic_disable = sun4i_tv_disable, + .atomic_enable = sun4i_tv_enable, .mode_set = sun4i_tv_mode_set, };