All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays
@ 2019-10-10 14:51 Ville Syrjala
  2019-10-10 14:51 ` [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Ville Syrjala @ 2019-10-10 14:51 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Make the ways/sets arrays static cosnt u8 to shrink things a bit.

    text	   data	    bss	    dec	    hex	filename
-  23935	    629	    128	  24692	   6074	i915_drv.o
+  23818	    629	    128	  24575	   5fff	i915_drv.o

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index f02a34722217..0b8c13ae4857 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1073,8 +1073,8 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
 
 static u32 gen9_edram_size_mb(struct drm_i915_private *dev_priv, u32 cap)
 {
-	const unsigned int ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
-	const unsigned int sets[4] = { 1, 1, 2, 2 };
+	static const u8 ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
+	static const u8 sets[4] = { 1, 1, 2, 2 };
 
 	return EDRAM_NUM_BANKS(cap) *
 		ways[EDRAM_WAYS_IDX(cap)] *
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
@ 2019-10-10 14:51 ` Ville Syrjala
  2019-10-17  6:55   ` Ramalingam C
  2019-10-10 14:51 ` [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[] Ville Syrjala
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjala @ 2019-10-10 14:51 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The array is there only for timeout, "data" doesn't mean anything
so let's rename the thing to be more descriptive.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 0a6846c5ba95..13c588ae88a4 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1527,13 +1527,13 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
 	return true;
 }
 
-struct hdcp2_hdmi_msg_data {
+struct hdcp2_hdmi_msg_timeout {
 	u8 msg_id;
 	u32 timeout;
 	u32 timeout2;
 };
 
-static const struct hdcp2_hdmi_msg_data hdcp2_msg_data[] = {
+static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
 	{ HDCP_2_2_AKE_INIT, 0, 0 },
 	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
 	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
@@ -1564,12 +1564,12 @@ static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
-		if (hdcp2_msg_data[i].msg_id == msg_id &&
+	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
+		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
 		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
-			return hdcp2_msg_data[i].timeout;
-		else if (hdcp2_msg_data[i].msg_id == msg_id)
-			return hdcp2_msg_data[i].timeout2;
+			return hdcp2_msg_timeout[i].timeout;
+		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
+			return hdcp2_msg_timeout[i].timeout2;
 
 	return -EINVAL;
 }
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[]
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
  2019-10-10 14:51 ` [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ Ville Syrjala
@ 2019-10-10 14:51 ` Ville Syrjala
  2019-10-17  7:02   ` Ramalingam C
  2019-10-10 14:51 ` [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2 Ville Syrjala
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjala @ 2019-10-10 14:51 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The .read_2_2() hooks is never called for any of the message
types with a zero timeout. So it's all just dead weight which
we can chuck.

    text	   data	    bss	    dec	    hex	filename
-  34701	    360	      0	  35061	   88f5	intel_hdmi.o
+  34633	    360	      0	  34993	   88b1	intel_hdmi.o

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 13c588ae88a4..8a574be86bc6 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1534,19 +1534,12 @@ struct hdcp2_hdmi_msg_timeout {
 };
 
 static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
-	{ HDCP_2_2_AKE_INIT, 0, 0 },
 	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
-	{ HDCP_2_2_AKE_STORED_KM, 0, 0 },
 	{ HDCP_2_2_AKE_SEND_HPRIME, HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS,
 	  HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS },
 	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_LC_INIT, 0, 0 },
 	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_SKE_SEND_EKS, 0, 0 },
 	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_REP_SEND_ACK, 0, 0 },
-	{ HDCP_2_2_REP_STREAM_MANAGE, 0, 0 },
 	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, 0 },
 };
 
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
  2019-10-10 14:51 ` [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ Ville Syrjala
  2019-10-10 14:51 ` [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[] Ville Syrjala
@ 2019-10-10 14:51 ` Ville Syrjala
  2019-10-17  7:05   ` Ramalingam C
  2019-10-10 14:51 ` [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16 Ville Syrjala
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjala @ 2019-10-10 14:51 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The only reason for the timeout2 value in the array is the
HDCP_2_2_AKE_SEND_HPRIME message. But that one still needs
special casing inside the loop, and so just ends up making
the code harder to read. Let's just remove this leaky
timeout2 abstraction and special case that one command
in a way that is easy to understand. We can then remove the
timeout2 member from struct entirely.

    text	   data	    bss	    dec	    hex	filename
-  34633	    360	      0	  34993	   88b1	intel_hdmi.o
+  34521	    360	      0	  34881	   8841	intel_hdmi.o

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 28 ++++++++++++-----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 8a574be86bc6..2dd798d8b961 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1530,17 +1530,14 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
 struct hdcp2_hdmi_msg_timeout {
 	u8 msg_id;
 	u32 timeout;
-	u32 timeout2;
 };
 
 static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
-	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_AKE_SEND_HPRIME, HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS,
-	  HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS },
-	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, 0 },
-	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, 0 },
+	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, },
+	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, },
+	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, },
+	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, },
+	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, },
 };
 
 static
@@ -1557,12 +1554,17 @@ static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
-		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
-		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
+	if (msg_id == HDCP_2_2_AKE_SEND_HPRIME) {
+		if (is_paired)
+			return HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS;
+		else
+			return HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS;
+	}
+
+	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++) {
+		if (hdcp2_msg_timeout[i].msg_id == msg_id)
 			return hdcp2_msg_timeout[i].timeout;
-		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
-			return hdcp2_msg_timeout[i].timeout2;
+	}
 
 	return -EINVAL;
 }
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-10-10 14:51 ` [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2 Ville Syrjala
@ 2019-10-10 14:51 ` Ville Syrjala
  2019-10-17  7:08   ` Ramalingam C
  2019-10-10 16:57 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: Shrink eDRAM ways/sets arrays Patchwork
  2019-10-17  7:58 ` [PATCH 1/5] " Ramalingam C
  5 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjala @ 2019-10-10 14:51 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

All the timeout values fit in u16, so let's shrink the structure
a bit.

This ends up actually increasing the .text size a bit due to
some changes in instructions (constant imul+small jmps replaced
with mov+bigger jmpqs). Seems pretty arbitrary to me so I'll
just pretend I didn't see it.

    text	   data	    bss	    dec	    hex	filename
-  34521	    360	      0	  34881	   8841	intel_hdmi.o
+  34537	    360	      0	  34897	   8851	intel_hdmi.o

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 2dd798d8b961..5e97df38d281 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1529,7 +1529,7 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
 
 struct hdcp2_hdmi_msg_timeout {
 	u8 msg_id;
-	u32 timeout;
+	u16 timeout;
 };
 
 static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: Shrink eDRAM ways/sets arrays
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
                   ` (3 preceding siblings ...)
  2019-10-10 14:51 ` [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16 Ville Syrjala
@ 2019-10-10 16:57 ` Patchwork
  2019-10-17  7:58 ` [PATCH 1/5] " Ramalingam C
  5 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2019-10-10 16:57 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/5] drm/i915: Shrink eDRAM ways/sets arrays
URL   : https://patchwork.freedesktop.org/series/67853/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7056 -> Patchwork_14752
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_14752 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14752, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14752:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live_hangcheck:
    - fi-hsw-4770r:       [PASS][1] -> [DMESG-FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html

  
Known issues
------------

  Here are the changes found in Patchwork_14752 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-bxt-dsi:         [PASS][3] -> [INCOMPLETE][4] ([fdo#103927])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [PASS][5] -> [INCOMPLETE][6] ([fdo#107718])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_mmap_gtt@basic-write-read-distinct:
    - fi-icl-u3:          [PASS][7] -> [DMESG-WARN][8] ([fdo#107724]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-icl-u3/igt@gem_mmap_gtt@basic-write-read-distinct.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-icl-u3/igt@gem_mmap_gtt@basic-write-read-distinct.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload-with-fault-injection:
    - {fi-icl-dsi}:       [INCOMPLETE][9] ([fdo#107713]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-icl-dsi/igt@i915_module_load@reload-with-fault-injection.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-icl-dsi/igt@i915_module_load@reload-with-fault-injection.html

  * igt@i915_selftest@live_execlists:
    - {fi-icl-guc}:       [INCOMPLETE][11] ([fdo#107713]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-icl-guc/igt@i915_selftest@live_execlists.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-icl-guc/igt@i915_selftest@live_execlists.html

  * igt@kms_addfb_basic@unused-modifier:
    - fi-icl-u3:          [DMESG-WARN][13] ([fdo#107724]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7056/fi-icl-u3/igt@kms_addfb_basic@unused-modifier.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/fi-icl-u3/igt@kms_addfb_basic@unused-modifier.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735


Participating hosts (54 -> 47)
------------------------------

  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7056 -> Patchwork_14752

  CI-20190529: 20190529
  CI_DRM_7056: 589ed9c309ff4c26532bbc7ac6dcce9514bbd1e9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5220: 1e38e32d721210a780198c8293a6b8c8e881df68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14752: 770d7f9be1dc476e8774a91addc34b7099ff1772 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

770d7f9be1dc drm/i915: Make hdcp2_msg_timeout.timeout u16
24c9ff1cca7e drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2
7e072255546e drm/i915: Remove dead weight from hdcp2_msg_timeout[]
d958cb47d4ac drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/
64800ed28892 drm/i915: Shrink eDRAM ways/sets arrays

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14752/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/
  2019-10-10 14:51 ` [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ Ville Syrjala
@ 2019-10-17  6:55   ` Ramalingam C
  0 siblings, 0 replies; 13+ messages in thread
From: Ramalingam C @ 2019-10-17  6:55 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On 2019-10-10 at 17:51:24 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The array is there only for timeout, "data" doesn't mean anything
> so let's rename the thing to be more descriptive.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 0a6846c5ba95..13c588ae88a4 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1527,13 +1527,13 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>  	return true;
>  }
>  
> -struct hdcp2_hdmi_msg_data {
> +struct hdcp2_hdmi_msg_timeout {
>  	u8 msg_id;
>  	u32 timeout;
>  	u32 timeout2;
>  };
>  
> -static const struct hdcp2_hdmi_msg_data hdcp2_msg_data[] = {
> +static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
>  	{ HDCP_2_2_AKE_INIT, 0, 0 },
>  	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
>  	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
> @@ -1564,12 +1564,12 @@ static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_data); i++)
> -		if (hdcp2_msg_data[i].msg_id == msg_id &&
> +	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
> +		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
>  		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
> -			return hdcp2_msg_data[i].timeout;
> -		else if (hdcp2_msg_data[i].msg_id == msg_id)
> -			return hdcp2_msg_data[i].timeout2;
> +			return hdcp2_msg_timeout[i].timeout;
> +		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
> +			return hdcp2_msg_timeout[i].timeout2;
>  
>  	return -EINVAL;
>  }
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[]
  2019-10-10 14:51 ` [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[] Ville Syrjala
@ 2019-10-17  7:02   ` Ramalingam C
  0 siblings, 0 replies; 13+ messages in thread
From: Ramalingam C @ 2019-10-17  7:02 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On 2019-10-10 at 17:51:25 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The .read_2_2() hooks is never called for any of the message
> types with a zero timeout. So it's all just dead weight which
> we can chuck.
> 
>     text	   data	    bss	    dec	    hex	filename
> -  34701	    360	      0	  35061	   88f5	intel_hdmi.o
> +  34633	    360	      0	  34993	   88b1	intel_hdmi.o
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Timeout is added for supporting msgs read. These msgs with 0 timeout
are only written. Hence can be removed from the timeout table.

Reviwed-by: Ramalingam C < ramalingam.c@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 13c588ae88a4..8a574be86bc6 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1534,19 +1534,12 @@ struct hdcp2_hdmi_msg_timeout {
>  };
>  
>  static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
> -	{ HDCP_2_2_AKE_INIT, 0, 0 },
>  	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_AKE_NO_STORED_KM, 0, 0 },
> -	{ HDCP_2_2_AKE_STORED_KM, 0, 0 },
>  	{ HDCP_2_2_AKE_SEND_HPRIME, HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS,
>  	  HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS },
>  	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_LC_INIT, 0, 0 },
>  	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_SKE_SEND_EKS, 0, 0 },
>  	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_REP_SEND_ACK, 0, 0 },
> -	{ HDCP_2_2_REP_STREAM_MANAGE, 0, 0 },
>  	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, 0 },
>  };
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2
  2019-10-10 14:51 ` [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2 Ville Syrjala
@ 2019-10-17  7:05   ` Ramalingam C
  0 siblings, 0 replies; 13+ messages in thread
From: Ramalingam C @ 2019-10-17  7:05 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On 2019-10-10 at 17:51:26 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The only reason for the timeout2 value in the array is the
> HDCP_2_2_AKE_SEND_HPRIME message. But that one still needs
> special casing inside the loop, and so just ends up making
> the code harder to read. Let's just remove this leaky
> timeout2 abstraction and special case that one command
> in a way that is easy to understand. We can then remove the
> timeout2 member from struct entirely.

Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> 
>     text	   data	    bss	    dec	    hex	filename
> -  34633	    360	      0	  34993	   88b1	intel_hdmi.o
> +  34521	    360	      0	  34881	   8841	intel_hdmi.o
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 28 ++++++++++++-----------
>  1 file changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 8a574be86bc6..2dd798d8b961 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1530,17 +1530,14 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>  struct hdcp2_hdmi_msg_timeout {
>  	u8 msg_id;
>  	u32 timeout;
> -	u32 timeout2;
>  };
>  
>  static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
> -	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_AKE_SEND_HPRIME, HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS,
> -	  HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS },
> -	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, 0 },
> -	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, 0 },
> +	{ HDCP_2_2_AKE_SEND_CERT, HDCP_2_2_CERT_TIMEOUT_MS, },
> +	{ HDCP_2_2_AKE_SEND_PAIRING_INFO, HDCP_2_2_PAIRING_TIMEOUT_MS, },
> +	{ HDCP_2_2_LC_SEND_LPRIME, HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS, },
> +	{ HDCP_2_2_REP_SEND_RECVID_LIST, HDCP_2_2_RECVID_LIST_TIMEOUT_MS, },
> +	{ HDCP_2_2_REP_STREAM_READY, HDCP_2_2_STREAM_READY_TIMEOUT_MS, },
>  };
>  
>  static
> @@ -1557,12 +1554,17 @@ static int get_hdcp2_msg_timeout(u8 msg_id, bool is_paired)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++)
> -		if (hdcp2_msg_timeout[i].msg_id == msg_id &&
> -		    (msg_id != HDCP_2_2_AKE_SEND_HPRIME || is_paired))
> +	if (msg_id == HDCP_2_2_AKE_SEND_HPRIME) {
> +		if (is_paired)
> +			return HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS;
> +		else
> +			return HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS;
> +	}
> +
> +	for (i = 0; i < ARRAY_SIZE(hdcp2_msg_timeout); i++) {
> +		if (hdcp2_msg_timeout[i].msg_id == msg_id)
>  			return hdcp2_msg_timeout[i].timeout;
> -		else if (hdcp2_msg_timeout[i].msg_id == msg_id)
> -			return hdcp2_msg_timeout[i].timeout2;
> +	}
>  
>  	return -EINVAL;
>  }
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16
  2019-10-10 14:51 ` [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16 Ville Syrjala
@ 2019-10-17  7:08   ` Ramalingam C
  0 siblings, 0 replies; 13+ messages in thread
From: Ramalingam C @ 2019-10-17  7:08 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On 2019-10-10 at 17:51:27 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> All the timeout values fit in u16, so let's shrink the structure
> a bit.
> 
> This ends up actually increasing the .text size a bit due to
> some changes in instructions (constant imul+small jmps replaced
> with mov+bigger jmpqs). Seems pretty arbitrary to me so I'll
> just pretend I didn't see it.
> 
>     text	   data	    bss	    dec	    hex	filename
> -  34521	    360	      0	  34881	   8841	intel_hdmi.o
> +  34537	    360	      0	  34897	   8851	intel_hdmi.o
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks Good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 2dd798d8b961..5e97df38d281 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1529,7 +1529,7 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>  
>  struct hdcp2_hdmi_msg_timeout {
>  	u8 msg_id;
> -	u32 timeout;
> +	u16 timeout;
>  };
>  
>  static const struct hdcp2_hdmi_msg_timeout hdcp2_msg_timeout[] = {
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays
  2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
                   ` (4 preceding siblings ...)
  2019-10-10 16:57 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: Shrink eDRAM ways/sets arrays Patchwork
@ 2019-10-17  7:58 ` Ramalingam C
  2019-10-17 12:54   ` Ville Syrjälä
  5 siblings, 1 reply; 13+ messages in thread
From: Ramalingam C @ 2019-10-17  7:58 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On 2019-10-10 at 17:51:23 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Make the ways/sets arrays static cosnt u8 to shrink things a bit.
> 
>     text	   data	    bss	    dec	    hex	filename
> -  23935	    629	    128	  24692	   6074	i915_drv.o
> +  23818	    629	    128	  24575	   5fff	i915_drv.o
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index f02a34722217..0b8c13ae4857 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1073,8 +1073,8 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
>  
>  static u32 gen9_edram_size_mb(struct drm_i915_private *dev_priv, u32 cap)
>  {
> -	const unsigned int ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> -	const unsigned int sets[4] = { 1, 1, 2, 2 };
> +	static const u8 ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> +	static const u8 sets[4] = { 1, 1, 2, 2 };
Asking for my understanding. unsigned int -> u8 make sense to shrink the
size. Could you please add reasoning for adding static? moving it into
data segment hence reducing the stack?

-Ram
>  
>  	return EDRAM_NUM_BANKS(cap) *
>  		ways[EDRAM_WAYS_IDX(cap)] *
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays
  2019-10-17  7:58 ` [PATCH 1/5] " Ramalingam C
@ 2019-10-17 12:54   ` Ville Syrjälä
  2019-10-17 13:26     ` Ramalingam C
  0 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2019-10-17 12:54 UTC (permalink / raw)
  To: Ramalingam C; +Cc: intel-gfx

On Thu, Oct 17, 2019 at 01:28:29PM +0530, Ramalingam C wrote:
> On 2019-10-10 at 17:51:23 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Make the ways/sets arrays static cosnt u8 to shrink things a bit.
> > 
> >     text	   data	    bss	    dec	    hex	filename
> > -  23935	    629	    128	  24692	   6074	i915_drv.o
> > +  23818	    629	    128	  24575	   5fff	i915_drv.o
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index f02a34722217..0b8c13ae4857 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1073,8 +1073,8 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
> >  
> >  static u32 gen9_edram_size_mb(struct drm_i915_private *dev_priv, u32 cap)
> >  {
> > -	const unsigned int ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> > -	const unsigned int sets[4] = { 1, 1, 2, 2 };
> > +	static const u8 ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> > +	static const u8 sets[4] = { 1, 1, 2, 2 };
> Asking for my understanding. unsigned int -> u8 make sense to shrink the
> size. Could you please add reasoning for adding static? moving it into
> data segment hence reducing the stack?

Possibly. My usual approach is to just make all such things
static const unless there is a real reason not to.

> 
> -Ram
> >  
> >  	return EDRAM_NUM_BANKS(cap) *
> >  		ways[EDRAM_WAYS_IDX(cap)] *
> > -- 
> > 2.21.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays
  2019-10-17 12:54   ` Ville Syrjälä
@ 2019-10-17 13:26     ` Ramalingam C
  0 siblings, 0 replies; 13+ messages in thread
From: Ramalingam C @ 2019-10-17 13:26 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On 2019-10-17 at 15:54:46 +0300, Ville Syrjälä wrote:
> On Thu, Oct 17, 2019 at 01:28:29PM +0530, Ramalingam C wrote:
> > On 2019-10-10 at 17:51:23 +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Make the ways/sets arrays static cosnt u8 to shrink things a bit.
> > > 
> > >     text	   data	    bss	    dec	    hex	filename
> > > -  23935	    629	    128	  24692	   6074	i915_drv.o
> > > +  23818	    629	    128	  24575	   5fff	i915_drv.o
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > > index f02a34722217..0b8c13ae4857 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -1073,8 +1073,8 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
> > >  
> > >  static u32 gen9_edram_size_mb(struct drm_i915_private *dev_priv, u32 cap)
> > >  {
> > > -	const unsigned int ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> > > -	const unsigned int sets[4] = { 1, 1, 2, 2 };
> > > +	static const u8 ways[8] = { 4, 8, 12, 16, 16, 16, 16, 16 };
> > > +	static const u8 sets[4] = { 1, 1, 2, 2 };
> > Asking for my understanding. unsigned int -> u8 make sense to shrink the
> > size. Could you please add reasoning for adding static? moving it into
> > data segment hence reducing the stack?
> 
> Possibly. My usual approach is to just make all such things
> static const unless there is a real reason not to.
Ok. Thanks.

-Ram
> 
> > 
> > -Ram
> > >  
> > >  	return EDRAM_NUM_BANKS(cap) *
> > >  		ways[EDRAM_WAYS_IDX(cap)] *
> > > -- 
> > > 2.21.0
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-10-17 13:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 14:51 [PATCH 1/5] drm/i915: Shrink eDRAM ways/sets arrays Ville Syrjala
2019-10-10 14:51 ` [PATCH 2/5] drm/i915: s/hdcp2_hdmi_msg_data/hdcp2_hdmi_msg_timeout/ Ville Syrjala
2019-10-17  6:55   ` Ramalingam C
2019-10-10 14:51 ` [PATCH 3/5] drm/i915: Remove dead weight from hdcp2_msg_timeout[] Ville Syrjala
2019-10-17  7:02   ` Ramalingam C
2019-10-10 14:51 ` [PATCH 4/5] drm/i915: Remove hdcp2_hdmi_msg_timeout.timeout2 Ville Syrjala
2019-10-17  7:05   ` Ramalingam C
2019-10-10 14:51 ` [PATCH 5/5] drm/i915: Make hdcp2_msg_timeout.timeout u16 Ville Syrjala
2019-10-17  7:08   ` Ramalingam C
2019-10-10 16:57 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: Shrink eDRAM ways/sets arrays Patchwork
2019-10-17  7:58 ` [PATCH 1/5] " Ramalingam C
2019-10-17 12:54   ` Ville Syrjälä
2019-10-17 13:26     ` Ramalingam C

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.