Skip to contentSkip to conversation

drm/msm/dpu: fix encoder irq wait skip

PATCH Applied Barnabás Czémán 3 participants 5 messages May 9, 2024 – Jun 5, 2024

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

PATCH v2 1/1 drm/msm/dpu: fix encoder irq wait skip

The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one.

Fixes 5a9d50150c2c ("drm/msm/dpu: shift IRQ indices by 1")

---
Changes in v2:
- Add Fixes in commit message.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +1 -1
index 119f3ea50a7c..cf7d769ab3b9 100644
@@ -428,7 +428,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
 		return -EWOULDBLOCK;
 	}
 
-	if (irq_idx < 0) {
+	if (irq_idx == 0) {
 		DRM_DEBUG_KMS("skip irq wait id=%u, callback=%ps\n",
 			      DRMID(phys_enc->parent), func);
 		return 0;

---
base-commit: 704ba27ac55579704ba1289392448b0c66b56258
change-id: 20240509-irq_wait-49444cea77e2

Best regards,

Signature · 1 line
Barnabás Czémán <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Barnabás Czémán

The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one.

Fixes 5a9d50150c2c ("drm/msm/dpu: shift IRQ indices by 1")
Quoted 8 lines

---
Changes in v2:
- Add Fixes in commit message.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

no functional change, so you could have retained by R-b, but here it is again,

Quoted 19 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +1 -2
index 119f3ea50a7c..cf7d769ab3b9 100644
@@ -428,7 +428,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
  		return -EWOULDBLOCK;
  	}
 
-	if (irq_idx < 0) {
+	if (irq_idx == 0) {
  		DRM_DEBUG_KMS("skip irq wait id=%u, callback=%ps\n",
  			      DRMID(phys_enc->parent), func);
  		return 0;
 
---

base-commit: 704ba27ac55579704ba1289392448b0c66b56258
change-id: 20240509-irq_wait-49444cea77e2

Best regards,

Reviewed-by on v2 1/1
#2 lore raw
In reply to Barnabás Czémán
Quoted 7 lines · Barnabás Czémán

The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one.

Fixes 5a9d50150c2c ("drm/msm/dpu: shift IRQ indices by 1")

In the previous revision you have got the Reviewed-by tag, which you didn't include here for some reason.

This revision is:

Note, there is no need to send a next iteration just for these tags. They usually get picked up by the patch management software (including the Fixes tag).

Quoted 26 lines

---
Changes in v2:
- Add Fixes in commit message.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +1 -2
index 119f3ea50a7c..cf7d769ab3b9 100644
@@ -428,7 +428,7 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
                return -EWOULDBLOCK;
        }
 
-       if (irq_idx < 0) {
+       if (irq_idx == 0) {
                DRM_DEBUG_KMS("skip irq wait id=%u, callback=%ps\n",
                              DRMID(phys_enc->parent), func);
                return 0;
 
---

base-commit: 704ba27ac55579704ba1289392448b0c66b56258
change-id: 20240509-irq_wait-49444cea77e2

Quoted 4 lines

Best regards,
--
Barnabás Czémán <[email protected]>

--
With best wishes
Dmitry

Reviewed-by Dmitry Baryshkov Reviewed-by on v2 1/1
#3 lore raw
In reply to Barnabás Czémán
Quoted 6 lines · Barnabás Czémán

The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one.

Fixes 5a9d50150c2c ("drm/msm/dpu: shift IRQ indices by 1")
Quoted 8 lines

---
Changes in v2:
- Add Fixes in commit message.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

To make patchwork happy, I am re-adding the tags this patch for previously as they got lost.

#4 lore raw
In reply to Barnabás Czémán
Quoted 5 lines · Barnabás Czémán

The irq_idx is unsigned so it cannot be lower than zero, better to change the condition to check if it is equal with zero. It could not cause any issue because a valid irq index starts from one.

Applied, thanks!

[1/1] drm/msm/dpu: fix encoder irq wait skip

      https://gitlab.freedesktop.org/abhinavk/msm-next/-/commit/8dfe802d4a7c

Best regards,

Signature · 1 line
Abhinav Kumar <[email protected]>