Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1078081yba; Thu, 4 Apr 2019 03:55:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5I+gRFb3EGDa3USX0eUQCN/QKphUbgrMQ4FTURcfnwqIM9XPWcxIDrQLzk3VM5ZUtPRV5 X-Received: by 2002:a63:cc0c:: with SMTP id x12mr5147071pgf.336.1554375328555; Thu, 04 Apr 2019 03:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554375328; cv=none; d=google.com; s=arc-20160816; b=s02tBBzMHu3DPrnPZsu2pKh89X1pJBPmsbVRtOjZF9QkVBZn78oH/IgCnMGeWZ6olJ vww7pCCWAymekP5c3H6n3gTCEpqpKrVBHDK9nkStLVtlP3DR+j3HDOkGeYJb0RVFQr2P 7SwoX7aCom1p+PAwyX6ylrmfqDJdWLPR9dxHTTnwr8DKduIDuxpWYDrRFRmFpdShbJGJ AdeeAVc4GIexglnk3vhdI3eVFxjto8Dld+iFf/8xs7IUUYNTAbKHbjsxqhM9vTnLQQy2 w43cGVBLFUq6AFa1O5iOfbQAhgHet/J7zmbr4M0/3AZtUfQOS+i6ImGqE8BsSZjYfpY/ Bkrw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/6tQwFRPyabSbWzuN4vS5KLEW/NgXxBtZhpIDezw4dI=; b=CCqkAQfIGXk+tTiXc5bFO4vhi9U6hNypsoqEqzXi6kulIy1dexhj8CBAPrYaMz74SQ K4D1ct8bwJ6T8GNOD/PnzJD54l/XA7UC3Mid6tIlaQTLWx+C8VcwICk/y+i5bpXzy+6l jblXrqR5f2urAIb/YS9wA/t64xXTOoNf33vcRzbskdekA6wtmgETksbwPucx6+W0ttdN 0MrMgcrYyWqqtDnUcT+GHZT8YCvI+T/rkTKx/rTFTA04ougIH5RzgI7q+pd05k2o7MnV xQh1z9ZkSCHw7kA4tn2wp2Z4TQO55aS+VuspCdXBuzYkeMbRf4CLyFNnnffuewjoeXuc 4VIQ== 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 v20si12608403pfa.224.2019.04.04.03.55.13; Thu, 04 Apr 2019 03:55:28 -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 S1729585AbfDDKyG (ORCPT + 99 others); Thu, 4 Apr 2019 06:54:06 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:54572 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbfDDKyF (ORCPT ); Thu, 4 Apr 2019 06:54:05 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 531E9FB04; Thu, 4 Apr 2019 12:54:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OTTWQEQsUKc8; Thu, 4 Apr 2019 12:54:00 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id DC81842BBE; Thu, 4 Apr 2019 12:53:59 +0200 (CEST) Date: Thu, 4 Apr 2019 12:53:59 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Joe Perches Cc: Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Kevin Hilman , Manivannan Sadhasivam , Shawn Guo , Jagan Teki , Martin Blumenstingl , Johan Hovold , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Nicolas Ferre , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Ravnborg Subject: Re: [PATCH v5 0/3] drm/panel: Support Rocktech jh057n00900 DSI panel Message-ID: <20190404105359.GA8255@bogon.m.sigxcpu.org> References: <20190403161735.GN5238@ulmo> <1ed5eb3af4df6b2dd1544c7b696e034ed5c94f06.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1ed5eb3af4df6b2dd1544c7b696e034ed5c94f06.camel@perches.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Apr 03, 2019 at 10:11:00AM -0700, Joe Perches wrote: > On Wed, 2019-04-03 at 18:17 +0200, Thierry Reding wrote: > > On Mon, Apr 01, 2019 at 12:35:32PM +0200, Guido G?nther wrote: > > > v4 fixes up the DT binding example and uses a wider cc list since I > > > failed to extend that when touching more files. > [] > > Applied, thanks. > > > > checkpatch does complain about the dsi_generic_write_seq() macro > > definition, because it uses flow control statements, but there are > > already similar macros in other drivers, so I let this slide. We may > > want to eventually come up with something better and then replace these > > macros for the other drivers as well. > > Dunno about the other drivers, but the mechanism isn't > particularly nice as it separates the init identifier > from the data being written. > > It might be better to use something like a struct for > each command and a for loop for each block of commands. > > Also the 0xBF value used in one of the init sequence > writes does not have an identifier #define in the > 'Manufacturer specific Commands send via DSI' block > which is odd. As written in the commit message the IC in that panel looks similar to the ST7703 but seems to be one of it's clones and the 0xBF isn't documented here at all so I've queued this: diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c index 158a6d548068..e58888f91007 100644 --- a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c +++ b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c @@ -33,6 +33,7 @@ #define ST7703_CMD_SETEXTC 0xB9 #define ST7703_CMD_SETMIPI 0xBA #define ST7703_CMD_SETVDC 0xBC +#define ST7703_CMD_UNKNOWN0 0xBF #define ST7703_CMD_SETSCR 0xC0 #define ST7703_CMD_SETPOWER 0xC1 #define ST7703_CMD_SETPANEL 0xCC @@ -94,7 +95,7 @@ static int jh057n_init_sequence(struct jh057n *ctx) msleep(20); dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F); - dsi_generic_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00); + dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN0, 0x02, 0x11, 0x00); dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1, 0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12, 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, Cheers, -- Guido