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, USER_AGENT_SANE_1 autolearn=unavailable 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 9053BC35240 for ; Thu, 30 Jan 2020 19:52:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5313920708 for ; Thu, 30 Jan 2020 19:52:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727515AbgA3Twq (ORCPT ); Thu, 30 Jan 2020 14:52:46 -0500 Received: from asavdk4.altibox.net ([109.247.116.15]:52646 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbgA3Twq (ORCPT ); Thu, 30 Jan 2020 14:52:46 -0500 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 F3125803F1; Thu, 30 Jan 2020 20:52:40 +0100 (CET) Date: Thu, 30 Jan 2020 20:52:39 +0100 From: Sam Ravnborg To: Michael Srba Cc: David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Thierry Reding , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v2 2/2] drm/panel: Add a driver for Samsung s6e88a0-ams452ef01 panel Message-ID: <20200130195239.GA28017@ravnborg.org> References: <20200130171128.29251-1-michael.srba@seznam.cz> <20200130171128.29251-2-michael.srba@seznam.cz> <20200130182832.GB21265@ravnborg.org> <0d78995c-e1a6-f301-12f7-d62cd5833f2c@seznam.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d78995c-e1a6-f301-12f7-d62cd5833f2c@seznam.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VcLZwmh9 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=rgSknGwOoRCBxhHlYYYA:9 a=k_jlxkuc_V8kldkU:21 a=3HhA6UZRQneBFC6W:21 a=CjuIK1q_8ugA:10 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Michael. On Thu, Jan 30, 2020 at 08:02:31PM +0100, Michael Srba wrote: > Sending this with thunderbird, fingers crossed for no formatting issues Readable... > > Hi, > I've taken about two weeks to send zinitix v2, and haven't heard about > that or > v3 yet, so combined with how easy it was to address the issues, I didn't > want > to risk that was the reason :) > I'm not sure how I should make the subject shorter, it's already pretty > barebones, so if it has to be done, I assume you would have a suggestion > on what > is not as important as it seems to me? > I'm also not sure if splitting the comment on line 78 to three lines > (two seem > to not suffice) wouldn't be even worse than leaving it like this? Or > should I > have it more to the left so that it fits on just two lines? > Similarly, I'm not sure what the convention for splitting would be on > line 25, > since I saw the line breaks placed mostly after a whole function parameter. > Actually, for all of the above-80 lines except the one that I missed when > updating it today I don't really know how to handle them... except maybe > line > 139, I guess I missed that since it's off-by-one Address what you think needs to be addressed. If I feel strong about some of the remaining warnings I will fix when applying. And let you know what I did if this is the case. Sam > > On 30. 01. 20 19:28, Sam Ravnborg wrote: > > Hi Micahel. > > > > Thanks for the quick feedback. > > > > Please address checkpatch warnings. > > > > be2b44c76320 (HEAD -> drm-misc-next) drm/panel: Add a driver for Samsung s6e88a0-ams452ef01 panel > > -:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one > > > > -:40: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? > > #40: > > new file mode 100644 > > > > -:69: WARNING:LONG_LINE: line over 80 characters > > #69: FILE: drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c:25: > > +static inline struct s6e88a0_ams452ef01 *to_s6e88a0_ams452ef01(struct drm_panel *panel) > > > > -:74: WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided > > #74: FILE: drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c:30: > > +#define dsi_dcs_write_seq(dsi, seq...) do { \ > > + static const u8 d[] = { seq }; \ > > + int ret; \ > > + ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ > > + if (ret < 0) \ > > + return ret; \ > > + } while (0) > > > > -:122: WARNING:LONG_LINE_COMMENT: line over 80 characters > > #122: FILE: drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c:78: > > + dsi_dcs_write_seq(dsi, 0xb2, 0x40, 0x0a, 0x17, 0x00, 0x0a); // set default Amoled Off Ratio > > > > -:183: WARNING:LONG_LINE: line over 80 characters > > #183: FILE: drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c:139: > > + regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); > > > > -:226: WARNING:LONG_LINE: line over 80 characters > > #226: FILE: drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c:182: > > +static int s6e88a0_ams452ef01_get_modes(struct drm_panel *panel, struct drm_connector *connector) > > > > total: 0 errors, 7 warnings, 0 checks, 308 lines checked > > > > > > > > Use: dim checkpatch" if you have dim. > > Otherwise use checkpatch -q --emacs --strict --show-types > > > > Ignore the warning "MACRO_WITH_FLOW_CONTROL" - as this seems legit in this use-case. > > > > Sam > > > > On Thu, Jan 30, 2020 at 06:11:28PM +0100, michael.srba@seznam.cz wrote: > >> From: Michael Srba > >> > >> Signed-off-by: Michael Srba > >> --- > >> Changes since v1: reorder includes; remove empty functions; fix after rebasing > >> --- > >> drivers/gpu/drm/panel/Kconfig | 6 + > >> drivers/gpu/drm/panel/Makefile | 1 + > >> .../panel/panel-samsung-s6e88a0-ams452ef01.c | 289 ++++++++++++++++++ > >> 3 files changed, 296 insertions(+) > >> create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c > >> > >> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > >> index ae44ac2ec106..0c7d61f32b0e 100644 > >> --- a/drivers/gpu/drm/panel/Kconfig > >> +++ b/drivers/gpu/drm/panel/Kconfig > >> @@ -275,6 +275,12 @@ config DRM_PANEL_SAMSUNG_S6E63M0 > >> Say Y here if you want to enable support for Samsung S6E63M0 > >> AMOLED LCD panel. > >> > >> +config DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 > >> + tristate "Samsung AMS452EF01 panel with S6E88A0 DSI video mode controller" > >> + depends on OF > >> + select DRM_MIPI_DSI > >> + select VIDEOMODE_HELPERS > >> + > >> config DRM_PANEL_SAMSUNG_S6E8AA0 > >> tristate "Samsung S6E8AA0 DSI video mode panel" > >> depends on OF > >> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > >> index 7c4d3c581fd4..5b622fbe4014 100644 > >> --- a/drivers/gpu/drm/panel/Makefile > >> +++ b/drivers/gpu/drm/panel/Makefile > >> @@ -28,6 +28,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o > >> obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o > >> obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o > >> obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o > >> +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o > >> obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o > >> obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o > >> obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o > >> diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c > >> new file mode 100644 > >> index 000000000000..49d3f6d0f137 > >> --- /dev/null > >> +++ b/drivers/gpu/drm/panel/panel-samsung-s6e88a0-ams452ef01.c > >> @@ -0,0 +1,289 @@ > >> +// SPDX-License-Identifier: GPL-2.0-only > >> +// Copyright (C) 2019, Michael Srba > >> + > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> + > >> +#include