All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@linaro.org>
To: John Stultz <jstultz@google.com>
Cc: linux-kernel@vger.kernel.org,
	Yongqin Liu <yongqin.liu@linaro.org>,
	Amit Pundir <amit.pundir@linaro.org>,
	Peter Collingbourne <pcc@google.com>,
	Vinod Koul <vkoul@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	kernel-team@android.com
Subject: Re: [PATCH 2/2] drm/bridge: lt9611: Use both bits for HDMI sensing
Date: Mon, 23 May 2022 12:18:57 +0200	[thread overview]
Message-ID: <CAG3jFyvHkZ6n5yYR6mW_oMLDeEGG9FpfCxyn+Pjo-APSKR6-PQ@mail.gmail.com> (raw)
In-Reply-To: <20220511012612.3297577-2-jstultz@google.com>

On Wed, 11 May 2022 at 03:26, John Stultz <jstultz@google.com> wrote:
>
> In commit 19cf41b64e3b ("lontium-lt9611: check a different
> register bit for HDMI sensing"), the bit flag used to detect
> HDMI cable connect was switched from BIT(2) to BIT(0) to improve
> compatibility with some monitors that didn't seem to set BIT(2).
>
> However, with that change, I've seen occasional issues where the
> detection failed, because BIT(2) was set, but not BIT(0).

I was waiting for a review or testing from a previous lt9611
committer, but seeing as how functionality is being re-introduced in
this patch I think a code review is all that's needed.

>
> Unfortunately, as I understand it, the bits and their function
> was never clearly documented. So lets instead check both
> (BIT(2) | BIT(0)) when checking the register.
>
> Cc: Yongqin Liu <yongqin.liu@linaro.org>
> Cc: Amit Pundir <amit.pundir@linaro.org>
> Cc: Peter Collingbourne <pcc@google.com>
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Robert Foss <robert.foss@linaro.org>
> Cc: kernel-team@android.com
> Fixes: 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing")
> Signed-off-by: John Stultz <jstultz@google.com>
> ---
>  drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index bf66af668f61..a11604a56e08 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -584,7 +584,7 @@ static enum drm_connector_status __lt9611_detect(struct lt9611 *lt9611)
>         int connected = 0;
>
>         regmap_read(lt9611->regmap, 0x825e, &reg_val);
> -       connected  = (reg_val & BIT(0));
> +       connected  = (reg_val & (BIT(2) | BIT(0)));
>
>         lt9611->status = connected ?  connector_status_connected :
>                                 connector_status_disconnected;
> --
> 2.36.0.512.ge40c2bad7a-goog
>

I reviewed this series and it looks good.

Reviewed-by: Robert Foss <robert.foss@linaro.org>

Applied to drm-misc-next.

      reply	other threads:[~2022-05-23 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  1:26 [PATCH 1/2] drm/bridge: lt9611: Consolidate detection logic John Stultz
2022-05-11  1:26 ` [PATCH 2/2] drm/bridge: lt9611: Use both bits for HDMI sensing John Stultz
2022-05-23 10:18   ` Robert Foss [this message]

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=CAG3jFyvHkZ6n5yYR6mW_oMLDeEGG9FpfCxyn+Pjo-APSKR6-PQ@mail.gmail.com \
    --to=robert.foss@linaro.org \
    --cc=amit.pundir@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=jstultz@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcc@google.com \
    --cc=vkoul@kernel.org \
    --cc=yongqin.liu@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.