Lines Matching refs:res
47 struct vmw_resource res; member
56 static int vmw_dx_streamoutput_create(struct vmw_resource *res);
57 static int vmw_dx_streamoutput_bind(struct vmw_resource *res,
59 static int vmw_dx_streamoutput_unbind(struct vmw_resource *res, bool readback,
61 static void vmw_dx_streamoutput_commit_notify(struct vmw_resource *res,
79 vmw_res_to_dx_streamoutput(struct vmw_resource *res) in vmw_res_to_dx_streamoutput() argument
81 return container_of(res, struct vmw_dx_streamoutput, res); in vmw_res_to_dx_streamoutput()
90 static int vmw_dx_streamoutput_unscrub(struct vmw_resource *res) in vmw_dx_streamoutput_unscrub() argument
92 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_unscrub()
93 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_unscrub()
109 cmd->body.mobid = res->guest_memory_bo->tbo.resource->start; in vmw_dx_streamoutput_unscrub()
110 cmd->body.offsetInBytes = res->guest_memory_offset; in vmw_dx_streamoutput_unscrub()
119 static int vmw_dx_streamoutput_create(struct vmw_resource *res) in vmw_dx_streamoutput_create() argument
121 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_create()
122 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_create()
127 if (vmw_resource_mob_attached(res)) { in vmw_dx_streamoutput_create()
129 ret = vmw_dx_streamoutput_unscrub(res); in vmw_dx_streamoutput_create()
133 res->id = so->id; in vmw_dx_streamoutput_create()
138 static int vmw_dx_streamoutput_bind(struct vmw_resource *res, in vmw_dx_streamoutput_bind() argument
141 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_bind()
149 ret = vmw_dx_streamoutput_unscrub(res); in vmw_dx_streamoutput_bind()
161 static int vmw_dx_streamoutput_scrub(struct vmw_resource *res) in vmw_dx_streamoutput_scrub() argument
163 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_scrub()
164 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_scrub()
181 cmd->body.soid = res->id; in vmw_dx_streamoutput_scrub()
187 res->id = -1; in vmw_dx_streamoutput_scrub()
193 static int vmw_dx_streamoutput_unbind(struct vmw_resource *res, bool readback, in vmw_dx_streamoutput_unbind() argument
196 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_unbind()
200 if (WARN_ON(res->guest_memory_bo->tbo.resource->mem_type != VMW_PL_MOB)) in vmw_dx_streamoutput_unbind()
204 ret = vmw_dx_streamoutput_scrub(res); in vmw_dx_streamoutput_unbind()
219 static void vmw_dx_streamoutput_commit_notify(struct vmw_resource *res, in vmw_dx_streamoutput_commit_notify() argument
222 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_commit_notify()
223 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_commit_notify()
229 res->id = so->id; in vmw_dx_streamoutput_commit_notify()
235 res->id = -1; in vmw_dx_streamoutput_commit_notify()
255 static void vmw_dx_streamoutput_res_free(struct vmw_resource *res) in vmw_dx_streamoutput_res_free() argument
257 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_res_free()
263 static void vmw_dx_streamoutput_hw_destroy(struct vmw_resource *res) in vmw_dx_streamoutput_hw_destroy() argument
266 res->id = -1; in vmw_dx_streamoutput_hw_destroy()
283 struct vmw_resource *res; in vmw_dx_streamoutput_add() local
292 res = &so->res; in vmw_dx_streamoutput_add()
299 ret = vmw_resource_init(dev_priv, res, true, in vmw_dx_streamoutput_add()
306 res, list); in vmw_dx_streamoutput_add()
310 res->id = so->id; in vmw_dx_streamoutput_add()
311 res->hw_destroy = vmw_dx_streamoutput_hw_destroy; in vmw_dx_streamoutput_add()
314 vmw_resource_unreference(&res); in vmw_dx_streamoutput_add()
324 void vmw_dx_streamoutput_set_size(struct vmw_resource *res, u32 size) in vmw_dx_streamoutput_set_size() argument
326 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_set_size()
364 WARN_ON(vmw_dx_streamoutput_scrub(&entry->res)); in vmw_dx_streamoutput_cotable_list_scrub()