Lines Matching refs:msg
196 static inline int hyperv_sendpacket(struct hv_device *hdev, struct synthvid_msg *msg) in hyperv_sendpacket() argument
202 msg->pipe_hdr.type = PIPE_MSG_DATA; in hyperv_sendpacket()
203 msg->pipe_hdr.size = msg->vid_hdr.size; in hyperv_sendpacket()
205 ret = vmbus_sendpacket(hdev->channel, msg, in hyperv_sendpacket()
206 msg->vid_hdr.size + sizeof(struct pipe_msg_hdr), in hyperv_sendpacket()
219 struct synthvid_msg *msg = (struct synthvid_msg *)hv->init_buf; in hyperv_negotiate_version() local
223 memset(msg, 0, sizeof(struct synthvid_msg)); in hyperv_negotiate_version()
224 msg->vid_hdr.type = SYNTHVID_VERSION_REQUEST; in hyperv_negotiate_version()
225 msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_negotiate_version()
227 msg->ver_req.version = ver; in hyperv_negotiate_version()
228 hyperv_sendpacket(hdev, msg); in hyperv_negotiate_version()
236 if (!msg->ver_resp.is_accepted) { in hyperv_negotiate_version()
251 struct synthvid_msg *msg = (struct synthvid_msg *)hv->init_buf; in hyperv_update_vram_location() local
255 memset(msg, 0, sizeof(struct synthvid_msg)); in hyperv_update_vram_location()
256 msg->vid_hdr.type = SYNTHVID_VRAM_LOCATION; in hyperv_update_vram_location()
257 msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_update_vram_location()
259 msg->vram.user_ctx = vram_pp; in hyperv_update_vram_location()
260 msg->vram.vram_gpa = vram_pp; in hyperv_update_vram_location()
261 msg->vram.is_vram_gpa_specified = 1; in hyperv_update_vram_location()
262 hyperv_sendpacket(hdev, msg); in hyperv_update_vram_location()
269 if (msg->vram_ack.user_ctx != vram_pp) { in hyperv_update_vram_location()
280 struct synthvid_msg msg; in hyperv_update_situation() local
282 memset(&msg, 0, sizeof(struct synthvid_msg)); in hyperv_update_situation()
284 msg.vid_hdr.type = SYNTHVID_SITUATION_UPDATE; in hyperv_update_situation()
285 msg.vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_update_situation()
287 msg.situ.user_ctx = 0; in hyperv_update_situation()
288 msg.situ.video_output_count = 1; in hyperv_update_situation()
289 msg.situ.video_output[0].active = active; in hyperv_update_situation()
291 msg.situ.video_output[0].vram_offset = 0; in hyperv_update_situation()
292 msg.situ.video_output[0].depth_bits = bpp; in hyperv_update_situation()
293 msg.situ.video_output[0].width_pixels = w; in hyperv_update_situation()
294 msg.situ.video_output[0].height_pixels = h; in hyperv_update_situation()
295 msg.situ.video_output[0].pitch_bytes = pitch; in hyperv_update_situation()
297 hyperv_sendpacket(hdev, &msg); in hyperv_update_situation()
320 struct synthvid_msg msg; in hyperv_hide_hw_ptr() local
322 memset(&msg, 0, sizeof(struct synthvid_msg)); in hyperv_hide_hw_ptr()
323 msg.vid_hdr.type = SYNTHVID_POINTER_POSITION; in hyperv_hide_hw_ptr()
324 msg.vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_hide_hw_ptr()
326 msg.ptr_pos.is_visible = 1; in hyperv_hide_hw_ptr()
327 msg.ptr_pos.video_output = 0; in hyperv_hide_hw_ptr()
328 msg.ptr_pos.image_x = 0; in hyperv_hide_hw_ptr()
329 msg.ptr_pos.image_y = 0; in hyperv_hide_hw_ptr()
330 hyperv_sendpacket(hdev, &msg); in hyperv_hide_hw_ptr()
332 memset(&msg, 0, sizeof(struct synthvid_msg)); in hyperv_hide_hw_ptr()
333 msg.vid_hdr.type = SYNTHVID_POINTER_SHAPE; in hyperv_hide_hw_ptr()
334 msg.vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_hide_hw_ptr()
336 msg.ptr_shape.part_idx = SYNTHVID_CURSOR_COMPLETE; in hyperv_hide_hw_ptr()
337 msg.ptr_shape.is_argb = 1; in hyperv_hide_hw_ptr()
338 msg.ptr_shape.width = 1; in hyperv_hide_hw_ptr()
339 msg.ptr_shape.height = 1; in hyperv_hide_hw_ptr()
340 msg.ptr_shape.hot_x = 0; in hyperv_hide_hw_ptr()
341 msg.ptr_shape.hot_y = 0; in hyperv_hide_hw_ptr()
342 msg.ptr_shape.data[0] = 0; in hyperv_hide_hw_ptr()
343 msg.ptr_shape.data[1] = 1; in hyperv_hide_hw_ptr()
344 msg.ptr_shape.data[2] = 1; in hyperv_hide_hw_ptr()
345 msg.ptr_shape.data[3] = 1; in hyperv_hide_hw_ptr()
346 hyperv_sendpacket(hdev, &msg); in hyperv_hide_hw_ptr()
354 struct synthvid_msg msg; in hyperv_update_dirt() local
359 memset(&msg, 0, sizeof(struct synthvid_msg)); in hyperv_update_dirt()
361 msg.vid_hdr.type = SYNTHVID_DIRT; in hyperv_update_dirt()
362 msg.vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_update_dirt()
364 msg.dirt.video_output = 0; in hyperv_update_dirt()
365 msg.dirt.dirt_count = 1; in hyperv_update_dirt()
366 msg.dirt.rect[0].x1 = rect->x1; in hyperv_update_dirt()
367 msg.dirt.rect[0].y1 = rect->y1; in hyperv_update_dirt()
368 msg.dirt.rect[0].x2 = rect->x2; in hyperv_update_dirt()
369 msg.dirt.rect[0].y2 = rect->y2; in hyperv_update_dirt()
371 hyperv_sendpacket(hdev, &msg); in hyperv_update_dirt()
379 struct synthvid_msg *msg = (struct synthvid_msg *)hv->init_buf; in hyperv_get_supported_resolution() local
385 memset(msg, 0, sizeof(struct synthvid_msg)); in hyperv_get_supported_resolution()
386 msg->vid_hdr.type = SYNTHVID_RESOLUTION_REQUEST; in hyperv_get_supported_resolution()
387 msg->vid_hdr.size = sizeof(struct synthvid_msg_hdr) + in hyperv_get_supported_resolution()
389 msg->resolution_req.maximum_resolution_count = in hyperv_get_supported_resolution()
391 hyperv_sendpacket(hdev, msg); in hyperv_get_supported_resolution()
399 if (msg->resolution_resp.resolution_count == 0) { in hyperv_get_supported_resolution()
404 index = msg->resolution_resp.default_resolution_index; in hyperv_get_supported_resolution()
405 if (index >= msg->resolution_resp.resolution_count) { in hyperv_get_supported_resolution()
410 for (i = 0; i < msg->resolution_resp.resolution_count; i++) { in hyperv_get_supported_resolution()
412 msg->resolution_resp.supported_resolution[i].width); in hyperv_get_supported_resolution()
414 msg->resolution_resp.supported_resolution[i].height); in hyperv_get_supported_resolution()
418 msg->resolution_resp.supported_resolution[index].width; in hyperv_get_supported_resolution()
420 msg->resolution_resp.supported_resolution[index].height; in hyperv_get_supported_resolution()
428 struct synthvid_msg *msg; in hyperv_receive_sub() local
433 msg = (struct synthvid_msg *)hv->recv_buf; in hyperv_receive_sub()
436 if (msg->vid_hdr.type == SYNTHVID_VERSION_RESPONSE || in hyperv_receive_sub()
437 msg->vid_hdr.type == SYNTHVID_RESOLUTION_RESPONSE || in hyperv_receive_sub()
438 msg->vid_hdr.type == SYNTHVID_VRAM_LOCATION_ACK) { in hyperv_receive_sub()
439 memcpy(hv->init_buf, msg, VMBUS_MAX_PACKET_SIZE); in hyperv_receive_sub()
444 if (msg->vid_hdr.type == SYNTHVID_FEATURE_CHANGE) { in hyperv_receive_sub()
445 hv->dirt_needed = msg->feature_chg.is_dirt_needed; in hyperv_receive_sub()