mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 06:40:22 +01:00
Connect INTEL_DEBUG=sync up to cmd/batch ioctls.
This commit is contained in:
parent
0536268267
commit
183abbcd6b
1 changed files with 30 additions and 2 deletions
|
|
@ -43,6 +43,26 @@
|
|||
#include "drm.h"
|
||||
#include "bufmgr.h"
|
||||
|
||||
static int intelWaitIdleLocked( struct intel_context *intel )
|
||||
{
|
||||
static int in_wait_idle = 0;
|
||||
unsigned int fence;
|
||||
|
||||
if (!in_wait_idle) {
|
||||
if (INTEL_DEBUG & DEBUG_SYNC) {
|
||||
fprintf(stderr, "waiting for idle\n");
|
||||
}
|
||||
|
||||
in_wait_idle = 1;
|
||||
fence = bmSetFence(intel);
|
||||
intelWaitIrq(intel, fence);
|
||||
in_wait_idle = 0;
|
||||
|
||||
return bmTestFence(intel, fence);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int intelEmitIrqLocked( struct intel_context *intel )
|
||||
{
|
||||
|
|
@ -139,7 +159,11 @@ void intel_batch_ioctl( struct intel_context *intel,
|
|||
UNLOCK_HARDWARE(intel);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_SYNC) {
|
||||
intelWaitIdleLocked(intel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void intel_cmd_ioctl( struct intel_context *intel,
|
||||
|
|
@ -171,5 +195,9 @@ void intel_cmd_ioctl( struct intel_context *intel,
|
|||
UNLOCK_HARDWARE(intel);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_SYNC) {
|
||||
intelWaitIdleLocked(intel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue