Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10960494ybi; Thu, 25 Jul 2019 07:41:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjr3meXZMfsKNMiT76P+Ayj11JxQXS5GcaZbXC1HYDz6e43tVGeWl3wzveS+Fq8DyzPOG+ X-Received: by 2002:a17:902:86:: with SMTP id a6mr4448799pla.244.1564065696044; Thu, 25 Jul 2019 07:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564065696; cv=none; d=google.com; s=arc-20160816; b=YNx2dAZq1ehZzEFvwu11XXs1++GoEdNYOLuvGFkdAfv6S9xB6F58t6IjvE7rnpCsau ReJEcAg2+jhkXmGcbi4yULns/SIP48+IRYEzbzfiFjyiGEzS2XT7A4JgWarJTDkOi5dc bBMzNwjtBF6+fLilKmoGDaoPPsnXQ/9zS/8FWMgygsW3VVNI+yaoLzbpM6QTmy0NKm+J EwjTYm50vtr24xK09RS0+wNdD3/qMrjPuiOp03CCQ+d6FNBI6qgOJz4A39j0LmH2+FpA TsowbfnEDeAV5Mey/KuQcalhRwyFxrw8LPY9eERy9TWroFbtFFbHzeWcP8qegpJ2fzom ST1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=npSqn5bm8GDXFQpUCQO7w3Agw8ocPdfjFG5Vu/gE8po=; b=qt0Bz2APFZ17nT802Deb5ZYWo46sFxLKqVTm565Etjr8ikCaj4AlUQYmZO7J4R7Fyw XBcmVv5Bx7dY7RGVqgAxnQlt7yFAJQ10NXHDR4J4QKVknBgDS09QEocvHHdIyZPfhVjX fCKsubXMMugR4QkGfP0d16MjE+JVLXJuXSROapS0nduHkfBAQndhWk8o3l3yBjDW8i9W glJxQ0rOAl59CHSJPLmb/kFEbrkQ5gmU3a7icgu497tG6KhM0lh2LF7PFyXVP4wR0a2I MzSpeKL2QmhUDos5qXkOFnG+HEgu5mTttgu4OT+7kxZK+R2KOKyHnA0lYBNmG2JwTJFP 9V9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si23132547pfg.26.2019.07.25.07.41.20; Thu, 25 Jul 2019 07:41:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387957AbfGYOkK (ORCPT + 99 others); Thu, 25 Jul 2019 10:40:10 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:52211 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387834AbfGYOkJ (ORCPT ); Thu, 25 Jul 2019 10:40:09 -0400 X-Originating-IP: 86.250.200.211 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: maxime.ripard@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 4E0F860012; Thu, 25 Jul 2019 14:40:06 +0000 (UTC) Date: Thu, 25 Jul 2019 13:32:37 +0200 From: "maxime.ripard@free-electrons.com" To: Oleksandr Suvorov Cc: Andrzej Hajda , Neil Armstrong , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Igor Opaniuk , "stable@vger.kernel.org" , Marcel Ziswiler , Jonas Karlman , David Airlie , Jernej Skrabec , Laurent Pinchart , Daniel Vetter Subject: Re: [PATCH 0/1] This patch fixes connection detection for monitors w/o DDC. Message-ID: <20190725113237.d2dwxzientte4j3n@flea> References: <20190725110520.26848-1-oleksandr.suvorov@toradex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190725110520.26848-1-oleksandr.suvorov@toradex.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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