All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tanmay Shah <tanmay@codeaurora.org>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, robdclark@gmail.com
Cc: swboyd@chromium.org, linux-arm-msm@vger.kernel.org,
	seanpaul@chromium.org, daniel@ffwll.ch, airlied@linux.ie,
	aravindh@codeaurora.org, abhinavk@codeaurora.org,
	khsieh@codeaurora.org, Chandan Uddaraju <chandanu@codeaurora.org>,
	Vara Reddy <varar@codeaurora.org>,
	Tanmay Shah <tanmay@codeaurora.org>,
	Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH v11 1/5] drm: add constant N value in helper file
Date: Mon, 17 Aug 2020 22:11:33 -0700	[thread overview]
Message-ID: <20200818051137.21478-2-tanmay@codeaurora.org> (raw)
In-Reply-To: <20200818051137.21478-1-tanmay@codeaurora.org>

From: Chandan Uddaraju <chandanu@codeaurora.org>

The constant N value (0x8000) is used by i915 DP
driver. Define this value in dp helper header file
to use in multiple Display Port drivers. Change
i915 driver accordingly.

Change in v6: Change commit message

Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Vara Reddy <varar@codeaurora.org>
Signed-off-by: Tanmay Shah <tanmay@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 include/drm/drm_dp_helper.h                  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 729ec6e0d43a..10b8310f290b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8114,7 +8114,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 e47dc22ebf50..a31d7aebb8b8 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1134,6 +1134,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
 #define DP_LINK_STATUS_SIZE	   6
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


WARNING: multiple messages have this Message-ID (diff)
From: Tanmay Shah <tanmay@codeaurora.org>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, robdclark@gmail.com
Cc: airlied@linux.ie, linux-arm-msm@vger.kernel.org,
	abhinavk@codeaurora.org, swboyd@chromium.org,
	khsieh@codeaurora.org, Jani Nikula <jani.nikula@intel.com>,
	seanpaul@chromium.org, Tanmay Shah <tanmay@codeaurora.org>,
	Vara Reddy <varar@codeaurora.org>,
	aravindh@codeaurora.org,
	Chandan Uddaraju <chandanu@codeaurora.org>
Subject: [PATCH v11 1/5] drm: add constant N value in helper file
Date: Mon, 17 Aug 2020 22:11:33 -0700	[thread overview]
Message-ID: <20200818051137.21478-2-tanmay@codeaurora.org> (raw)
In-Reply-To: <20200818051137.21478-1-tanmay@codeaurora.org>

From: Chandan Uddaraju <chandanu@codeaurora.org>

The constant N value (0x8000) is used by i915 DP
driver. Define this value in dp helper header file
to use in multiple Display Port drivers. Change
i915 driver accordingly.

Change in v6: Change commit message

Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Vara Reddy <varar@codeaurora.org>
Signed-off-by: Tanmay Shah <tanmay@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 2 +-
 include/drm/drm_dp_helper.h                  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 729ec6e0d43a..10b8310f290b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -8114,7 +8114,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 e47dc22ebf50..a31d7aebb8b8 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1134,6 +1134,7 @@
 #define DP_MST_PHYSICAL_PORT_0 0
 #define DP_MST_LOGICAL_PORT_0 8
 
+#define DP_LINK_CONSTANT_N_VALUE 0x8000
 #define DP_LINK_STATUS_SIZE	   6
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
 			  int lane_count);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-08-18  5:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  5:11 [PATCH v11 0/5] Add support for DisplayPort driver on SnapDragon Tanmay Shah
2020-08-18  5:11 ` Tanmay Shah
2020-08-18  5:11 ` Tanmay Shah [this message]
2020-08-18  5:11   ` [PATCH v11 1/5] drm: add constant N value in helper file Tanmay Shah
2020-08-18  5:11 ` [PATCH v11 2/5] drm/msm/dp: add displayPort driver support Tanmay Shah
2020-08-18  5:11   ` Tanmay Shah
2020-08-18  5:11 ` [PATCH v11 3/5] drm/msm/dp: add support for DP PLL driver Tanmay Shah
2020-08-18  5:11   ` Tanmay Shah
2020-08-18  5:11 ` [PATCH v11 4/5] drm/msm/dpu: add display port support in DPU Tanmay Shah
2020-08-18  5:11   ` Tanmay Shah
2020-08-18  5:11 ` [PATCH v11 5/5] drm/msm/dp: Add Display Port HPD feature Tanmay Shah
2020-08-18  5:11   ` Tanmay Shah

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=20200818051137.21478-2-tanmay@codeaurora.org \
    --to=tanmay@codeaurora.org \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=aravindh@codeaurora.org \
    --cc=chandanu@codeaurora.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=khsieh@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.