All of lore.kernel.org
 help / color / mirror / Atom feed
From: "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com>
To: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Igor Opaniuk <igor.opaniuk@toradex.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Jonas Karlman <jonas@kwiboo.se>, David Airlie <airlied@linux.ie>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH 0/1] This patch fixes connection detection for monitors w/o DDC.
Date: Thu, 25 Jul 2019 13:32:37 +0200	[thread overview]
Message-ID: <20190725113237.d2dwxzientte4j3n@flea> (raw)
In-Reply-To: <20190725110520.26848-1-oleksandr.suvorov@toradex.com>

65;5603;1c
On Thu, Jul 25, 2019 at 11:05:23AM +0000, Oleksandr Suvorov wrote:
>
> Even in source code of this driver there is an author's description:
>     /*
>      * Even if we have an I2C bus, we can't assume that the cable
>      * is disconnected if drm_probe_ddc fails. Some cables don't
>      * wire the DDC pins, or the I2C bus might not be working at
>      * all.
>      */
>
> That's true. DDC and VGA channels are independent, and therefore
> we cannot decide whether the monitor is connected or not,
> depending on the information from the DDC.
>
> So the monitor should always be considered connected.

Well, no. Like you said, we cannot decided whether is connected or
not.

> Thus there is no reason to use connector detect callback for this
> driver: DRM sub-system considers monitor always connected if there
> is no detect() callback registered with drm_connector_init().
>
> How to reproduce the bug:
> * setup: i.MX8QXP, LCDIF video module + gpu/drm/mxsfb driver,
>   adv712x VGA DAC + dumb-vga-dac driver, VGA-connector w/o DDC;
> * try to use drivers chain mxsfb-drm + dumb-vga-dac;
> * any DRM applications consider the monitor is not connected:
>   ===========
>   $ weston-start
>   $ cat /var/log/weston.log
>       ...
>       DRM: head 'VGA-1' found, connector 32 is disconnected.
>       ...
>   $ cat /sys/devices/platform/5a180000.lcdif/drm/card0/card0-VGA-1/status
>   unknown

And that's exactly what's being reported here: we cannot decide if it
is connected or not, so it's unknown.

If weston chooses to ignore connectors that are in an unknown state,
I'd say it's weston's problem, since it's much broader than this
particular device.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com>
To: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Igor Opaniuk <igor.opaniuk@toradex.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Jonas Karlman <jonas@kwiboo.se>, David Airlie <airlied@linux.ie>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH 0/1] This patch fixes connection detection for monitors w/o DDC.
Date: Thu, 25 Jul 2019 13:32:37 +0200	[thread overview]
Message-ID: <20190725113237.d2dwxzientte4j3n@flea> (raw)
In-Reply-To: <20190725110520.26848-1-oleksandr.suvorov@toradex.com>

65;5603;1c
On Thu, Jul 25, 2019 at 11:05:23AM +0000, Oleksandr Suvorov wrote:
>
> Even in source code of this driver there is an author's description:
>     /*
>      * Even if we have an I2C bus, we can't assume that the cable
>      * is disconnected if drm_probe_ddc fails. Some cables don't
>      * wire the DDC pins, or the I2C bus might not be working at
>      * all.
>      */
>
> That's true. DDC and VGA channels are independent, and therefore
> we cannot decide whether the monitor is connected or not,
> depending on the information from the DDC.
>
> So the monitor should always be considered connected.

Well, no. Like you said, we cannot decided whether is connected or
not.

> Thus there is no reason to use connector detect callback for this
> driver: DRM sub-system considers monitor always connected if there
> is no detect() callback registered with drm_connector_init().
>
> How to reproduce the bug:
> * setup: i.MX8QXP, LCDIF video module + gpu/drm/mxsfb driver,
>   adv712x VGA DAC + dumb-vga-dac driver, VGA-connector w/o DDC;
> * try to use drivers chain mxsfb-drm + dumb-vga-dac;
> * any DRM applications consider the monitor is not connected:
>   ===========
>   $ weston-start
>   $ cat /var/log/weston.log
>       ...
>       DRM: head 'VGA-1' found, connector 32 is disconnected.
>       ...
>   $ cat /sys/devices/platform/5a180000.lcdif/drm/card0/card0-VGA-1/status
>   unknown

And that's exactly what's being reported here: we cannot decide if it
is connected or not, so it's unknown.

If weston chooses to ignore connectors that are in an unknown state,
I'd say it's weston's problem, since it's much broader than this
particular device.

Maxime

  parent reply	other threads:[~2019-07-25 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 11:05 [PATCH 0/1] This patch fixes connection detection for monitors w/o DDC Oleksandr Suvorov
2019-07-25 11:05 ` [PATCH 1/1] drm/bridge: vga-dac: Fix detect of monitor connection Oleksandr Suvorov
2019-07-25 12:14   ` Daniel Vetter
2019-07-25 11:32 ` maxime.ripard [this message]
2019-07-25 11:32   ` [PATCH 0/1] This patch fixes connection detection for monitors w/o DDC maxime.ripard
2019-07-29 10:58   ` Oleksandr Suvorov
2019-07-29 22:03     ` Daniel Vetter

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=20190725113237.d2dwxzientte4j3n@flea \
    --to=maxime.ripard@free-electrons.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=igor.opaniuk@toradex.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=narmstrong@baylibre.com \
    --cc=oleksandr.suvorov@toradex.com \
    --cc=stable@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 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.