Skip to contentSkip to conversation

drm/i915: Make number of ddi ports explicit.

PATCH In review Rodrigo Vivi 3 participants 8 messages Oct 19, 2018 – Oct 22, 2018

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/3 drm/i915: Make number of ddi ports explicit.

Instead of a simple bool that shows if we have ddi ports or not, let's highlight the number of ddi ports.

So we can use this information to determine the code path instead of using platforms codenames.

---
 drivers/gpu/drm/i915/i915_drv.h          | 2 +-
 drivers/gpu/drm/i915/i915_pci.c          | 5 +++--
 drivers/gpu/drm/i915/intel_device_info.h | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
index 3017ef037fed..7ad232849268 100644
@@ -2647,7 +2647,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define HAS_DP_MST(dev_priv)	((dev_priv)->info.has_dp_mst)
 
-#define HAS_DDI(dev_priv)		 ((dev_priv)->info.has_ddi)
+#define HAS_DDI(dev_priv)		 ((dev_priv)->info.ddi_ports > 0)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
 #define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
 
drivers/gpu/drm/i915/i915_pci.c +3 -2
index 0a05cc7ace14..0427486f63d0 100644
@@ -363,7 +363,7 @@ static const struct intel_device_info intel_valleyview_info = {
 #define G75_FEATURES  \
 	GEN7_FEATURES, \
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \
-	.has_ddi = 1, \
+	.ddi_ports = 5, \
 	.has_fpga_dbg = 1, \
 	.has_psr = 1, \
 	.has_dp_mst = 1, \
@@ -505,7 +505,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \
 	.num_pipes = 3, \
 	.has_64bit_reloc = 1, \
-	.has_ddi = 1, \
+	.ddi_ports = 3, \
 	.has_fpga_dbg = 1, \
 	.has_fbc = 1, \
 	.has_psr = 1, \
@@ -596,6 +596,7 @@ static const struct intel_device_info intel_cannonlake_info = {
 #define GEN11_FEATURES \
 	GEN10_FEATURES, \
 	GEN(11), \
+	.ddi_ports = 6, \
 	.ddb_size = 2048, \
 	.has_logical_ring_elsq = 1
 
drivers/gpu/drm/i915/intel_device_info.h +1 -1
index af7002640cdf..1be941222ed0 100644
@@ -90,7 +90,6 @@ enum intel_ppgtt {
 	/* Keep has_* in alphabetical order */ \
 	func(has_64bit_reloc); \
 	func(has_csr); \
-	func(has_ddi); \
 	func(has_dp_mst); \
 	func(has_reset_engine); \
 	func(has_fbc); \
@@ -165,6 +164,7 @@ struct intel_device_info {
 
 	u32 display_mmio_offset;
 
+	u8 ddi_ports;
 	u8 num_pipes;
 	u8 num_sprites[I915_MAX_PIPES];
 	u8 num_scalers[I915_MAX_PIPES];
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#1 lore raw

PATCH 2/3 drm/i915: Prefer direct IS_CANNONLAKE over IS_CNL_WITH_PORT_F

After all, no Cannonlake has HPD_PORT_F, even the skus with port F.

Also we will only reach this case if PORT_F is already there in use.

So let's use IS_CANNONLAKE directly here and avoid the ugly check starting from here.

Cc Lucas De Marchi <[email protected]>
---
 drivers/gpu/drm/i915/intel_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hotplug.c +1 -1
index 648a13c6043c..927e23cb426c 100644
@@ -101,7 +101,7 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,
 	case PORT_E:
 		return HPD_PORT_E;
 	case PORT_F:
-		if (IS_CNL_WITH_PORT_F(dev_priv))
+		if (IS_CANNONLAKE(dev_priv))
 			return HPD_PORT_E;
 		return HPD_PORT_F;
 	default:
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#2 lore raw

PATCH 3/3 drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F.

In reply to Rodrigo Vivi

Now that we have the number of ddi ports information available let's use it instead of that ugly platform macro.

v2: - Don't override platform info (Jani) But use platform info (Daniel)
- Don't use ddi_ports when it doesn't make sense (Lucas)
- Add a comment to let clear that port E is fused off. (Rodrigo)

Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Lucas De Marchi <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h         | 2 --
 drivers/gpu/drm/i915/i915_irq.c         | 5 ++---
 drivers/gpu/drm/i915/i915_pci.c         | 8 ++++++++
 drivers/gpu/drm/i915/intel_dp.c         | 2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +-
 include/drm/i915_pciids.h               | 4 +++-
 6 files changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -2
index 7ad232849268..99e42df79ed8 100644
@@ -2485,8 +2485,6 @@ intel_info(const struct drm_i915_private *dev_priv)
 				 (dev_priv)->info.gt == 2)
 #define IS_CFL_GT3(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
 				 (dev_priv)->info.gt == 3)
-#define IS_CNL_WITH_PORT_F(dev_priv)   (IS_CANNONLAKE(dev_priv) && \
-					(INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)
 
 #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
 
drivers/gpu/drm/i915/i915_irq.c +2 -3
index 5d1f53723388..63d676de3840 100644
@@ -2782,8 +2782,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 			if (INTEL_GEN(dev_priv) >= 11)
 				tmp_mask |= ICL_AUX_CHANNEL_E;
 
-			if (IS_CNL_WITH_PORT_F(dev_priv) ||
-			    INTEL_GEN(dev_priv) >= 11)
+			if (INTEL_INFO(dev_priv)->ddi_ports >= 6)
 				tmp_mask |= CNL_AUX_CHANNEL_F;
 
 			if (iir & tmp_mask) {
@@ -4220,7 +4219,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 	if (INTEL_GEN(dev_priv) >= 11)
 		de_port_masked |= ICL_AUX_CHANNEL_E;
 
-	if (IS_CNL_WITH_PORT_F(dev_priv) || INTEL_GEN(dev_priv) >= 11)
+	if (INTEL_INFO(dev_priv)->ddi_ports >= 6)
 		de_port_masked |= CNL_AUX_CHANNEL_F;
 
 	de_pipe_enables = de_pipe_masked | GEN8_PIPE_VBLANK |
drivers/gpu/drm/i915/i915_pci.c +8 -0
index 0427486f63d0..dc78daca145f 100644
@@ -593,6 +593,13 @@ static const struct intel_device_info intel_cannonlake_info = {
 	.gt = 2,
 };
 
+static const struct intel_device_info intel_cannonlake_portf_info = {
+	GEN10_FEATURES,
+	PLATFORM(INTEL_CANNONLAKE),
+	.gt = 2,
+	.ddi_ports = 6, /* Although port E is fused off, full port F is added */
+};
+
 #define GEN11_FEATURES \
 	GEN10_FEATURES, \
 	GEN(11), \
@@ -672,6 +679,7 @@ static const struct pci_device_id pciidlist[] = {
 	INTEL_AML_CFL_GT2_IDS(&intel_coffeelake_gt2_info),
 	INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info),
 	INTEL_CNL_IDS(&intel_cannonlake_info),
+	INTEL_CNL_PORTF_IDS(&intel_cannonlake_portf_info),
 	INTEL_ICL_11_IDS(&intel_icelake_11_info),
 	{0, 0, 0}
 };
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 3384a9bbdafd..0ea0414ccef4 100644
@@ -402,7 +402,7 @@ static int cnl_max_source_rate(struct intel_dp *intel_dp)
 		return 540000;
 
 	/* For this SKU 8.1G is supported in all ports */
-	if (IS_CNL_WITH_PORT_F(dev_priv))
+	if (INTEL_INFO(dev_priv)->ddi_ports == 6)
 		return 810000;
 
 	/* For other SKUs, max rate on ports A and D is 5.4G */
drivers/gpu/drm/i915/intel_runtime_pm.c +1 -1
index 31a49bdcf193..80e14be11279 100644
@@ -3099,7 +3099,7 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
 		 * timeouts, lets remove them from the list
 		 * for the SKUs without port F.
 		 */
-		if (!IS_CNL_WITH_PORT_F(dev_priv))
+		if (INTEL_INFO(dev_priv)->ddi_ports == 5)
 			power_domains->power_well_count -= 2;
 
 	} else if (IS_BROXTON(dev_priv)) {
include/drm/i915_pciids.h +3 -1
index 192667144693..486822205151 100644
@@ -445,7 +445,9 @@
 	INTEL_VGA_DEVICE(0x5A42, info), \
 	INTEL_VGA_DEVICE(0x5A4A, info), \
 	INTEL_VGA_DEVICE(0x5A50, info), \
-	INTEL_VGA_DEVICE(0x5A40, info), \
+	INTEL_VGA_DEVICE(0x5A40, info)
+
+#define INTEL_CNL_PORTF_IDS(info) \
 	INTEL_VGA_DEVICE(0x5A54, info), \
 	INTEL_VGA_DEVICE(0x5A5C, info), \
 	INTEL_VGA_DEVICE(0x5A44, info), \
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#3 lore raw

PATCH 1/1 drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F.

Now that we have the number of ddi ports information available let's use it instead of that ugly platform macro.

v2: - Don't override platform info (Jani) But use platform info (Daniel)
- Don't use ddi_ports when it doesn't make sense (Lucas)
- Add a comment to let clear that port E is fused off. (Rodrigo)

v3: - Adding missing case suggested by Lucas to avoid using ddi_ports
when it doesn't make sense.

Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Lucas De Marchi <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h          | 3 +--
 drivers/gpu/drm/i915/i915_irq.c          | 5 ++---
 drivers/gpu/drm/i915/i915_pci.c          | 9 +++++++++
 drivers/gpu/drm/i915/intel_device_info.h | 1 +
 drivers/gpu/drm/i915/intel_dp.c          | 2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c  | 2 +-
 include/drm/i915_pciids.h                | 4 +++-
 7 files changed, 18 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -2
index 7ad232849268..3e7624de4681 100644
@@ -2485,8 +2485,6 @@ intel_info(const struct drm_i915_private *dev_priv)
 				 (dev_priv)->info.gt == 2)
 #define IS_CFL_GT3(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
 				 (dev_priv)->info.gt == 3)
-#define IS_CNL_WITH_PORT_F(dev_priv)   (IS_CANNONLAKE(dev_priv) && \
-					(INTEL_DEVID(dev_priv) & 0x0004) == 0x0004)
 
 #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
 
@@ -2648,6 +2646,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define HAS_DP_MST(dev_priv)	((dev_priv)->info.has_dp_mst)
 
 #define HAS_DDI(dev_priv)		 ((dev_priv)->info.ddi_ports > 0)
+#define HAS_ALL_PORTS_HBR3(dev_priv)	 ((dev_priv)->info.has_all_ports_hbr3)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
 #define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
 
drivers/gpu/drm/i915/i915_irq.c +2 -3
index 5d1f53723388..63d676de3840 100644
@@ -2782,8 +2782,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
 			if (INTEL_GEN(dev_priv) >= 11)
 				tmp_mask |= ICL_AUX_CHANNEL_E;
 
-			if (IS_CNL_WITH_PORT_F(dev_priv) ||
-			    INTEL_GEN(dev_priv) >= 11)
+			if (INTEL_INFO(dev_priv)->ddi_ports >= 6)
 				tmp_mask |= CNL_AUX_CHANNEL_F;
 
 			if (iir & tmp_mask) {
@@ -4220,7 +4219,7 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
 	if (INTEL_GEN(dev_priv) >= 11)
 		de_port_masked |= ICL_AUX_CHANNEL_E;
 
-	if (IS_CNL_WITH_PORT_F(dev_priv) || INTEL_GEN(dev_priv) >= 11)
+	if (INTEL_INFO(dev_priv)->ddi_ports >= 6)
 		de_port_masked |= CNL_AUX_CHANNEL_F;
 
 	de_pipe_enables = de_pipe_masked | GEN8_PIPE_VBLANK |
drivers/gpu/drm/i915/i915_pci.c +9 -0
index 0427486f63d0..9d89f7190487 100644
@@ -593,6 +593,14 @@ static const struct intel_device_info intel_cannonlake_info = {
 	.gt = 2,
 };
 
+static const struct intel_device_info intel_cannonlake_portf_info = {
+	GEN10_FEATURES,
+	PLATFORM(INTEL_CANNONLAKE),
+	.gt = 2,
+	.ddi_ports = 6, /* Although port E is fused off, full port F is added */
+	.has_all_ports_hbr3 = true,
+};
+
 #define GEN11_FEATURES \
 	GEN10_FEATURES, \
 	GEN(11), \
@@ -672,6 +680,7 @@ static const struct pci_device_id pciidlist[] = {
 	INTEL_AML_CFL_GT2_IDS(&intel_coffeelake_gt2_info),
 	INTEL_WHL_U_GT3_IDS(&intel_coffeelake_gt3_info),
 	INTEL_CNL_IDS(&intel_cannonlake_info),
+	INTEL_CNL_PORTF_IDS(&intel_cannonlake_portf_info),
 	INTEL_ICL_11_IDS(&intel_icelake_11_info),
 	{0, 0, 0}
 };
drivers/gpu/drm/i915/intel_device_info.h +1 -0
index 1be941222ed0..44e597b7b307 100644
@@ -89,6 +89,7 @@ enum intel_ppgtt {
 	func(is_alpha_support); \
 	/* Keep has_* in alphabetical order */ \
 	func(has_64bit_reloc); \
+	func(has_all_ports_hbr3); \
 	func(has_csr); \
 	func(has_dp_mst); \
 	func(has_reset_engine); \
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 3384a9bbdafd..8d9d0b82e459 100644
@@ -402,7 +402,7 @@ static int cnl_max_source_rate(struct intel_dp *intel_dp)
 		return 540000;
 
 	/* For this SKU 8.1G is supported in all ports */
-	if (IS_CNL_WITH_PORT_F(dev_priv))
+	if (HAS_ALL_PORTS_HBR3(dev_priv))
 		return 810000;
 
 	/* For other SKUs, max rate on ports A and D is 5.4G */
drivers/gpu/drm/i915/intel_runtime_pm.c +1 -1
index 31a49bdcf193..80e14be11279 100644
@@ -3099,7 +3099,7 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
 		 * timeouts, lets remove them from the list
 		 * for the SKUs without port F.
 		 */
-		if (!IS_CNL_WITH_PORT_F(dev_priv))
+		if (INTEL_INFO(dev_priv)->ddi_ports == 5)
 			power_domains->power_well_count -= 2;
 
 	} else if (IS_BROXTON(dev_priv)) {
include/drm/i915_pciids.h +3 -1
index 192667144693..486822205151 100644
@@ -445,7 +445,9 @@
 	INTEL_VGA_DEVICE(0x5A42, info), \
 	INTEL_VGA_DEVICE(0x5A4A, info), \
 	INTEL_VGA_DEVICE(0x5A50, info), \
-	INTEL_VGA_DEVICE(0x5A40, info), \
+	INTEL_VGA_DEVICE(0x5A40, info)
+
+#define INTEL_CNL_PORTF_IDS(info) \
 	INTEL_VGA_DEVICE(0x5A54, info), \
 	INTEL_VGA_DEVICE(0x5A5C, info), \
 	INTEL_VGA_DEVICE(0x5A44, info), \
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)
URL : https://patchwork.freedesktop.org/series/51275/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
bafa4e7b6635 drm/i915: Make number of ddi ports explicit.
a43c4174c546 drm/i915: Prefer direct IS_CANNONLAKE over IS_CNL_WITH_PORT_F
7dbe18944986 drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F.
-:142: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#142: FILE: include/drm/i915_pciids.h:450:
+#define INTEL_CNL_PORTF_IDS(info) \
 	INTEL_VGA_DEVICE(0x5A54, info), \
 	INTEL_VGA_DEVICE(0x5A5C, info), \
 	INTEL_VGA_DEVICE(0x5A44, info), \

-:142: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #142: FILE: include/drm/i915_pciids.h:450:
+#define INTEL_CNL_PORTF_IDS(info) \
INTEL_VGA_DEVICE(0x5A54, info), \
INTEL_VGA_DEVICE(0x5A5C, info), \
INTEL_VGA_DEVICE(0x5A44, info), \

total: 1 errors, 0 warnings, 1 checks, 86 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)
URL : https://patchwork.freedesktop.org/series/51275/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: Make number of ddi ports explicit.
Okay!

Commit: drm/i915: Prefer direct IS_CANNONLAKE over IS_CNL_WITH_PORT_F Okay!

Commit: drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F. -drivers/gpu/drm/i915/selftests/../i915_drv.h:3725:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3724:16: warning: expression using sizeof(void)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/3] drm/i915: Make number of ddi ports explicit. (rev2)
URL : https://patchwork.freedesktop.org/series/51275/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5017 -> Patchwork_10522 =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_10522 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10522, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/51275/revisions/2/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@drv_hangman@error-state-basic:
      fi-icl-u2:          PASS -> DMESG-WARN

    igt@gem_exec_reloc@basic-cpu-read-active:
      fi-icl-u:           NOTRUN -> DMESG-WARN

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_store@basic-all:
      fi-icl-u:           NOTRUN -> DMESG-WARN (fdo#107732) +7

    igt@gem_exec_suspend@basic:
      fi-icl-u:           NOTRUN -> DMESG-WARN (fdo#107724) +24

    igt@gem_exec_suspend@basic-s3:
      fi-kbl-soraka:      NOTRUN -> INCOMPLETE (fdo#107556, fdo#107774, fdo#107859)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#105602)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-skl-6700hq:      PASS -> DMESG-WARN (fdo#105998) +1

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       DMESG-WARN (fdo#107139, fdo#105128) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-cfl-8700k:       FAIL (fdo#104008) -> PASS

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107732 https://bugs.freedesktop.org/show_bug.cgi?id=107732
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
fdo#107859 https://bugs.freedesktop.org/show_bug.cgi?id=107859

== Participating hosts (51 -> 48) ==

Additional (2): fi-kbl-soraka fi-icl-u
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600

== Build changes ==

* Linux: CI_DRM_5017 -> Patchwork_10522

CI_DRM_5017: 9510f8e44127260f92b5b6c3127aafa22b15f741 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4685: 78619fde4008424c472906041edb1d204e014f7c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10522: 7dbe189449864d4dd24090e4c8f59507351588ec @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7dbe18944986 drm/i915: Use the ddi_ports info to kill ugly CNL_WITH_PORT_F. a43c4174c546 drm/i915: Prefer direct IS_CANNONLAKE over IS_CNL_WITH_PORT_F bafa4e7b6635 drm/i915: Make number of ddi ports explicit.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10522/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw
In reply to Rodrigo Vivi
Quoted 69 lines · Rodrigo Vivi

Instead of a simple bool that shows if we have ddi ports or not, let's highlight the number of ddi ports.

So we can use this information to determine the code path instead of using platforms codenames.

---
 drivers/gpu/drm/i915/i915_drv.h          | 2 +-
 drivers/gpu/drm/i915/i915_pci.c          | 5 +++--
 drivers/gpu/drm/i915/intel_device_info.h | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
index 3017ef037fed..7ad232849268 100644
@@ -2647,7 +2647,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define HAS_DP_MST(dev_priv)	((dev_priv)->info.has_dp_mst)
 
-#define HAS_DDI(dev_priv)		 ((dev_priv)->info.has_ddi)
+#define HAS_DDI(dev_priv)		 ((dev_priv)->info.ddi_ports > 0)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
 #define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
 
drivers/gpu/drm/i915/i915_pci.c +3 -2
index 0a05cc7ace14..0427486f63d0 100644
@@ -363,7 +363,7 @@ static const struct intel_device_info intel_valleyview_info = {
 #define G75_FEATURES  \
 	GEN7_FEATURES, \
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \
-	.has_ddi = 1, \
+	.ddi_ports = 5, \
 	.has_fpga_dbg = 1, \
 	.has_psr = 1, \
 	.has_dp_mst = 1, \
@@ -505,7 +505,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING, \
 	.num_pipes = 3, \
 	.has_64bit_reloc = 1, \
-	.has_ddi = 1, \
+	.ddi_ports = 3, \
 	.has_fpga_dbg = 1, \
 	.has_fbc = 1, \
 	.has_psr = 1, \
@@ -596,6 +596,7 @@ static const struct intel_device_info intel_cannonlake_info = {
 #define GEN11_FEATURES \
 	GEN10_FEATURES, \
 	GEN(11), \
+	.ddi_ports = 6, \
 	.ddb_size = 2048, \
 	.has_logical_ring_elsq = 1
 
drivers/gpu/drm/i915/intel_device_info.h +0 -1
index af7002640cdf..1be941222ed0 100644
@@ -90,7 +90,6 @@ enum intel_ppgtt {
 	/* Keep has_* in alphabetical order */ \
 	func(has_64bit_reloc); \
 	func(has_csr); \
-	func(has_ddi); \
 	func(has_dp_mst); \
 	func(has_reset_engine); \
 	func(has_fbc); \

drivers/gpu/drm/i915/intel_device_info.h struct intel_device_info { · line 167

Quoted 4 lines
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -165,6 +164,7 @@ struct intel_device_info {
 
 	u32 display_mmio_offset;
 
+	u8 ddi_ports;

num_ddi_ports?

Or might we even want a bitmask?

Quoted 10 lines
drivers/gpu/drm/i915/intel_device_info.h +0 -0
 	u8 num_pipes;
 	u8 num_sprites[I915_MAX_PIPES];
 	u8 num_scalers[I915_MAX_PIPES];
Signature · 6 lines
2.19.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx