Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578612

Re: [PATCH] drm: change connector disconnected debug message to an error

From Shuah Khan <shuahkh@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drm: change connector disconnected debug message to an error
Date 2017-02-10 18:00 +0100
Message-ID <t9mI9-5ZB-3@gated-at.bofh.it> (permalink)
References <t6fMR-6bA-7@gated-at.bofh.it> <t6l5U-1oK-21@gated-at.bofh.it> <t6tmO-6Wj-21@gated-at.bofh.it> <t6H6q-7vO-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/03/2017 01:06 AM, Daniel Vetter wrote:
> 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.

drm_helper_probe_single_connector_modes() finds the condition and doesn't
have a means to return it to the user-space.

Instead of error or debug message, would it be useful to add a trace event
to report status of connector to drm_helper_probe_single_connector_modes()
Trace could be triggered as needed and turned off.

Please let me know what you think of this idea? If it sounds useful, I can
add it.

> 
> Because upstream runs also on non-embedded systems, where unplugging is
> normal, and we definitely don't want to spam dmesg.
> -Daniel
> 

thanks,
-- Shuah

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] drm: change connector disconnected debug message to an error Shuah Khan <shuahkh@osg.samsung.com> - 2017-02-02 04:00 +0100
  Re: [PATCH] drm: change connector disconnected debug message to an error Jani Nikula <jani.nikula@linux.intel.com> - 2017-02-02 09:40 +0100
    Re: [PATCH] drm: change connector disconnected debug message to an  error Shuah Khan <shuahkh@osg.samsung.com> - 2017-02-02 18:30 +0100
      Re: [PATCH] drm: change connector disconnected debug message to an error Jani Nikula <jani.nikula@linux.intel.com> - 2017-02-03 09:00 +0100
      Re: [PATCH] drm: change connector disconnected debug message to an  error Daniel Vetter <daniel@ffwll.ch> - 2017-02-03 09:10 +0100
        Re: [PATCH] drm: change connector disconnected debug message to an  error Shuah Khan <shuahkh@osg.samsung.com> - 2017-02-10 18:00 +0100

csiph-web