From: Neil Armstrong <narmstrong@baylibre.com>
To: Jonas Karlman <jonas@kwiboo.se>, Andrzej Hajda <a.hajda@samsung.com>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>, Sean Paul <sean@poorly.run>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Hans Verkuil <hverkuil@xs4all.nl>,
Jerome Brunet <jbrunet@baylibre.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] drm: dw-hdmi: update CEC phys addr and EDID on HPD event
Date: Mon, 2 Sep 2019 10:10:17 +0200 [thread overview]
Message-ID: <d0d7a5b8-4301-9a08-64af-8474a0c4f5de@baylibre.com> (raw)
In-Reply-To: <AM0PR06MB4004285BAA935D14F1A68787ACBF0@AM0PR06MB4004.eurprd06.prod.outlook.com>
On 01/09/2019 18:14, Jonas Karlman wrote:
> Update CEC phys addr and EDID on HPD event, fixes lost CEC phys addr and
> stale EDID when HDMI cable is unplugged/replugged or AVR is powered on/off.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 91d86ddd6624..0f07be1b5914 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2189,6 +2189,7 @@ static int dw_hdmi_connector_update_edid(struct drm_connector *connector,
> static enum drm_connector_status
> dw_hdmi_connector_detect(struct drm_connector *connector, bool force)
> {
> + enum drm_connector_status status;
> struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
> connector);
>
> @@ -2198,7 +2199,14 @@ dw_hdmi_connector_detect(struct drm_connector *connector, bool force)
> dw_hdmi_update_phy_mask(hdmi);
> mutex_unlock(&hdmi->mutex);
>
> - return hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
> + status = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
> +
> + if (status == connector_status_connected)
> + dw_hdmi_connector_update_edid(connector, false);
> + else
> + cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
> +
> + return status;
> }
>
> static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
> @@ -2438,12 +2446,6 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
> dw_hdmi_setup_rx_sense(hdmi,
> phy_stat & HDMI_PHY_HPD,
> phy_stat & HDMI_PHY_RX_SENSE);
> -
> - if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) {
> - mutex_lock(&hdmi->cec_notifier_mutex);
> - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
> - mutex_unlock(&hdmi->cec_notifier_mutex);
> - }
> }
>
> if (intr_stat & HDMI_IH_PHY_STAT0_HPD) {
>
Won't it possibly trigger twice edid readouts on each HPD event,
one for CEC and one for modes ? It seems sane but not very efficient to me...
Anyway:
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
next prev parent reply other threads:[~2019-09-02 8:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-01 16:13 [PATCH 0/5] drm: dw-hdmi: update CEC phys addr, EDID and ELD " Jonas Karlman
2019-09-01 16:14 ` [PATCH 1/5] drm: dw-hdmi: extract dw_hdmi_connector_update_edid() Jonas Karlman
2019-09-02 8:05 ` Neil Armstrong
[not found] ` <20190901161426.1606-1-jonas@kwiboo.se>
2019-09-01 16:14 ` [PATCH 2/5] drm: dw-hdmi: move dw_hdmi_connector_detect() Jonas Karlman
2019-09-02 8:05 ` Neil Armstrong
2019-09-01 16:14 ` [PATCH 3/5] drm: dw-hdmi: update CEC phys addr and EDID on HPD event Jonas Karlman
2019-09-02 8:10 ` Neil Armstrong [this message]
2019-09-02 10:49 ` Jonas Karlman
2019-09-01 16:14 ` [PATCH 4/5] Revert "drm/edid: make drm_edid_to_eld() static" Jonas Karlman
2019-09-02 8:07 ` Neil Armstrong
2019-09-01 16:14 ` [PATCH 5/5] drm: dw-hdmi: update ELD on HPD event Jonas Karlman
2019-09-02 8:08 ` Neil Armstrong
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=d0d7a5b8-4301-9a08-64af-8474a0c4f5de@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sean@poorly.run \
/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
all inboxes | Powered by JetHome®