From: Daniel Vetter <daniel@ffwll.ch>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
daniel.vetter@intel.com, seanpaul@chromium.org, airlied@linux.ie,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: change connector disconnected debug message to an error
Date: Fri, 3 Feb 2017 09:06:22 +0100 [thread overview]
Message-ID: <20170203080622.j2fms2hf3pmz7uqb@phenom.ffwll.local> (raw)
In-Reply-To: <9d3783d1-b8f8-bd82-3141-1897980197da@osg.samsung.com>
On Thu, Feb 02, 2017 at 10:25:44AM -0700, Shuah Khan wrote:
> On 02/02/2017 01:32 AM, Jani Nikula wrote:
> > On Thu, 02 Feb 2017, Shuah Khan <shuahkh@osg.samsung.com> wrote:
> >> Change drm_helper_probe_single_connector_modes() to print an error to
> >> report connector disconnected status instead of a debug message.
> >>
> >> When this condition occurs, application doesn't know the real error and
> >> reports it as driver lacking support for mode setting. Change it to an
> >> error to make it easier to debug.
> >
> > Please explain what makes this condition an error. Connectors get
> > connected and disconnected, business as usual, why should this be an
> > error?
> >
> > BR,
> > Jani.
>
> Disconnecting connector itself isn't an error. When user-space tries
> to access it, it would be useful to report the status that the connector
> is disconnected.
>
> I use embedded system(s) that don't like it when HDMI is hot added or
> removed. Also, because of return power, it is safer to disconnect HDMI
> and then apply power to the board. It chased a few libdrm and user-space
> dead ends before I enabled drm debug and was able to fix the real issue,
> which is a disconnected cable.
>
> User-space prints rather confusing messages as it doesn't really know
> the disconnected status as it isn't returned to it.
>
> I figured it might be a good idea to at least print a message and this can
> be a notice or info instead of an error. I do think its is worth while in
> some cases.
This sounds like a very specific use-case you have here, and it can easily
be supported by a small deamon in userspace (only on debug builds ofc)
that tell you that someone unplugged the screen when it shouldn't have
been.
Because upstream runs also on non-embedded systems, where unplugging is
normal, and we definitely don't want to spam dmesg.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-02-03 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 2:59 Shuah Khan
2017-02-02 8:32 ` Jani Nikula
2017-02-02 17:25 ` Shuah Khan
2017-02-03 7:59 ` Jani Nikula
2017-02-03 8:06 ` Daniel Vetter [this message]
2017-02-10 16:29 ` Shuah Khan
2017-02-14 20:05 ` 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=20170203080622.j2fms2hf3pmz7uqb@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.org \
--cc=shuahkh@osg.samsung.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®