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.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/char/drm/savage_state.c b/drivers/char/drm/savage_state.c
index 1ca1e9cb5a33..77497841478a 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;
@@ -277,7 +277,7 @@ static int savage_dispatch_state(drm_savage_private_t * dev_priv,
277 277
278static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv, 278static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv,
279 const drm_savage_cmd_header_t * cmd_header, 279 const drm_savage_cmd_header_t * cmd_header,
280 const drm_buf_t * dmabuf) 280 const struct drm_buf * dmabuf)
281{ 281{
282 unsigned char reorder = 0; 282 unsigned char reorder = 0;
283 unsigned int prim = cmd_header->prim.prim; 283 unsigned int prim = cmd_header->prim.prim;
@@ -536,7 +536,7 @@ static int savage_dispatch_vb_prim(drm_savage_private_t * dev_priv,
536static int savage_dispatch_dma_idx(drm_savage_private_t * dev_priv, 536static int savage_dispatch_dma_idx(drm_savage_private_t * dev_priv,
537 const drm_savage_cmd_header_t * cmd_header, 537 const drm_savage_cmd_header_t * cmd_header,
538 const uint16_t *idx, 538 const uint16_t *idx,
539 const drm_buf_t * dmabuf) 539 const struct drm_buf * dmabuf)
540{ 540{
541 unsigned char reorder = 0; 541 unsigned char reorder = 0;
542 unsigned int prim = cmd_header->idx.prim; 542 unsigned int prim = cmd_header->idx.prim;
@@ -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;
@@ -892,11 +892,11 @@ static int savage_dispatch_swap(drm_savage_private_t * dev_priv,
892static int savage_dispatch_draw(drm_savage_private_t * dev_priv, 892static int savage_dispatch_draw(drm_savage_private_t * dev_priv,
893 const drm_savage_cmd_header_t *start, 893 const drm_savage_cmd_header_t *start,
894 const drm_savage_cmd_header_t *end, 894 const drm_savage_cmd_header_t *end,
895 const drm_buf_t * dmabuf, 895 const struct drm_buf * dmabuf,
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;
@@ -957,13 +957,13 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
957{ 957{
958 DRM_DEVICE; 958 DRM_DEVICE;
959 drm_savage_private_t *dev_priv = dev->dev_private; 959 drm_savage_private_t *dev_priv = dev->dev_private;
960 drm_device_dma_t *dma = dev->dma; 960 struct drm_device_dma *dma = dev->dma;
961 drm_buf_t *dmabuf; 961 struct drm_buf *dmabuf;
962 drm_savage_cmdbuf_t cmdbuf; 962 drm_savage_cmdbuf_t cmdbuf;
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;