Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5129622ybl; Tue, 10 Dec 2019 00:39:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxgEMWxKSkECuHfY+SdoIzVDjo6RB+4FABDXcip5EH2KwLkfGbpXJgTWZr414Xjvyh7JtWy X-Received: by 2002:a05:6808:24e:: with SMTP id m14mr3014696oie.168.1575967171224; Tue, 10 Dec 2019 00:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575967171; cv=none; d=google.com; s=arc-20160816; b=XHe8DXCCIrzfRr7vu+FtsXAClRUHAzNd2R2hzdSPtmGDE7A9hircEKCXIZbc+a/MVP 3u6f+V6uLokbMVrErPe1tYVblmyayRdR3UagxYF5U7zyE2CAFr/kqPURC98eSuELLWUe ebccJzEnaH1u6NVQxebleKMYdZJXf23g5EayK9Y6FFE5yZ3GfdcIVNCcOrz6IWWBadhs maGto8w4zyyf52GEGIXzmUuPp6JWstv8UIL7XrIIbU83DKhoDOyhYmCFT7OxBLSZJaso kA1ISjAmAUos+Wg3YwV1Rr+QUhdIGKJX8oK/fHMNEDlwEeeGT60XHQgTpGwwCbnYZuia hImA== 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 :dkim-signature; bh=2YOvetV4MVRRWPou2An5hVJNwBVfKLVagoiSqtpV5io=; b=HCLE3dHIVSYfIbBnb3zO9NeDLLEyD0PZ58nEjivXypMMbI3vLtK385bWEbIzC3LLgZ WPovxaJzRJXTOBDnxv6B+Uv64royfUeR5YDaDD5v3tI9t/XML81k4uayerTMpwv60Di+ N8uDF5FnGel4ihALxWTdUkFRBmpyI7s8Yj2GTnTZve5FfXlnHnTCHx6xVpOsRSl+dkQN 7Sgzh+qmn6yoVjuMmzc4BCVaju/Ny8tkG5K5fc946E3QvHkXXToHINsLeNR8eMqHfpWY 9IYIhxIgUxByRTFC9qkHwKEp0YB8jVu7+8bUCDVUQz3+XjUVNj6z66BTgriAZ4S+Wkk3 4Ffg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lI7EB+RN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si1535168otq.250.2019.12.10.00.39.18; Tue, 10 Dec 2019 00:39:31 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=lI7EB+RN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbfLJIhX (ORCPT + 99 others); Tue, 10 Dec 2019 03:37:23 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40236 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfLJIhV (ORCPT ); Tue, 10 Dec 2019 03:37:21 -0500 Received: by mail-pg1-f196.google.com with SMTP id k25so8541641pgt.7 for ; Tue, 10 Dec 2019 00:37:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2YOvetV4MVRRWPou2An5hVJNwBVfKLVagoiSqtpV5io=; b=lI7EB+RNXO2IOAaBP8QoxppbUYFi64K6owYRv+tg2UUiwIHPW5/xeQov8v2Wgeyou1 XOQmtySV1DmVOmya4O3i/VN0IbkVt1axGw02ocTBXjAbiiqo5UQ7e0o5tMfZ1UdS+f9W vtR3SlhJhAw8MeD9jA+zBDqia0JaeNILol5rjIruBWt1NL1BXHsDugi6AFCQflS5PLFy 6wn5tXmPhmsMmQct9bPxJ9pQsXbxESplbAOoCSGY2Ac3RVpMnLJrrEcLAxCsghVdZkFC idkTcZj36eVEtZm57o57N0bQ4KOjbCSeynaZx8QDJmKUFYbsZPYfTt8kAGTQwXRMCnV0 8vAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2YOvetV4MVRRWPou2An5hVJNwBVfKLVagoiSqtpV5io=; b=Ll6+a+RSykPAX63KqkFVBp3Wnrvj+/SJYR1l/onrmhjy6M78w/Q98JLjTYXlVVkpoC 71wVxuMojXk8ueCYZD0vChgpc+Q4bjd9xwpjmWvcwpShuTRhE9CTJ/h10011OWInuQSM rIezc1jL59YVKOwvhbI9wN4h9HLGW2RItcs6pys/YnSdDZyT7kJyoTxbHNUdrs5wY7Mw FasmP410O8fhMkaYSd8l/eiJv+8b1YoFwdL5wn02sXAM/HuoSZIZKqG3TSe/99B8suVr 0pJZcplPo1GtfUsQphSHlUGHSLtFe7t96tAH1VejruFDgbj9QFZdLWUMJPMXF38dcz4m a7rg== X-Gm-Message-State: APjAAAXxph8m5G2uWFxAxmkewT0SQehutWPFVn1Djh0FfVUBD++zPKkT aw62jI8NKp698wCWxA97Kf8= X-Received: by 2002:a63:1b54:: with SMTP id b20mr23239679pgm.312.1575967039849; Tue, 10 Dec 2019 00:37:19 -0800 (PST) Received: from nj08008nbu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id y128sm2246632pfg.17.2019.12.10.00.37.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Dec 2019 00:37:19 -0800 (PST) From: Kevin Tang To: airlied@linux.ie, daniel@ffwll.ch, kevin3.tang@gmail.com Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH RFC 8/8] drm/sprd: add Unisoc's drm generic mipi panel driver Date: Tue, 10 Dec 2019 16:36:35 +0800 Message-Id: <1575966995-13757-9-git-send-email-kevin3.tang@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1575966995-13757-1-git-send-email-kevin3.tang@gmail.com> References: <1575966995-13757-1-git-send-email-kevin3.tang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Tang This is a generic mipi dsi panel driver, All the parameters related to lcd panel, we are placed in the DTS to configure, for example,lcd display timing, dpi parameter and more. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Signed-off-by: Kevin Tang --- drivers/gpu/drm/sprd/Makefile | 3 +- drivers/gpu/drm/sprd/sprd_panel.c | 778 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sprd/sprd_panel.h | 114 ++++++ 3 files changed, 894 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sprd/sprd_panel.c create mode 100644 drivers/gpu/drm/sprd/sprd_panel.h diff --git a/drivers/gpu/drm/sprd/Makefile b/drivers/gpu/drm/sprd/Makefile index 78d3ddb..30a581c 100644 --- a/drivers/gpu/drm/sprd/Makefile +++ b/drivers/gpu/drm/sprd/Makefile @@ -8,7 +8,8 @@ obj-y := sprd_drm.o \ sprd_gem.o \ sprd_dpu.o \ sprd_dsi.o \ - sprd_dphy.o + sprd_dphy.o \ + sprd_panel.o obj-y += disp_lib.o obj-y += dpu/ diff --git a/drivers/gpu/drm/sprd/sprd_panel.c b/drivers/gpu/drm/sprd/sprd_panel.c new file mode 100644 index 0000000..4a70a20 --- /dev/null +++ b/drivers/gpu/drm/sprd/sprd_panel.c @@ -0,0 +1,778 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 Unisoc Inc. + */ + +#include +#include +#include +#include +#include +#include +#include