From patchwork Wed Oct 14 17:27:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 3609 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mxe881.netcup.net (Postfix) with ESMTPS id 2091B1C1351 for ; Wed, 14 Oct 2026 19:31:01 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 104.64.211.4) smtp.mailfrom=linux-sunxi+bounces-26643-noreply=patchwork.local@lists.linux.dev smtp.helo=sin.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4 as permitted sender) client-ip=104.64.211.4; envelope-from=linux-sunxi+bounces-26643-noreply=patchwork.local@lists.linux.dev; helo=sin.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sin.lore.kernel.org (Postfix) with ESMTP id 88C0D2CD5F for ; Wed, 14 Oct 2026 17:30:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5B6E31B101; Wed, 14 Oct 2026 17:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L297U/ob" X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C326F31D730 for ; Wed, 14 Oct 2026 17:30:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791999056; cv=none; b=hg+Rs1cHN01UUxqLWrp3U7BhcICm0X/YQ5KIANkcgp65/87/A5oNhZu1Ivgdb/ktnpl0TbVTyc3o1Q+6gzEJpV/oAMY60J79EmZcDqWkN7vNgzd7ybCm0T3K9bAyjwiRa60PCUX4wy6UIQRV25Qyfo7jLjjQiaV2t5YfNTjbKWk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791999056; c=relaxed/simple; bh=LdgN7Ly8DOeZP0rhAFtQr7JjeNlItSMFEwC6teFOK9Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jSisJ5tW7YteRgM+kpuM6Zo1eKgNLnMFCBB0Jd5B4CDTpl3hsYh/+Q+wfghfZhdUGbSXGPdH16pUrHKeq+NaZLnTDblI5iiuVqYP9GZoC+wAx17EdVYc5v2xdMpdnrQCu9/UKlZ5Ti3QVhtUnjfNxEVKWoF4Q7G70aOBEB5oBE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L297U/ob; arc=none smtp.client-ip=100.103.45.18 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A68DE1F000C5; Wed, 14 Oct 2026 17:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791999054; bh=axNUJMhhnxKQtQYDsX+DThuVPCWOkI5w9f6H3PvyWtg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=L297U/obPdPP8e6ICJuDBar1WwFIfCTxAgFssiWoQ10gpYVYtSFTAnQNlkG5y2zfM V4tm8F+1uQ7XWKNnEwzCpTQZusqAMUcua0b8TNsfxqBum1uMJ3bZL8xgfiNQ8SD/FP uAYMpIo8FO7mDOu2n+PodpQE5fwoLW1ho2vip4eIZpNFkMbaMDktQx6zPDiKK0Dc02 orzhkviERWymsOOXcDGCB3b7NzbEvdLtvKY+DSxZ02FOQZf87/UAU8p/dbnhU7o531 X2LrmldVxmMTTtE6VUMacwbPSYFZbdge+Ok+ciDYZgpCHKYcu1pw5e5bg4t/4hTz1X rcyVf/IWXdhEQ== From: Maxime Ripard Date: Wed, 14 Oct 2026 19:27:24 +0200 Subject: [PATCH 61/75] drm/sun4i: tv: Convert to atomic_create_state Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20261014-drm-no-more-connector-reset-v1-61-586c9c026823@kernel.org> References: <20261014-drm-no-more-connector-reset-v1-0-586c9c026823@kernel.org> In-Reply-To: <20261014-drm-no-more-connector-reset-v1-0-586c9c026823@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, Maxime Ripard , Chen-Yu Tsai , Samuel Holland , linux-sunxi@lists.linux.dev X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2208; i=mripard@kernel.org; h=from:subject:message-id; bh=LdgN7Ly8DOeZP0rhAFtQr7JjeNlItSMFEwC6teFOK9Y=; b=kA0DAAkTJ1/OGaI9vnYByyZiAGrPu2Wh/cotqwiQQKGdx/TEF0TxfVsf/71THk/WVDi4LOg2m oiVBAATCQAdFiEE5BxWy6eHo3pAP6n4J1/OGaI9vnYFAmrPu2UACgkQJ1/OGaI9vnbhKAGA/oLD UE32/nSIMkid7mqxYmAajX/Zdu3iJZtoXhBwTDKMPJpTb84WmgoVeZH/ax7MAYDcva6HztCqqpY c4fngyAO3RHzb4tZmS+i/8URffWUQrUjl8qUvxB0LJ1Bp6A4vkI0= X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= The sun4i TV connector reset implementation creates a pristine state and initializes the analog TV properties. It does not perform any hardware reset. Since this is equivalent to what atomic_create_state expects, convert the reset function to an atomic_create_state hook that returns the initialized state. Signed-off-by: Maxime Ripard --- Cc: Chen-Yu Tsai Cc: Samuel Holland Cc: linux-sunxi@lists.linux.dev --- drivers/gpu/drm/sun4i/sun4i_tv.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index ea86f8a6a35e..a68e5f7a03d2 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c @@ -403,20 +403,28 @@ static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = { static const struct drm_connector_helper_funcs sun4i_tv_comp_connector_helper_funcs = { .atomic_check = drm_atomic_helper_connector_tv_check, .get_modes = drm_connector_helper_tv_get_modes, }; -static void sun4i_tv_connector_reset(struct drm_connector *connector) +static struct drm_connector_state * +sun4i_tv_connector_create_state(struct drm_connector *connector) { - drm_atomic_helper_connector_reset(connector); - drm_atomic_helper_connector_tv_state_init(connector->state, connector); + struct drm_connector_state *connector_state; + + connector_state = drm_atomic_helper_connector_create_state(connector); + if (IS_ERR(connector_state)) + return connector_state; + + drm_atomic_helper_connector_tv_state_init(connector_state, connector); + + return connector_state; } static const struct drm_connector_funcs sun4i_tv_comp_connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, .destroy = drm_connector_cleanup, - .reset = sun4i_tv_connector_reset, + .atomic_create_state = sun4i_tv_connector_create_state, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; static const struct regmap_config sun4i_tv_regmap_config = {