From: Thierry Reding <thierry.reding@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Subject: [PATCH 12/14] drm/tegra: dsi: Make FIFO depths host parameters
Date: Mon, 13 Oct 2014 12:21:53 +0200 [thread overview]
Message-ID: <1413195715-4719-12-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1413195715-4719-1-git-send-email-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Rather than hardcoding them as macros, make the host and video FIFO
depths parameters so that they can be more easily adjusted if a new
generation of the Tegra SoC changes them.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/tegra/dsi.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index f7874458926a..584b771d8b2f 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -26,9 +26,6 @@
#include "dsi.h"
#include "mipi-phy.h"
-#define DSI_VIDEO_FIFO_DEPTH (1920 / 4)
-#define DSI_HOST_FIFO_DEPTH 64
-
struct tegra_dsi {
struct host1x_client client;
struct tegra_output output;
@@ -54,6 +51,9 @@ struct tegra_dsi {
struct regulator *vdd;
bool enabled;
+
+ unsigned int video_fifo_depth;
+ unsigned int host_fifo_depth;
};
static inline struct tegra_dsi *
@@ -467,7 +467,7 @@ static int tegra_output_dsi_enable(struct tegra_output *output)
DSI_CONTROL_SOURCE(dc->pipe);
tegra_dsi_writel(dsi, value, DSI_CONTROL);
- tegra_dsi_writel(dsi, DSI_VIDEO_FIFO_DEPTH, DSI_MAX_THRESHOLD);
+ tegra_dsi_writel(dsi, dsi->video_fifo_depth, DSI_MAX_THRESHOLD);
value = DSI_HOST_CONTROL_HS | DSI_HOST_CONTROL_CS |
DSI_HOST_CONTROL_ECC;
@@ -843,6 +843,8 @@ static int tegra_dsi_probe(struct platform_device *pdev)
return -ENOMEM;
dsi->output.dev = dsi->dev = &pdev->dev;
+ dsi->video_fifo_depth = 1920;
+ dsi->host_fifo_depth = 64;
err = tegra_output_probe(&dsi->output);
if (err < 0)
--
2.1.2
next prev parent reply other threads:[~2014-10-13 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 10:21 [PATCH 01/14] gpu: host1x: Use struct host1x_bo pointers in traces Thierry Reding
2014-10-13 10:21 ` [PATCH 03/14] gpu: host1x: Fix typo in comment Thierry Reding
2014-10-13 10:21 ` [PATCH 04/14] gpu: host1x: Print address/offset pairs consistently Thierry Reding
2014-10-13 10:21 ` [PATCH 05/14] gpu: host1x: Make gather offsets unsigned Thierry Reding
2014-10-13 10:21 ` [PATCH 07/14] gpu: host1x: mipi: Preserve the contents of MIPI_CAL_CTRL Thierry Reding
2014-10-13 10:21 ` [PATCH 08/14] gpu: host1x: mipi: Calibrate clock lanes Thierry Reding
2014-10-13 10:21 ` [PATCH 09/14] gpu: host1x: mipi: Set MIPI_CAL_BIAS_PAD_CFG1 register Thierry Reding
2014-10-13 10:21 ` [PATCH 10/14] drm/tegra: dc: Add powergate support Thierry Reding
[not found] ` <1413195715-4719-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-13 10:21 ` [PATCH 02/14] gpu: host1x: Make mapped field of push buffers void * Thierry Reding
2014-10-13 10:21 ` [PATCH 06/14] gpu: host1x: mipi: Registers are 32 bits wide Thierry Reding
2014-10-13 10:21 ` [PATCH 11/14] drm/tegra: Do not enable output on .mode_set() Thierry Reding
2014-10-13 10:21 ` Thierry Reding [this message]
2014-10-13 10:21 ` [PATCH 13/14] drm/tegra: dsi: Add ganged mode support Thierry Reding
[not found] ` <1413195715-4719-13-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-14 14:51 ` Sean Paul
2014-10-13 10:21 ` [PATCH 14/14] drm/tegra: dsi: Set up PHY_TIMING & BTA_TIMING registers earlier Thierry Reding
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=1413195715-4719-12-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-tegra@vger.kernel.org \
/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