video: Add Hyper-V Synthetic Video Frame Buffer Driver
Subsystems (3)
Haiyang Zhang
maintainerPATCH v2 1/1 video: Add Hyper-V Synthetic Video Frame Buffer Driver
This is the driver for the Hyper-V Synthetic Video, which supports screen resolution up to Full HD 1920x1080 on Windows Server 2012 host, and 1600x1200 on Windows Server 2008 R2 or earlier.
It also solves the double mouse cursor issue of the emulated video mode.
---
v2:
Made changes based on reviews from Olaf Hering <[email protected]>, Geert Uytterhoeven <[email protected]>.
Renamed the Kconfig string to FB_HYPERV. And, use KBUILD_MODNAME in two additional places to keep consistency in naming.
Switched fb from system RAM to PCI mmio space, so the workaround for large memory allocation is not necessary. The fb ops and screen refresh mechanism is updated accordingly.
Added aperture setting so that VESA fb can be disabled automatically without code change on the vesafb.c.
--- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/hyperv_fb.c | 826 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/hyperv.h | 11 + include/linux/pci_ids.h | 3 + 5 files changed, 850 insertions(+), 0 deletions(-) create mode 100644 drivers/video/hyperv_fb.c
drivers/video/Kconfig +9 -0
@@ -2451,6 +2451,15 @@ config FB_PUV3_UNIGFX Choose this option if you want to use the Unigfx device as a framebuffer device. Without the support of PCI & AGP. +config FB_HYPERV + tristate "Microsoft Hyper-V Synthetic Video support" + depends on FB && HYPERV + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This framebuffer driver supports Microsoft Hyper-V Synthetic Video. + source "drivers/video/omap/Kconfig" source "drivers/video/omap2/Kconfig" source "drivers/video/exynos/Kconfig"
drivers/video/Makefile +1 -0
@@ -149,6 +149,7 @@ obj-$(CONFIG_FB_MSM) += msm/ obj-$(CONFIG_FB_NUC900) += nuc900fb.o obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o +obj-$(CONFIG_FB_HYPERV) += hyperv_fb.o # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA) += uvesafb.o
drivers/video/hyperv_fb.c new file +826 -0
826 lines not on this page · raw message
include/linux/hyperv.h +11 -0
@@ -1253,6 +1253,17 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver); }/* +* Synthetic Video GUID +* {DA0A7802-E377-4aac-8E77-0558EB1073F8} +*/ +#define HV_SYNTHVID_GUID \ + .guid = { \ + 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a, \ + 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 \ + } + + +/* * Common header for Hyper-V ICs */
include/linux/pci_ids.h +3 -0
@@ -2951,3 +2951,6 @@#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001#define PCI_VENDOR_ID_OCZ 0x1b85 + +#define PCI_VENDOR_ID_MICROSOFT 0x1414 +#define PCI_DEVICE_ID_HYPERV_VIDEO 0x5353
Signature · 1 line
1.7.4.1
include/linux/pci_ids.h line 2956
Quoted 9 lines · Haiyang Zhang
include/linux/pci_ids.h +3
-0@@ -2951,3 +2951,6 @@#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001#define PCI_VENDOR_ID_OCZ 0x1b85 + +#define PCI_VENDOR_ID_MICROSOFT 0x1414 +#define PCI_DEVICE_ID_HYPERV_VIDEO 0x5353
Please see the top of this while for why you shouldn't be adding any lines to this file.
greg k-h
Haiyang Zhang
maintainerQuoted 19 lines
-----Original Message-----
From: [email protected] [mailto:linux-fbdev- [email protected]] On Behalf Of Greg KH
Sent: Monday, March 04, 2013 8:16 PM
To: Haiyang Zhang
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] video: Add Hyper-V Synthetic Video Frame Buffer DriverQuoted 5 lines · Haiyang Zhang
include/linux/pci_ids.h +0
-0@@ -2951,3 +2951,6 @@#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001
Quoted 7 lines
include/linux/pci_ids.h line 2956
Quoted 4 lines
include/linux/pci_ids.h +3
-0#define PCI_VENDOR_ID_OCZ 0x1b85 + +#define PCI_VENDOR_ID_MICROSOFT 0x1414 +#define PCI_DEVICE_ID_HYPERV_VIDEO 0x5353Please see the top of this while for why you shouldn't be adding any lines to this file.
I will move the defines back to the hyperv_fb.c.
Thanks for pointing this out.
- Haiyang