aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_dmablit.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-09-02 22:06:45 -0400
committerDave Airlie <airlied@optimus.(none)>2007-10-14 20:38:20 -0400
commitc153f45f9b7e30289157bba3ff5682291df16caa (patch)
tree33f21e1ebd83ec548751f3d490afe6230ab99972 /drivers/char/drm/via_dmablit.c
parentb589ee5943a9610ebaea6e4e3433f2ae4d812b0b (diff)
drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to t This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DR is lost. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_dmablit.c')
-rw-r--r--drivers/char/drm/via_dmablit.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/char/drm/via_dmablit.c b/drivers/char/drm/via_dmablit.c
index cd204f35eced..c6fd16f3cb43 100644
--- a/drivers/char/drm/via_dmablit.c
+++ b/drivers/char/drm/via_dmablit.c
@@ -781,18 +781,15 @@ via_dmablit(struct drm_device *dev, drm_via_dmablit_t *xfer)
781 */ 781 */
782 782
783int 783int
784via_dma_blit_sync( DRM_IOCTL_ARGS ) 784via_dma_blit_sync( struct drm_device *dev, void *data, struct drm_file *file_priv )
785{ 785{
786 drm_via_blitsync_t sync; 786 drm_via_blitsync_t *sync = data;
787 int err; 787 int err;
788 DRM_DEVICE;
789 788
790 DRM_COPY_FROM_USER_IOCTL(sync, (drm_via_blitsync_t *)data, sizeof(sync)); 789 if (sync->engine >= VIA_NUM_BLIT_ENGINES)
791
792 if (sync.engine >= VIA_NUM_BLIT_ENGINES)
793 return -EINVAL; 790 return -EINVAL;
794 791
795 err = via_dmablit_sync(dev, sync.sync_handle, sync.engine); 792 err = via_dmablit_sync(dev, sync->sync_handle, sync->engine);
796 793
797 if (-EINTR == err) 794 if (-EINTR == err)
798 err = -EAGAIN; 795 err = -EAGAIN;
@@ -808,17 +805,12 @@ via_dma_blit_sync( DRM_IOCTL_ARGS )
808 */ 805 */
809 806
810int 807int
811via_dma_blit( DRM_IOCTL_ARGS ) 808via_dma_blit( struct drm_device *dev, void *data, struct drm_file *file_priv )
812{ 809{
813 drm_via_dmablit_t xfer; 810 drm_via_dmablit_t *xfer = data;
814 int err; 811 int err;
815 DRM_DEVICE;
816
817 DRM_COPY_FROM_USER_IOCTL(xfer, (drm_via_dmablit_t __user *)data, sizeof(xfer));
818
819 err = via_dmablit(dev, &xfer);
820 812
821 DRM_COPY_TO_USER_IOCTL((void __user *)data, xfer, sizeof(xfer)); 813 err = via_dmablit(dev, xfer);
822 814
823 return err; 815 return err;
824} 816}