From mboxrd@z Thu Jan 1 00:00:00 1970 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 13E50CC6B1A for ; Wed, 14 Oct 2026 17:30:49 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eqrMAdy0KFPp4dg7EkOd0bOCl0IBATp5vZYkx95ShZc=; b=CzPjNTQbyjVes8 /7sgReliVfhJDVC39TSBoOr55LLZR6NvFGqa2/1IudJmJffBdAYhFh2bYhmaW2JJiHFiegznaFpLJ YwducJ+psRscuWAypZdQm+XKx/cIajU8B1Dd3KJpT7m7qLCC1kNnevxGx/LmJpqa5OJd4JFEQvqdI MXpgNHoUaI5A9yItAnWGhPj+m0qJ38wt1ASNBrQZ+PgANYBoJtSXkLGdegftpNySouhj4v7on21Af SFZaBv/1cWA6AlG9d72UByuPEV0HwJ42I7mqesPOxwfMEmbWAODxp3rjPIFcg3Cle43ehiZR/xihX ANUTTMsIbOxN2C11qd1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xH2oP-0000000G51b-3JCB; Wed, 14 Oct 2026 17:30:45 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xH2oO-0000000G51P-0AKf for linux-amlogic@lists.infradead.org; Wed, 14 Oct 2026 17:30:44 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 732E344781; Wed, 14 Oct 2026 17:30:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C79E91F000C5; Wed, 14 Oct 2026 17:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791999043; bh=7R/UujzdlkHZUl2pa3+Ny38x0csYsO2mqxSiJYN24f8=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=FrjkMmiXwH1cJoO4QiT7c9Xf65Z+Hm4aEvvjoZfQOUBK6pugmTRkHBqGr9E65zslB l5x8Y275WLBfrK6Y91ZxzIEkBNFdEtUUHss11rNmFQCbXrS1a0k854fCQVu970HDFm kLfwFZMu6BGjAk92u1+IZh8TYcM4YlhJHpJ+M/kwzdo7TP/yQ4g57kLntRz49My/oR YjTnnqh6FOkXKyLpDZsYM+4Rv0cGgUbj6C9Qb/AgkgAR5mdIwIX7emBBVr4jaRYe+7 v1HbOK+Jy76LFPniTMq1AxTDHQ8/ZgA+5MIBPDjezLwk06K9/5ZXCAvb+1Tj0zSRHD evDRqwrA5ysgQ== From: Maxime Ripard Date: Wed, 14 Oct 2026 19:27:21 +0200 Subject: [PATCH 58/75] drm/meson: Convert to atomic_create_state MIME-Version: 1.0 Message-Id: <20261014-drm-no-more-connector-reset-v1-58-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 , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , linux-amlogic@lists.infradead.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1868; i=mripard@kernel.org; h=from:subject:message-id; bh=4Aof8z3qpDFgdWxPTO9gWRMfppFmEHKKmxOj0ZdhSBA=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFnndycnWMS83ySuzdXq3eO1r1e8OXdKn/72ezv833/f+ +1l3CGBjqksDMKcDLJiiixPZMJOL29fXOVgv/IHzBxWJpAhDFycAjCRnYGM9RHzWX+9vP/p849p 63orMyaW5/2cnf7/mW56GjuPfNjsplibWT5KxdfSTlT+qpS24ju4i7HhsSbfmgWJMs534u4Ifrk 7bWoEH4tES5xCkKzF5DuqF+4+kgr5qyw/c3ef0Bejlh97f68EAA== X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The meson HDMI encoder calls drm_atomic_helper_connector_reset() during connector creation to allocate an initial connector state needed by drm_connector_attach_max_bpc_property(). However, the driver only needs to allocate a pristine state, which is exactly what atomic_create_state provides. Convert to drm_atomic_helper_connector_create_state() with proper error handling. Signed-off-by: Maxime Ripard --- Cc: Jerome Brunet Cc: Kevin Hilman Cc: Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org --- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c index c4355c5cc340..c04e381b2c10 100644 --- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c +++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c @@ -446,11 +446,21 @@ int meson_encoder_hdmi_probe(struct meson_drm *priv) /* * drm_connector_attach_max_bpc_property() requires the * connector to have a state. */ - drm_atomic_helper_connector_reset(meson_encoder_hdmi->connector); + if (!meson_encoder_hdmi->connector->state) { + struct drm_connector_state *conn_state; + + conn_state = drm_atomic_helper_connector_create_state(meson_encoder_hdmi->connector); + if (IS_ERR(conn_state)) { + ret = PTR_ERR(conn_state); + goto err_put_node; + } + + meson_encoder_hdmi->connector->state = conn_state; + } if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) || meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXM) || meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) drm_connector_attach_hdr_output_metadata_property(meson_encoder_hdmi->connector); -- 2.55.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic