diff options
Diffstat (limited to 'drivers/char/drm/i915_dma.c')
-rw-r--r-- | drivers/char/drm/i915_dma.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index ea52740af4f6..3359cc2b9736 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -47,7 +47,7 @@ | |||
47 | * the head pointer changes, so that EBUSY only happens if the ring | 47 | * the head pointer changes, so that EBUSY only happens if the ring |
48 | * actually stalls for (eg) 3 seconds. | 48 | * actually stalls for (eg) 3 seconds. |
49 | */ | 49 | */ |
50 | int i915_wait_ring(drm_device_t * dev, int n, const char *caller) | 50 | int i915_wait_ring(struct drm_device * dev, int n, const char *caller) |
51 | { | 51 | { |
52 | drm_i915_private_t *dev_priv = dev->dev_private; | 52 | drm_i915_private_t *dev_priv = dev->dev_private; |
53 | drm_i915_ring_buffer_t *ring = &(dev_priv->ring); | 53 | drm_i915_ring_buffer_t *ring = &(dev_priv->ring); |
@@ -73,7 +73,7 @@ int i915_wait_ring(drm_device_t * dev, int n, const char *caller) | |||
73 | return DRM_ERR(EBUSY); | 73 | return DRM_ERR(EBUSY); |
74 | } | 74 | } |
75 | 75 | ||
76 | void i915_kernel_lost_context(drm_device_t * dev) | 76 | void i915_kernel_lost_context(struct drm_device * dev) |
77 | { | 77 | { |
78 | drm_i915_private_t *dev_priv = dev->dev_private; | 78 | drm_i915_private_t *dev_priv = dev->dev_private; |
79 | drm_i915_ring_buffer_t *ring = &(dev_priv->ring); | 79 | drm_i915_ring_buffer_t *ring = &(dev_priv->ring); |
@@ -88,7 +88,7 @@ void i915_kernel_lost_context(drm_device_t * dev) | |||
88 | dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY; | 88 | dev_priv->sarea_priv->perf_boxes |= I915_BOX_RING_EMPTY; |
89 | } | 89 | } |
90 | 90 | ||
91 | static int i915_dma_cleanup(drm_device_t * dev) | 91 | static int i915_dma_cleanup(struct drm_device * dev) |
92 | { | 92 | { |
93 | /* Make sure interrupts are disabled here because the uninstall ioctl | 93 | /* Make sure interrupts are disabled here because the uninstall ioctl |
94 | * may not have been called from userspace and after dev_private | 94 | * may not have been called from userspace and after dev_private |
@@ -126,13 +126,13 @@ static int i915_dma_cleanup(drm_device_t * dev) | |||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
129 | static int i915_initialize(drm_device_t * dev, | 129 | static int i915_initialize(struct drm_device * dev, |
130 | drm_i915_private_t * dev_priv, | 130 | drm_i915_private_t * dev_priv, |
131 | drm_i915_init_t * init) | 131 | drm_i915_init_t * init) |
132 | { | 132 | { |
133 | memset(dev_priv, 0, sizeof(drm_i915_private_t)); | 133 | memset(dev_priv, 0, sizeof(drm_i915_private_t)); |
134 | 134 | ||
135 | DRM_GETSAREA(); | 135 | dev_priv->sarea = drm_getsarea(dev); |
136 | if (!dev_priv->sarea) { | 136 | if (!dev_priv->sarea) { |
137 | DRM_ERROR("can not find sarea!\n"); | 137 | DRM_ERROR("can not find sarea!\n"); |
138 | dev->dev_private = (void *)dev_priv; | 138 | dev->dev_private = (void *)dev_priv; |
@@ -211,7 +211,7 @@ static int i915_initialize(drm_device_t * dev, | |||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | 213 | ||
214 | static int i915_dma_resume(drm_device_t * dev) | 214 | static int i915_dma_resume(struct drm_device * dev) |
215 | { | 215 | { |
216 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 216 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
217 | 217 | ||
@@ -357,7 +357,7 @@ static int validate_cmd(int cmd) | |||
357 | return ret; | 357 | return ret; |
358 | } | 358 | } |
359 | 359 | ||
360 | static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords) | 360 | static int i915_emit_cmds(struct drm_device * dev, int __user * buffer, int dwords) |
361 | { | 361 | { |
362 | drm_i915_private_t *dev_priv = dev->dev_private; | 362 | drm_i915_private_t *dev_priv = dev->dev_private; |
363 | int i; | 363 | int i; |
@@ -396,12 +396,12 @@ static int i915_emit_cmds(drm_device_t * dev, int __user * buffer, int dwords) | |||
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
398 | 398 | ||
399 | static int i915_emit_box(drm_device_t * dev, | 399 | static int i915_emit_box(struct drm_device * dev, |
400 | drm_clip_rect_t __user * boxes, | 400 | struct drm_clip_rect __user * boxes, |
401 | int i, int DR1, int DR4) | 401 | int i, int DR1, int DR4) |
402 | { | 402 | { |
403 | drm_i915_private_t *dev_priv = dev->dev_private; | 403 | drm_i915_private_t *dev_priv = dev->dev_private; |
404 | drm_clip_rect_t box; | 404 | struct drm_clip_rect box; |
405 | RING_LOCALS; | 405 | RING_LOCALS; |
406 | 406 | ||
407 | if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) { | 407 | if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) { |
@@ -439,7 +439,7 @@ static int i915_emit_box(drm_device_t * dev, | |||
439 | * emit. For now, do it in both places: | 439 | * emit. For now, do it in both places: |
440 | */ | 440 | */ |
441 | 441 | ||
442 | static void i915_emit_breadcrumb(drm_device_t *dev) | 442 | static void i915_emit_breadcrumb(struct drm_device *dev) |
443 | { | 443 | { |
444 | drm_i915_private_t *dev_priv = dev->dev_private; | 444 | drm_i915_private_t *dev_priv = dev->dev_private; |
445 | RING_LOCALS; | 445 | RING_LOCALS; |
@@ -457,7 +457,7 @@ static void i915_emit_breadcrumb(drm_device_t *dev) | |||
457 | ADVANCE_LP_RING(); | 457 | ADVANCE_LP_RING(); |
458 | } | 458 | } |
459 | 459 | ||
460 | static int i915_dispatch_cmdbuffer(drm_device_t * dev, | 460 | static int i915_dispatch_cmdbuffer(struct drm_device * dev, |
461 | drm_i915_cmdbuffer_t * cmd) | 461 | drm_i915_cmdbuffer_t * cmd) |
462 | { | 462 | { |
463 | int nbox = cmd->num_cliprects; | 463 | int nbox = cmd->num_cliprects; |
@@ -489,11 +489,11 @@ static int i915_dispatch_cmdbuffer(drm_device_t * dev, | |||
489 | return 0; | 489 | return 0; |
490 | } | 490 | } |
491 | 491 | ||
492 | static int i915_dispatch_batchbuffer(drm_device_t * dev, | 492 | static int i915_dispatch_batchbuffer(struct drm_device * dev, |
493 | drm_i915_batchbuffer_t * batch) | 493 | drm_i915_batchbuffer_t * batch) |
494 | { | 494 | { |
495 | drm_i915_private_t *dev_priv = dev->dev_private; | 495 | drm_i915_private_t *dev_priv = dev->dev_private; |
496 | drm_clip_rect_t __user *boxes = batch->cliprects; | 496 | struct drm_clip_rect __user *boxes = batch->cliprects; |
497 | int nbox = batch->num_cliprects; | 497 | int nbox = batch->num_cliprects; |
498 | int i = 0, count; | 498 | int i = 0, count; |
499 | RING_LOCALS; | 499 | RING_LOCALS; |
@@ -535,7 +535,7 @@ static int i915_dispatch_batchbuffer(drm_device_t * dev, | |||
535 | return 0; | 535 | return 0; |
536 | } | 536 | } |
537 | 537 | ||
538 | static int i915_dispatch_flip(drm_device_t * dev) | 538 | static int i915_dispatch_flip(struct drm_device * dev) |
539 | { | 539 | { |
540 | drm_i915_private_t *dev_priv = dev->dev_private; | 540 | drm_i915_private_t *dev_priv = dev->dev_private; |
541 | RING_LOCALS; | 541 | RING_LOCALS; |
@@ -583,7 +583,7 @@ static int i915_dispatch_flip(drm_device_t * dev) | |||
583 | return 0; | 583 | return 0; |
584 | } | 584 | } |
585 | 585 | ||
586 | static int i915_quiescent(drm_device_t * dev) | 586 | static int i915_quiescent(struct drm_device * dev) |
587 | { | 587 | { |
588 | drm_i915_private_t *dev_priv = dev->dev_private; | 588 | drm_i915_private_t *dev_priv = dev->dev_private; |
589 | 589 | ||
@@ -625,7 +625,7 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS) | |||
625 | 625 | ||
626 | if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, | 626 | if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects, |
627 | batch.num_cliprects * | 627 | batch.num_cliprects * |
628 | sizeof(drm_clip_rect_t))) | 628 | sizeof(struct drm_clip_rect))) |
629 | return DRM_ERR(EFAULT); | 629 | return DRM_ERR(EFAULT); |
630 | 630 | ||
631 | ret = i915_dispatch_batchbuffer(dev, &batch); | 631 | ret = i915_dispatch_batchbuffer(dev, &batch); |
@@ -655,7 +655,7 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) | |||
655 | if (cmdbuf.num_cliprects && | 655 | if (cmdbuf.num_cliprects && |
656 | DRM_VERIFYAREA_READ(cmdbuf.cliprects, | 656 | DRM_VERIFYAREA_READ(cmdbuf.cliprects, |
657 | cmdbuf.num_cliprects * | 657 | cmdbuf.num_cliprects * |
658 | sizeof(drm_clip_rect_t))) { | 658 | sizeof(struct drm_clip_rect))) { |
659 | DRM_ERROR("Fault accessing cliprects\n"); | 659 | DRM_ERROR("Fault accessing cliprects\n"); |
660 | return DRM_ERR(EFAULT); | 660 | return DRM_ERR(EFAULT); |
661 | } | 661 | } |
@@ -792,7 +792,7 @@ static int i915_set_status_page(DRM_IOCTL_ARGS) | |||
792 | return 0; | 792 | return 0; |
793 | } | 793 | } |
794 | 794 | ||
795 | int i915_driver_load(drm_device_t *dev, unsigned long flags) | 795 | int i915_driver_load(struct drm_device *dev, unsigned long flags) |
796 | { | 796 | { |
797 | /* i915 has 4 more counters */ | 797 | /* i915 has 4 more counters */ |
798 | dev->counters += 4; | 798 | dev->counters += 4; |
@@ -804,7 +804,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) | |||
804 | return 0; | 804 | return 0; |
805 | } | 805 | } |
806 | 806 | ||
807 | void i915_driver_lastclose(drm_device_t * dev) | 807 | void i915_driver_lastclose(struct drm_device * dev) |
808 | { | 808 | { |
809 | if (dev->dev_private) { | 809 | if (dev->dev_private) { |
810 | drm_i915_private_t *dev_priv = dev->dev_private; | 810 | drm_i915_private_t *dev_priv = dev->dev_private; |
@@ -813,7 +813,7 @@ void i915_driver_lastclose(drm_device_t * dev) | |||
813 | i915_dma_cleanup(dev); | 813 | i915_dma_cleanup(dev); |
814 | } | 814 | } |
815 | 815 | ||
816 | void i915_driver_preclose(drm_device_t * dev, DRMFILE filp) | 816 | void i915_driver_preclose(struct drm_device * dev, DRMFILE filp) |
817 | { | 817 | { |
818 | if (dev->dev_private) { | 818 | if (dev->dev_private) { |
819 | drm_i915_private_t *dev_priv = dev->dev_private; | 819 | drm_i915_private_t *dev_priv = dev->dev_private; |
@@ -854,7 +854,7 @@ int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); | |||
854 | * \returns | 854 | * \returns |
855 | * A value of 1 is always retured to indictate every i9x5 is AGP. | 855 | * A value of 1 is always retured to indictate every i9x5 is AGP. |
856 | */ | 856 | */ |
857 | int i915_driver_device_is_agp(drm_device_t * dev) | 857 | int i915_driver_device_is_agp(struct drm_device * dev) |
858 | { | 858 | { |
859 | return 1; | 859 | return 1; |
860 | } | 860 | } |