diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-25 06:23:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-14 20:38:20 -0400 |
commit | 6c340eac0285f3d62406d2d902d0e96fbf2a5dc0 (patch) | |
tree | a92039951cb7eaced306cfff2bad6af0ac5257ad /drivers/char/drm/i915_dma.c | |
parent | 20caafa6ecb2487d9b223aa33e7cc704f912a758 (diff) |
drm: Replace filp in ioctl arguments with drm_file *file_priv.
As a fallout, replace filp storage with file_priv storage for "unique
identifier of a client" all over the DRM. There is a 1:1 mapping, so this
should be a noop. This could be a minor performance improvement, as everyth
on Linux dereferenced filp to get file_priv anyway, while only the mmap ioct
went the other direction.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/i915_dma.c')
-rw-r--r-- | drivers/char/drm/i915_dma.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index a7566ff1a3ea..25d8b2b9524d 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -602,7 +602,7 @@ static int i915_flush_ioctl(DRM_IOCTL_ARGS) | |||
602 | { | 602 | { |
603 | DRM_DEVICE; | 603 | DRM_DEVICE; |
604 | 604 | ||
605 | LOCK_TEST_WITH_RETURN(dev, filp); | 605 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
606 | 606 | ||
607 | return i915_quiescent(dev); | 607 | return i915_quiescent(dev); |
608 | } | 608 | } |
@@ -628,7 +628,7 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS) | |||
628 | DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n", | 628 | DRM_DEBUG("i915 batchbuffer, start %x used %d cliprects %d\n", |
629 | batch.start, batch.used, batch.num_cliprects); | 629 | batch.start, batch.used, batch.num_cliprects); |
630 | 630 | ||
631 | LOCK_TEST_WITH_RETURN(dev, filp); | 631 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
632 | 632 | ||
633 | if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, | 633 | if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, |
634 | batch.num_cliprects * | 634 | batch.num_cliprects * |
@@ -657,7 +657,7 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) | |||
657 | DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n", | 657 | DRM_DEBUG("i915 cmdbuffer, buf %p sz %d cliprects %d\n", |
658 | cmdbuf.buf, cmdbuf.sz, cmdbuf.num_cliprects); | 658 | cmdbuf.buf, cmdbuf.sz, cmdbuf.num_cliprects); |
659 | 659 | ||
660 | LOCK_TEST_WITH_RETURN(dev, filp); | 660 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
661 | 661 | ||
662 | if (cmdbuf.num_cliprects && | 662 | if (cmdbuf.num_cliprects && |
663 | DRM_VERIFYAREA_READ(cmdbuf.cliprects, | 663 | DRM_VERIFYAREA_READ(cmdbuf.cliprects, |
@@ -683,7 +683,7 @@ static int i915_flip_bufs(DRM_IOCTL_ARGS) | |||
683 | 683 | ||
684 | DRM_DEBUG("%s\n", __FUNCTION__); | 684 | DRM_DEBUG("%s\n", __FUNCTION__); |
685 | 685 | ||
686 | LOCK_TEST_WITH_RETURN(dev, filp); | 686 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
687 | 687 | ||
688 | return i915_dispatch_flip(dev); | 688 | return i915_dispatch_flip(dev); |
689 | } | 689 | } |
@@ -821,11 +821,11 @@ void i915_driver_lastclose(struct drm_device * dev) | |||
821 | i915_dma_cleanup(dev); | 821 | i915_dma_cleanup(dev); |
822 | } | 822 | } |
823 | 823 | ||
824 | void i915_driver_preclose(struct drm_device * dev, DRMFILE filp) | 824 | void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) |
825 | { | 825 | { |
826 | if (dev->dev_private) { | 826 | if (dev->dev_private) { |
827 | drm_i915_private_t *dev_priv = dev->dev_private; | 827 | drm_i915_private_t *dev_priv = dev->dev_private; |
828 | i915_mem_release(dev, filp, dev_priv->agp_heap); | 828 | i915_mem_release(dev, file_priv, dev_priv->agp_heap); |
829 | } | 829 | } |
830 | } | 830 | } |
831 | 831 | ||