From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59E0FC10F27 for ; Tue, 10 Mar 2020 18:54:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B3DA20637 for ; Tue, 10 Mar 2020 18:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbgCJSy3 (ORCPT ); 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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