Lines Matching refs:res

46 	struct vmw_resource res;  member
55 static int vmw_dx_streamoutput_create(struct vmw_resource *res);
56 static int vmw_dx_streamoutput_bind(struct vmw_resource *res,
58 static int vmw_dx_streamoutput_unbind(struct vmw_resource *res, bool readback,
60 static void vmw_dx_streamoutput_commit_notify(struct vmw_resource *res,
77 vmw_res_to_dx_streamoutput(struct vmw_resource *res) in vmw_res_to_dx_streamoutput() argument
79 return container_of(res, struct vmw_dx_streamoutput, res); in vmw_res_to_dx_streamoutput()
88 static int vmw_dx_streamoutput_unscrub(struct vmw_resource *res) in vmw_dx_streamoutput_unscrub() argument
90 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_unscrub()
91 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_unscrub()
107 cmd->body.mobid = res->backup->base.resource->start; in vmw_dx_streamoutput_unscrub()
108 cmd->body.offsetInBytes = res->backup_offset; in vmw_dx_streamoutput_unscrub()
117 static int vmw_dx_streamoutput_create(struct vmw_resource *res) in vmw_dx_streamoutput_create() argument
119 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_create()
120 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_create()
125 if (vmw_resource_mob_attached(res)) { in vmw_dx_streamoutput_create()
127 ret = vmw_dx_streamoutput_unscrub(res); in vmw_dx_streamoutput_create()
131 res->id = so->id; in vmw_dx_streamoutput_create()
136 static int vmw_dx_streamoutput_bind(struct vmw_resource *res, in vmw_dx_streamoutput_bind() argument
139 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_bind()
147 ret = vmw_dx_streamoutput_unscrub(res); in vmw_dx_streamoutput_bind()
159 static int vmw_dx_streamoutput_scrub(struct vmw_resource *res) in vmw_dx_streamoutput_scrub() argument
161 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_scrub()
162 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_scrub()
179 cmd->body.soid = res->id; in vmw_dx_streamoutput_scrub()
185 res->id = -1; in vmw_dx_streamoutput_scrub()
191 static int vmw_dx_streamoutput_unbind(struct vmw_resource *res, bool readback, in vmw_dx_streamoutput_unbind() argument
194 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_unbind()
198 if (WARN_ON(res->backup->base.resource->mem_type != VMW_PL_MOB)) in vmw_dx_streamoutput_unbind()
202 ret = vmw_dx_streamoutput_scrub(res); in vmw_dx_streamoutput_unbind()
217 static void vmw_dx_streamoutput_commit_notify(struct vmw_resource *res, in vmw_dx_streamoutput_commit_notify() argument
220 struct vmw_private *dev_priv = res->dev_priv; in vmw_dx_streamoutput_commit_notify()
221 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_commit_notify()
227 res->id = so->id; in vmw_dx_streamoutput_commit_notify()
233 res->id = -1; in vmw_dx_streamoutput_commit_notify()
253 static void vmw_dx_streamoutput_res_free(struct vmw_resource *res) in vmw_dx_streamoutput_res_free() argument
255 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_res_free()
261 static void vmw_dx_streamoutput_hw_destroy(struct vmw_resource *res) in vmw_dx_streamoutput_hw_destroy() argument
264 res->id = -1; in vmw_dx_streamoutput_hw_destroy()
281 struct vmw_resource *res; in vmw_dx_streamoutput_add() local
290 res = &so->res; in vmw_dx_streamoutput_add()
297 ret = vmw_resource_init(dev_priv, res, true, in vmw_dx_streamoutput_add()
304 res, list); in vmw_dx_streamoutput_add()
308 res->id = so->id; in vmw_dx_streamoutput_add()
309 res->hw_destroy = vmw_dx_streamoutput_hw_destroy; in vmw_dx_streamoutput_add()
312 vmw_resource_unreference(&res); in vmw_dx_streamoutput_add()
322 void vmw_dx_streamoutput_set_size(struct vmw_resource *res, u32 size) in vmw_dx_streamoutput_set_size() argument
324 struct vmw_dx_streamoutput *so = vmw_res_to_dx_streamoutput(res); in vmw_dx_streamoutput_set_size()
362 WARN_ON(vmw_dx_streamoutput_scrub(&entry->res)); in vmw_dx_streamoutput_cotable_list_scrub()