drm/xe: Remove extra xe_mmio_read32 from xe_mmio_wait32
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 27 Apr 2023 11:44:46 +0000 (13:44 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:31:47 +0000 (18:31 -0500)
Commit 7aaec3a623ad ("drm/xe: Let's return last value read on
xe_mmio_wait32.") mentions that we should return the last value read,
but we never actually return it. This breaks display which depends on
the value being actually returned where needed.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Fixes: 7aaec3a623ad ("drm/xe: Let's return last value read on xe_mmio_wait32.")
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/257
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_mmio.h

index be7ba2813d58d6fb1a4960e27601c5cab592f082..b72a0a75259faaa66db308249368dc9f1f9b71c0 100644 (file)
@@ -93,9 +93,6 @@ static inline int xe_mmio_wait32(struct xe_gt *gt, u32 reg, u32 val, u32 mask,
        u32 read;
 
        for (;;) {
-               if ((xe_mmio_read32(gt, reg) & mask) == val)
-                       return 0;
-
                read = xe_mmio_read32(gt, reg);
                if ((read & mask) == val) {
                        ret = 0;