Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions
@ 2026-10-01  9:25 Matheus Alves de Almeida
  2026-10-01  9:30 ` sashiko-bot
  2026-10-01 13:59 ` Thomas Zimmermann
  0 siblings, 2 replies; 3+ messages in thread
From: Matheus Alves de Almeida @ 2026-10-01  9:25 UTC (permalink / raw)
  To: Dave Airlie, Gerd Hoffmann
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, virtualization, spice-devel, dri-devel,
	linux-kernel, Matheus Alves de Almeida

The qxl driver currently returns -EINVAL when the emulated qxl revision
is too old. This is not a driver initialization failure but rather a
match rejection, which should return -ENODEV.

Change the value returned when the qxl revision is below 4 to -ENODEV.
Switch the DRM_ERROR() call to a dev_err() call.

Fixes: f64122c1f6ad ("drm: add new QXL driver. (v1.4)")
Signed-off-by: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>
---
v2: Use dev_err() instead of dev_info()

 drivers/gpu/drm/qxl/qxl_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 97df9d3d6..85743f235 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -82,9 +82,9 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	int ret;
 
 	if (pdev->revision < 4) {
-		DRM_ERROR("qxl too old, doesn't support client_monitors_config,"
-			  " use xf86-video-qxl in user mode");
-		return -EINVAL; /* TODO: ENODEV ? */
+		dev_err(&pdev->dev,
+			"qxl too old, doesn't support client_monitors_config, use xf86-video-qxl in user mode\n");
+		return -ENODEV;
 	}
 
 	qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions
  2026-10-01  9:25 [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions Matheus Alves de Almeida
@ 2026-10-01  9:30 ` sashiko-bot
  2026-10-01 13:59 ` Thomas Zimmermann
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-10-01  9:30 UTC (permalink / raw)
  To: Matheus Alves de Almeida
  Cc: Eugenio Perez, dri-devel, Michael S. Tsirkin, virtualization

> The qxl driver currently returns -EINVAL when the emulated qxl revision
> is too old. This is not a driver initialization failure but rather a
> match rejection, which should return -ENODEV.
> 
> Change the value returned when the qxl revision is below 4 to -ENODEV.
> Switch the DRM_ERROR() call to a dev_err() call.
> 
> Fixes: f64122c1f6ad ("drm: add new QXL driver. (v1.4)")
> Signed-off-by: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261001092506.76201-1-matheus.aalmeida@inf.ufrgs.br?part=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions
  2026-10-01  9:25 [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions Matheus Alves de Almeida
  2026-10-01  9:30 ` sashiko-bot
@ 2026-10-01 13:59 ` Thomas Zimmermann
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2026-10-01 13:59 UTC (permalink / raw)
  To: Matheus Alves de Almeida, Dave Airlie, Gerd Hoffmann
  Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter,
	virtualization, spice-devel, dri-devel, linux-kernel



Am 01.10.26 um 11:25 schrieb Matheus Alves de Almeida:
> The qxl driver currently returns -EINVAL when the emulated qxl revision
> is too old. This is not a driver initialization failure but rather a
> match rejection, which should return -ENODEV.
>
> Change the value returned when the qxl revision is below 4 to -ENODEV.
> Switch the DRM_ERROR() call to a dev_err() call.
>
> Fixes: f64122c1f6ad ("drm: add new QXL driver. (v1.4)")
> Signed-off-by: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Thanks for the fix.

> ---
> v2: Use dev_err() instead of dev_info()
>
>   drivers/gpu/drm/qxl/qxl_drv.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
> index 97df9d3d6..85743f235 100644
> --- a/drivers/gpu/drm/qxl/qxl_drv.c
> +++ b/drivers/gpu/drm/qxl/qxl_drv.c
> @@ -82,9 +82,9 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   	int ret;
>   
>   	if (pdev->revision < 4) {
> -		DRM_ERROR("qxl too old, doesn't support client_monitors_config,"
> -			  " use xf86-video-qxl in user mode");
> -		return -EINVAL; /* TODO: ENODEV ? */
> +		dev_err(&pdev->dev,
> +			"qxl too old, doesn't support client_monitors_config, use xf86-video-qxl in user mode\n");
> +		return -ENODEV;
>   	}
>   
>   	qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver,

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-01 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01  9:25 [PATCH v2] drm/qxl: return -ENODEV for unsupported revisions Matheus Alves de Almeida
2026-10-01  9:30 ` sashiko-bot
2026-10-01 13:59 ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox