Lines Matching defs:hdev
287 static inline int synthvid_send(struct hv_device *hdev,
296 ret = vmbus_sendpacket(hdev->channel, msg,
309 static int synthvid_send_situ(struct hv_device *hdev)
311 struct fb_info *info = hv_get_drvdata(hdev);
331 synthvid_send(hdev, &msg);
337 static int synthvid_send_ptr(struct hv_device *hdev)
349 synthvid_send(hdev, &msg);
365 synthvid_send(hdev, &msg);
374 struct hv_device *hdev = device_to_hv_device(info->device);
395 synthvid_send(hdev, &msg);
458 static void synthvid_recv_sub(struct hv_device *hdev)
460 struct fb_info *info = hv_get_drvdata(hdev);
482 synthvid_send_ptr(hdev);
483 synthvid_send_situ(hdev);
495 struct hv_device *hdev = ctx;
496 struct fb_info *info = hv_get_drvdata(hdev);
510 ret = vmbus_recvpacket(hdev->channel, recv_buf,
515 synthvid_recv_sub(hdev);
531 static int synthvid_negotiate_ver(struct hv_device *hdev, u32 ver)
533 struct fb_info *info = hv_get_drvdata(hdev);
544 synthvid_send(hdev, msg);
566 static int synthvid_get_supported_resolution(struct hv_device *hdev)
568 struct fb_info *info = hv_get_drvdata(hdev);
582 synthvid_send(hdev, msg);
614 static int synthvid_connect_vsp(struct hv_device *hdev)
616 struct fb_info *info = hv_get_drvdata(hdev);
620 ret = vmbus_open(hdev->channel, RING_BUFSIZE, RING_BUFSIZE,
621 NULL, 0, synthvid_receive, hdev);
631 ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10);
637 ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN8);
640 ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10);
651 ret = synthvid_get_supported_resolution(hdev);
656 screen_fb_size = hdev->channel->offermsg.offer.
662 vmbus_close(hdev->channel);
667 static int synthvid_send_config(struct hv_device *hdev)
669 struct fb_info *info = hv_get_drvdata(hdev);
682 synthvid_send(hdev, msg);
697 synthvid_send_ptr(hdev);
698 synthvid_send_situ(hdev);
783 struct hv_device *hdev;
789 hdev = device_to_hv_device(info->device);
791 if (hv_ringbuffer_spinlock_busy(hdev->channel))
819 struct hv_device *hdev = device_to_hv_device(info->device);
821 return synthvid_send_situ(hdev);
938 static phys_addr_t hvfb_get_phymem(struct hv_device *hdev,
959 hdev->device.coherent_dma_mask = DMA_BIT_MASK(64);
961 vmem = dma_alloc_coherent(&hdev->device,
976 static void hvfb_release_phymem(struct hv_device *hdev,
984 dma_free_coherent(&hdev->device,
992 static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info)
1019 paddr = hvfb_get_phymem(hdev, screen_fb_size);
1045 ret = vmbus_allocate_mmio(&par->mem, hdev, 0, -1,
1103 static void hvfb_putmem(struct hv_device *hdev, struct fb_info *info)
1112 hvfb_release_phymem(hdev, info->fix.smem_start,
1120 static int hvfb_probe(struct hv_device *hdev,
1127 info = framebuffer_alloc(sizeof(struct hvfb_par), &hdev->device);
1144 hv_set_drvdata(hdev, info);
1145 ret = synthvid_connect_vsp(hdev);
1155 ret = hvfb_getmem(hdev, info);
1197 ret = synthvid_send_config(hdev);
1226 hvfb_putmem(hdev, info);
1228 vmbus_close(hdev->channel);
1231 hv_set_drvdata(hdev, NULL);
1236 static void hvfb_remove(struct hv_device *hdev)
1238 struct fb_info *info = hv_get_drvdata(hdev);
1252 vmbus_close(hdev->channel);
1253 hv_set_drvdata(hdev, NULL);
1255 hvfb_putmem(hdev, info);
1259 static int hvfb_suspend(struct hv_device *hdev)
1261 struct fb_info *info = hv_get_drvdata(hdev);
1276 vmbus_close(hdev->channel);
1283 static int hvfb_resume(struct hv_device *hdev)
1285 struct fb_info *info = hv_get_drvdata(hdev);
1291 ret = synthvid_connect_vsp(hdev);
1295 ret = synthvid_send_config(hdev);
1297 vmbus_close(hdev->channel);