* [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload
2026-07-01 17:05 [PATCH v1 0/4] drm/hyperv: A fix and a few cleanups Uwe Kleine-König (The Capable Hub)
@ 2026-07-01 17:05 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 6:42 ` Thomas Zimmermann
2026-07-02 16:37 ` Michael Kelley
2026-07-01 17:05 ` [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array Uwe Kleine-König (The Capable Hub)
` (2 subsequent siblings)
3 siblings, 2 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-01 17:05 UTC (permalink / raw)
To: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Deepak Rawat
Cc: linux-hyperv, dri-devel, linux-kernel
The pci driver must not kept registered if the module is unloaded after
vmbus_driver_register() fails. So check the return value of
vmbus_driver_register() and unregister the pci driver on failure.
Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
index 20f35c48c0b8..2e75fb793495 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
@@ -249,7 +249,11 @@ static int __init hv_drm_init(void)
if (ret != 0)
return ret;
- return vmbus_driver_register(&hv_drm_hv_driver);
+ ret = vmbus_driver_register(&hv_drm_hv_driver);
+ if (ret)
+ pci_unregister_driver(&hv_drm_pci_driver);
+
+ return ret;
}
static void __exit hv_drm_exit(void)
--
2.55.0.11.g153666a7d9bb
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload
2026-07-01 17:05 ` [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload Uwe Kleine-König (The Capable Hub)
@ 2026-07-02 6:42 ` Thomas Zimmermann
2026-07-02 16:37 ` Michael Kelley
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2026-07-02 6:42 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter, Deepak Rawat
Cc: linux-hyperv, dri-devel, linux-kernel
Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> The pci driver must not kept registered if the module is unloaded after
> vmbus_driver_register() fails. So check the return value of
> vmbus_driver_register() and unregister the pci driver on failure.
>
> Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index 20f35c48c0b8..2e75fb793495 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -249,7 +249,11 @@ static int __init hv_drm_init(void)
> if (ret != 0)
> return ret;
>
> - return vmbus_driver_register(&hv_drm_hv_driver);
> + ret = vmbus_driver_register(&hv_drm_hv_driver);
> + if (ret)
> + pci_unregister_driver(&hv_drm_pci_driver);
> +
> + return ret;
> }
>
> static void __exit hv_drm_exit(void)
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread* RE: [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload
2026-07-01 17:05 ` [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload Uwe Kleine-König (The Capable Hub)
2026-07-02 6:42 ` Thomas Zimmermann
@ 2026-07-02 16:37 ` Michael Kelley
1 sibling, 0 replies; 14+ messages in thread
From: Michael Kelley @ 2026-07-02 16:37 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Deepak Rawat
Cc: linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Sent: Wednesday, July 1, 2026 10:05 AM
>
> The pci driver must not kept registered if the module is unloaded after
> vmbus_driver_register() fails. So check the return value of
> vmbus_driver_register() and unregister the pci driver on failure.
>
> Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index 20f35c48c0b8..2e75fb793495 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -249,7 +249,11 @@ static int __init hv_drm_init(void)
> if (ret != 0)
> return ret;
>
> - return vmbus_driver_register(&hv_drm_hv_driver);
> + ret = vmbus_driver_register(&hv_drm_hv_driver);
> + if (ret)
> + pci_unregister_driver(&hv_drm_pci_driver);
> +
> + return ret;
> }
>
> static void __exit hv_drm_exit(void)
> --
> 2.55.0.11.g153666a7d9bb
>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
2026-07-01 17:05 [PATCH v1 0/4] drm/hyperv: A fix and a few cleanups Uwe Kleine-König (The Capable Hub)
2026-07-01 17:05 ` [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload Uwe Kleine-König (The Capable Hub)
@ 2026-07-01 17:05 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 6:43 ` Thomas Zimmermann
2026-07-01 17:05 ` [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback Uwe Kleine-König (The Capable Hub)
2026-07-01 17:05 ` [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays Uwe Kleine-König (The Capable Hub)
3 siblings, 1 reply; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-01 17:05 UTC (permalink / raw)
To: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
.subvendor and .subdevice were set to 0 implicitly, so only devices with
these two values set to 0 in hardware can probe automatically. Make this
requirement explicit.
While touching this array item, also make use of the pci macro designed
for that case.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
index 2e75fb793495..e766d87b7a9d 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
@@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
static const struct pci_device_id hv_drm_pci_tbl[] = {
{
- .vendor = PCI_VENDOR_ID_MICROSOFT,
- .device = PCI_DEVICE_ID_HYPERV_VIDEO,
+ PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
+ 0, 0),
},
{ /* end of list */ }
};
--
2.55.0.11.g153666a7d9bb
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
2026-07-01 17:05 ` [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array Uwe Kleine-König (The Capable Hub)
@ 2026-07-02 6:43 ` Thomas Zimmermann
2026-07-02 8:52 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Zimmermann @ 2026-07-02 6:43 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
Hi
Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> .subvendor and .subdevice were set to 0 implicitly, so only devices with
> these two values set to 0 in hardware can probe automatically. Make this
> requirement explicit.
>
> While touching this array item, also make use of the pci macro designed
> for that case.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index 2e75fb793495..e766d87b7a9d 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
>
> static const struct pci_device_id hv_drm_pci_tbl[] = {
> {
> - .vendor = PCI_VENDOR_ID_MICROSOFT,
> - .device = PCI_DEVICE_ID_HYPERV_VIDEO,
> + PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
> + 0, 0),
IDK, but it looks like an oversight to me. Setting the sub-fields to
ANY seems like the better fix.
Best regards
Thomas
> },
> { /* end of list */ }
> };
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
2026-07-02 6:43 ` Thomas Zimmermann
@ 2026-07-02 8:52 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 9:15 ` Thomas Zimmermann
0 siblings, 1 reply; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-02 8:52 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, linux-hyperv,
dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]
Hallo Thomas,
On Thu, Jul 02, 2026 at 08:43:32AM +0200, Thomas Zimmermann wrote:
> Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> > .subvendor and .subdevice were set to 0 implicitly, so only devices with
> > these two values set to 0 in hardware can probe automatically. Make this
> > requirement explicit.
> >
> > While touching this array item, also make use of the pci macro designed
> > for that case.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> > ---
> > drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> > index 2e75fb793495..e766d87b7a9d 100644
> > --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> > +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> > @@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
> > static const struct pci_device_id hv_drm_pci_tbl[] = {
> > {
> > - .vendor = PCI_VENDOR_ID_MICROSOFT,
> > - .device = PCI_DEVICE_ID_HYPERV_VIDEO,
> > + PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
> > + 0, 0),
>
> IDK, but it looks like an oversight to me. Setting the sub-fields to ANY
> seems like the better fix.
That was my initial reflex, too. However while writing the commit log
for that change I noticed that since commit d750785f305e ("Staging: hv:
fix hv_utils module to properly autoload") from 2010 (applied to
v2.6.35-rc4) the driver never worked for hardware with .subvendor != 0
or .subdevice != 0. I cannot believe that something like that is
discovered 16 years later by chance during a rework by someone who
didn't try to run that hardware. And if I understand correctly, this is
emulated hardware and so I guess used quite a lot.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
2026-07-02 8:52 ` Uwe Kleine-König (The Capable Hub)
@ 2026-07-02 9:15 ` Thomas Zimmermann
2026-07-02 16:37 ` Michael Kelley
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Zimmermann @ 2026-07-02 9:15 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub)
Cc: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, linux-hyperv,
dri-devel, linux-kernel
Hi
Am 02.07.26 um 10:52 schrieb Uwe Kleine-König (The Capable Hub):
> Hallo Thomas,
>
> On Thu, Jul 02, 2026 at 08:43:32AM +0200, Thomas Zimmermann wrote:
>> Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
>>> .subvendor and .subdevice were set to 0 implicitly, so only devices with
>>> these two values set to 0 in hardware can probe automatically. Make this
>>> requirement explicit.
>>>
>>> While touching this array item, also make use of the pci macro designed
>>> for that case.
>>>
>>> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>>> ---
>>> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> index 2e75fb793495..e766d87b7a9d 100644
>>> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
>>> @@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
>>> static const struct pci_device_id hv_drm_pci_tbl[] = {
>>> {
>>> - .vendor = PCI_VENDOR_ID_MICROSOFT,
>>> - .device = PCI_DEVICE_ID_HYPERV_VIDEO,
>>> + PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
>>> + 0, 0),
>> IDK, but it looks like an oversight to me. Setting the sub-fields to ANY
>> seems like the better fix.
> That was my initial reflex, too. However while writing the commit log
> for that change I noticed that since commit d750785f305e ("Staging: hv:
> fix hv_utils module to properly autoload") from 2010 (applied to
> v2.6.35-rc4) the driver never worked for hardware with .subvendor != 0
> or .subdevice != 0. I cannot believe that something like that is
> discovered 16 years later by chance during a rework by someone who
> didn't try to run that hardware. And if I understand correctly, this is
> emulated hardware and so I guess used quite a lot.
I wouldn't be surprised. To my knowledge, there's just one
implementation of this device, which is Windows. If they clear their
host-side structures to 0 and pass them to the guest, no one would ever
notice the issue. But let's see what the driver maintainers can comment
on the issue.
Best regards
Thomas
>
> Best regards
> Uwe
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread* RE: [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array
2026-07-02 9:15 ` Thomas Zimmermann
@ 2026-07-02 16:37 ` Michael Kelley
0 siblings, 0 replies; 14+ messages in thread
From: Michael Kelley @ 2026-07-02 16:37 UTC (permalink / raw)
To: Thomas Zimmermann, Uwe Kleine-König (The Capable Hub)
Cc: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter,
linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
From: Thomas Zimmermann <tzimmermann@suse.de> Sent: Thursday, July 2, 2026 2:15 AM
>
> Hi
>
> Am 02.07.26 um 10:52 schrieb Uwe Kleine-König (The Capable Hub):
> > Hallo Thomas,
> >
> > On Thu, Jul 02, 2026 at 08:43:32AM +0200, Thomas Zimmermann wrote:
> >> Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> >>> .subvendor and .subdevice were set to 0 implicitly, so only devices with
> >>> these two values set to 0 in hardware can probe automatically. Make this
> >>> requirement explicit.
> >>>
> >>> While touching this array item, also make use of the pci macro designed
> >>> for that case.
> >>>
> >>> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> >>> ---
> >>> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> >>> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> >>> index 2e75fb793495..e766d87b7a9d 100644
> >>> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> >>> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> >>> @@ -51,8 +51,8 @@ static void hv_drm_pci_remove(struct pci_dev *pdev)
> >>> static const struct pci_device_id hv_drm_pci_tbl[] = {
> >>> {
> >>> - .vendor = PCI_VENDOR_ID_MICROSOFT,
> >>> - .device = PCI_DEVICE_ID_HYPERV_VIDEO,
> >>> + PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
> >>> + 0, 0),
> >> IDK, but it looks like an oversight to me. Setting the sub-fields to ANY
> >> seems like the better fix.
> > That was my initial reflex, too. However while writing the commit log
> > for that change I noticed that since commit d750785f305e ("Staging: hv:
> > fix hv_utils module to properly autoload") from 2010 (applied to
> > v2.6.35-rc4) the driver never worked for hardware with .subvendor != 0
> > or .subdevice != 0. I cannot believe that something like that is
> > discovered 16 years later by chance during a rework by someone who
> > didn't try to run that hardware. And if I understand correctly, this is
> > emulated hardware and so I guess used quite a lot.
>
> I wouldn't be surprised. To my knowledge, there's just one
> implementation of this device, which is Windows. If they clear their
> host-side structures to 0 and pass them to the guest, no one would ever
> notice the issue. But let's see what the driver maintainers can comment
> on the issue.
>
Yes, the device is a synthetic device provided by a host that implements
VMBus. Historically that's Windows Hyper-V, but alternate VMBus
implementations are arising, such as in the paravisor used in some
Azure VMs. That paravisor is also provided by Microsoft, though
conceptually a customer could provide their own paravisor.
Since current code is defaulting to requiring .subvendor and .subdevice
to be zero, I think that requirement should continue even with this
cleanup. That maintains strict consistency with current code. If
there's ever a case where a different implementation of VMBus
needs to identify the synthetic frame buffer device differently, that's
likely because of other changes in how the device presents itself.
Any tweaks to the device id matching can be included then as part
of whatever other changes are needed to the driver.
Just my $.02 ....
As such,
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback
2026-07-01 17:05 [PATCH v1 0/4] drm/hyperv: A fix and a few cleanups Uwe Kleine-König (The Capable Hub)
2026-07-01 17:05 ` [PATCH v1 1/4] drm/hyperv: Unregister pci driver in error path before module unload Uwe Kleine-König (The Capable Hub)
2026-07-01 17:05 ` [PATCH v1 2/4] drm/hyperv: Explicitly set subvendor and subdevice for pci match array Uwe Kleine-König (The Capable Hub)
@ 2026-07-01 17:05 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 6:45 ` Thomas Zimmermann
2026-07-01 17:05 ` [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays Uwe Kleine-König (The Capable Hub)
3 siblings, 1 reply; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-01 17:05 UTC (permalink / raw)
To: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
Having an empty remove callback is equivalent to no remove callback.
(The only minor difference is that with an empty remove callback
pm_runtime_get_sync() and pm_runtime_put_noidle() are called.)
Drop this useless function.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
index e766d87b7a9d..e3f41336a831 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
@@ -45,10 +45,6 @@ static int hv_drm_pci_probe(struct pci_dev *pdev,
return 0;
}
-static void hv_drm_pci_remove(struct pci_dev *pdev)
-{
-}
-
static const struct pci_device_id hv_drm_pci_tbl[] = {
{
PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
@@ -64,7 +60,6 @@ static struct pci_driver hv_drm_pci_driver = {
.name = KBUILD_MODNAME,
.id_table = hv_drm_pci_tbl,
.probe = hv_drm_pci_probe,
- .remove = hv_drm_pci_remove,
};
static int hv_drm_setup_vram(struct hv_drm_device *hv,
--
2.55.0.11.g153666a7d9bb
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback
2026-07-01 17:05 ` [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback Uwe Kleine-König (The Capable Hub)
@ 2026-07-02 6:45 ` Thomas Zimmermann
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2026-07-02 6:45 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
Hi
Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> Having an empty remove callback is equivalent to no remove callback.
> (The only minor difference is that with an empty remove callback
> pm_runtime_get_sync() and pm_runtime_put_noidle() are called.)
>
> Drop this useless function.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index e766d87b7a9d..e3f41336a831 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -45,10 +45,6 @@ static int hv_drm_pci_probe(struct pci_dev *pdev,
> return 0;
> }
>
> -static void hv_drm_pci_remove(struct pci_dev *pdev)
> -{
It would be better to call drm_dev_unplug() from here. With a bit more
work, the driver can have hot-unplug functionality.
Best regards
Thomas
> -}
> -
> static const struct pci_device_id hv_drm_pci_tbl[] = {
> {
> PCI_VDEVICE_SUB(MICROSOFT, PCI_DEVICE_ID_HYPERV_VIDEO,
> @@ -64,7 +60,6 @@ static struct pci_driver hv_drm_pci_driver = {
> .name = KBUILD_MODNAME,
> .id_table = hv_drm_pci_tbl,
> .probe = hv_drm_pci_probe,
> - .remove = hv_drm_pci_remove,
> };
>
> static int hv_drm_setup_vram(struct hv_drm_device *hv,
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays
2026-07-01 17:05 [PATCH v1 0/4] drm/hyperv: A fix and a few cleanups Uwe Kleine-König (The Capable Hub)
` (2 preceding siblings ...)
2026-07-01 17:05 ` [PATCH v1 3/4] drm/hyperv: Drop useless empty remove callback Uwe Kleine-König (The Capable Hub)
@ 2026-07-01 17:05 ` Uwe Kleine-König (The Capable Hub)
2026-07-02 6:45 ` Thomas Zimmermann
2026-07-02 16:38 ` Michael Kelley
3 siblings, 2 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-01 17:05 UTC (permalink / raw)
To: Dexuan Cui, Long Li, Saurabh Sengar, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
It matches the usual coding style to have the MODULE_DEVICE_TABLE macro
directly after the respective arrays.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
index e3f41336a831..6a28048f687b 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
@@ -52,6 +52,7 @@ static const struct pci_device_id hv_drm_pci_tbl[] = {
},
{ /* end of list */ }
};
+MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
/*
* PCI stub to support gen1 VM.
@@ -219,6 +220,7 @@ static const struct hv_vmbus_device_id hv_drm_vmbus_tbl[] = {
{HV_SYNTHVID_GUID},
{}
};
+MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
static struct hv_driver hv_drm_hv_driver = {
.name = KBUILD_MODNAME,
@@ -260,8 +262,6 @@ static void __exit hv_drm_exit(void)
module_init(hv_drm_init);
module_exit(hv_drm_exit);
-MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
-MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Deepak Rawat <drawat.floss@gmail.com>");
MODULE_DESCRIPTION("DRM driver for Hyper-V synthetic video device");
--
2.55.0.11.g153666a7d9bb
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays
2026-07-01 17:05 ` [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-07-02 6:45 ` Thomas Zimmermann
2026-07-02 16:38 ` Michael Kelley
1 sibling, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2026-07-02 6:45 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard, David Airlie,
Simona Vetter
Cc: linux-hyperv, dri-devel, linux-kernel
Am 01.07.26 um 19:05 schrieb Uwe Kleine-König (The Capable Hub):
> It matches the usual coding style to have the MODULE_DEVICE_TABLE macro
> directly after the respective arrays.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index e3f41336a831..6a28048f687b 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -52,6 +52,7 @@ static const struct pci_device_id hv_drm_pci_tbl[] = {
> },
> { /* end of list */ }
> };
> +MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
>
> /*
> * PCI stub to support gen1 VM.
> @@ -219,6 +220,7 @@ static const struct hv_vmbus_device_id hv_drm_vmbus_tbl[] = {
> {HV_SYNTHVID_GUID},
> {}
> };
> +MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
>
> static struct hv_driver hv_drm_hv_driver = {
> .name = KBUILD_MODNAME,
> @@ -260,8 +262,6 @@ static void __exit hv_drm_exit(void)
> module_init(hv_drm_init);
> module_exit(hv_drm_exit);
>
> -MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
> -MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Deepak Rawat <drawat.floss@gmail.com>");
> MODULE_DESCRIPTION("DRM driver for Hyper-V synthetic video device");
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 14+ messages in thread* RE: [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays
2026-07-01 17:05 ` [PATCH v1 4/4] drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-02 6:45 ` Thomas Zimmermann
@ 2026-07-02 16:38 ` Michael Kelley
1 sibling, 0 replies; 14+ messages in thread
From: Michael Kelley @ 2026-07-02 16:38 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub), Dexuan Cui, Long Li,
Saurabh Sengar, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Sent: Wednesday, July 1, 2026 10:05 AM
>
> It matches the usual coding style to have the MODULE_DEVICE_TABLE macro
> directly after the respective arrays.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> index e3f41336a831..6a28048f687b 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_drv.c
> @@ -52,6 +52,7 @@ static const struct pci_device_id hv_drm_pci_tbl[] = {
> },
> { /* end of list */ }
> };
> +MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
>
> /*
> * PCI stub to support gen1 VM.
> @@ -219,6 +220,7 @@ static const struct hv_vmbus_device_id hv_drm_vmbus_tbl[] = {
> {HV_SYNTHVID_GUID},
> {}
> };
> +MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
>
> static struct hv_driver hv_drm_hv_driver = {
> .name = KBUILD_MODNAME,
> @@ -260,8 +262,6 @@ static void __exit hv_drm_exit(void)
> module_init(hv_drm_init);
> module_exit(hv_drm_exit);
>
> -MODULE_DEVICE_TABLE(pci, hv_drm_pci_tbl);
> -MODULE_DEVICE_TABLE(vmbus, hv_drm_vmbus_tbl);
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Deepak Rawat <drawat.floss@gmail.com>");
> MODULE_DESCRIPTION("DRM driver for Hyper-V synthetic video device");
> --
> 2.55.0.11.g153666a7d9bb
>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
^ permalink raw reply [flat|nested] 14+ messages in thread