From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v7 7/9] drm: tegra: use cec_notifier_conn_(un)register Date: Wed, 28 Aug 2019 11:38:20 +0200 Message-ID: <20190828093820.GE2917@ulmo> References: <20190814104520.6001-1-darekm@google.com> <20190814104520.6001-8-darekm@google.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y2zxS2PfCDLh6JVG" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Hans Verkuil Cc: Dariusz Marcinkiewicz , dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, David Airlie , Daniel Vetter , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-tegra@vger.kernel.org --y2zxS2PfCDLh6JVG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2019 at 10:09:30AM +0200, Hans Verkuil wrote: > Thierry, >=20 > Can you review this patch? >=20 > Thanks! >=20 > Hans Did you want me to pick this up into the drm/tegra tree? Or do you want to pick it up into your tree? We're just past the DRM subsystem deadline, so it'll have to wait until the next cycle if we go that way. If you're in a hurry you may want to pick it up yourself, in which case: Acked-by: Thierry Reding > On 8/14/19 12:45 PM, Dariusz Marcinkiewicz wrote: > > Use the new cec_notifier_conn_(un)register() functions to > > (un)register the notifier for the HDMI connector, and fill in > > the cec_connector_info. > >=20 > > Changes since v4: > > - only create a CEC notifier for HDMI connectors > >=20 > > Signed-off-by: Dariusz Marcinkiewicz > > Tested-by: Hans Verkuil > > --- > > drivers/gpu/drm/tegra/output.c | 28 +++++++++++++++++++++------- > > 1 file changed, 21 insertions(+), 7 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/out= put.c > > index bdcaa4c7168cf..34373734ff689 100644 > > --- a/drivers/gpu/drm/tegra/output.c > > +++ b/drivers/gpu/drm/tegra/output.c > > @@ -70,6 +70,11 @@ tegra_output_connector_detect(struct drm_connector *= connector, bool force) > > =20 > > void tegra_output_connector_destroy(struct drm_connector *connector) > > { > > + struct tegra_output *output =3D connector_to_output(connector); > > + > > + if (output->cec) > > + cec_notifier_conn_unregister(output->cec); > > + > > drm_connector_unregister(connector); > > drm_connector_cleanup(connector); > > } > > @@ -163,18 +168,11 @@ int tegra_output_probe(struct tegra_output *outpu= t) > > disable_irq(output->hpd_irq); > > } > > =20 > > - output->cec =3D cec_notifier_get(output->dev); > > - if (!output->cec) > > - return -ENOMEM; > > - > > return 0; > > } > > =20 > > void tegra_output_remove(struct tegra_output *output) > > { > > - if (output->cec) > > - cec_notifier_put(output->cec); > > - > > if (output->hpd_gpio) > > free_irq(output->hpd_irq, output); > > =20 > > @@ -184,6 +182,7 @@ void tegra_output_remove(struct tegra_output *outpu= t) > > =20 > > int tegra_output_init(struct drm_device *drm, struct tegra_output *out= put) > > { > > + int connector_type; > > int err; > > =20 > > if (output->panel) { > > @@ -199,6 +198,21 @@ int tegra_output_init(struct drm_device *drm, stru= ct tegra_output *output) > > if (output->hpd_gpio) > > enable_irq(output->hpd_irq); > > =20 > > + connector_type =3D output->connector.connector_type; > > + /* > > + * Create a CEC notifier for HDMI connector. > > + */ > > + if (connector_type =3D=3D DRM_MODE_CONNECTOR_HDMIA || > > + connector_type =3D=3D DRM_MODE_CONNECTOR_HDMIB) { > > + struct cec_connector_info conn_info; > > + > > + cec_fill_conn_info_from_drm(&conn_info, &output->connector); > > + output->cec =3D cec_notifier_conn_register(output->dev, NULL, > > + &conn_info); > > + if (!output->cec) > > + return -ENOMEM; > > + } > > + > > return 0; > > } > > =20 > >=20 >=20 --y2zxS2PfCDLh6JVG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl1mS4wACgkQ3SOs138+ s6Hukw/8DvWhMV7uYDCsZIDHgnNF+l4WXu+x1XIy9XFt57KVfkbBW6YyYhAos1rx 4JSvHvWIdlB1AdTJacEqnxYynrMmfDrBNikG+0kFuUUwIeOdT+wRuOODFzGg7gZC OvN+cADPyEDP0XyPZjv29B5+heSJnnLV6ziIENuVQaJA3QECOyx+K1hBheCLUXjE fBUH9B6CpuGHvYtAqNu5i10kkL5sGIG/xjnHresWTHxrxwDHEIVBeryREjPdaYV7 fpafk17crGKST65cyIU0Be7h6WPEzCuybE5653TI4qM71ISJvhEsPnWY4ZSHBZXk QWaKd8FtIuSuh6T/zkhzkfCBRAMyD3hluP2lPKOQLrw/oZqRTtyu4hyTFhxAIema OeQeVY7aQyawoT3bSfWvhruPZ4r0wDxXCu0j2eD3so2AgGYBz/5WadYsCoZxGOS0 hzQayaCick670ZmDPJV/CiyzybkDN21gKpRzp/0+DXB837yCBlCK34bU76b9rd0e J4Gy5wy32ja6KK2TxqiHBuPKyASjadwW5dYxDH2iNnSJxWbg82z15/ZBaUpYeIvF mDhLxA6Cz49/iFXDsfTZcUpVf5JTADqNYYa0Yy1kBjFNXw/pwvgvp6wL0N5x20eL mItPhPmbflgIE0KJvBp0S0h/sgJ4dxUTjPsEVFKD2KFLn7xbYJY= =2whG -----END PGP SIGNATURE----- --y2zxS2PfCDLh6JVG--