Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1157367lqb; Thu, 30 May 2024 01:49:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJklFzYrkwwrOnampj+XfEFQ0yJHHpe652k9F8eipz3FpX4Rg55Zb6P8bSvhc9iL+yodvrPz/eaXg3QQ9I3d9Kd9ZToJOqfQkYOBKC0A== X-Google-Smtp-Source: AGHT+IEM3wqNOTYZiR/Cq0NGvDbb8u25QBitqsfFmpBWFDFjsNwDc06AN7HYrBWWzv+wY56WTG7R X-Received: by 2002:a05:6214:3c8a:b0:6a0:cbab:771 with SMTP id 6a1803df08f44-6ae0cb5c837mr17694866d6.35.1717058984920; Thu, 30 May 2024 01:49:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717058984; cv=pass; d=google.com; s=arc-20160816; b=qyjIbKI9BWm9yAJMRimF5jnlrNJvpY4qdQ+8H7q4cR0Jxd42/FImNDhnZfjE1zYnYZ hqpgRBp39coayOnc9xe171RUAlpvza7oaRqXGCmBssyAh5mLF15m9oCIWkUp7NL97f6M yBTTm7z9taatsleSKGYfz/GhzoABcFDWAIMxvSiMJg+9ahPK862Hx8RZUOoRS5N7nNps Inh/joWNZ2uNtsDl5DQrhlHdJj0i4nRulQJSbS9EVmLMUDICaWripaimoEiMk+ojpNd0 0IcI0jnfPC9pJ39UpuYwBN4MytNYNcFK1CEAjhz+7ALs8t2yZeyvysf57ZyX9uKoKy+F 4+XA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DNkBA3/DdL55D4yHMVQLVl6tz9q3gLPUIdeX8HyNiK0=; fh=iy29NWqipxoS+cCxwcELosrt3OlGBq5xwDbc/PNzevE=; b=vb1YEVkfXXG4cCbfqyFBNSPQRvvoDNJgETR7c2flJ8S9F0NxW6ELJwLn6Tr254YDJL GYlK4KZikt9mR/8LwqkBiU3NIfa00+RWNEp8oa8Z1juKwJsq/1ljFH1JNkGgNFslD47f GCup7e3fC3uXXz49mV1FwyI/Y/5PGapCfRSyHgNkqdBYs4iX0DsJtakyVseRWjDs2QyU gC1aneSZzcR+lXzEefEBUEyzf5xCE+GCtEE5HHyWalvQmF8rFgIvSAV1ImhwaAekBP3B gTAKKzEyY5KRzsw/QZE7w9+lQNNk2bp2XqzsiI1WdgQXgvI6IfafmjgT88b0n96EeR0o vYJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lBSF5qn6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195090-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac070f15c6si150736336d6.289.2024.05.30.01.49.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:49:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195090-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lBSF5qn6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195090-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A21341C2039D for ; Thu, 30 May 2024 08:49:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26D1514372D; Thu, 30 May 2024 08:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lBSF5qn6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4C0616F318; Thu, 30 May 2024 08:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717058969; cv=none; b=NEYvJINg4ZQcRW3AJDxbqMiXtW2F0T9o176eljkUmRwh5qWD9J1AAJayfj7tD3uHX3eaS4jGshBlOyqx5Skq/6GbvzcwL4DgEPMzHAx9UW8Ac6/Ou7zJPZfb3Qy1TzQPMApCPxY67gf8kwxEKytRTFAdQcjmuQpFl8ANW3Xnh3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717058969; c=relaxed/simple; bh=RMlDUxJiGobRFguc3DRtHWTv7WiNMiDof+uoZrSLUA8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fi3K37CEiwEN//WMPCmp1dkrGACIzw/0anDGrIKGvqdFkajx0IUvcKFObZF5XCZaTlmoQmD0pfCYMFY01jIlrgENa9kd4/wT+7UcK+7zRbj/3fjOmgxszkRKrXKWOUo0VgwCOMV/pjyOa8zZ5ATm3cUvYuIf415q6ETSVyahsz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lBSF5qn6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BF8BC3277B; Thu, 30 May 2024 08:49:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717058968; bh=RMlDUxJiGobRFguc3DRtHWTv7WiNMiDof+uoZrSLUA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lBSF5qn63ZTxet3h/KgfI84iXyPbcZ7m5UVIGT4Zh94nALn7/QyNuPD566qQJSpK5 +j7sNiyUcFxomJhas0mIMXGD4wU7YBq4nefDAv6hrMcyG6D/I5uulEmMIElQnPrrlw CPgQOb52Zg3a/Kq0j9RjknhjnLKzCEyUgyPBeEFSZW64HY2+nYJJpCJ2RM1Ro9dY14 3+hqt3XtD4GEqQFHT0v+c4IMSKpJeonXM7jWz6mC3UyEyDovCwxvWajQsz4UlqxkIO qJR8XxIAf/QhhsBC66Ej7PaXU59n7GQJAfT1ET3FK1KcAb0w4CfmIr6kWZ8eTTR926 rATiKQfQzbyRA== Date: Thu, 30 May 2024 10:49:26 +0200 From: Maxime Ripard To: Dmitry Baryshkov Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/7] drm/connector: hdmi: accept NULL for Audio Infoframe Message-ID: <20240530-daffy-satisfied-sheep-5b9e16@houat> References: <20240530-bridge-hdmi-connector-v3-0-a1d184d68fe3@linaro.org> <20240530-bridge-hdmi-connector-v3-1-a1d184d68fe3@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="takwrixyv5pp4e4s" Content-Disposition: inline In-Reply-To: <20240530-bridge-hdmi-connector-v3-1-a1d184d68fe3@linaro.org> --takwrixyv5pp4e4s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, May 30, 2024 at 02:12:24AM GMT, Dmitry Baryshkov wrote: > Allow passing NULL as audio infoframe as a way to disable Audio > Infoframe generation. >=20 > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/display/drm_hdmi_state_helper.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gp= u/drm/display/drm_hdmi_state_helper.c > index ce96837eea65..5356723d21f5 100644 > --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c > +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c > @@ -681,7 +681,7 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_update= _infoframes); > /** > * drm_atomic_helper_connector_hdmi_update_audio_infoframe - Update the = Audio Infoframe > * @connector: A pointer to the HDMI connector > - * @frame: A pointer to the audio infoframe to write > + * @frame: A pointer to the audio infoframe to write or NULL to disable = sending the frame > * > * This function is meant for HDMI connector drivers to update their > * audio infoframe. It will typically be used in one of the ALSA hooks > @@ -704,10 +704,16 @@ drm_atomic_helper_connector_hdmi_update_audio_infof= rame(struct drm_connector *co > =20 > mutex_lock(&connector->hdmi.infoframes.lock); > =20 > - memcpy(&infoframe->data, frame, sizeof(infoframe->data)); > - infoframe->set =3D true; > + if (frame) { > + memcpy(&infoframe->data, frame, sizeof(infoframe->data)); > + infoframe->set =3D true; > + > + ret =3D write_infoframe(connector, infoframe); > + } else { > + infoframe->set =3D false; > =20 > - ret =3D write_infoframe(connector, infoframe); > + ret =3D clear_infoframe(connector, infoframe); > + } I'm not entirely sure your commit matches your commit log? It looks like you follow the same pattern than the other infoframes and call write_infoframe if there's one, or clear_infoframe if there isn't. So we're never passing NULL to disable? clear_infoframe is called. Maxime --takwrixyv5pp4e4s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZlg9kQAKCRAnX84Zoj2+ dk3pAYCbS/9eXzTy0YlUFvQaOXrLJprI9gx8B2mCC+SSaUyqq6oITErczWwScJwQ fgXhMFIBgJOU255qv1o/4bocu6tu2hF/D9FGax6f1ae+MKrdPFUmJ0PhyEX/zJY/ D+quLGMFQg== =gGq3 -----END PGP SIGNATURE----- --takwrixyv5pp4e4s--