Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3180404ybd; Mon, 24 Jun 2019 21:07:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZ6zNrza+9FnMDEgVLq+OOfTCqau3mz7xkz+o+NO9hY1OsQNTXmr0a3BncdNXxLkH0Fe9g X-Received: by 2002:a17:90a:1ae2:: with SMTP id p89mr6854420pjp.26.1561435640959; Mon, 24 Jun 2019 21:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435640; cv=none; d=google.com; s=arc-20160816; b=f/5cA1exb3dK++OUuO7OUWn+Ltdujibf5Z2oBV2+CSM8vESx4h/IDw2Kv5JDFC8sxx M8mPEZwCwYzcg+Jo9RqUPMEGJk5/OLg97JR5afhVItDrx8XYtsW2WnNTpW5zkJN+7Lcg X/ONyp5vTxskGu311vndbDbLgRejg/9sbZnokqrLyDNqGk/JdFTDqN2nCKOxs4tuoaAi T4BoyaozNbhnJxfu3J6vFhCXlyc0asan2n8e5wWSCKxmLvDQ9nPlfCcQhGqbNHsSryP/ y63hMnpia3+2fjtG0uZVUhijs9HU9560YlOjShEp+94ry0UHw67kMFyDfZ8U60M76/Gg XhdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e2ogumH57Dk+mOO0y5/CmcdAve3k/tPr0Lofkj3W1yQ=; b=MrPUOFeH8cwaifKnl8SOOQ1DAQiM9U5n6YLWwWjv56eQMMFwLW6bUBfqTvJ8R0RIxU BxpypCGcunkWv2KiuEGzDX0drtph5GhL0aFO5Bn7pF+XvNtYdZavYkBnCPdCwyANQCJV ggyBF9QdG9HEWdzID+FgDuH5ENddUKfbZjNaMmdqhwga59otoZYknWmJQxTiWiniSHgp c/h9oM4S9Y6O0rQt/rLRYljjG4OolrTEsEuU0oaOKN9vj56UU4ULjSCFAEccvfjuU/FQ zMt8LYlNAoXOivY3MUmanXDR/ds8+pwz7Ie5JuO/PnPAcqRoaQnHdHOOaa8EqQtOJtLv NDxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gn85bRpx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14si1468903pjr.88.2019.06.24.21.07.05; Mon, 24 Jun 2019 21:07:20 -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; dkim=pass header.i=@chromium.org header.s=google header.b=gn85bRpx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729493AbfFYAnK (ORCPT + 99 others); Mon, 24 Jun 2019 20:43:10 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:35072 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729029AbfFYAnK (ORCPT ); Mon, 24 Jun 2019 20:43:10 -0400 Received: by mail-qk1-f193.google.com with SMTP id l128so11260390qke.2 for ; Mon, 24 Jun 2019 17:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e2ogumH57Dk+mOO0y5/CmcdAve3k/tPr0Lofkj3W1yQ=; b=gn85bRpxX7rX0vPi2OF9kz6nsjSpDytW5uaW02EslXpNifmNJJW+bfXA/vNHvtnfyd LEbGvEe0UTmhomOdUgl3WLDYKeBbP9GS8Ul3o4lm0omA18ix5UVvi5y53tJ9mWlSYZ+O 2tGmkRpE9D4p4h3dyylbbuMMhbJXozsVkMUW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e2ogumH57Dk+mOO0y5/CmcdAve3k/tPr0Lofkj3W1yQ=; b=uG7IdAhy8Axs9X/jVY2pPijNDmZA/bjN64ulRTRxJr23ipIJn5aRJjaZpoD1lICic7 L/cGP03q4sqPXl/lTmkb6hpJgrTwZ094sbjlGnjiaTVwccCEV8XaA7MfcEruwVaymQGi 7DcBP549lD02WGyIxKpnqZSJOpj0rEEaYNGdvPJLnGy+hqrRkmhu5xYnmh9ACiE9MV7N Twkk7TiQ1zUHtIrUNyLpEQ9wTa55CV/a4pGjysba01b3g4A31E5+9MxgJ++IHnCCsXbb B6Ot1dLRHYk78XfTWJCRFeTTNnk7GwDaAekogGmbI1iUlQZsXzhU8XkTQCnnRYKeGSr5 M/jA== X-Gm-Message-State: APjAAAWVeqPHJgY/J97ySWiKY4Wq+rlrwdxygYsaiRcwjCt5CV6J1Rrm Pmp8AtTGV9K3ZffNIWR/tTRmE7lKLClllbo7ot6WyQ== X-Received: by 2002:a37:9c88:: with SMTP id f130mr19471044qke.457.1561423388940; Mon, 24 Jun 2019 17:43:08 -0700 (PDT) MIME-Version: 1.0 References: <20190624080001.67222-1-jitao.shi@mediatek.com> <20190624080001.67222-3-jitao.shi@mediatek.com> In-Reply-To: <20190624080001.67222-3-jitao.shi@mediatek.com> From: Nicolas Boichat Date: Tue, 25 Jun 2019 08:42:57 +0800 Message-ID: Subject: Re: [v2 2/2] drm/panel: support for auo, kd101n80-45na wuxga dsi video mode panel 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 , Russell King , Thierry Reding , devicetree@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , Yingjoe Chen , Eddie Huang , linux-arm Mailing List , Rahul Sharma , srv_heupstream , lkml , Sascha Hauer , Sean Paul Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 24, 2019 at 4:00 PM 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. > > Signed-off-by: Jitao Shi > --- > .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 40 +++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c > index 6e06c8506623..d1ee43cfcbe2 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); > @@ -572,6 +581,34 @@ 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, > + .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, > +}; > + > +static const struct panel_desc auo_kd101n80_45na_desc = { > + .modes = &auo_default_mode, > + .bpc = 8, > + .size = { > + .width = 216, > + .height = 135, Same issue as the BOE panel: This is wrong, as this is a portrait panel, should be: 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); > @@ -695,6 +732,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