aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/savage_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/savage_state.c')
-rw-r--r--drivers/char/drm/savage_state.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/char/drm/savage_state.c b/drivers/char/drm/savage_state.c
index 1ca1e9cb5a33..73fa9ef43c57 100644
--- a/drivers/char/drm/savage_state.c
+++ b/drivers/char/drm/savage_state.c
@@ -27,7 +27,7 @@
27#include "savage_drv.h" 27#include "savage_drv.h"
28 28
29void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv, 29void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
30 const drm_clip_rect_t * pbox) 30 const struct drm_clip_rect * pbox)
31{ 31{
32 uint32_t scstart = dev_priv->state.s3d.new_scstart; 32 uint32_t scstart = dev_priv->state.s3d.new_scstart;
33 uint32_t scend = dev_priv->state.s3d.new_scend; 33 uint32_t scend = dev_priv->state.s3d.new_scend;
@@ -53,7 +53,7 @@ void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv,
53} 53}
54 54
55void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv, 55void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv,
56 const drm_clip_rect_t * pbox) 56 const struct drm_clip_rect * pbox)
57{ 57{
58 uint32_t drawctrl0 = dev_priv->state.s4.new_drawctrl0; 58 uint32_t drawctrl0 = dev_priv->state.s4.new_drawctrl0;
59 uint32_t drawctrl1 = dev_priv->state.s4.new_drawctrl1; 59 uint32_t drawctrl1 = dev_priv->state.s4.new_drawctrl1;
@@ -792,7 +792,7 @@ static int savage_dispatch_clear(drm_savage_private_t * dev_priv,
792 const drm_savage_cmd_header_t * cmd_header, 792 const drm_savage_cmd_header_t * cmd_header,
793 const drm_savage_cmd_header_t *data, 793 const drm_savage_cmd_header_t *data,
794 unsigned int nbox, 794 unsigned int nbox,
795 const drm_clip_rect_t *boxes) 795 const struct drm_clip_rect *boxes)
796{ 796{
797 unsigned int flags = cmd_header->clear0.flags; 797 unsigned int flags = cmd_header->clear0.flags;
798 unsigned int clear_cmd; 798 unsigned int clear_cmd;
@@ -861,7 +861,7 @@ static int savage_dispatch_clear(drm_savage_private_t * dev_priv,
861} 861}
862 862
863static int savage_dispatch_swap(drm_savage_private_t * dev_priv, 863static int savage_dispatch_swap(drm_savage_private_t * dev_priv,
864 unsigned int nbox, const drm_clip_rect_t *boxes) 864 unsigned int nbox, const struct drm_clip_rect *boxes)
865{ 865{
866 unsigned int swap_cmd; 866 unsigned int swap_cmd;
867 unsigned int i; 867 unsigned int i;
@@ -896,7 +896,7 @@ static int savage_dispatch_draw(drm_savage_private_t * dev_priv,
896 const unsigned int *vtxbuf, 896 const unsigned int *vtxbuf,
897 unsigned int vb_size, unsigned int vb_stride, 897 unsigned int vb_size, unsigned int vb_stride,
898 unsigned int nbox, 898 unsigned int nbox,
899 const drm_clip_rect_t *boxes) 899 const struct drm_clip_rect *boxes)
900{ 900{
901 unsigned int i, j; 901 unsigned int i, j;
902 int ret; 902 int ret;
@@ -963,7 +963,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
963 drm_savage_cmd_header_t *kcmd_addr = NULL; 963 drm_savage_cmd_header_t *kcmd_addr = NULL;
964 drm_savage_cmd_header_t *first_draw_cmd; 964 drm_savage_cmd_header_t *first_draw_cmd;
965 unsigned int *kvb_addr = NULL; 965 unsigned int *kvb_addr = NULL;
966 drm_clip_rect_t *kbox_addr = NULL; 966 struct drm_clip_rect *kbox_addr = NULL;
967 unsigned int i, j; 967 unsigned int i, j;
968 int ret = 0; 968 int ret = 0;
969 969
@@ -1019,7 +1019,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
1019 cmdbuf.vb_addr = kvb_addr; 1019 cmdbuf.vb_addr = kvb_addr;
1020 } 1020 }
1021 if (cmdbuf.nbox) { 1021 if (cmdbuf.nbox) {
1022 kbox_addr = drm_alloc(cmdbuf.nbox * sizeof(drm_clip_rect_t), 1022 kbox_addr = drm_alloc(cmdbuf.nbox * sizeof(struct drm_clip_rect),
1023 DRM_MEM_DRIVER); 1023 DRM_MEM_DRIVER);
1024 if (kbox_addr == NULL) { 1024 if (kbox_addr == NULL) {
1025 ret = DRM_ERR(ENOMEM); 1025 ret = DRM_ERR(ENOMEM);
@@ -1027,7 +1027,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
1027 } 1027 }
1028 1028
1029 if (DRM_COPY_FROM_USER(kbox_addr, cmdbuf.box_addr, 1029 if (DRM_COPY_FROM_USER(kbox_addr, cmdbuf.box_addr,
1030 cmdbuf.nbox * sizeof(drm_clip_rect_t))) { 1030 cmdbuf.nbox * sizeof(struct drm_clip_rect))) {
1031 ret = DRM_ERR(EFAULT); 1031 ret = DRM_ERR(EFAULT);
1032 goto done; 1032 goto done;
1033 } 1033 }
@@ -1158,7 +1158,7 @@ done:
1158 /* If we didn't need to allocate them, these'll be NULL */ 1158 /* If we didn't need to allocate them, these'll be NULL */
1159 drm_free(kcmd_addr, cmdbuf.size * 8, DRM_MEM_DRIVER); 1159 drm_free(kcmd_addr, cmdbuf.size * 8, DRM_MEM_DRIVER);
1160 drm_free(kvb_addr, cmdbuf.vb_size, DRM_MEM_DRIVER); 1160 drm_free(kvb_addr, cmdbuf.vb_size, DRM_MEM_DRIVER);
1161 drm_free(kbox_addr, cmdbuf.nbox * sizeof(drm_clip_rect_t), 1161 drm_free(kbox_addr, cmdbuf.nbox * sizeof(struct drm_clip_rect),
1162 DRM_MEM_DRIVER); 1162 DRM_MEM_DRIVER);
1163 1163
1164 return ret; 1164 return ret;