Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp436836ybd; Wed, 26 Jun 2019 00:28:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBzM5oWHOXEkU56Sx2wKHpy0oXdQzgQ2vIJf8at4s4A3ypB+zUSydCFFxNJQC11T0UPFgY X-Received: by 2002:a63:7a5b:: with SMTP id j27mr1554720pgn.242.1561534113650; Wed, 26 Jun 2019 00:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561534113; cv=none; d=google.com; s=arc-20160816; b=V/re7mCxFCjyKC5nW1uCJlvvor1/XDLQNbcTgep+Aim+kCZoYNBhmbWH4nOkwxpK9J cQCNC0JqGP0TNpVOcFwp0OcMHqT7w++EHakVf4BcFbB5Y2Pg5DUEQJBHQipVhy03qlmj DGbOCr+z/gWZan/GwFyJ3b+rkbQnbY1XRaiRKUg5dr+Z3BN4sap++yMk8FQcmerVd+mu SH6E4+VVSFRGCNbiMUp7AXM6EHWab+MgtGBmH0NY/bXherYnfq/+hDAOUk5E8jTnbBEt 3t+21XU+icImvsKKuk9t4SHqXiwLjDw4tpklwyCD8ad7abxe/aXqlJ7L0EiEtOrQa0K3 sDog== 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=68Xx1qbtD9p/wHlAZW4XdUirEr0kKCshgLd4As/8M10=; b=TkQpVHTMJPDcWTZMLLaeCU4+7mINa6T2KdDENhfn+hhOhubFyS+hzy7h8ekkD6Vw+i MzKfhhiZi0hR4Bvok2W0pQCoZ06akJaJ4UAY1wJYiY+s4L0/TC3oydWYrnVF5Gxcwo8o 8jlmVhfJc7or5hFmzZDRo7T8HUNdBByCCm/FPNFitFI6hs8HUj31LgsmLanDm1SRNupU O/Z4SgRXdo21cdsX5dgAXbWgifLkQDMNxQ6YI2xCoiZ/pO6S1i68WeFysnMkJ1AOsSca ccz4gSEBFy76Rp4e9RIc1XZUWpN4F1F7ELScOfB92K22Up5d+HIB9bKk973Cwf3Z/Y/Q DSag== 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 15si16002193pfh.174.2019.06.26.00.28.17; Wed, 26 Jun 2019 00:28:33 -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 S1726946AbfFZH0g (ORCPT + 99 others); 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