gfx: pvr: fix corrupted command trace for SGX transfer command
authorImre Deak <imre.deak@intel.com>
Wed, 11 Jan 2012 14:07:48 +0000 (16:07 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:34 +0000 (12:29 +0300)
When the transfer command is called with the SGXMKIF_TQFLAGS_KEEPPENDING
source and destination sync counters were not zeroed in the
corresponding trace record, leading to a corrupted trace output.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Tested-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/pvr/services4/srvkm/devices/sgx/sgxtransfer.c

index f804650..0a6d65d 100644 (file)
@@ -171,6 +171,11 @@ IMG_EXPORT PVRSRV_ERROR SGXSubmitTransferKM(IMG_HANDLE hDevHandle, PVRSRV_TRANSF
 
                        pvr_trcmd_set_syn(&ttrace->dst_syn[loop], psSyncInfo);
                }
+       } else {
+               for (loop = 0; loop < SGX_MAX_TRANSFER_SYNC_OPS; loop++) {
+                       pvr_trcmd_clear_syn(&ttrace->src_syn[loop]);
+                       pvr_trcmd_clear_syn(&ttrace->dst_syn[loop]);
+               }
        }
 
 #if defined(PDUMP)