Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp971947ybh; Tue, 10 Mar 2020 11:55:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs4OaZkZPZoqcs22McwbQkK+XsSL5+pdV6VWbm8YVG4GqdUroPadQ7tl1vgaNzNhsb6rM4u X-Received: by 2002:a9d:6255:: with SMTP id i21mr4697019otk.183.1583866501619; Tue, 10 Mar 2020 11:55:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583866501; cv=none; d=google.com; s=arc-20160816; b=iYJaJP1RWRbfUqst/uTgQ0WJ2RQtqYU360nmeNk8zbbd78LfF9TsqLvFmQFLArK5Cl 2qDypogQbzKOP3SREN9ZCHbx9WkWt86eGxeP20XHQO5c+DCOClNampPq6J3BhMsBw65C 676NugC/NpSennAdWYgVXko9AYu/ZQcFSutlj+3x+jolsh+wzQeukQ5KT9xzIE1dhcBR js4Zg6eIZlnSBIuOMsetfnO6YXJyqAMcFmNzg6VVzVwWzi8w+2R4Olx1FFO/VPDSWoxC j+ZPWiiZkCg9w7TOsOizHg3Y94NKtdIXxhGVUCoeSOM0VDUZ1+GorbNw9xR53VqJC2DO HdEA== 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=YrVPb4JClxw0IE6yX+AQNVkVCVBRLTNvluTJCKlAliE=; b=je2Hlue1u4U4oMnGBrDiB6saZnR2e0JZlZGUwLRid405JMGx1AdGMYVGCIijNi5OAJ YMazdbcPhfIRv0669oyHrutLjZM7I4sQoQBxIOUSCPCBiXpdINV4ziV6Cd7tPtNijVih CMoHnGLT1+G9TOJlpOlBH4OFG8fYdlT8QDhF5gAKdg+XizwzEkasVatI37gXXOM0Mts+ iiDv5cA20VgBzlCPFP+krsett+Qqw63zJx89yaq+sb39PdgAAras42S0qs51d6L+nF15 gptu2WsVhKm7N7OaeenIe1ZdN4tWZvbfr21TC3sVUHziDZz+vSNV9upc4W8IlHG0BO9g 64eQ== 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 t25si5934887oic.183.2020.03.10.11.54.49; Tue, 10 Mar 2020 11:55:01 -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 S1726917AbgCJSy3 (ORCPT + 99 others); Tue, 10 Mar 2020 14:54:29 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:45208 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbgCJSy3 (ORCPT ); Tue, 10 Mar 2020 14:54:29 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 9B0DF804FE; Tue, 10 Mar 2020 19:54:24 +0100 (CET) Date: Tue, 10 Mar 2020 19:54:23 +0100 From: Sam Ravnborg To: Pascal Roeleven Cc: Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 1/2] drm/panel: Add Starry KR070PE2T Message-ID: <20200310185422.GA22095@ravnborg.org> References: <20200310102725.14591-1-dev@pascalroeleven.nl> <20200310102725.14591-2-dev@pascalroeleven.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200310102725.14591-2-dev@pascalroeleven.nl> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=XpTUx2N9 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=SYmV4DkvhPPEfb4SR88A:9 a=CjuIK1q_8ugA:10 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pascal. Thanks for submitting. On Tue, Mar 10, 2020 at 11:27:23AM +0100, Pascal Roeleven wrote: > The KR070PE2T is a 7" panel with a resolution of 800x480. > > KR070PE2T is the marking present on the ribbon cable. As this panel is > probably available under different brands, this marking will catch > most devices. > > Signed-off-by: Pascal Roeleven A few things to improve. The binding should be a separate patch. subject - shall start with dt-bindings: Shall be sent to deveicetree mailing list. For panel we no longer accept .txt bindings. But the good news is that since the panel is simple, you only need to list your compatible in the file bindings/display/panel/panel-simple.yaml - must be en alphabetical order - vendor prefix must be present in vendor-prefixes > --- > .../display/panel/starry,kr070pe2t.txt | 7 +++++ > drivers/gpu/drm/panel/panel-simple.c | 26 +++++++++++++++++++ > 2 files changed, 33 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/panel/starry,kr070pe2t.txt > > diff --git a/Documentation/devicetree/bindings/display/panel/starry,kr070pe2t.txt b/Documentation/devicetree/bindings/display/panel/starry,kr070pe2t.txt > new file mode 100644 > index 000000000..699ad5eb2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/starry,kr070pe2t.txt > @@ -0,0 +1,7 @@ > +Starry 7" (800x480 pixels) LCD panel > + > +Required properties: > +- compatible: should be "starry,kr070pe2t" > + > +This binding is compatible with the simple-panel binding, which is specified > +in simple-panel.txt in this directory. > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c > index e14c14ac6..027a2612b 100644 > --- a/drivers/gpu/drm/panel/panel-simple.c > +++ b/drivers/gpu/drm/panel/panel-simple.c > @@ -2842,6 +2842,29 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { > .bus_format = MEDIA_BUS_FMT_RGB666_1X18, > }; > > +static const struct drm_display_mode starry_kr070pe2t_mode = { > + .clock = 33000, > + .hdisplay = 800, > + .hsync_start = 800 + 209, > + .hsync_end = 800 + 209 + 1, > + .htotal = 800 + 209 + 1 + 45, > + .vdisplay = 480, > + .vsync_start = 480 + 22, > + .vsync_end = 480 + 22 + 1, > + .vtotal = 480 + 22 + 1 + 22, > + .vrefresh = 60, > +}; Please adjust so: vrefresh * htotal * vtotal == clock. I cannot say what needs to be adjusted. But we are moving away from specifying vrefresh and want the data to be OK. > + > +static const struct panel_desc starry_kr070pe2t = { > + .modes = &starry_kr070pe2t_mode, > + .num_modes = 1, > + .bpc = 8, > + .size = { > + .width = 152, > + .height = 86, > + }, > +}; For this part specifying the connector type is today mandatory. And please investigate if you can be more precise concerning bus_format, flags, etc. See also what other panels do in the same file. Sam > + > static const struct drm_display_mode starry_kr122ea0sra_mode = { > .clock = 147000, > .hdisplay = 1920, > @@ -3474,6 +3497,9 @@ static const struct of_device_id platform_of_match[] = { > }, { > .compatible = "shelly,sca07010-bfn-lnn", > .data = &shelly_sca07010_bfn_lnn, > + }, { > + .compatible = "starry,kr070pe2t", > + .data = &starry_kr070pe2t, > }, { > .compatible = "starry,kr122ea0sra", > .data = &starry_kr122ea0sra, > -- > 2.20.1