linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konradybcio@gmail.com>
To: konradybcio@gmail.com
Cc: martin.botka1@gmail.com, Rob Clark <robdclark@gmail.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Felipe Balbi <balbi@kernel.org>,
	Jordan Crouse <jcrouse@codeaurora.org>,
	zhengbin <zhengbin13@huawei.com>,
	Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
	AngeloGioacchino Del Regno <kholk11@gmail.com>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Krzysztof Wilczynski <kw@linux.com>,
	Harigovindan P <harigovi@codeaurora.org>,
	Brian Masney <masneyb@onstation.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Xiaozhe Shi <xiaozhes@codeaurora.org>,
	Manu Gautam <mgautam@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: [PATCH 7/9] drm/msm/mdp5: Add MDP5 configuration for SDM636/660
Date: Sun, 26 Jul 2020 13:12:04 +0200	[thread overview]
Message-ID: <20200726111215.22361-8-konradybcio@gmail.com> (raw)
In-Reply-To: <20200726111215.22361-1-konradybcio@gmail.com>

This commit adds support for the MDP5 IP on Snapdragon
636/660.

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 105 +++++++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
index 2e02de8a7e41..df10c1ac7591 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
@@ -1002,6 +1002,110 @@ static const struct mdp5_cfg_hw sdm630_config = {
 	.max_clk = 412500000,
 };
 
+static const struct mdp5_cfg_hw sdm660_config = {
+	.name = "sdm660",
+	.mdp = {
+		.count = 1,
+		.caps = MDP_CAP_DSC |
+			MDP_CAP_CDM |
+			MDP_CAP_SRC_SPLIT |
+			0,
+	},
+	.ctl = {
+		.count = 5,
+		.base = { 0x01000, 0x01200, 0x01400, 0x01600, 0x01800 },
+		.flush_hw_mask = 0xf4ffffff,
+	},
+	.pipe_vig = {
+		.count = 2,
+		.base = { 0x04000, 0x6000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SCALE	|
+			MDP_PIPE_CAP_CSC	|
+			MDP_PIPE_CAP_DECIMATION	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_rgb = {
+		.count = 4,
+		.base = { 0x14000, 0x16000, 0x18000, 0x1a000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SCALE	|
+			MDP_PIPE_CAP_DECIMATION	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_dma = {
+		.count = 2, /* driver supports max of 2 currently */
+		.base = { 0x24000, 0x26000, 0x28000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_cursor = {
+		.count = 1,
+		.base = { 0x34000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			MDP_PIPE_CAP_CURSOR	|
+			0,
+	},
+
+	.lm = {
+		.count = 4,
+		.base = { 0x44000, 0x45000, 0x46000, 0x49000 },
+		.instances = {
+				{ .id = 0, .pp = 0, .dspp = 0,
+				  .caps = MDP_LM_CAP_DISPLAY |
+					  MDP_LM_CAP_PAIR, },
+				{ .id = 1, .pp = 1, .dspp = 1,
+				  .caps = MDP_LM_CAP_DISPLAY, },
+				{ .id = 2, .pp = 2, .dspp = -1,
+				  .caps = MDP_LM_CAP_DISPLAY |
+					  MDP_LM_CAP_PAIR, },
+				{ .id = 3, .pp = 3, .dspp = -1,
+				  .caps = MDP_LM_CAP_WB, },
+				},
+		.nb_stages = 8,
+		.max_width = 2560,
+		.max_height = 0xFFFF,
+	},
+	.dspp = {
+		.count = 2,
+		.base = { 0x54000, 0x56000 },
+	},
+	.ad = {
+		.count = 2,
+		.base = { 0x78000, 0x78800 },
+	},
+	.pp = {
+		.count = 5,
+		.base = { 0x70000, 0x70800, 0x71000, 0x71800, 0x72000 },
+	},
+	.cdm = {
+		.count = 1,
+		.base = { 0x79200 },
+	},
+	.dsc = {
+		.count = 2,
+		.base = { 0x80000, 0x80400 },
+	},
+	.intf = {
+		.base = { 0x6a000, 0x6a800, 0x6b000, 0x6b800 },
+		.connect = {
+			[0] = INTF_DISABLED,
+			[1] = INTF_DSI,
+			[2] = INTF_DSI,
+			[3] = INTF_HDMI,
+		},
+	},
+	.max_clk = 412500000,
+};
+
 static const struct mdp5_cfg_handler cfg_handlers_v1[] = {
 	{ .revision = 0, .config = { .hw = &msm8x74v1_config } },
 	{ .revision = 2, .config = { .hw = &msm8x74v2_config } },
@@ -1016,6 +1120,7 @@ static const struct mdp5_cfg_handler cfg_handlers_v1[] = {
 
 static const struct mdp5_cfg_handler cfg_handlers_v3[] = {
 	{ .revision = 0, .config = { .hw = &msm8998_config } },
+	{ .revision = 2, .config = { .hw = &sdm660_config } },
 	{ .revision = 3, .config = { .hw = &sdm630_config } },
 };
 
-- 
2.27.0


  parent reply	other threads:[~2020-07-26 11:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26 11:11 [PATCH 0/9] SDM630/36/60 driver enablement Konrad Dybcio
2020-07-26 11:11 ` [PATCH 1/9] clk: qcom: gcc-sdm660: Add missing modem reset Konrad Dybcio
     [not found]   ` <159587899589.1360974.4403082749390843157@swboyd.mtv.corp.google.com>
2020-07-27 19:58     ` Konrad Dybcio
2020-07-26 11:11 ` [PATCH 2/9] phy: qcom-qusb2: Add support for SDM630/660 Konrad Dybcio
2020-07-31 20:26   ` Rob Herring
2020-07-26 11:12 ` [PATCH 3/9] drivers: usb: dwc3-qcom: Add sdm660 compatible Konrad Dybcio
2020-07-31 20:26   ` Rob Herring
2020-07-26 11:12 ` [PATCH 4/9] drm/msm/dsi: Add phy configuration for SDM630/636/660 Konrad Dybcio
2020-08-03 11:00   ` Vinod Koul
2020-08-03 16:06     ` Rob Clark
2020-08-04 12:09       ` Vinod Koul
2020-08-04 14:49         ` Rob Clark
2020-07-26 11:12 ` [PATCH 5/9] drm/msm/mdp5: Add MDP5 configuration for SDM630 Konrad Dybcio
2020-07-26 11:12 ` [PATCH 6/9] drm/msm/dsi: Add DSI configuration for SDM660 Konrad Dybcio
2020-07-26 11:12 ` Konrad Dybcio [this message]
2020-07-26 11:12 ` [PATCH 8/9] clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk Konrad Dybcio
     [not found]   ` <159587887102.1360974.16083886481437183810@swboyd.mtv.corp.google.com>
2020-07-27 19:58     ` Konrad Dybcio
2020-07-26 11:12 ` [PATCH 9/9] soc/qcom: Add REVID driver Konrad Dybcio
2020-07-26 11:29   ` Greg Kroah-Hartman
2020-07-26 11:40     ` Konrad Dybcio
2020-07-26 12:04       ` Greg Kroah-Hartman
2020-07-27 18:13   ` Rob Herring
2020-07-27 18:13   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200726111215.22361-8-konradybcio@gmail.com \
    --to=konradybcio@gmail.com \
    --cc=agross@kernel.org \
    --cc=airlied@linux.ie \
    --cc=balbi@kernel.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=harigovi@codeaurora.org \
    --cc=jcrouse@codeaurora.org \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=kholk11@gmail.com \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.botka1@gmail.com \
    --cc=masneyb@onstation.org \
    --cc=mgautam@codeaurora.org \
    --cc=mturquette@baylibre.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=sboyd@kernel.org \
    --cc=sean@poorly.run \
    --cc=vkoul@kernel.org \
    --cc=xiaozhes@codeaurora.org \
    --cc=zhengbin13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).