Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp578881ybe; Mon, 2 Sep 2019 06:14:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwPg/A3lu8PUjU1Ash2u1VJ86f9dQIA2DTCt1vkqbZx6QsEqMyQPnD/BtGeygZA/G4l+iS X-Received: by 2002:a17:902:b718:: with SMTP id d24mr29117964pls.204.1567430049041; Mon, 02 Sep 2019 06:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567430049; cv=none; d=google.com; s=arc-20160816; b=b/CKqxBQ5FsstJbe8HnnuPmGYWrZ8jUpORD/JGFZRTycoc9xf2x/VFYjYIo2Ma9/zE gZlgIe9lkSpbml8UYFMlNnJuUsj8tYVMscSycDRhN/Sk/iV4KJmzRIczzWqS/iNTU9Qv U4R0OCquZ8rfjzwgp8MZnA5htiFy6zHlio4udMmMvfS1AzB8q9BWVGtu5myhzTGhj1bl 6s8DCLVQawiaaedrwVycjCKpthEmuvfvKFTea6pgQMhANfH6reJU8hI7eDYeMUOSGxLB 41sHKflGXSk8wg0oMBr6rqFoEMhXLjUHhy/FBSA+ctb4e43/GdhmiDPcnioqy2Xsxxs7 ohpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PZv22NgyAy4cpGO8nvyQHGric91X1UzIHSt4+HMcQy0=; b=0W9xn2LW78PZHMfvJYdcTLS8F582jLKLF+2Qsg9QyLZ8ziAuWupn4IUDiHl3im61pv 5uKc/PGSuaV5t6ETDf+OY3bFD+ee5+nm+BGKQONp9lhy8ZIyU6jv6CFDxexFuGqnc+Be 0TXvvtoqzZlkQdF/R2OGmCO4EpY6Dq7lnHEi+xtFWg4v5aYjChCH9Z9a0tTkOC7cpM1s AlckZ1XD7m7nnCmf7+O7IPlHHNhW91zb0KSd55fczjTemp/kOgXwAdSUPO2B/SsT/24A VJXYZtZ74xTjxZG8UWNvzvLHwqHbRqZ5JuhnEhWLhXqe+SLZ3dmFxtVrPL1wXWbVM8x1 mUbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VfyOjtZ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z62si11425740pgd.472.2019.09.02.06.13.52; Mon, 02 Sep 2019 06:14:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VfyOjtZ8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730619AbfIBNLe (ORCPT + 99 others); Mon, 2 Sep 2019 09:11:34 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42155 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729840AbfIBNLe (ORCPT ); Mon, 2 Sep 2019 09:11:34 -0400 Received: by mail-qt1-f196.google.com with SMTP id t12so15519916qtp.9 for ; Mon, 02 Sep 2019 06:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PZv22NgyAy4cpGO8nvyQHGric91X1UzIHSt4+HMcQy0=; b=VfyOjtZ8aWgjvf651FHyhOAmwULu+NSuKIFmWFDbTRWli+KD2QjI1GYeqiw61Zjm2m 7aaaBlmkKkRFGyH+0e/2tfli/Lzx3ClE2/e2G5QLJQYnubJJ3JYzZLvgyXXSK4+1L+EE Z7LbQ3jZDzcbqs+UdWR7g5QpEcTndIQMh46gYQkp6+SayViDEjVz6qOCIWbXrzCYf9qd 7mQnrP/NU6T4dEn9pN39cR1iiOpk8+HPk9FvMT4BxOIGOTrnmYFYwqdtsOMeIh+WZXQZ YbLPKeJAaT7hmIolpfVwwIm0YOCT6huuORR8Dat7ZQQzEFC7TrlK3q7zqruDx4uHmJk/ oj0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PZv22NgyAy4cpGO8nvyQHGric91X1UzIHSt4+HMcQy0=; b=qixgzlLM+nOQSBcovlT9IwEFHm3n1zH39/sCcTO2YmsB4j9A7qhq7c+9A00vja9VeQ q5LEcXAVQGBSUwj3mcF8Ue4zHJYB9S1tJLCYw2ghATg8/8BekjsUbZrnc8JZlAorsLzV kMeq3Lwkm4wDILEErKpmVAJKoDS43oJQSPyh5j6QeH/d+G3+JSkTa76Xk9yZ/yvpMbRV 1bJTHX9vYhXRFlykfxpHCKp9gjC3IBOGJYzxeS6rTkGzymVuw7uJOwCgf2G0lLZa6VBw xqWWIB4C12sQRK2UnkoyqwsH9UN37FNEc7/Yu5RSIhCE4DiIssYr0DHkl1KBhUTbaE8d 1iZQ== X-Gm-Message-State: APjAAAV5thuOjT4DyzbPg4XjSSA/M4zV1VNjhfkTM9+RIEaTySM1pVtd tpLamnws65YI28s8DCztqVUqoVvIVkMSz/dpsmpjEQ== X-Received: by 2002:ac8:60d6:: with SMTP id i22mr24868461qtm.250.1567429893126; Mon, 02 Sep 2019 06:11:33 -0700 (PDT) MIME-Version: 1.0 References: <20190814104520.6001-1-darekm@google.com> <20190814104520.6001-7-darekm@google.com> <00515839-a4bd-6721-8563-a16fbbaa7159@xs4all.nl> In-Reply-To: <00515839-a4bd-6721-8563-a16fbbaa7159@xs4all.nl> From: Benjamin Gaignard Date: Mon, 2 Sep 2019 15:11:22 +0200 Message-ID: Subject: Re: [PATCH v7 6/9] drm: sti: use cec_notifier_conn_(un)register To: Hans Verkuil Cc: Dariusz Marcinkiewicz , ML dri-devel , linux-media@vger.kernel.org, David Airlie , Linux Kernel Mailing List , Vincent Abriou Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le jeu. 22 ao=C3=BBt 2019 =C3=A0 10:11, Hans Verkuil a =C3=A9crit : > > Adding Benjamin Gaignard. > > Benjamin, can you take a look at this and Ack it (or merge it if you pref= er) and > ideally test it as well. This is the only patch in this series that I cou= ld not > test since I don't have any hardware. Looks good for me. Applied on drm-misc-next, Thanks, Benjamin > > Regards, > > Hans > > 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. > > > > Changes since v2: > > Don't invalidate physical address before unregistering the > > notifier. > > > > Signed-off-by: Dariusz Marcinkiewicz > > --- > > drivers/gpu/drm/sti/sti_hdmi.c | 19 ++++++++++++------- > > 1 file changed, 12 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_h= dmi.c > > index 9862c322f0c4a..bd15902b825ad 100644 > > --- a/drivers/gpu/drm/sti/sti_hdmi.c > > +++ b/drivers/gpu/drm/sti/sti_hdmi.c > > @@ -1256,6 +1256,7 @@ static int sti_hdmi_bind(struct device *dev, stru= ct device *master, void *data) > > struct drm_device *drm_dev =3D data; > > struct drm_encoder *encoder; > > struct sti_hdmi_connector *connector; > > + struct cec_connector_info conn_info; > > struct drm_connector *drm_connector; > > struct drm_bridge *bridge; > > int err; > > @@ -1318,6 +1319,14 @@ static int sti_hdmi_bind(struct device *dev, str= uct device *master, void *data) > > goto err_sysfs; > > } > > > > + cec_fill_conn_info_from_drm(&conn_info, drm_connector); > > + hdmi->notifier =3D cec_notifier_conn_register(&hdmi->dev, NULL, > > + &conn_info); > > + if (!hdmi->notifier) { > > + hdmi->drm_connector =3D NULL; > > + return -ENOMEM; > > + } > > + > > /* Enable default interrupts */ > > hdmi_write(hdmi, HDMI_DEFAULT_INT, HDMI_INT_EN); > > > > @@ -1331,6 +1340,9 @@ static int sti_hdmi_bind(struct device *dev, stru= ct device *master, void *data) > > static void sti_hdmi_unbind(struct device *dev, > > struct device *master, void *data) > > { > > + struct sti_hdmi *hdmi =3D dev_get_drvdata(dev); > > + > > + cec_notifier_conn_unregister(hdmi->notifier); > > } > > > > static const struct component_ops sti_hdmi_ops =3D { > > @@ -1436,10 +1448,6 @@ static int sti_hdmi_probe(struct platform_device= *pdev) > > goto release_adapter; > > } > > > > - hdmi->notifier =3D cec_notifier_get(&pdev->dev); > > - if (!hdmi->notifier) > > - goto release_adapter; > > - > > hdmi->reset =3D devm_reset_control_get(dev, "hdmi"); > > /* Take hdmi out of reset */ > > if (!IS_ERR(hdmi->reset)) > > @@ -1459,14 +1467,11 @@ static int sti_hdmi_remove(struct platform_devi= ce *pdev) > > { > > struct sti_hdmi *hdmi =3D dev_get_drvdata(&pdev->dev); > > > > - cec_notifier_set_phys_addr(hdmi->notifier, CEC_PHYS_ADDR_INVALID)= ; > > - > > i2c_put_adapter(hdmi->ddc_adapt); > > if (hdmi->audio_pdev) > > platform_device_unregister(hdmi->audio_pdev); > > component_del(&pdev->dev, &sti_hdmi_ops); > > > > - cec_notifier_put(hdmi->notifier); > > return 0; > > } > > > > >