From: Dariusz Marcinkiewicz <darekm@google.com>
To: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl
Cc: Dariusz Marcinkiewicz <darekm@google.com>
Subject: [PATCH v5 2/9] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register
Date: Wed, 7 Aug 2019 10:52:25 +0200 [thread overview]
Message-ID: <20190807085232.151260-3-darekm@google.com> (raw)
In-Reply-To: <20190807085232.151260-1-darekm@google.com>
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.
Signed-off-by: Dariusz Marcinkiewicz <darekm@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
drivers/gpu/drm/i915/intel_hdmi.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 187a2b828b975..db7953ce49c8e 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2752,8 +2752,9 @@ intel_hdmi_connector_register(struct drm_connector *connector)
static void intel_hdmi_destroy(struct drm_connector *connector)
{
- if (intel_attached_hdmi(connector)->cec_notifier)
- cec_notifier_put(intel_attached_hdmi(connector)->cec_notifier);
+ struct cec_notifier *n = intel_attached_hdmi(connector)->cec_notifier;
+
+ cec_notifier_conn_unregister(n);
intel_connector_destroy(connector);
}
@@ -3061,6 +3062,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
struct drm_device *dev = intel_encoder->base.dev;
struct drm_i915_private *dev_priv = to_i915(dev);
enum port port = intel_encoder->port;
+ struct cec_connector_info conn_info;
DRM_DEBUG_KMS("Adding HDMI connector on port %c\n",
port_name(port));
@@ -3113,8 +3115,11 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
I915_WRITE(PEG_BAND_GAP_DATA, (temp & ~0xf) | 0xd);
}
- intel_hdmi->cec_notifier = cec_notifier_get_conn(dev->dev,
- port_identifier(port));
+ cec_fill_conn_info_from_drm(&conn_info, connector);
+
+ intel_hdmi->cec_notifier =
+ cec_notifier_conn_register(dev->dev, port_identifier(port),
+ &conn_info);
if (!intel_hdmi->cec_notifier)
DRM_DEBUG_KMS("CEC notifier get failed\n");
}
--
2.22.0.770.g0f2c4a37fd-goog
next prev parent reply other threads:[~2019-08-07 8:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 8:52 [PATCH v5 0/9] drm: cec: convert DRM drivers to the new notifier API Dariusz Marcinkiewicz
2019-08-07 8:52 ` [PATCH v5 1/9] drm_dp_cec: add connector info support Dariusz Marcinkiewicz
2019-08-08 8:18 ` Hans Verkuil
2019-08-09 10:30 ` Hans Verkuil
2019-08-08 8:44 ` Hans Verkuil
2019-08-07 8:52 ` Dariusz Marcinkiewicz [this message]
2019-08-08 11:47 ` [PATCH v5 2/9] drm/i915/intel_hdmi: use cec_notifier_conn_(un)register Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register Dariusz Marcinkiewicz
2019-08-09 10:25 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 4/9] tda9950: " Dariusz Marcinkiewicz
2019-08-08 9:11 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 5/9] drm: tda998x: use cec_notifier_conn_(un)register Dariusz Marcinkiewicz
2019-08-08 9:12 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 6/9] drm: sti: " Dariusz Marcinkiewicz
2019-08-07 8:52 ` [PATCH v5 7/9] drm: tegra: " Dariusz Marcinkiewicz
2019-08-08 20:42 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 8/9] drm: dw-hdmi: " Dariusz Marcinkiewicz
2019-08-09 15:12 ` Hans Verkuil
2019-08-07 8:52 ` [PATCH v5 9/9] drm: exynos: exynos_hdmi: " Dariusz Marcinkiewicz
2019-08-08 14:27 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190807085232.151260-3-darekm@google.com \
--to=darekm@google.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).