[PATCH v2 00/10] drm/bochs: Modernize driver

2024-09-02 Thread Thomas Zimmermann
Patch 10 removes code from GEM VRAM helpers that is now no longer in use. Tested with qemu emulation. v2: - fix linker error (kernel test robot) - fix mode validation Thomas Zimmermann (10): drm/bochs: Remove manual format test from fb_create drm/bochs: Use helpers for struct drm_edid drm

[PATCH v2 01/10] drm/bochs: Remove manual format test from fb_create

2024-09-02 Thread Thomas Zimmermann
An updated implementation of drm_gem_fb_create() already tests the driver's planes for supported formats. [1] No need to duplicate this test in bochs. Signed-off-by: Thomas Zimmermann Link: https://elixir.bootlin.com/linux/v6.9/source/drivers/gpu/drm/drm_gem_framebuffer_helper.c#L169 # 1

[PATCH v2 03/10] drm/bochs: Do managed resource cleanup

2024-09-02 Thread Thomas Zimmermann
Do managed cleanup of all PCI resources. Remove the now-unused cleanup helper bochs_hw_fini(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 42 +--- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a

[PATCH v2 05/10] drm/bochs: Upcast with to_bochs_device()

2024-09-02 Thread Thomas Zimmermann
The dev_private field in struct drm_device is deprecated. Limit its use by moving it into a helper function. A later change will remove it entirely. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH v2 04/10] drm/bochs: Pass bochs device to various functions

2024-09-02 Thread Thomas Zimmermann
Avoid upcasting from struct drm_device by passing the bochs device directly to functions. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tiny/bochs.c b

[PATCH v2 07/10] drm/bochs: Use regular atomic helpers

2024-09-02 Thread Thomas Zimmermann
C and an update helper for the plane. The encoder changes type from NONE ot VIRTUAL. Removing simple-pipe helpers from bochs will allow for related cleanups in GEM VRAM helpers. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c

[PATCH v2 06/10] drm/bochs: Allocate DRM device in struct bochs_device

2024-09-02 Thread Thomas Zimmermann
Allocate an instance of struct drm_device in struct bochs_device. Also remove all uses of dev_private from bochs and upcast from the embedded instance if necessary. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 52

[PATCH v2 08/10] drm/bochs: Use GEM SHMEM helpers for memory management

2024-09-02 Thread Thomas Zimmermann
ch configurations. This cannot always be guaranteed and bochs already contains code to rule out <4 MiB configurations. With GEM SHMEM, only 8 MiB of video memory are required for the given example. Unsupported modes can be sorted out easily. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann

[PATCH v2 10/10] drm/gem-vram: Remove support for simple display pipelines

2024-09-02 Thread Thomas Zimmermann
There are no more drivers that use GEM VRAM helpers with a simple display pipeline. Remove the respective code. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/drm_gem_vram_helper.c | 45 --- include/drm/drm_gem_vram_helper.h | 13

[PATCH v2 02/10] drm/bochs: Use helpers for struct drm_edid

2024-09-02 Thread Thomas Zimmermann
required. Remove it. If qemu provides no EDID data, install default display modes as before. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 48 +--- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH v2 09/10] drm/bochs: Validate display modes against available video memory

2024-09-02 Thread Thomas Zimmermann
robot) - fix vdisplay and hdisplay usage Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/tiny/bochs.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index

Re: [PATCH v2 0/5] drm/connector: make mode_valid() callback accept const mode pointer

2025-01-06 Thread Thomas Zimmermann
uld I rework it adding something like .mode_valid_new() callback which takes const argument? Please merge as-is. No need to complicate things. For the whole series: Reviewed-by: Thomas Zimmermann Thanks for doing this. Best regards Thomas Signed-off-by: Dmitry Baryshkov --- Changes in v