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_MUTT 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 22C0BC4646B for ; Wed, 26 Jun 2019 07:26:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2F032133F for ; Wed, 26 Jun 2019 07:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbfFZH0g (ORCPT ); Wed, 26 Jun 2019 03:26:36 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:58270 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbfFZH0g (ORCPT ); Wed, 26 Jun 2019 03:26:36 -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 BB02B80324; Wed, 26 Jun 2019 09:26:29 +0200 (CEST) Date: Wed, 26 Jun 2019 09:26:28 +0200 From: Sam Ravnborg To: Jitao Shi Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , linux-pwm@vger.kernel.org, David Airlie , Matthias Brugger , stonea168@163.com, dri-devel@lists.freedesktop.org, Andy Yan , Ajay Kumar , Vincent Palatin , cawa.cheng@mediatek.com, Russell King , Thierry Reding , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, Rahul Sharma , srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, Sascha Hauer , Sean Paul Subject: Re: [v3 4/4] drm/panel: support for auo, kd101n80-45na wuxga dsi video mode panel Message-ID: <20190626072628.GC14541@ravnborg.org> References: <20190626025400.109567-1-jitao.shi@mediatek.com> <20190626025400.109567-5-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626025400.109567-5-jitao.shi@mediatek.com> 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=mpaa-ttXAAAA:8 a=e5mUnYsNAAAA:8 a=noVse8_2oiOjf6f6wEgA:9 a=CjuIK1q_8ugA:10 a=6heAxKwa5pAsJatQ0mat:22 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 10:54:00AM +0800, Jitao Shi wrote: > Auo,kd101n80-45na's connector is same as boe,tv101wum-nl6. > The most codes can be reuse. > So auo,kd101n80-45na and boe,tv101wum-nl6 use one driver file. > Add the different parts in driver data. Very nice consolidation. Have you considered another filename that better tell this is a driver for different types of displays? And the Kconfig text needs some adjustment to tell this driver now supports an extra type of display. Sam > > Signed-off-by: Jitao Shi > --- > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > index 30d1f53dcbaf..6ff49f900cd2 100644 > --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > @@ -372,6 +372,15 @@ static const struct panel_init_cmd boe_init_cmd[] = { > {}, > }; > > +static const struct panel_init_cmd auo_init_cmd[] = { > + _INIT_DELAY_CMD(24), > + _INIT_DCS_CMD(0x11), > + _INIT_DELAY_CMD(120), > + _INIT_DCS_CMD(0x29), > + _INIT_DELAY_CMD(120), > + {}, > +}; > + > static inline struct boe_panel *to_boe_panel(struct drm_panel *panel) > { > return container_of(panel, struct boe_panel, base); > @@ -571,6 +580,33 @@ static const struct panel_desc boe_tv101wum_nl6_desc = { > .init_cmds = boe_init_cmd, > }; > > +static const struct drm_display_mode auo_default_mode = { > + .clock = 157000, > + .hdisplay = 1200, > + .hsync_start = 1200 + 80, > + .hsync_end = 1200 + 80 + 24, > + .htotal = 1200 + 80 + 24 + 36, > + .vdisplay = 1920, > + .vsync_start = 1920 + 16, > + .vsync_end = 1920 + 16 + 4, > + .vtotal = 1920 + 16 + 4 + 16, > + .vrefresh = 60, > +}; > + > +static const struct panel_desc auo_kd101n80_45na_desc = { > + .modes = &auo_default_mode, > + .bpc = 8, > + .size = { > + .width = 135, > + .height = 216, > + }, > + .lanes = 4, > + .format = MIPI_DSI_FMT_RGB888, > + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | > + MIPI_DSI_MODE_LPM, > + .init_cmds = auo_init_cmd, > +}; > + > static int boe_panel_get_modes(struct drm_panel *panel) > { > struct boe_panel *boe = to_boe_panel(panel); > @@ -694,6 +730,9 @@ static const struct of_device_id boe_of_match[] = { > { .compatible = "boe,tv101wum-nl6", > .data = &boe_tv101wum_nl6_desc > }, > + { .compatible = "auo,kd101n80-45na", > + .data = &auo_kd101n80_45na_desc > + }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, boe_of_match); > -- > 2.21.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [v3 4/4] drm/panel: support for auo, kd101n80-45na wuxga dsi video mode panel Date: Wed, 26 Jun 2019 09:26:28 +0200 Message-ID: <20190626072628.GC14541@ravnborg.org> References: <20190626025400.109567-1-jitao.shi@mediatek.com> <20190626025400.109567-5-jitao.shi@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190626025400.109567-5-jitao.shi@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org To: Jitao Shi Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , linux-pwm@vger.kernel.org, David Airlie , Matthias Brugger , stonea168@163.com, dri-devel@lists.freedesktop.org, Andy Yan , Ajay Kumar , Vincent Palatin , cawa.cheng@mediatek.com, Russell King , Thierry Reding , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, Rahul Sharma , srv_heupstream@mediatek.com, linux-kernel@vge List-Id: devicetree@vger.kernel.org On Wed, Jun 26, 2019 at 10:54:00AM +0800, Jitao Shi wrote: > Auo,kd101n80-45na's connector is same as boe,tv101wum-nl6. > The most codes can be reuse. > So auo,kd101n80-45na and boe,tv101wum-nl6 use one driver file. > Add the different parts in driver data. Very nice consolidation. Have you considered another filename that better tell this is a driver for different types of displays? And the Kconfig text needs some adjustment to tell this driver now supports an extra type of display. Sam > > Signed-off-by: Jitao Shi > --- > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > index 30d1f53dcbaf..6ff49f900cd2 100644 > --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > @@ -372,6 +372,15 @@ static const struct panel_init_cmd boe_init_cmd[] = { > {}, > }; > > +static const struct panel_init_cmd auo_init_cmd[] = { > + _INIT_DELAY_CMD(24), > + _INIT_DCS_CMD(0x11), > + _INIT_DELAY_CMD(120), > + _INIT_DCS_CMD(0x29), > + _INIT_DELAY_CMD(120), > + {}, > +}; > + > static inline struct boe_panel *to_boe_panel(struct drm_panel *panel) > { > return container_of(panel, struct boe_panel, base); > @@ -571,6 +580,33 @@ static const struct panel_desc boe_tv101wum_nl6_desc = { > .init_cmds = boe_init_cmd, > }; > > +static const struct drm_display_mode auo_default_mode = { > + .clock = 157000, > + .hdisplay = 1200, > + .hsync_start = 1200 + 80, > + .hsync_end = 1200 + 80 + 24, > + .htotal = 1200 + 80 + 24 + 36, > + .vdisplay = 1920, > + .vsync_start = 1920 + 16, > + .vsync_end = 1920 + 16 + 4, > + .vtotal = 1920 + 16 + 4 + 16, > + .vrefresh = 60, > +}; > + > +static const struct panel_desc auo_kd101n80_45na_desc = { > + .modes = &auo_default_mode, > + .bpc = 8, > + .size = { > + .width = 135, > + .height = 216, > + }, > + .lanes = 4, > + .format = MIPI_DSI_FMT_RGB888, > + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | > + MIPI_DSI_MODE_LPM, > + .init_cmds = auo_init_cmd, > +}; > + > static int boe_panel_get_modes(struct drm_panel *panel) > { > struct boe_panel *boe = to_boe_panel(panel); > @@ -694,6 +730,9 @@ static const struct of_device_id boe_of_match[] = { > { .compatible = "boe,tv101wum-nl6", > .data = &boe_tv101wum_nl6_desc > }, > + { .compatible = "auo,kd101n80-45na", > + .data = &auo_kd101n80_45na_desc > + }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, boe_of_match); > -- > 2.21.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel 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.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT 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 631D2C4646B for ; Wed, 26 Jun 2019 07:26:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A78D208E3 for ; Wed, 26 Jun 2019 07:26:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FtuVBaCs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A78D208E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZJ5AB8MVl7e5NXCH92R9MIVT4CPbQJhlJbcKvdmKZJM=; b=FtuVBaCsCuVSqe ADSbQEEnzp1+uGjlJPW/fAqjlXck+Akm2gSUGhE2tUyupInIhr7UVmgGjeeESybqHsEoN+ss3bpc8 WnWKINb/x55DULC4HNUVYD7yhfs5auYLoT+vei+ed1KkgdZXrYqU6gF9XlTjzlAyK/G/oyvPs7h/c Pf0DpQr3yZfZ8cjG0VG/vq2OOP5lK9MRUjm28bXL10tqxm3cqFH29PVdEr5rWDLM/edThTgfUT3kr 3jV/QK2yz7YqFl2GzIpobM3x93Tr0qM+u3h5H1Ggq+NaiN7kq9SVBt7QisPYqjCwiPrIrzq3jTm6l 7cPsOc2PGjFkgSh92kIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hg2KD-0004Oy-R5; Wed, 26 Jun 2019 07:26:37 +0000 Received: from asavdk4.altibox.net ([109.247.116.15]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hg2KA-0004OM-3n; Wed, 26 Jun 2019 07:26:35 +0000 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 BB02B80324; Wed, 26 Jun 2019 09:26:29 +0200 (CEST) Date: Wed, 26 Jun 2019 09:26:28 +0200 From: Sam Ravnborg To: Jitao Shi Subject: Re: [v3 4/4] drm/panel: support for auo, kd101n80-45na wuxga dsi video mode panel Message-ID: <20190626072628.GC14541@ravnborg.org> References: <20190626025400.109567-1-jitao.shi@mediatek.com> <20190626025400.109567-5-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190626025400.109567-5-jitao.shi@mediatek.com> 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=mpaa-ttXAAAA:8 a=e5mUnYsNAAAA:8 a=noVse8_2oiOjf6f6wEgA:9 a=CjuIK1q_8ugA:10 a=6heAxKwa5pAsJatQ0mat:22 a=Vxmtnl_E_bksehYqCbjh:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190626_002634_513155_8D75B0AD X-CRM114-Status: GOOD ( 17.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, David Airlie , stonea168@163.com, dri-devel@lists.freedesktop.org, Ajay Kumar , Vincent Palatin , cawa.cheng@mediatek.com, yingjoe.chen@mediatek.com, Thierry Reding , Sean Paul , linux-pwm@vger.kernel.org, Pawel Moll , Ian Campbell , Rob Herring , linux-mediatek@lists.infradead.org, Russell King , Matthias Brugger , eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, Rahul Sharma , srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, Sascha Hauer , Andy Yan Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 26, 2019 at 10:54:00AM +0800, Jitao Shi wrote: > Auo,kd101n80-45na's connector is same as boe,tv101wum-nl6. > The most codes can be reuse. > So auo,kd101n80-45na and boe,tv101wum-nl6 use one driver file. > Add the different parts in driver data. Very nice consolidation. Have you considered another filename that better tell this is a driver for different types of displays? And the Kconfig text needs some adjustment to tell this driver now supports an extra type of display. Sam > > Signed-off-by: Jitao Shi > --- > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > index 30d1f53dcbaf..6ff49f900cd2 100644 > --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > @@ -372,6 +372,15 @@ static const struct panel_init_cmd boe_init_cmd[] = { > {}, > }; > > +static const struct panel_init_cmd auo_init_cmd[] = { > + _INIT_DELAY_CMD(24), > + _INIT_DCS_CMD(0x11), > + _INIT_DELAY_CMD(120), > + _INIT_DCS_CMD(0x29), > + _INIT_DELAY_CMD(120), > + {}, > +}; > + > static inline struct boe_panel *to_boe_panel(struct drm_panel *panel) > { > return container_of(panel, struct boe_panel, base); > @@ -571,6 +580,33 @@ static const struct panel_desc boe_tv101wum_nl6_desc = { > .init_cmds = boe_init_cmd, > }; > > +static const struct drm_display_mode auo_default_mode = { > + .clock = 157000, > + .hdisplay = 1200, > + .hsync_start = 1200 + 80, > + .hsync_end = 1200 + 80 + 24, > + .htotal = 1200 + 80 + 24 + 36, > + .vdisplay = 1920, > + .vsync_start = 1920 + 16, > + .vsync_end = 1920 + 16 + 4, > + .vtotal = 1920 + 16 + 4 + 16, > + .vrefresh = 60, > +}; > + > +static const struct panel_desc auo_kd101n80_45na_desc = { > + .modes = &auo_default_mode, > + .bpc = 8, > + .size = { > + .width = 135, > + .height = 216, > + }, > + .lanes = 4, > + .format = MIPI_DSI_FMT_RGB888, > + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | > + MIPI_DSI_MODE_LPM, > + .init_cmds = auo_init_cmd, > +}; > + > static int boe_panel_get_modes(struct drm_panel *panel) > { > struct boe_panel *boe = to_boe_panel(panel); > @@ -694,6 +730,9 @@ static const struct of_device_id boe_of_match[] = { > { .compatible = "boe,tv101wum-nl6", > .data = &boe_tv101wum_nl6_desc > }, > + { .compatible = "auo,kd101n80-45na", > + .data = &auo_kd101n80_45na_desc > + }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, boe_of_match); > -- > 2.21.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel