diff options
author | Eric Anholt <[email protected]> | 2007-06-19 15:15:40 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2007-09-19 10:50:19 -0700 |
commit | 9070e6b9970a6aeabfff07b259e0e1660980cc59 (patch) | |
tree | 511c7a1ff74aaec141925a726ff006e6198ec2eb | |
parent | 3800599bd4f6185c1eefc5d44794525ec4a3e406 (diff) |
i915: Quiet valgrind by initializing the seq value the kernel writes into.
Also, add a couple of comments to the wait/emit IRQ functions.
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_ioctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_ioctl.c b/src/mesa/drivers/dri/i915/intel_ioctl.c index ede3b6378fe..ddd92782db0 100644 --- a/src/mesa/drivers/dri/i915/intel_ioctl.c +++ b/src/mesa/drivers/dri/i915/intel_ioctl.c @@ -53,6 +53,10 @@ u_int32_t intelGetLastFrame (intelContextPtr intel) return frame; } +/** + * Emits a marker in the command stream, numbered from 0x00000001 to + * 0x7fffffff. + */ int intelEmitIrqLocked( intelContextPtr intel ) { drmI830IrqEmit ie; @@ -61,6 +65,10 @@ int intelEmitIrqLocked( intelContextPtr intel ) assert(((*(int *)intel->driHwLock) & ~DRM_LOCK_CONT) == (DRM_LOCK_HELD|intel->hHWContext)); + /* Valgrind can't tell that the kernel will have copyout()ed onto this + * value, so initialize it now to prevent false positives. + */ + seq = 0; ie.irq_seq = &seq; ret = drmCommandWriteRead( intel->driFd, DRM_I830_IRQ_EMIT, @@ -76,6 +84,7 @@ int intelEmitIrqLocked( intelContextPtr intel ) return seq; } +/** Blocks on a marker returned by intelEitIrqLocked(). */ void intelWaitIrq( intelContextPtr intel, int seq ) { int ret; |