Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1735231ybp; Fri, 11 Oct 2019 20:10:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVmKSCx5bax0sXBcwSGW+lJYELZV50kcRdH10mNDkGKFBUofmL6vqi97ORDI9wJI6Gc0gb X-Received: by 2002:a17:906:c317:: with SMTP id s23mr17855209ejz.251.1570849849180; Fri, 11 Oct 2019 20:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570849849; cv=none; d=google.com; s=arc-20160816; b=oT2XTfJ4kmaes7YUn7MNnNutfGiXRy7ycgPBGOLIzaKTOusN6DKkBFeOVXNJRAoD/2 cjs8AIL6A4e1YaCBZ4C2ZkncarssMjuKzP7Hp0ofcJvI5EQFOfcjAnwi4CIDE17rR8qH UUisr62qgMILMXKdX5Zc5CeEwyz4a8GrTWJmYlsUI7FnzWBwHlaODfSyVMYLT49tJdkY +msh7P+E18Qq7Xo79GerScrFxPrxsGaY1UxRyHhlFEWYJ1FZTGoXVBT61IJ8N1nPJv+W lkOXNlPNLizdJyYGJRvGjrTTKb7KoQEhC4juWMyXerO7C9EiqlhDUxgGNu7ew9u9JV1v Lnwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZnuxHZxc0deXgOcxFTIaiTXw7Bv45geg22qfVfrLHkg=; b=HnNrF/EFySicrHeh4DcsHTJXjAmEel6aJHy80caYi9mk8RrpXVDQqQQRQ7Ogj72k27 fOMkMfUBNLTUFsKSnyfv6KV4wOKkPEfG2p/xCMlyPAy4uhrYuFPBTP9Wlme+wlBLg9pN G2nhNh1m/QJITXov9NLCB59jYs+cERBsTWtYPpjBl4sAhxzEzy2u+oa6wjWCpmMdAZKD 26C/y8hDdEZ1rKSAy7VpM2HAOWJGYnTK6oLQft8YWKG9Ha5bopyTveNLWWcwXa/Pn2Gf WRsChtHbBE6ImtbhSaGbdaMEwFfPm1T7u4P6G8M1OQv6+Gs7sDxQBo3wf+y4JEncLKQ0 Yqfw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si6510506ejx.315.2019.10.11.20.10.25; Fri, 11 Oct 2019 20:10:49 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728602AbfJLDIO (ORCPT + 99 others); Fri, 11 Oct 2019 23:08:14 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:38427 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727896AbfJLDIM (ORCPT ); Fri, 11 Oct 2019 23:08:12 -0400 X-UUID: 1a32b68b218847ceb4f1b1f5b84b5d05-20191012 X-UUID: 1a32b68b218847ceb4f1b1f5b84b5d05-20191012 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1503494496; Sat, 12 Oct 2019 11:07:57 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33N2.mediatek.inc (172.27.4.76) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 12 Oct 2019 11:07:55 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 12 Oct 2019 11:07:54 +0800 From: Jitao Shi To: Sam Ravnborg , David Airlie , Daniel Vetter , , CC: , , , , , , , , Jitao Shi Subject: [PATCH v7 6/8] drm/panel: support for boe,tv101wum-n53 wuxga dsi video mode panel Date: Sat, 12 Oct 2019 11:07:18 +0800 Message-ID: <20191012030720.27127-7-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191012030720.27127-1-jitao.shi@mediatek.com> References: <20191012030720.27127-1-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-TM-SNTS-SMTP: 4D629611DAE2BCB5C0460DDC94222343CB9BBCE98EE75388431498F7F4C6D03C2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boe,tv101wum-n53's connector is same as boe,tv101wum-nl6. The most codes can be reuse. So boe,tv101wum-n53 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 | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index e6457f87bc61..7b47619675f5 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -624,6 +624,34 @@ static const struct panel_desc auo_kd101n80_45na_desc = { .discharge_on_disable = true, }; +static const struct drm_display_mode boe_tv101wum_n53_default_mode = { + .clock = 159833, + .hdisplay = 1200, + .hsync_start = 1200 + 114, + .hsync_end = 1200 + 114 + 10, + .htotal = 1200 + 114 + 10 + 40, + .vdisplay = 1920, + .vsync_start = 1920 + 19, + .vsync_end = 1920 + 19 + 4, + .vtotal = 1920 + 19 + 4 + 10, + .vrefresh = 60, + .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, +}; + +static const struct panel_desc boe_tv101wum_n53_desc = { + .modes = &boe_tv101wum_n53_default_mode, + .bpc = 8, + .size = { + .width_mm = 135, + .height_mm = 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 = boe_init_cmd, +}; + static int boe_panel_get_modes(struct drm_panel *panel) { struct boe_panel *boe = to_boe_panel(panel); @@ -751,6 +779,9 @@ static const struct of_device_id boe_of_match[] = { { .compatible = "auo,kd101n80-45na", .data = &auo_kd101n80_45na_desc }, + { .compatible = "boe,tv101wum-n53", + .data = &boe_tv101wum_n53_desc + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, boe_of_match); -- 2.21.0