From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbdAaV1E (ORCPT ); Tue, 31 Jan 2017 16:27:04 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35674 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126AbdAaV07 (ORCPT ); Tue, 31 Jan 2017 16:26:59 -0500 Date: Tue, 31 Jan 2017 22:17:02 +0100 From: Daniel Vetter To: Thierry Reding Cc: Eric Anholt , Mark Rutland , Florian Fainelli , Stephen Warren , Michael Turquette , Lee Jones , Stephen Boyd , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen. Message-ID: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local> Mail-Followup-To: Thierry Reding , Eric Anholt , Mark Rutland , Florian Fainelli , Stephen Warren , Michael Turquette , Lee Jones , Stephen Boyd , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20161214194621.16499-1-eric@anholt.net> <20161214194621.16499-10-eric@anholt.net> <20170131210717.GA872@mithrandir.ba.sec> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170131210717.GA872@mithrandir.ba.sec> 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 Tue, Jan 31, 2017 at 10:07:19PM +0100, Thierry Reding wrote: > On Wed, Dec 14, 2016 at 11:46:19AM -0800, Eric Anholt wrote: > > +static int rpi_touchscreen_enable(struct drm_panel *panel) > > +{ > > + struct rpi_touchscreen *ts = panel_to_ts(panel); > > + int i; > > + > > + rpi_touchscreen_i2c_write(ts, REG_POWERON, 1); > > + /* Wait for nPWRDWN to go low to indicate poweron is done. */ > > + for (i = 0; i < 100; i++) { > > + if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1) > > + break; > > + } > > Don't you want to fail when power on doesn't succeed? Seems kind of > pointless to continue if the panel doesn't power on. kms works under the assumption that even when the sink is dead, the display pipe (well, vblanks and pageflips) keep working. There's a patch floating around to give userspace more information about what's going wrong through an async uevent+read-only property for cases where an unresponsive sink is normal, i.e. link training for dp. But either way, continuing is generally the right thing to do, there's no way to report -EIO from here (because no reasons than that's where accidentally ended up with our evolved design ...). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel@ffwll.ch (Daniel Vetter) Date: Tue, 31 Jan 2017 22:17:02 +0100 Subject: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen. In-Reply-To: <20170131210717.GA872@mithrandir.ba.sec> References: <20161214194621.16499-1-eric@anholt.net> <20161214194621.16499-10-eric@anholt.net> <20170131210717.GA872@mithrandir.ba.sec> Message-ID: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Jan 31, 2017 at 10:07:19PM +0100, Thierry Reding wrote: > On Wed, Dec 14, 2016 at 11:46:19AM -0800, Eric Anholt wrote: > > +static int rpi_touchscreen_enable(struct drm_panel *panel) > > +{ > > + struct rpi_touchscreen *ts = panel_to_ts(panel); > > + int i; > > + > > + rpi_touchscreen_i2c_write(ts, REG_POWERON, 1); > > + /* Wait for nPWRDWN to go low to indicate poweron is done. */ > > + for (i = 0; i < 100; i++) { > > + if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1) > > + break; > > + } > > Don't you want to fail when power on doesn't succeed? Seems kind of > pointless to continue if the panel doesn't power on. kms works under the assumption that even when the sink is dead, the display pipe (well, vblanks and pageflips) keep working. There's a patch floating around to give userspace more information about what's going wrong through an async uevent+read-only property for cases where an unresponsive sink is normal, i.e. link training for dp. But either way, continuing is generally the right thing to do, there's no way to report -EIO from here (because no reasons than that's where accidentally ended up with our evolved design ...). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 09/11] drm/panel: Add support for the Raspberry Pi 7" Touchscreen. Date: Tue, 31 Jan 2017 22:17:02 +0100 Message-ID: <20170131211702.o2he5o6ktaztmrkx@phenom.ffwll.local> References: <20161214194621.16499-1-eric@anholt.net> <20161214194621.16499-10-eric@anholt.net> <20170131210717.GA872@mithrandir.ba.sec> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 447816E2E8 for ; Tue, 31 Jan 2017 21:17:07 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id r18so991467wmd.3 for ; Tue, 31 Jan 2017 13:17:07 -0800 (PST) Content-Disposition: inline In-Reply-To: <20170131210717.GA872@mithrandir.ba.sec> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Thierry Reding Cc: Mark Rutland , Florian Fainelli , Stephen Warren , Michael Turquette , Lee Jones , Stephen Boyd , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: dri-devel@lists.freedesktop.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