Skip to contentSkip to conversation

3 display pipes combination system support

PATCH Anshuman Gupta 2 participants 5 messages Feb 11, 2020 – Feb 19, 2020 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Ville Syrjälä
Quoted 9 lines · Anshuman Gupta

Updated version after rebase and fixing few comments.

Anshuman Gupta (6):
drm/i915: Iterate over pipe and skip the disabled one drm/i915: Remove (pipe == crtc->index) assumption drm/i915: Fix broken transcoder err state
drm/i915: Fix wrongly populated plane possible_crtcs bit mask drm/i915: Get right max plane stride
drm/i915: Add WARN_ON in intel_get_crtc_for_pipe()

Quoted 8 lines

Another broken thing I realized recently is due to my
commit ee34801cc0e8 ("drm/i915: Prefer to use the pipe to index the ddb entries")

We either need to revert that or always pass s/num_pipes/I915_MAX_PIPES/ to skl_ddb_allocation_overlaps() in skl_commit_modeset_enables(). The latter may be nicer since I don't really want that silly 'i' usage back. Can you cook up a patch like that as well?

AFAIU entries[] may have holes inside it as its size is I915_MAX_PIPES, though these holes are already initialized with zero and will not harm skl_ddb_allocation_overlaps, is it good a idea to avoid these hole as ignore_index bit mask ?

Thanks ,
Anshuman Gupta.

Quoted 9 lines
Quoted 9 lines

 drivers/gpu/drm/i915/display/intel_display.c  | 31 +++++++++++---
 drivers/gpu/drm/i915/display/intel_display.h  |  5 ++-
 .../drm/i915/display/intel_display_types.h    | 12 +++++-
 drivers/gpu/drm/i915/display/intel_sprite.c   |  5 +--
 drivers/gpu/drm/i915/i915_irq.c               | 40 ++++++++++++++-----
 5 files changed, 71 insertions(+), 22 deletions(-)
Quoted 6 lines
Quoted 2 lines
Signature · 1 line
2.24.0
Signature · 2 lines
Ville Syrjälä
Intel

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

#3 lore raw
Quoted 16 lines · Anshuman Gupta
Quoted 15 lines · Ville Syrjälä
Quoted 9 lines · Anshuman Gupta

Updated version after rebase and fixing few comments.

Anshuman Gupta (6):
drm/i915: Iterate over pipe and skip the disabled one drm/i915: Remove (pipe == crtc->index) assumption drm/i915: Fix broken transcoder err state
drm/i915: Fix wrongly populated plane possible_crtcs bit mask drm/i915: Get right max plane stride
drm/i915: Add WARN_ON in intel_get_crtc_for_pipe()

Another broken thing I realized recently is due to my
commit ee34801cc0e8 ("drm/i915: Prefer to use the pipe to index the ddb entries")

Quoted 8 lines
Quoted 4 lines

We either need to revert that or always pass s/num_pipes/I915_MAX_PIPES/ to skl_ddb_allocation_overlaps() in skl_commit_modeset_enables(). The latter may be nicer since I don't really want that silly 'i' usage back. Can you cook up a patch like that as well?

AFAIU entries[] may have holes inside it as its size is I915_MAX_PIPES, though these holes are already initialized with zero and will not harm skl_ddb_allocation_overlaps, is it good a idea to avoid these hole as ignore_index bit mask ?

skl_ddb_entries_overlap() should just ignore empty allocations. And that will anyway happen for any pipe that is not active. So we don't have to worry about any holes.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 21 lines · Ville Syrjälä
Quoted 20 lines · Anshuman Gupta
Quoted 19 lines · Ville Syrjälä
Quoted 9 lines · Anshuman Gupta

Updated version after rebase and fixing few comments.

Anshuman Gupta (6):
drm/i915: Iterate over pipe and skip the disabled one drm/i915: Remove (pipe == crtc->index) assumption drm/i915: Fix broken transcoder err state
drm/i915: Fix wrongly populated plane possible_crtcs bit mask drm/i915: Get right max plane stride
drm/i915: Add WARN_ON in intel_get_crtc_for_pipe()

Another broken thing I realized recently is due to my
commit ee34801cc0e8 ("drm/i915: Prefer to use the pipe to index the ddb entries")

We either need to revert that or always pass s/num_pipes/I915_MAX_PIPES/ to skl_ddb_allocation_overlaps() in skl_commit_modeset_enables(). The latter may be nicer since I don't really want that silly 'i' usage back. Can you cook up a patch like that as well?

Quoted 8 lines
Quoted 4 lines

AFAIU entries[] may have holes inside it as its size is I915_MAX_PIPES, though these holes are already initialized with zero and will not harm skl_ddb_allocation_overlaps, is it good a idea to avoid these hole as ignore_index bit mask ?

skl_ddb_entries_overlap() should just ignore empty allocations. And that will anyway happen for any pipe that is not active. So we don't have to worry about any holes.

Thanks Ville for explanation.
Thanks,
Anshuman Gupta.

Quoted 4 lines
Signature · 3 lines
-- 
Ville Syrjälä
Intel

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

Re: [Intel-gfx] [PATCH v2 1/6] drm/i915: Iterate over pipe and skip the disabled one

Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Anshuman Gupta

It should not be assumed that a disabled display pipe will be always last the pipe.
for_each_pipe() should iterate over I915_MAX_PIPES and check for the disabled pipe and skip that pipe so that it should not initialize the intel crtc for any disabled pipes.

Below compilation error require to be handle due to change in for_each_pipe() macro.
"suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else]"

---
 drivers/gpu/drm/i915/display/intel_display.h | 5 +++--
 drivers/gpu/drm/i915/i915_irq.c              | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_display.h +0 -0
index 75438a136d58..7a531e485b53 100644
@@ -313,10 +313,11 @@ enum phy_fia {
 };
 
Quoted 6 lines

drivers/gpu/drm/i915/display/intel_display.h enum phy_fia { · line 317

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.h +2 -1
 #define for_each_pipe(__dev_priv, __p) \
-	for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++)
+	for ((__p) = 0; (__p) < I915_MAX_PIPES; (__p)++) \
+		for_each_if((INTEL_INFO(__dev_priv)->pipe_mask) & BIT(__p))

Don't need the parens around the (->pipe_mask)

Thanks for review i will address this.

Quoted 9 lines

drivers/gpu/drm/i915/display/intel_display.h enum phy_fia { · line 320

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.h +1 -1
 #define for_each_pipe_masked(__dev_priv, __p, __mask) \
-	for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++) \
+	for_each_pipe(__dev_priv, __p) \
 		for_each_if((__mask) & BIT(__p))

Shouldn't this one still consult the pipe_mask? There's no reason to assume that the caller bothered to filter the mask it passed in.

AFAIU current caller is interested to init the pipe {IIR,IMR,IER} for the passed mask. Please correct me if i am wrong here.
Thanks,
Anshuman Gupta.

Quoted 33 lines
Quoted 33 lines
drivers/gpu/drm/i915/display/intel_display.h +0 -0
 #define for_each_cpu_transcoder_masked(__dev_priv, __t, __mask) \
drivers/gpu/drm/i915/i915_irq.c +4 -2
index 3d0cd0960bd2..a26f2bf1b6ea 100644
@@ -1739,11 +1739,12 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	if (pch_iir & SDE_POISON)
 		drm_err(&dev_priv->drm, "PCH poison interrupt\n");
 
-	if (pch_iir & SDE_FDI_MASK)
+	if (pch_iir & SDE_FDI_MASK) {
 		for_each_pipe(dev_priv, pipe)
 			drm_dbg(&dev_priv->drm, "  pipe %c FDI IIR: 0x%08x\n",
 				pipe_name(pipe),
 				I915_READ(FDI_RX_IIR(pipe)));
+	}
 
 	if (pch_iir & (SDE_TRANSB_CRC_DONE | SDE_TRANSA_CRC_DONE))
 		drm_dbg(&dev_priv->drm, "PCH transcoder CRC done interrupt\n");
@@ -1823,11 +1824,12 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	if (pch_iir & SDE_AUDIO_CP_CHG_CPT)
 		drm_dbg(&dev_priv->drm, "Audio CP change interrupt\n");
 
-	if (pch_iir & SDE_FDI_MASK_CPT)
+	if (pch_iir & SDE_FDI_MASK_CPT) {
 		for_each_pipe(dev_priv, pipe)
 			drm_dbg(&dev_priv->drm, "  pipe %c FDI IIR: 0x%08x\n",
 				pipe_name(pipe),
 				I915_READ(FDI_RX_IIR(pipe)));
+	}
 
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +0 -0
 	if (pch_iir & SDE_ERROR_CPT)
 		cpt_serr_int_handler(dev_priv);
Signature · 1 line
2.24.0
Signature · 2 lines
Ville Syrjälä
Intel

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

#8 lore raw

Re: [Intel-gfx] [PATCH v2 1/6] drm/i915: Iterate over pipe and skip the disabled one

Quoted 42 lines · Anshuman Gupta
Quoted 25 lines · Ville Syrjälä
Quoted 24 lines · Anshuman Gupta

It should not be assumed that a disabled display pipe will be always last the pipe.
for_each_pipe() should iterate over I915_MAX_PIPES and check for the disabled pipe and skip that pipe so that it should not initialize the intel crtc for any disabled pipes.

Below compilation error require to be handle due to change in for_each_pipe() macro.
"suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else]"

---
 drivers/gpu/drm/i915/display/intel_display.h | 5 +++--
 drivers/gpu/drm/i915/i915_irq.c              | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_display.h +0 -0
index 75438a136d58..7a531e485b53 100644
@@ -313,10 +313,11 @@ enum phy_fia {
 };
 
Quoted 6 lines

drivers/gpu/drm/i915/display/intel_display.h enum phy_fia { · line 317

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.h +2 -1
 #define for_each_pipe(__dev_priv, __p) \
-	for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++)
+	for ((__p) = 0; (__p) < I915_MAX_PIPES; (__p)++) \
+		for_each_if((INTEL_INFO(__dev_priv)->pipe_mask) & BIT(__p))

Don't need the parens around the (->pipe_mask)

Thanks for review i will address this.

Quoted 9 lines

drivers/gpu/drm/i915/display/intel_display.h enum phy_fia { · line 320

Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.h +1 -1
 #define for_each_pipe_masked(__dev_priv, __p, __mask) \
-	for ((__p) = 0; (__p) < INTEL_NUM_PIPES(__dev_priv); (__p)++) \
+	for_each_pipe(__dev_priv, __p) \
 		for_each_if((__mask) & BIT(__p))

Shouldn't this one still consult the pipe_mask? There's no reason to assume that the caller bothered to filter the mask it passed in.

Quoted 3 lines

AFAIU current caller is interested to init the pipe {IIR,IMR,IER} for the passed mask. Please correct me if i am wrong here.

This was just me not noticing that you used for_each_pipe() here, which does account for the pipe_mask already. Mea culpa.

Quoted 43 lines

Thanks,
Anshuman Gupta.

Quoted 41 lines
Quoted 37 lines
drivers/gpu/drm/i915/display/intel_display.h +0 -0
 #define for_each_cpu_transcoder_masked(__dev_priv, __t, __mask) \
drivers/gpu/drm/i915/i915_irq.c +4 -2
index 3d0cd0960bd2..a26f2bf1b6ea 100644
@@ -1739,11 +1739,12 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	if (pch_iir & SDE_POISON)
 		drm_err(&dev_priv->drm, "PCH poison interrupt\n");
 
-	if (pch_iir & SDE_FDI_MASK)
+	if (pch_iir & SDE_FDI_MASK) {
 		for_each_pipe(dev_priv, pipe)
 			drm_dbg(&dev_priv->drm, "  pipe %c FDI IIR: 0x%08x\n",
 				pipe_name(pipe),
 				I915_READ(FDI_RX_IIR(pipe)));
+	}
 
 	if (pch_iir & (SDE_TRANSB_CRC_DONE | SDE_TRANSA_CRC_DONE))
 		drm_dbg(&dev_priv->drm, "PCH transcoder CRC done interrupt\n");
@@ -1823,11 +1824,12 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
 	if (pch_iir & SDE_AUDIO_CP_CHG_CPT)
 		drm_dbg(&dev_priv->drm, "Audio CP change interrupt\n");
 
-	if (pch_iir & SDE_FDI_MASK_CPT)
+	if (pch_iir & SDE_FDI_MASK_CPT) {
 		for_each_pipe(dev_priv, pipe)
 			drm_dbg(&dev_priv->drm, "  pipe %c FDI IIR: 0x%08x\n",
 				pipe_name(pipe),
 				I915_READ(FDI_RX_IIR(pipe)));
+	}
 
 	if (pch_iir & SDE_ERROR_CPT)
 		cpt_serr_int_handler(dev_priv);
Signature · 1 line
2.24.0
Signature · 2 lines
Ville Syrjälä
Intel
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx