drm/cirrus: Don't pretend to operate hardware
Subsystems (4)
Thomas Zimmermann
maintainercover drm/cirrus: Don't pretend to operate hardware
The cirrus driver is only for qemu's emulation of that hardware. The two patches in this series update cirrus to reflect this.
(The driver is still obsolete. Use something else if possible.)
Thomas Zimmermann (2):
drm/cirrus: Use virtual encoder and connector types drm/cirrus: Rename to cirrus-qemu
MAINTAINERS | 2 +-
drivers/gpu/drm/tiny/Makefile | 2 +-
drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
rename drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} (99%)Signature · 1 line
2.46.0
Thomas Zimmermann
maintainerPATCH 1/2 drm/cirrus: Use virtual encoder and connector types
The cirrus driver only works on emulated Cirrus hardware. Use the correct types for encoder and connector.
--- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/tiny/cirrus.c +2 -2
@@ -587,14 +587,14 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus) encoder = &cirrus->encoder; ret =drm_encoder_init (dev, encoder, &cirrus_encoder_funcs, -DRM_MODE_ENCODER_DAC ,NULL ); +DRM_MODE_ENCODER_VIRTUAL ,NULL );if (ret)return ret; encoder->possible_crtcs =drm_crtc_mask (crtc); connector = &cirrus->connector; ret =drm_connector_init (dev, connector, &cirrus_connector_funcs, -DRM_MODE_CONNECTOR_VGA ); +DRM_MODE_CONNECTOR_VIRTUAL );if (ret)return ret;drm_connector_helper_add (connector, &cirrus_connector_helper_funcs);
Signature · 1 line
2.46.0
Re: [PATCH 1/2] drm/cirrus: Use virtual encoder and connector types
Quoted 16 lines · Thomas Zimmermann
The cirrus driver only works on emulated Cirrus hardware. Use the correct types for encoder and connector.
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/tiny/cirrus.c +0
-0@@ -587,14 +587,14 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus) encoder = &cirrus->encoder; ret = drm_encoder_init(dev, encoder, &cirrus_encoder_funcs,
drivers/gpu/drm/tiny/cirrus.c static int cirrus_pipe_init(struct cirrus_device *cirrus) · line 597
Quoted 10 lines
drivers/gpu/drm/tiny/cirrus.c +2
-2- DRM_MODE_ENCODER_DAC, NULL); + DRM_MODE_ENCODER_VIRTUAL, NULL);if (ret)return ret; encoder->possible_crtcs =drm_crtc_mask (crtc); connector = &cirrus->connector; ret =drm_connector_init (dev, connector, &cirrus_connector_funcs, -DRM_MODE_CONNECTOR_VGA ); +DRM_MODE_CONNECTOR_VIRTUAL );
This will also remove the EDID property from this connector. I'm not sore if that is an expected behaviour or not.
Quoted 6 lines
drivers/gpu/drm/tiny/cirrus.c +0
-0if (ret)return ret;drm_connector_helper_add (connector, &cirrus_connector_helper_funcs);Signature · 1 line
2.46.0
Signature · 2 lines
With best wishes Dmitry
Thomas Zimmermann
maintainerRe: [PATCH 1/2] drm/cirrus: Use virtual encoder and connector types
Hi
Am 23.11.24 um 17:28 schrieb Dmitry Baryshkov:
Quoted 23 lines · Thomas Zimmermann
Quoted 22 lines
The cirrus driver only works on emulated Cirrus hardware. Use the correct types for encoder and connector.
Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/tiny/cirrus.c +1
-1@@ -587,14 +587,14 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus) encoder = &cirrus->encoder; ret =drm_encoder_init (dev, encoder, &cirrus_encoder_funcs, -DRM_MODE_ENCODER_DAC ,NULL ); +DRM_MODE_ENCODER_VIRTUAL ,NULL );if (ret)return ret; encoder->possible_crtcs =drm_crtc_mask (crtc);
Quoted 6 lines
drivers/gpu/drm/tiny/cirrus.c static int cirrus_pipe_init(struct cirrus_device *cirrus) · line 597
Quoted 4 lines
drivers/gpu/drm/tiny/cirrus.c +1
-1connector = &cirrus->connector; ret =drm_connector_init (dev, connector, &cirrus_connector_funcs, -DRM_MODE_CONNECTOR_VGA ); +DRM_MODE_CONNECTOR_VIRTUAL );This will also remove the EDID property from this connector. I'm not sore if that is an expected behaviour or not.
Indeed. That's a positive side effect IMHO. The cirrus emulation nor driver provides an EDID. By removing the property, we stop pretending that there could be one. I'll mention this in the changelog before committing.
Best regards
Thomas
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/tiny/cirrus.c +0
-0if (ret)return ret;drm_connector_helper_add (connector, &cirrus_connector_helper_funcs);Signature · 1 line
2.46.0
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Gerd Hoffmann
maintainerRe: [PATCH 1/2] drm/cirrus: Use virtual encoder and connector types
In reply to Dmitry BaryshkovQuoted 11 lines · Dmitry Baryshkov
drivers/gpu/drm/tiny/cirrus.c static int cirrus_pipe_init(struct cirrus_device *cirrus) · line 597
Quoted 7 lines · Thomas Zimmermann
The cirrus driver only works on emulated Cirrus hardware. Use the correct types for encoder and connector.
drivers/gpu/drm/tiny/cirrus.c +1
-1connector = &cirrus->connector; ret =drm_connector_init (dev, connector, &cirrus_connector_funcs, -DRM_MODE_CONNECTOR_VGA ); +DRM_MODE_CONNECTOR_VIRTUAL );This will also remove the EDID property from this connector. I'm not sore if that is an expected behaviour or not.
Well, the qemu cirrus emulation does not actually provide an EDID, so this is probably a good thing (even if possibly not intentional).
take care,
Gerd
Thomas Zimmermann
maintainerPATCH 2/2 drm/cirrus: Rename to cirrus-qemu
In reply to Thomas ZimmermannThis driver is only for Qemu's emulated Cirrus hardware. Name it accordingly.
---
MAINTAINERS | 2 +-
drivers/gpu/drm/tiny/Makefile | 2 +-
drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
rename drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} (99%)MAINTAINERS +1 -1
@@ -7312,7 +7312,7 @@ L: [email protected] S: Obsolete W: https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git -F: drivers/gpu/drm/tiny/cirrus.c +F: drivers/gpu/drm/tiny/cirrus-qemu.c DRM DRIVER FOR QXL VIRTUAL GPU M: Dave Airlie <[email protected]>
drivers/gpu/drm/tiny/Makefile +1 -1
@@ -2,7 +2,7 @@ obj-$(CONFIG_DRM_ARCPGU) += arcpgu.o obj-$(CONFIG_DRM_BOCHS) += bochs.o -obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o +obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus-qemu.o obj-$(CONFIG_DRM_GM12U320) += gm12u320.o obj-$(CONFIG_DRM_OFDRM) += ofdrm.o obj-$(CONFIG_DRM_PANEL_MIPI_DBI) += panel-mipi-dbi.o
drivers/gpu/drm/tiny/cirrus-qemu.c renamed from drivers/gpu/drm/tiny/cirrus.c +1 -1
@@ -46,7 +46,7 @@#include <drm/drm_module.h> #include <drm/drm_probe_helper.h> -#define DRIVER_NAME "cirrus" +#define DRIVER_NAME "cirrus-qemu"#define DRIVER_DESC "qemu cirrus vga"#define DRIVER_DATE "2019"#define DRIVER_MAJOR 2
Signature · 1 line
2.46.0
Thomas Zimmermann
maintainerping
Am 29.10.24 um 15:34 schrieb Thomas Zimmermann:
Quoted 15 lines
The cirrus driver is only for qemu's emulation of that hardware. The two patches in this series update cirrus to reflect this.
(The driver is still obsolete. Use something else if possible.)
Thomas Zimmermann (2):
drm/cirrus: Use virtual encoder and connector types drm/cirrus: Rename to cirrus-qemuMAINTAINERS | 2 +- drivers/gpu/drm/tiny/Makefile | 2 +- drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)rename
drivers/gpu/drm/tiny/{cirrus.c=>cirrus-qemu.c} (99%)
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Thomas Zimmermann
maintainerping ping
Am 29.10.24 um 15:34 schrieb Thomas Zimmermann:
Quoted 15 lines
The cirrus driver is only for qemu's emulation of that hardware. The two patches in this series update cirrus to reflect this.
(The driver is still obsolete. Use something else if possible.)
Thomas Zimmermann (2):
drm/cirrus: Use virtual encoder and connector types drm/cirrus: Rename to cirrus-qemuMAINTAINERS | 2 +- drivers/gpu/drm/tiny/Makefile | 2 +- drivers/gpu/drm/tiny/{cirrus.c => cirrus-qemu.c} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)rename
drivers/gpu/drm/tiny/{cirrus.c=>cirrus-qemu.c} (99%)
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Quoted 4 lines · Thomas Zimmermann
ping ping
Quoted 2 lines
drm/cirrus: Use virtual encoder and connector types drm/cirrus: Rename to cirrus-qemu
Hmm, matter of taste. I would not have invested that effort, but I have no objections either. So:
take care,
Gerd