From: Tanmay Shah <tanmay@codeaurora.org>
To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, seanpaul@chromium.org,
swboyd@chromium.org
Cc: Chandan Uddaraju <chandanu@codeaurora.org>,
robdclark@gmail.com, abhinavk@codeaurora.org,
nganji@codeaurora.org, jsanka@codeaurora.org,
aravindh@codeaurora.org, hoegsberg@google.com,
dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org,
Vara Reddy <varar@codeaurora.org>
Subject: [DPU PATCH v5 2/5] drm: add constant N value in helper file
Date: Tue, 31 Mar 2020 17:30:28 -0700 [thread overview]
Message-ID: <1585701031-28871-3-git-send-email-tanmay@codeaurora.org> (raw)
In-Reply-To: <1585701031-28871-1-git-send-email-tanmay@codeaurora.org>
From: Chandan Uddaraju <chandanu@codeaurora.org>
The constant N value (0x8000) is used by multiple DP
drivers. Define this value in header file and use this
in the existing i915 display driver.
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Vara Reddy <varar@codeaurora.org>
---
drivers/gpu/drm/i915/display/intel_display.c | 2 +-
include/drm/drm_dp_helper.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index effc425..3c016f3 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7618,7 +7618,7 @@ static void compute_m_n(unsigned int m, unsigned int n,
* which the devices expect also in synchronous clock mode.
*/
if (constant_n)
- *ret_n = 0x8000;
+ *ret_n = DP_LINK_CONSTANT_N_VALUE;
else
*ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 51ecb51..b509e74 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1455,6 +1455,8 @@ static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux,
int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
u8 status[DP_LINK_STATUS_SIZE]);
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
+
int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
const u8 port_cap[4]);
int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE],
--
1.9.1
next prev parent reply other threads:[~2020-04-01 0:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 0:30 [DPU PATCH v5 0/5] Add support for DisplayPort driver on SnapDragon Tanmay Shah
2020-04-01 0:30 ` [DPU PATCH v5 1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon Tanmay Shah
2020-04-01 5:49 ` Sam Ravnborg
2020-04-07 4:23 ` tanmay
[not found] ` <0c151ac7b2a7e0c9b21452c8bde3e21d@codeaurora.org>
2020-06-09 0:13 ` tanmay
2020-04-23 23:41 ` Stephen Boyd
2020-06-09 0:15 ` tanmay
2020-04-01 0:30 ` Tanmay Shah [this message]
2020-04-23 23:41 ` [DPU PATCH v5 2/5] drm: add constant N value in helper file Stephen Boyd
2020-06-09 0:15 ` tanmay
2020-04-01 0:30 ` [DPU PATCH v5 3/5] drm/msm/dp: add displayPort driver support Tanmay Shah
2020-04-01 0:30 ` [DPU PATCH v5 4/5] drm/msm/dp: add support for DP PLL driver Tanmay Shah
2020-04-24 0:26 ` Stephen Boyd
2020-06-09 0:16 ` [Freedreno] " tanmay
2020-04-01 0:30 ` [DPU PATCH v5 5/5] drm/msm/dpu: add display port support in DPU Tanmay Shah
2020-04-24 17:13 ` [DPU PATCH v5 0/5] Add support for DisplayPort driver on SnapDragon Sean Paul
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=1585701031-28871-3-git-send-email-tanmay@codeaurora.org \
--to=tanmay@codeaurora.org \
--cc=abhinavk@codeaurora.org \
--cc=aravindh@codeaurora.org \
--cc=chandanu@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=hoegsberg@google.com \
--cc=jsanka@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=nganji@codeaurora.org \
--cc=robdclark@gmail.com \
--cc=seanpaul@chromium.org \
--cc=swboyd@chromium.org \
--cc=varar@codeaurora.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;
as well as URLs for NNTP newsgroup(s).