From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923AbdBCIG2 (ORCPT ); Fri, 3 Feb 2017 03:06:28 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35414 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbdBCIG0 (ORCPT ); Fri, 3 Feb 2017 03:06:26 -0500 Date: Fri, 3 Feb 2017 09:06:22 +0100 From: Daniel Vetter To: Shuah Khan Cc: Jani Nikula , 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 Message-ID: <20170203080622.j2fms2hf3pmz7uqb@phenom.ffwll.local> Mail-Followup-To: Shuah Khan , Jani Nikula , daniel.vetter@intel.com, seanpaul@chromium.org, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20170202025904.25810-1-shuahkh@osg.samsung.com> <874m0d0z7o.fsf@intel.com> <9d3783d1-b8f8-bd82-3141-1897980197da@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d3783d1-b8f8-bd82-3141-1897980197da@osg.samsung.com> X-Operating-System: Linux phenom 4.8.0-1-amd64 User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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