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/mga_state.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/mga_state.c')
-rw-r--r-- | drivers/char/drm/mga_state.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c index 4e9867161170..74811727595a 100644 --- a/drivers/char/drm/mga_state.c +++ b/drivers/char/drm/mga_state.c | |||
@@ -835,7 +835,7 @@ static int mga_dma_clear(DRM_IOCTL_ARGS) | |||
835 | drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; | 835 | drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; |
836 | drm_mga_clear_t clear; | 836 | drm_mga_clear_t clear; |
837 | 837 | ||
838 | LOCK_TEST_WITH_RETURN(dev, filp); | 838 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
839 | 839 | ||
840 | DRM_COPY_FROM_USER_IOCTL(clear, (drm_mga_clear_t __user *) data, | 840 | DRM_COPY_FROM_USER_IOCTL(clear, (drm_mga_clear_t __user *) data, |
841 | sizeof(clear)); | 841 | sizeof(clear)); |
@@ -860,7 +860,7 @@ static int mga_dma_swap(DRM_IOCTL_ARGS) | |||
860 | drm_mga_private_t *dev_priv = dev->dev_private; | 860 | drm_mga_private_t *dev_priv = dev->dev_private; |
861 | drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; | 861 | drm_mga_sarea_t *sarea_priv = dev_priv->sarea_priv; |
862 | 862 | ||
863 | LOCK_TEST_WITH_RETURN(dev, filp); | 863 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
864 | 864 | ||
865 | if (sarea_priv->nbox > MGA_NR_SAREA_CLIPRECTS) | 865 | if (sarea_priv->nbox > MGA_NR_SAREA_CLIPRECTS) |
866 | sarea_priv->nbox = MGA_NR_SAREA_CLIPRECTS; | 866 | sarea_priv->nbox = MGA_NR_SAREA_CLIPRECTS; |
@@ -885,7 +885,7 @@ static int mga_dma_vertex(DRM_IOCTL_ARGS) | |||
885 | drm_mga_buf_priv_t *buf_priv; | 885 | drm_mga_buf_priv_t *buf_priv; |
886 | drm_mga_vertex_t vertex; | 886 | drm_mga_vertex_t vertex; |
887 | 887 | ||
888 | LOCK_TEST_WITH_RETURN(dev, filp); | 888 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
889 | 889 | ||
890 | DRM_COPY_FROM_USER_IOCTL(vertex, | 890 | DRM_COPY_FROM_USER_IOCTL(vertex, |
891 | (drm_mga_vertex_t __user *) data, | 891 | (drm_mga_vertex_t __user *) data, |
@@ -925,7 +925,7 @@ static int mga_dma_indices(DRM_IOCTL_ARGS) | |||
925 | drm_mga_buf_priv_t *buf_priv; | 925 | drm_mga_buf_priv_t *buf_priv; |
926 | drm_mga_indices_t indices; | 926 | drm_mga_indices_t indices; |
927 | 927 | ||
928 | LOCK_TEST_WITH_RETURN(dev, filp); | 928 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
929 | 929 | ||
930 | DRM_COPY_FROM_USER_IOCTL(indices, | 930 | DRM_COPY_FROM_USER_IOCTL(indices, |
931 | (drm_mga_indices_t __user *) data, | 931 | (drm_mga_indices_t __user *) data, |
@@ -966,7 +966,7 @@ static int mga_dma_iload(DRM_IOCTL_ARGS) | |||
966 | drm_mga_iload_t iload; | 966 | drm_mga_iload_t iload; |
967 | DRM_DEBUG("\n"); | 967 | DRM_DEBUG("\n"); |
968 | 968 | ||
969 | LOCK_TEST_WITH_RETURN(dev, filp); | 969 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
970 | 970 | ||
971 | DRM_COPY_FROM_USER_IOCTL(iload, (drm_mga_iload_t __user *) data, | 971 | DRM_COPY_FROM_USER_IOCTL(iload, (drm_mga_iload_t __user *) data, |
972 | sizeof(iload)); | 972 | sizeof(iload)); |
@@ -1008,7 +1008,7 @@ static int mga_dma_blit(DRM_IOCTL_ARGS) | |||
1008 | drm_mga_blit_t blit; | 1008 | drm_mga_blit_t blit; |
1009 | DRM_DEBUG("\n"); | 1009 | DRM_DEBUG("\n"); |
1010 | 1010 | ||
1011 | LOCK_TEST_WITH_RETURN(dev, filp); | 1011 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
1012 | 1012 | ||
1013 | DRM_COPY_FROM_USER_IOCTL(blit, (drm_mga_blit_t __user *) data, | 1013 | DRM_COPY_FROM_USER_IOCTL(blit, (drm_mga_blit_t __user *) data, |
1014 | sizeof(blit)); | 1014 | sizeof(blit)); |