mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Douglas Anderson <dianders@chromium.org>,
	dri-devel@lists.freedesktop.org
Cc: Hsin-Yi Wang <hsinyi@chromium.org>,
	Sankeerth Billakanti <quic_sbillaka@quicinc.com>,
	Philip Chen <philipchen@chromium.org>,
	Robert Foss <robert.foss@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jani Nikula <jani.nikula@intel.com>,
	Kees Cook <keescook@chromium.org>, Lyude Paul <lyude@redhat.com>,
	Maxime Ripard <maxime@cerno.tech>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/4] drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux
Date: Thu, 2 Jun 2022 13:22:35 +0300	[thread overview]
Message-ID: <b157ebf3-9846-1235-c8e7-693abe4569d3@linaro.org> (raw)
In-Reply-To: <20220418101725.v3.1.Icf57bb12233a47727013c6ab69eebf803e22ebc1@changeid>

On 18/04/2022 20:17, Douglas Anderson wrote:
> Sometimes it's useful for users of the DP AUX bus (like panels) to be
> able to poll HPD. Let's add a callback that allows DP AUX busses
> drivers to provide this.
> 
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


> ---
> Left Dmitry's Reviewed-by tag off since patch changed enough.
> 
> (no changes since v2)
> 
> Changes in v2:
> - Change is_hpd_asserted() to wait_hpd_asserted()
> 
>   include/drm/dp/drm_dp_helper.h | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
> 
> diff --git a/include/drm/dp/drm_dp_helper.h b/include/drm/dp/drm_dp_helper.h
> index 53d1e722f4de..0940c415db8c 100644
> --- a/include/drm/dp/drm_dp_helper.h
> +++ b/include/drm/dp/drm_dp_helper.h
> @@ -2035,6 +2035,32 @@ struct drm_dp_aux {
>   	ssize_t (*transfer)(struct drm_dp_aux *aux,
>   			    struct drm_dp_aux_msg *msg);
>   
> +	/**
> +	 * @wait_hpd_asserted: wait for HPD to be asserted
> +	 *
> +	 * This is mainly useful for eDP panels drivers to wait for an eDP
> +	 * panel to finish powering on. This is an optional function.
> +	 *
> +	 * This function will efficiently wait for up to `wait_us` microseconds
> +	 * for HPD to be asserted and might sleep.
> +	 *
> +	 * This function returns 0 if HPD was asserted or -ETIMEDOUT if time
> +	 * expired and HPD wasn't asserted. This function should not print
> +	 * timeout errors to the log.
> +	 *
> +	 * The semantics of this function are designed to match the
> +	 * readx_poll_timeout() function. That means a `wait_us` of 0 means
> +	 * to wait forever. If you want to do a quick poll you could pass 1
> +	 * for `wait_us`.
> +	 *
> +	 * NOTE: this function specifically reports the state of the HPD pin
> +	 * that's associated with the DP AUX channel. This is different from
> +	 * the HPD concept in much of the rest of DRM which is more about
> +	 * physical presence of a display. For eDP, for instance, a display is
> +	 * assumed always present even if the HPD pin is deasserted.
> +	 */
> +	int (*wait_hpd_asserted)(struct drm_dp_aux *aux, unsigned long wait_us);
> +
>   	/**
>   	 * @i2c_nack_count: Counts I2C NACKs, used for DP validation.
>   	 */


-- 
With best wishes
Dmitry

  parent reply	other threads:[~2022-06-02 10:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18 17:17 [PATCH v3 0/4] drm/dp: Introduce wait_hpd_asserted() for the DP AUX bus Douglas Anderson
2022-04-18 17:17 ` [PATCH v3 1/4] drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux Douglas Anderson
2022-05-12  1:58   ` Stephen Boyd
2022-05-12 23:24     ` Doug Anderson
2022-05-20  0:34       ` Stephen Boyd
2022-05-20 15:45         ` Doug Anderson
2022-06-02 10:22   ` Dmitry Baryshkov [this message]
2022-04-18 17:17 ` [PATCH v3 2/4] drm/panel-edp: Take advantage of wait_hpd_asserted() in " Douglas Anderson
2022-06-02 15:12   ` Dmitry Baryshkov
2022-06-14 21:57     ` Doug Anderson
2022-04-18 17:17 ` [PATCH v3 3/4] drm/panel: atna33xc20: " Douglas Anderson
2022-06-02 14:49   ` Dmitry Baryshkov
2022-04-18 17:17 ` [PATCH v3 4/4] drm/bridge: parade-ps8640: Provide " Douglas Anderson
2022-06-02 14:56   ` Dmitry Baryshkov
2022-05-03 23:26 ` [PATCH v3 0/4] drm/dp: Introduce wait_hpd_asserted() for the DP AUX bus Doug Anderson

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=b157ebf3-9846-1235-c8e7-693abe4569d3@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hsinyi@chromium.org \
    --cc=jani.nikula@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=maxime@cerno.tech \
    --cc=philipchen@chromium.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_sbillaka@quicinc.com \
    --cc=robert.foss@linaro.org \
    --cc=swboyd@chromium.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

all inboxes | Powered by JetHome®