| .. | .. |
|---|
| 114 | 114 | (dev_priv->active_display_unit == vmw_du_screen_target); |
|---|
| 115 | 115 | break; |
|---|
| 116 | 116 | case DRM_VMW_PARAM_DX: |
|---|
| 117 | | - param->value = dev_priv->has_dx; |
|---|
| 117 | + param->value = has_sm4_context(dev_priv); |
|---|
| 118 | 118 | break; |
|---|
| 119 | 119 | case DRM_VMW_PARAM_SM4_1: |
|---|
| 120 | | - param->value = dev_priv->has_sm4_1; |
|---|
| 120 | + param->value = has_sm4_1_context(dev_priv); |
|---|
| 121 | + break; |
|---|
| 122 | + case DRM_VMW_PARAM_SM5: |
|---|
| 123 | + param->value = has_sm5_context(dev_priv); |
|---|
| 121 | 124 | break; |
|---|
| 122 | 125 | default: |
|---|
| 123 | 126 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 126 | 129 | return 0; |
|---|
| 127 | 130 | } |
|---|
| 128 | 131 | |
|---|
| 129 | | -static u32 vmw_mask_multisample(unsigned int cap, u32 fmt_value) |
|---|
| 132 | +static u32 vmw_mask_legacy_multisample(unsigned int cap, u32 fmt_value) |
|---|
| 130 | 133 | { |
|---|
| 131 | 134 | /* |
|---|
| 132 | 135 | * A version of user-space exists which use MULTISAMPLE_MASKABLESAMPLES |
|---|
| 133 | 136 | * to check the sample count supported by virtual device. Since there |
|---|
| 134 | 137 | * never was support for multisample count for backing MOB return 0. |
|---|
| 138 | + * |
|---|
| 139 | + * MULTISAMPLE_MASKABLESAMPLES devcap is marked as deprecated by virtual |
|---|
| 140 | + * device. |
|---|
| 135 | 141 | */ |
|---|
| 136 | | - if (cap == SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES) |
|---|
| 142 | + if (cap == SVGA3D_DEVCAP_DEAD5) |
|---|
| 137 | 143 | return 0; |
|---|
| 138 | 144 | |
|---|
| 139 | 145 | return fmt_value; |
|---|
| .. | .. |
|---|
| 164 | 170 | for (i = 0; i < max_size; ++i) { |
|---|
| 165 | 171 | vmw_write(dev_priv, SVGA_REG_DEV_CAP, i); |
|---|
| 166 | 172 | compat_cap->pairs[i][0] = i; |
|---|
| 167 | | - compat_cap->pairs[i][1] = vmw_mask_multisample |
|---|
| 173 | + compat_cap->pairs[i][1] = vmw_mask_legacy_multisample |
|---|
| 168 | 174 | (i, vmw_read(dev_priv, SVGA_REG_DEV_CAP)); |
|---|
| 169 | 175 | } |
|---|
| 170 | 176 | spin_unlock(&dev_priv->cap_lock); |
|---|
| .. | .. |
|---|
| 188 | 194 | struct vmw_fpriv *vmw_fp = vmw_fpriv(file_priv); |
|---|
| 189 | 195 | |
|---|
| 190 | 196 | if (unlikely(arg->pad64 != 0 || arg->max_size == 0)) { |
|---|
| 191 | | - DRM_ERROR("Illegal GET_3D_CAP argument.\n"); |
|---|
| 197 | + VMW_DEBUG_USER("Illegal GET_3D_CAP argument.\n"); |
|---|
| 192 | 198 | return -EINVAL; |
|---|
| 193 | 199 | } |
|---|
| 194 | 200 | |
|---|
| .. | .. |
|---|
| 220 | 226 | spin_lock(&dev_priv->cap_lock); |
|---|
| 221 | 227 | for (i = 0; i < num; ++i) { |
|---|
| 222 | 228 | vmw_write(dev_priv, SVGA_REG_DEV_CAP, i); |
|---|
| 223 | | - *bounce32++ = vmw_mask_multisample |
|---|
| 229 | + *bounce32++ = vmw_mask_legacy_multisample |
|---|
| 224 | 230 | (i, vmw_read(dev_priv, SVGA_REG_DEV_CAP)); |
|---|
| 225 | 231 | } |
|---|
| 226 | 232 | spin_unlock(&dev_priv->cap_lock); |
|---|
| .. | .. |
|---|
| 268 | 274 | return 0; |
|---|
| 269 | 275 | |
|---|
| 270 | 276 | if (clips_ptr == NULL) { |
|---|
| 271 | | - DRM_ERROR("Variable clips_ptr must be specified.\n"); |
|---|
| 277 | + VMW_DEBUG_USER("Variable clips_ptr must be specified.\n"); |
|---|
| 272 | 278 | ret = -EINVAL; |
|---|
| 273 | 279 | goto out_clips; |
|---|
| 274 | 280 | } |
|---|
| .. | .. |
|---|
| 291 | 297 | |
|---|
| 292 | 298 | fb = drm_framebuffer_lookup(dev, file_priv, arg->fb_id); |
|---|
| 293 | 299 | if (!fb) { |
|---|
| 294 | | - DRM_ERROR("Invalid framebuffer id.\n"); |
|---|
| 300 | + VMW_DEBUG_USER("Invalid framebuffer id.\n"); |
|---|
| 295 | 301 | ret = -ENOENT; |
|---|
| 296 | 302 | goto out_no_fb; |
|---|
| 297 | 303 | } |
|---|
| .. | .. |
|---|
| 351 | 357 | return 0; |
|---|
| 352 | 358 | |
|---|
| 353 | 359 | if (clips_ptr == NULL) { |
|---|
| 354 | | - DRM_ERROR("Argument clips_ptr must be specified.\n"); |
|---|
| 360 | + VMW_DEBUG_USER("Argument clips_ptr must be specified.\n"); |
|---|
| 355 | 361 | ret = -EINVAL; |
|---|
| 356 | 362 | goto out_clips; |
|---|
| 357 | 363 | } |
|---|
| .. | .. |
|---|
| 374 | 380 | |
|---|
| 375 | 381 | fb = drm_framebuffer_lookup(dev, file_priv, arg->fb_id); |
|---|
| 376 | 382 | if (!fb) { |
|---|
| 377 | | - DRM_ERROR("Invalid framebuffer id.\n"); |
|---|
| 383 | + VMW_DEBUG_USER("Invalid framebuffer id.\n"); |
|---|
| 378 | 384 | ret = -ENOENT; |
|---|
| 379 | 385 | goto out_no_fb; |
|---|
| 380 | 386 | } |
|---|
| 381 | 387 | |
|---|
| 382 | 388 | vfb = vmw_framebuffer_to_vfb(fb); |
|---|
| 383 | 389 | if (!vfb->bo) { |
|---|
| 384 | | - DRM_ERROR("Framebuffer not buffer backed.\n"); |
|---|
| 390 | + VMW_DEBUG_USER("Framebuffer not buffer backed.\n"); |
|---|
| 385 | 391 | ret = -EINVAL; |
|---|
| 386 | 392 | goto out_no_ttm_lock; |
|---|
| 387 | 393 | } |
|---|