From: Jiyu Yang Date: Thu, 29 Apr 2021 08:47:03 +0000 (+0800) Subject: MGS-6145 [#imx-2455] fix the QueryIdle fail when no weston X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~78 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=7742a338e205b4b2c0553868b10ea42d66108db0;p=linux.git MGS-6145 [#imx-2455] fix the QueryIdle fail when no weston 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 --- diff --git a/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c index a31808d196bc..445ad027d457 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c +++ b/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c @@ -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;