]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: fix encoder irq wait skip
authorBarnabás Czémán <trabarni@gmail.com>
Thu, 9 May 2024 19:40:41 +0000 (21:40 +0200)
committerRob Clark <robdclark@chromium.org>
Wed, 5 Jun 2024 22:53:29 +0000 (15:53 -0700)
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>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/596853/
Link: https://lore.kernel.org/r/20240509-irq_wait-v2-1-b8b687b22cc4@gmail.com
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

index 119f3ea50a7c66459dbc0fbf5ff1018810fa2a47..cf7d769ab3b95536ee232a3c0ca647b87a47eedf 100644 (file)
@@ -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;