Received: by 10.223.185.116 with SMTP id b49csp832351wrg; Wed, 21 Feb 2018 07:38:09 -0800 (PST) X-Google-Smtp-Source: AH8x224Q8PxxFkUVkECTRkrxUR2egYE9nNi8tS/UAymf5dNWdqi20gihEvnMsqsuXujfCFmBV6l/ X-Received: by 2002:a17:902:4d46:: with SMTP id o6-v6mr3454450plh.166.1519227489457; Wed, 21 Feb 2018 07:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519227489; cv=none; d=google.com; s=arc-20160816; b=TK69Ak8eeRX5cpBFOariOmSM70RNAElv2k5SYVNmQgscwEcl3U+n1QSf+xHAhJeSU4 08Q0WG+AV2dao7LJ1msjZXdi2xeRqeyhlvWIF2pgwGxhY4e4TQ6uLodqx7zkrr38ttZR +6Xoe+Cca2RPNf5VnQdEyrAbK0TDi4eGGmiU+wveuDPHTy0JxWqSEWxQjTGgHF+E3/hL 4t26h0tFnOApAtKPliiDO9p+HP2UY5kZar1QA0S6ajFzDVJVbjEW68c07bg0GmWOFQ5A RiFRE6S6z6ZLvBmgmTDi3rXsmfBJv9rAWevU1rJr3OvDJhx8kCCdFsWjzpkOjEWCvL2q HJ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=lknogfg1hz8hZlUBGkfS4o6fIGqgXjiVsz+jda1FW/Y=; b=DoayaiYzAw/1pT5JDJHx1Dp8n2ydKdgFhoDUR1v31WeV92DGog1LxT0dj9j7aEX57q DKmulGnQo+26FCIuebEUeoDAI8PQlN498Rd3mR/ALlE2Q8XiTbHUtw31ygVEXggYmkLq Eedg+TtvcXxKHaEFwWDF/Fq7vWKrid/W9t927p39WlOs56GLk3B6aoeEvUe4jg//rkes IkiuUwjvpN6KWx/ILeA6gVgGQyj5IL2DtEvngI8zECmgPsLnm6vJ6+VPhkvKGqRy+Pwf TgsqqQKEUtN+WVr087HLeL15MQP+sCp4iZxFa4bcBZcuEkWrGk0hOpJ+trGJ2HI/4lNV s7Bw== 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 t25si7010162pfk.176.2018.02.21.07.37.53; Wed, 21 Feb 2018 07:38:09 -0800 (PST) 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 S938377AbeBUPgh (ORCPT + 99 others); Wed, 21 Feb 2018 10:36:37 -0500 Received: from mail-wr0-f179.google.com ([209.85.128.179]:39929 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933105AbeBUPgf (ORCPT ); Wed, 21 Feb 2018 10:36:35 -0500 Received: by mail-wr0-f179.google.com with SMTP id w77so5665189wrc.6; Wed, 21 Feb 2018 07:36:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lknogfg1hz8hZlUBGkfS4o6fIGqgXjiVsz+jda1FW/Y=; b=Ojp+o+DiCoUBV48FExfH+07UU9qQKcmDNLMwMF2MD21S7hWC1QiNb1SrzUtgK5eth/ dnqasA3GHxfQsQbThBMdkt8swUc8X0bg4kJyWKbR8NpTZ+kP8jh6mvSWB+nwSuGV/Lpt Rd9gTf9MCF/DoG8eMGBYm/Gm1JG55Uby4MvbaQlRrQ17EtOrdR4Bj9nzF8kTTJYHCiHg hdXcphT7DJ+iagCOr8plZ43Rr/VgUrOK+gwJghdMwPNQuYHK/EbR8tqIXVYw6lXSEq1M mQEbxGcmlDnzqwdHXMkPFoPrsKBnf2fe9z53IIlpqI/TvL2nwU6IPIkFDsH7m0AtWU6I Il3w== X-Gm-Message-State: APf1xPCw7MDVZzwT4tyRO6U56O9ZJ9KDVQ2QkGs9/4tsDGDXS0YWpk8R JeKu5gJx6FlFtyCubr1BQ909VpUF X-Received: by 10.80.174.201 with SMTP id f9mr5395566edd.72.1519227393461; Wed, 21 Feb 2018 07:36:33 -0800 (PST) Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com. [209.85.128.180]) by smtp.gmail.com with ESMTPSA id n2sm5747705edb.62.2018.02.21.07.36.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 07:36:31 -0800 (PST) Received: by mail-wr0-f180.google.com with SMTP id z12so5683673wrg.4; Wed, 21 Feb 2018 07:36:31 -0800 (PST) X-Received: by 10.28.101.69 with SMTP id z66mr2486802wmb.143.1519227390811; Wed, 21 Feb 2018 07:36:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.134.148 with HTTP; Wed, 21 Feb 2018 07:36:10 -0800 (PST) In-Reply-To: <33efcb267bc513bb19551f1ffdcf578ebfb90369.1519204731.git-series.maxime.ripard@bootlin.com> References: <33efcb267bc513bb19551f1ffdcf578ebfb90369.1519204731.git-series.maxime.ripard@bootlin.com> From: Chen-Yu Tsai Date: Wed, 21 Feb 2018 23:36:10 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 08/10] drm/panel: Add Huarui LHR050H41 panel driver To: Maxime Ripard Cc: Mark Brown , Thierry Reding , Mark Rutland , Rob Herring , dri-devel , Gustavo Padovan , Daniel Vetter , Maarten Lankhorst , Sean Paul , devicetree , linux-arm-kernel , linux-kernel , Thomas Petazzoni , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Feb 21, 2018 at 5:20 PM, Maxime Ripard wrote: > From: Maxime Ripard > > The LHR050H41 panel is the panel shipped with the BananaPi M2-Magic. Add a > driver for it. So I distinctly remember questioning the vendor name the first time. I would just use Bananapi as the vendor name instead. > > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/panel/Kconfig | 9 +- > drivers/gpu/drm/panel/Makefile | 1 +- > drivers/gpu/drm/panel/panel-huarui-lhr050h41.c | 506 ++++++++++++++++++- > 3 files changed, 516 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-huarui-lhr050h41.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 6ba4031f3919..965310fd129a 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -28,6 +28,15 @@ config DRM_PANEL_SIMPLE > that it can be automatically turned off when the panel goes into a > low power state. > > +config DRM_PANEL_HUARUI_LHR050H41 > + tristate "Huarui LHR050H41 panel" > + depends on OF > + depends on DRM_MIPI_DSI > + depends on BACKLIGHT_CLASS_DEVICE > + help > + Say Y if you want to enable support for the Huarui Lighting > + LHR05041 DSI panel. The panel has a 1280x720 resolution. > + And it seems this panel is driven by an ILI9881C from Ilitek. So maybe you could make the panel driver more like the IL9322, as in having common code for the driver IC, then a data structure tied to actual panel compatible strings to handle any quirks. The datasheet can be found simply by googling the part ID, or here: http://en.startek-lcd.com/res/starteklcden/pdres/201706/20170617115241070.pdf This should help with the init command sequence. I also found this: http://www.ampdisplay.com/documents/pdf/AM-7201280ETZQW-00H.pdf which might or might not be the same panel. Now the IL9332 driver simply uses the device model (Dlink DIR-685) as part of the compatible string. Regards ChenYu > config DRM_PANEL_ILITEK_IL9322 > tristate "Ilitek ILI9322 320x240 QVGA panels" > depends on OF && SPI