diff options
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 2ff7ba04d8c8..315f9efce765 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |||
| @@ -2010,6 +2010,11 @@ static int vmw_cmd_set_shader(struct vmw_private *dev_priv, | |||
| 2010 | return 0; | 2010 | return 0; |
| 2011 | 2011 | ||
| 2012 | if (cmd->body.shid != SVGA3D_INVALID_ID) { | 2012 | if (cmd->body.shid != SVGA3D_INVALID_ID) { |
| 2013 | /* | ||
| 2014 | * This is the compat shader path - Per device guest-backed | ||
| 2015 | * shaders, but user-space thinks it's per context host- | ||
| 2016 | * backed shaders. | ||
| 2017 | */ | ||
| 2013 | res = vmw_shader_lookup(vmw_context_res_man(ctx), | 2018 | res = vmw_shader_lookup(vmw_context_res_man(ctx), |
| 2014 | cmd->body.shid, cmd->body.type); | 2019 | cmd->body.shid, cmd->body.type); |
| 2015 | if (!IS_ERR(res)) { | 2020 | if (!IS_ERR(res)) { |
| @@ -2017,6 +2022,14 @@ static int vmw_cmd_set_shader(struct vmw_private *dev_priv, | |||
| 2017 | VMW_RES_DIRTY_NONE); | 2022 | VMW_RES_DIRTY_NONE); |
| 2018 | if (unlikely(ret != 0)) | 2023 | if (unlikely(ret != 0)) |
| 2019 | return ret; | 2024 | return ret; |
| 2025 | |||
| 2026 | ret = vmw_resource_relocation_add | ||
| 2027 | (sw_context, res, | ||
| 2028 | vmw_ptr_diff(sw_context->buf_start, | ||
| 2029 | &cmd->body.shid), | ||
| 2030 | vmw_res_rel_normal); | ||
| 2031 | if (unlikely(ret != 0)) | ||
| 2032 | return ret; | ||
| 2020 | } | 2033 | } |
| 2021 | } | 2034 | } |
| 2022 | 2035 | ||
