mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shreeya Patel <shreeya.patel@collabora.com>,
	Hans Verkuil <hverkuil@kernel.org>,
	Dingxian Wen <shawn.wen@rock-chips.com>
Cc: linux-media@vger.kernel.org, kernel@collabora.com,
	linux-kernel@vger.kernel.org,
	Gerald Loacker <gerald.loacker@wolfvision.net>
Subject: Re: [PATCH 2/3] media: synopsys: hdmirx: add input status reporting to VIDIOC_ENUMINPUT
Date: Tue, 22 Sep 2026 15:53:40 +0300	[thread overview]
Message-ID: <da4d2d76-fb8c-4687-b977-b136a2c57f45@collabora.com> (raw)
In-Reply-To: <20260921-hdmirx-fixes-v1-2-495be0beaf93@pengutronix.de>

On 9/21/26 10:15, Sascha Hauer wrote:
> From: Gerald Loacker <gerald.loacker@wolfvision.net>
> 
> Userspace currently has to learn the cable and lock state from the error
> VIDIOC_QUERY_DV_TIMINGS returns, -ENOLINK or -ENOLCK. Both of those paths
> log at v4l2_err level, so waiting for a cable fills the kernel log.
> 
> Report it where it belongs instead: V4L2_IN_ST_NO_POWER while the source
> is not driving the connector's +5V line, V4L2_IN_ST_NO_SIGNAL while the
> receiver has not locked. Both come from the helpers
> hdmirx_query_dv_timings() already uses, so the two cannot disagree.
> adv76xx_g_input_status() and adv7842_g_input_status() report the same two
> flags the same way.
> 
> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> index 24ec6138a1fb6..75576a9366fd0 100644
> --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
> @@ -1199,6 +1199,9 @@ static void hdmirx_submodule_init(struct snps_hdmirx_dev *hdmirx_dev)
>  static int hdmirx_enum_input(struct file *file, void *priv,
>  			     struct v4l2_input *input)
>  {
> +	struct hdmirx_stream *stream = video_drvdata(file);
> +	struct snps_hdmirx_dev *hdmirx_dev = stream->hdmirx_dev;
> +
>  	if (input->index > 0)
>  		return -EINVAL;
>  
> @@ -1207,6 +1210,12 @@ static int hdmirx_enum_input(struct file *file, void *priv,
>  	strscpy(input->name, "HDMI IN", sizeof(input->name));
>  	input->capabilities = V4L2_IN_CAP_DV_TIMINGS;
>  
> +	input->status = 0;
> +	if (port_no_link(hdmirx_dev))
> +		input->status |= V4L2_IN_ST_NO_POWER;
> +	if (signal_not_lock(hdmirx_dev))
> +		input->status |= V4L2_IN_ST_NO_SIGNAL;
> +
>  	return 0;
>  }
>  
> 

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

-- 
Best regards,
Dmitry

  reply	other threads:[~2026-09-22 12:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  7:15 [PATCH 0/3] media: synopsys: hdmirx: pixelclock fix and input status reporting Sascha Hauer
2026-09-21  7:15 ` [PATCH 1/3] media: synopsys: hdmirx: fetch colordepth before calculating pixelclock Sascha Hauer
2026-09-22 12:50   ` Dmitry Osipenko
2026-09-21  7:15 ` [PATCH 2/3] media: synopsys: hdmirx: add input status reporting to VIDIOC_ENUMINPUT Sascha Hauer
2026-09-22 12:53   ` Dmitry Osipenko [this message]
2026-09-21  7:15 ` [PATCH 3/3] media: synopsys: hdmirx: stop logging a missing signal at error level Sascha Hauer
2026-09-22 12:54   ` Dmitry Osipenko

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=da4d2d76-fb8c-4687-b977-b136a2c57f45@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=gerald.loacker@wolfvision.net \
    --cc=hverkuil@kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.wen@rock-chips.com \
    --cc=shreeya.patel@collabora.com \
    /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®