MGS-6145 [#imx-2455] fix the QueryIdle fail when no weston
authorJiyu Yang <jiyu.yang@nxp.com>
Thu, 29 Apr 2021 08:47:03 +0000 (16:47 +0800)
committerJiyu Yang <jiyu.yang@nxp.com>
Thu, 13 May 2021 05:28:29 +0000 (13:28 +0800)
When GPU hardware become idle, FE address will fall into
last wait-link loop, Wait-link has 2 instructions,
each instruction is 8 bytes, the valid offset is [0, 16],
Original programming is wrong to test FE not in idle
with last wait-link + 16.

Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c

index a31808d..445ad02 100644 (file)
@@ -9360,7 +9360,7 @@ gckHARDWARE_QueryIdle(
 
             /* Test if address is inside the last WAIT/LINK sequence. */
             if ((address < Hardware->lastWaitLink) ||
-                (address >= (gctUINT64)Hardware->lastWaitLink + 16))
+                (address > (gctUINT64)Hardware->lastWaitLink + 16))
             {
                 /* FE is not in WAIT/LINK yet. */
                 break;