Skip to contentSkip to conversation

drm/i915: Skip DDI PLL selection for DSI

PATCH In review Mika Kahola 5 participants 7 messages Feb 5, 2016 – Feb 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Skip DDI PLL selection for DSI

Skip DDI PLL selection if display type is DSI/MIPI.

---
 drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -2
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
 static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
 				      struct intel_crtc_state *crtc_state)
 {
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 
 	crtc->lowfreq_avail = false;
 
Signature · 6 lines
1.9.1

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

✗ Fi.CI.BAT: failure for drm/i915: Skip DDI PLL selection for DSI

== Summary ==

== Summary ==

Series 3122v1 drm/i915: Skip DDI PLL selection for DSI
http://patchwork.freedesktop.org/api/1.0/series/3122/revisions/1/mbox/

Test gem_sync:

        Subgroup basic-blt:
                pass       -> INCOMPLETE (skl-i5k-2)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                dmesg-warn -> PASS       (ilk-hp8440p) UNSTABLE
bdw-nuci7        total:161  pass:152  dwarn:0   dfail:0   fail:0   skip:9  
bdw-ultra        total:164  pass:152  dwarn:0   dfail:0   fail:0   skip:12 
byt-nuc          total:164  pass:141  dwarn:0   dfail:0   fail:0   skip:23 
hsw-brixbox      total:164  pass:151  dwarn:0   dfail:0   fail:0   skip:13 
hsw-gt2          total:164  pass:154  dwarn:0   dfail:0   fail:0   skip:10 
ilk-hp8440p      total:164  pass:116  dwarn:0   dfail:0   fail:0   skip:48 
ivb-t430s        total:164  pass:150  dwarn:0   dfail:0   fail:0   skip:14 
skl-i5k-2        total:57   pass:48   dwarn:0   dfail:0   fail:0   skip:8  
skl-i7k-2        total:164  pass:149  dwarn:1   dfail:0   fail:0   skip:14 
snb-dellxps      total:164  pass:142  dwarn:0   dfail:0   fail:0   skip:22 

Results at /archive/results/CI_IGT_test/Patchwork_1369/

57e229193395068adcb34c5266d54194e652869f drm-intel-nightly: 2016y-02m-04d-18h-38m-55s UTC integration manifest aa42a6ab884b76ece511db816e90b80b6bd3a7ef drm/i915: Skip DDI PLL selection for DSI

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

#2 lore raw
In reply to Mika Kahola
Quoted 15 lines · Mika Kahola

Skip DDI PLL selection if display type is DSI/MIPI.

---
  drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
  static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
  				      struct intel_crtc_state *crtc_state)
  {

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9912

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +7 -2
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 

can this be moved inside bxt_ddi_pll_select ? we can avoid this check for other platforms that also execute this function.

regards,
Sivakumar

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9914

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
  	crtc->lowfreq_avail = false;
 

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

#3 lore raw
Quoted 20 lines · Sivakumar
Quoted 19 lines · Mika Kahola

Skip DDI PLL selection if display type is DSI/MIPI.

---
  drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
  static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
  				      struct intel_crtc_state *crtc_state)
  {
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9912

Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +5 -0
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 

can this be moved inside bxt_ddi_pll_select ? we can avoid this check for other platforms that also execute this function.

I asked Mika to do it this way, but if you feel strongly about it I guess I could be persuaded otherwise too.

My main point is, if we pass on DSI encoders to DDI functions in some cases but mostly not, it will muddy the waters and eventually people end up checking for "is dsi" all around DDI just because they can't be bothered to check if the functions are really called for DDI only or not. It's more of a maintainability concern than anything else.

BR,
Jani.

Quoted 6 lines

regards,
Sivakumar

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
  	crtc->lowfreq_avail = false;
 
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 32 lines · Jani Nikula
Quoted 20 lines · Sivakumar
Quoted 19 lines · Mika Kahola

Skip DDI PLL selection if display type is DSI/MIPI.

---
   drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
   1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
   static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
   				      struct intel_crtc_state *crtc_state)
   {
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9912

Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +5 -0
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 

can this be moved inside bxt_ddi_pll_select ? we can avoid this check for other platforms that also execute this function.

I asked Mika to do it this way, but if you feel strongly about it I guess I could be persuaded otherwise too.

Quoted 9 lines

My main point is, if we pass on DSI encoders to DDI functions in some cases but mostly not, it will muddy the waters and eventually people end up checking for "is dsi" all around DDI just because they can't be bothered to check if the functions are really called for DDI only or not. It's more of a maintainability concern than anything else.

BR,
Jani.

i am fine with this either way. i was thinking of avoid such checks in other platforms where it is not needed but your concern of too many is_dsi checks is valid as well.
with that i am fine with this change as is.

Quoted 5 lines
Quoted 5 lines

regards,
Sivakumar

Quoted 2 lines
drivers/gpu/drm/i915/intel_display.c +0 -0
   	crtc->lowfreq_avail = false;
 

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

#5 lore raw
Quoted 41 lines · Sivakumar
Quoted 38 lines · Jani Nikula
Quoted 20 lines · Sivakumar
Quoted 19 lines · Mika Kahola

Skip DDI PLL selection if display type is DSI/MIPI.

---
   drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
   1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
   static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
   				      struct intel_crtc_state *crtc_state)
   {
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9912

Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +5 -0
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 

can this be moved inside bxt_ddi_pll_select ? we can avoid this check for other platforms that also execute this function.

I asked Mika to do it this way, but if you feel strongly about it I guess I could be persuaded otherwise too.

My main point is, if we pass on DSI encoders to DDI functions in some cases but mostly not, it will muddy the waters and eventually people end up checking for "is dsi" all around DDI just because they can't be bothered to check if the functions are really called for DDI only or not. It's more of a maintainability concern than anything else.

Quoted 8 lines
Quoted 3 lines

BR,
Jani.

i am fine with this either way. i was thinking of avoid such checks in other platforms where it is not needed but your concern of too many is_dsi checks is valid as well.
with that i am fine with this change as is.

Another idea would be to use the clock_set thing to skip it, but I think historically that has only been used to skip the PLL calculations, not the PLL selection. So might be it would just confuse things more.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 51 lines · Ville Syrjälä
Quoted 41 lines · Sivakumar
Quoted 38 lines · Jani Nikula
Quoted 20 lines · Sivakumar
Quoted 19 lines · Mika Kahola

Skip DDI PLL selection if display type is DSI/MIPI.

---
   drivers/gpu/drm/i915/intel_display.c | 9 +++++++--
   1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
index d7de2a5..5da98b2 100644
@@ -9902,8 +9902,13 @@ static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state)
   static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
   				      struct intel_crtc_state *crtc_state)
   {
-	if (!intel_ddi_pll_select(crtc, crtc_state))
-		return -EINVAL;
+	struct intel_encoder *intel_encoder =
+		intel_ddi_get_crtc_new_encoder(crtc_state);
Quoted 8 lines

drivers/gpu/drm/i915/intel_display.c static void broadwell_modeset_commit_cdclk(struct drm_atomic_state *old_state) · line 9912

Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +5 -0
+
+	if (intel_encoder->type != INTEL_OUTPUT_DSI) {
+		if (!intel_ddi_pll_select(crtc, crtc_state))
+			return -EINVAL;
+	}
 

can this be moved inside bxt_ddi_pll_select ? we can avoid this check for other platforms that also execute this function.

I asked Mika to do it this way, but if you feel strongly about it I guess I could be persuaded otherwise too.

My main point is, if we pass on DSI encoders to DDI functions in some cases but mostly not, it will muddy the waters and eventually people end up checking for "is dsi" all around DDI just because they can't be bothered to check if the functions are really called for DDI only or not. It's more of a maintainability concern than anything else.

Quoted 8 lines
Quoted 3 lines

BR,
Jani.

i am fine with this either way. i was thinking of avoid such checks in other platforms where it is not needed but your concern of too many is_dsi checks is valid as well.
with that i am fine with this change as is.

Quoted 4 lines

Another idea would be to use the clock_set thing to skip it, but I think historically that has only been used to skip the PLL calculations, not the PLL selection. So might be it would just confuse things more.

I just pushed this one. Thanks for the patch and review.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx