diff options
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c index 04b64f9cbfdb..a4b71b25fa53 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c | |||
@@ -151,7 +151,7 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, | |||
151 | struct qxl_bo *cmd_bo; | 151 | struct qxl_bo *cmd_bo; |
152 | int release_type; | 152 | int release_type; |
153 | struct drm_qxl_command *commands = | 153 | struct drm_qxl_command *commands = |
154 | (struct drm_qxl_command *)execbuffer->commands; | 154 | (struct drm_qxl_command *)(uintptr_t)execbuffer->commands; |
155 | 155 | ||
156 | if (DRM_COPY_FROM_USER(&user_cmd, &commands[cmd_num], | 156 | if (DRM_COPY_FROM_USER(&user_cmd, &commands[cmd_num], |
157 | sizeof(user_cmd))) | 157 | sizeof(user_cmd))) |
@@ -193,7 +193,7 @@ static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, | |||
193 | 193 | ||
194 | for (i = 0 ; i < user_cmd.relocs_num; ++i) { | 194 | for (i = 0 ; i < user_cmd.relocs_num; ++i) { |
195 | if (DRM_COPY_FROM_USER(&reloc, | 195 | if (DRM_COPY_FROM_USER(&reloc, |
196 | &((struct drm_qxl_reloc *)user_cmd.relocs)[i], | 196 | &((struct drm_qxl_reloc *)(uintptr_t)user_cmd.relocs)[i], |
197 | sizeof(reloc))) { | 197 | sizeof(reloc))) { |
198 | qxl_bo_list_unreserve(&reloc_list, true); | 198 | qxl_bo_list_unreserve(&reloc_list, true); |
199 | qxl_release_unreserve(qdev, release); | 199 | qxl_release_unreserve(qdev, release); |
@@ -294,6 +294,7 @@ static int qxl_update_area_ioctl(struct drm_device *dev, void *data, | |||
294 | goto out; | 294 | goto out; |
295 | 295 | ||
296 | if (!qobj->pin_count) { | 296 | if (!qobj->pin_count) { |
297 | qxl_ttm_placement_from_domain(qobj, qobj->type); | ||
297 | ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, | 298 | ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, |
298 | true, false); | 299 | true, false); |
299 | if (unlikely(ret)) | 300 | if (unlikely(ret)) |