Linux-ARM-MSM Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dpu: fix encoder irq wait skip
@ 2024-05-09 19:40 Barnabás Czémán
  2024-05-09 20:42 ` Abhinav Kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Barnabás Czémán @ 2024-05-09 19:40 UTC (permalink / raw
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	Marijn Suijten, David Airlie, Daniel Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel,
	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")
Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
---
Changes in v2:
- Add Fixes in commit message.
- Link to v1: https://lore.kernel.org/r/20240509-irq_wait-v1-1-41d653e3784e@gmail.com
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 119f3ea50a7c..cf7d769ab3b9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -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,
-- 
Barnabás Czémán <trabarni@gmail.com>


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

* Re: [PATCH v2] drm/msm/dpu: fix encoder irq wait skip
  2024-05-09 19:40 [PATCH v2] drm/msm/dpu: fix encoder irq wait skip Barnabás Czémán
@ 2024-05-09 20:42 ` Abhinav Kumar
  2024-05-09 20:42 ` Dmitry Baryshkov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Abhinav Kumar @ 2024-05-09 20:42 UTC (permalink / raw
  To: Barnabás Czémán, Rob Clark, Dmitry Baryshkov,
	Sean Paul, Marijn Suijten, David Airlie, Daniel Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel



On 5/9/2024 12:40 PM, Barnabás Czémán wrote:
> 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")
> Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
> ---
> Changes in v2:
> - Add Fixes in commit message.
> - Link to v1: https://lore.kernel.org/r/20240509-irq_wait-v1-1-41d653e3784e@gmail.com
> ---
>   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,

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 119f3ea50a7c..cf7d769ab3b9 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -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,

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

* Re: [PATCH v2] drm/msm/dpu: fix encoder irq wait skip
  2024-05-09 19:40 [PATCH v2] drm/msm/dpu: fix encoder irq wait skip Barnabás Czémán
  2024-05-09 20:42 ` Abhinav Kumar
@ 2024-05-09 20:42 ` Dmitry Baryshkov
  2024-06-03 21:44 ` Abhinav Kumar
  2024-06-05 20:08 ` Abhinav Kumar
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-05-09 20:42 UTC (permalink / raw
  To: Barnabás Czémán
  Cc: Rob Clark, Abhinav Kumar, Sean Paul, Marijn Suijten, David Airlie,
	Daniel Vetter, linux-arm-msm, dri-devel, freedreno, linux-kernel

On Thu, 9 May 2024 at 22:40, Barnabás Czémán <trabarni@gmail.com> wrote:
>
> 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")
> Signed-off-by: Barnabás Czémán <trabarni@gmail.com>

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


This revision is:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

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).


> ---
> Changes in v2:
> - Add Fixes in commit message.
> - Link to v1: https://lore.kernel.org/r/20240509-irq_wait-v1-1-41d653e3784e@gmail.com
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 119f3ea50a7c..cf7d769ab3b9 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -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,
> --
> Barnabás Czémán <trabarni@gmail.com>
>


--
With best wishes
Dmitry

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

* Re: [PATCH v2] drm/msm/dpu: fix encoder irq wait skip
  2024-05-09 19:40 [PATCH v2] drm/msm/dpu: fix encoder irq wait skip Barnabás Czémán
  2024-05-09 20:42 ` Abhinav Kumar
  2024-05-09 20:42 ` Dmitry Baryshkov
@ 2024-06-03 21:44 ` Abhinav Kumar
  2024-06-05 20:08 ` Abhinav Kumar
  3 siblings, 0 replies; 5+ messages in thread
From: Abhinav Kumar @ 2024-06-03 21:44 UTC (permalink / raw
  To: Barnabás Czémán, Rob Clark, Dmitry Baryshkov,
	Sean Paul, Marijn Suijten, David Airlie, Daniel Vetter
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel



On 5/9/2024 12:40 PM, Barnabás Czémán wrote:
> 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")
> Signed-off-by: Barnabás Czémán <trabarni@gmail.com>
> ---
> Changes in v2:
> - Add Fixes in commit message.
> - Link to v1: https://lore.kernel.org/r/20240509-irq_wait-v1-1-41d653e3784e@gmail.com
> ---
>   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.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>


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

* Re: [PATCH v2] drm/msm/dpu: fix encoder irq wait skip
  2024-05-09 19:40 [PATCH v2] drm/msm/dpu: fix encoder irq wait skip Barnabás Czémán
                   ` (2 preceding siblings ...)
  2024-06-03 21:44 ` Abhinav Kumar
@ 2024-06-05 20:08 ` Abhinav Kumar
  3 siblings, 0 replies; 5+ messages in thread
From: Abhinav Kumar @ 2024-06-05 20:08 UTC (permalink / raw
  To: Rob Clark, Dmitry Baryshkov, Sean Paul, Marijn Suijten,
	David Airlie, Daniel Vetter, Barnabás Czémán
  Cc: Abhinav Kumar, linux-arm-msm, dri-devel, freedreno, linux-kernel


On Thu, 09 May 2024 21:40:41 +0200, Barnabás Czémán wrote:
> 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,
-- 
Abhinav Kumar <quic_abhinavk@quicinc.com>

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

end of thread, other threads:[~2024-06-05 20:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 19:40 [PATCH v2] drm/msm/dpu: fix encoder irq wait skip Barnabás Czémán
2024-05-09 20:42 ` Abhinav Kumar
2024-05-09 20:42 ` Dmitry Baryshkov
2024-06-03 21:44 ` Abhinav Kumar
2024-06-05 20:08 ` Abhinav Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).