Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-20 Thread Thomas Zimmermann
Hi Am 20.01.25 um 09:51 schrieb Tomi Valkeinen: Hi, On 20/01/2025 09:49, Thomas Zimmermann wrote: Hi Am 16.01.25 um 11:03 schrieb Tomi Valkeinen: [...] Aligning video= and dumb buffers almost sounds like going backwards. video= parameter is bad, Who told you that? Video= is still the

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-19 Thread Thomas Zimmermann
_DUMB that we've had for ages. And we're not going to change that. I'll also include documentation of the intended behavior and semantics in the series' next update. Whatever else is being discussed here, such as new ioctls, is a topic for a different series. Best regards T

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-19 Thread Thomas Zimmermann
he old behavior for CREATE_DUMB that we've had for ages.  Tomi -- -- 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)

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-16 Thread Thomas Zimmermann
ck is only required because of the existing odd cases that already bend the UAPI's rules. Best regards Thomas  Tomi -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDo

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-15 Thread Thomas Zimmermann
timal or future proof. Best regards Thomas  Tomi -- -- 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)

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-15 Thread Thomas Zimmermann
Hi Am 15.01.25 um 13:06 schrieb Tomi Valkeinen: Hi, On 15/01/2025 13:37, Thomas Zimmermann wrote: Hi Am 15.01.25 um 11:58 schrieb Tomi Valkeinen: [...] These are all good points. Did you read my discussion with Andy on patch 2? I think it resolves all the points you have. The current

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-15 Thread Thomas Zimmermann
itch-alignment requirements of DRM_FORMAT_MOD_LINEAR on various hardware. That affects dumb buffers as well. I don't think that there's an immediate need for a CREATE_DUMB2, but it seems worth to keep in mind. Best regards Thomas  Tomi -- -- Thomas Zimmermann Graphics Driver

Re: [PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-15 Thread Thomas Zimmermann
Hi Am 15.01.25 um 11:13 schrieb Tomi Valkeinen: Hi! On 09/01/2025 16:57, Thomas Zimmermann wrote: Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc

Re: [PATCH v2 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-01-12 Thread Thomas Zimmermann
nt drm_mode_size_dumb(struct drm_device *dev, + struct drm_mode_create_dumb *args, + unsigned long pitch_align, + unsigned long size_align); + +#endif -- 2.47.1 _______ Linux-rockchip mailing list linux-rockc...@lists.inf

Re: [PATCH v2 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-01-10 Thread Thomas Zimmermann
Hi Am 10.01.25 um 02:49 schrieb Andy Yan: Hi Thomas, At 2025-01-09 22:56:56, "Thomas Zimmermann" wrote: Add drm_modes_size_dumb(), a helper to calculate the dumb-buffer scanline pitch and allocation size. Implementations of struct drm_driver.dumb_create can call the new helper

Re: [PATCH v2 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Hi Am 09.01.25 um 17:05 schrieb Matthew Auld: On 09/01/2025 14:57, Thomas Zimmermann wrote: Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Align the buffer size according to hardware requirements. Signed-off-by: Thomas

[PATCH v2 18/25] drm/renesas/rz-du: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Biju Das --- drivers/gpu/drm/renesas/rz-du/rzg2l_du_kms.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v2 22/25] drm/vmwgfx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1 file changed, 4 insertions

[PATCH v2 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Align the buffer size according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vivi --- drivers/

[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Tomi Valkeinen --- drivers/gpu/drm/xlnx/zynqmp_kms.c | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH v2 24/25] drm/xen: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Cc: Oleksandr Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH v2 20/25] drm/tegra: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed, 5 insertions(+), 3

[PATCH v2 03/25] drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
s and implement their own dumb-buffer allocation. These drivers invoke drm_gem_dma_dumb_create_internal(), which is not affected by this commit. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_dma_helper.c | 7 +-- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 2 ++ 2 files change

[PATCH v2 21/25] drm/virtio: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 4. Signed-off-by: Thomas Zimmermann Cc: David Airlie Cc: Gerd Hoffmann Cc: Gurchetan Singh Cc: Chia-I Wu --- drivers/gpu/drm/virtio/virtgpu_gem.c | 11 +-- 1 file

[PATCH v2 19/25] drm/rockchip: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 64. Signed-off-by: Thomas Zimmermann Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 12 ++-- 1 file

[PATCH v2 16/25] drm/qxl: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Dave Airlie Cc: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_dumb.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a

[PATCH v2 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation

2025-01-09 Thread Thomas Zimmermann
ost implementations of dumb_create to use the new helper. A small number of drivers has more complicated calculations and will be updated by a later patches. v2: - rewrite series - convert many individual drivers besides the shared GEM helpers Thomas Zimmermann (25): drm/dumb-buffers: Sanit

[PATCH v2 15/25] drm/omapdrm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a

[PATCH v2 13/25] drm/msm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. The hardware requires the scnaline pitch to be a multiple of 32 pixels. Therefore compute the byte size of 32 pixels in the given color mode and align the pitch accordingly. Signed-off-by: Thomas Zimmermann Cc: Rob

[PATCH v2 08/25] drm/gma500: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 64. Signed-off-by: Thomas Zimmermann Cc: Patrik Jakobsson --- drivers/gpu/drm/gma500/gem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git

[PATCH v2 12/25] drm/mediatek: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_gem.c | 13

[PATCH v2 14/25] drm/nouveau: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 256. Signed-off-by: Thomas Zimmermann Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1 file changed, 4 insertions

[PATCH v2 07/25] drm/exynos: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Inki Dae Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: Alim Akhtar --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 8 +--- 1 file

[PATCH v2 09/25] drm/hibmc: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
nused helper. Signed-off-by: Thomas Zimmermann Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz --- drivers/gpu/drm/drm_gem_vram_helper.c | 65 --- .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 25 ++- includ

[PATCH v2 17/25] drm/renesas/rcar-du: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Laurent Pinchart Cc: Kieran Bingham --- drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 7 +-- 1 file changed, 5

[PATCH v2 10/25] drm/imx/ipuv3: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
accordingly. Signed-off-by: Thomas Zimmermann Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam --- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 31 ++-- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-01-09 Thread Thomas Zimmermann
some point, the validation logic in drm_mode_size_dumb() is supposed to replace the erronous code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_dumb_buffers.c | 93 ++ include/drm/drm_dumb_buffers.h | 14 + 2 files changed, 107 insertions(+) cre

[PATCH v2 06/25] drm/armada: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. No alignment required. Signed-off-by: Thomas Zimmermann Cc: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 04/25] drm/gem-shmem: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 8. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_shmem_helper.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 11/25] drm/loongson: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. Signed-off-by: Thomas Zimmermann Cc: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file changed, 8

[PATCH v2 01/25] drm/dumb-buffers: Sanitize output on errors

2025-01-09 Thread Thomas Zimmermann
not a security problem in practice, avoid any uncertainty by clearing the memory to 0 on errors. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_dumb_buffers.c | 40 ++ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_dumb_buffers

[PATCH v2 05/25] drm/gem-vram: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-01-09 Thread Thomas Zimmermann
drm_gem_vram_fill_create_dumb() directly and is therefore not affected. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_vram_helper.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index

Re: [PATCH v2 3/3] drm: remove driver date from struct drm_driver and all drivers

2024-12-04 Thread Thomas Zimmermann
ruct drm_driver, its initialization from drivers, along with the common DRIVER_DATE macros. v2: Also update drivers/accel (kernel test robot) Reviewed-by: Javier Martinez Canillas Acked-by: Alex Deucher Acked-by: Simon Ser Acked-by: Jeffrey Hugo Signed-off-by: Jani Nikula Reviewed-b

Re: [PATCH v2 1/3] drm/xen: remove redundant initialization info print

2024-12-04 Thread Thomas Zimmermann
: Oleksandr Andrushchenko Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Simona Vetter Cc: dri-de...@lists.freedesktop.org Cc: xen-devel@lists.xenproject.org Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/xen/xen_drm_front.c | 5 - 1 file changed, 5

Re: [PATCH] fbdev/xen-fbfront: Assign fb_info->device

2024-09-10 Thread Thomas Zimmermann
_device() would need to be adjusted to check for device != NULL. The helper expects a non-NULL pointer. We might want to document this. Best regards Thomas Thanks, Roger. -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nue

Re: [PATCH] fbdev/xen-fbfront: Assign fb_info->device

2024-09-10 Thread Thomas Zimmermann
UncX=lkxweisitksdy-coe8qkswhfvccneokfrkd0z...@mail.gmail.com/ Tested-by: Arthur Borsboom CC: sta...@vger.kernel.org Signed-off-by: Jason Andryuk Reviewed-by: Thomas Zimmermann Thanks a lot. --- The other option would be to re-instate the NULL check in video_is_primary_device() --- drivers/video/fbdev/xen-f

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-14 Thread Thomas Zimmermann
Hi Am 13.07.23 um 17:14 schrieb Tvrtko Ursulin: On 13/07/2023 16:09, Thomas Zimmermann wrote: Hi Am 13.07.23 um 16:41 schrieb Sean Paul: On Thu, Jul 13, 2023 at 9:04 AM Uwe Kleine-König wrote: hello Sean, On Wed, Jul 12, 2023 at 02:31:02PM -0400, Sean Paul wrote: I'd really prefer

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Thomas Zimmermann
ank you! Sean Thanks for your input, best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ | -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Thomas Zimmermann
| 8 +- include/drm/drm_atomic_helper.h | 2 +- include/drm/drm_crtc.h| 4 +- 194 files changed, 1296 insertions(+), 1264 deletions(-) base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solut

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Thomas Zimmermann
Sean If folks insist on following through with this anyway, I'm firmly in the camp the name should be "drm" and nothing else. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenst

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-13 Thread Thomas Zimmermann
"ddev" for the drm_device (see for example amdgpu_device_get_pcie_replay_count()). If folks insist on following through with this anyway, I'm firmly in the camp the name should be "drm" and nothing else. Up to now positive feedback is in the majority. Best regards Uwe -

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Thomas Zimmermann
| 4 +- 194 files changed, 1296 insertions(+), 1264 deletions(-) base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 -- 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) OpenPGP_signature Description: OpenPGP digital signature

[PATCH v3 23/23] drm/fb-helper: Clarify use of last_close and output_poll_changed

2022-11-03 Thread Thomas Zimmermann
Clarify documentation in the use of struct drm_driver.last_close and struct drm_mode_config_funcs.output_poll_changed. Those callbacks should not be said for fbdev implementations on top of struct drm_client_funcs. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 6

[PATCH v3 21/23] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-11-03 Thread Thomas Zimmermann
vmwgfx changes * rebase onto xlnx changes * fix include statements in amdgpu Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/Makefile | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + .../gpu/drm/arm

[PATCH v3 22/23] drm/fb-helper: Remove unnecessary include statements

2022-11-03 Thread Thomas Zimmermann
Remove include statements for where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. v3: * fix amdgpu include statements * fix rockchip include statements Signed-off-by: Thomas Zimmermann Reviewed-by

[PATCH v3 16/23] drm/fb-helper: Call fb_sync in I/O functions

2022-11-03 Thread Thomas Zimmermann
drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/drm_fb_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index f6d22cc4cd876..379e0d2f67198 100644 --- a/drivers

[PATCH v3 20/23] drm/fb-helper: Set flag in struct drm_fb_helper for leaking physical addresses

2022-11-03 Thread Thomas Zimmermann
Uncouple the parameter drm_leak_fbdev_smem from the implementation by setting a flag in struct drm_fb_helper. This will help to move the generic fbdev emulation into its own source file, while keeping the parameter in drm_fb_helper.c. No functional changes. Signed-off-by: Thomas Zimmermann

[PATCH v3 19/23] drm/fb-helper: Always initialize generic fbdev emulation

2022-11-03 Thread Thomas Zimmermann
Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas

[PATCH v3 14/23] drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix

2022-11-03 Thread Thomas Zimmermann
Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/armada/armada_fbdev.c | 2

[PATCH v3 18/23] drm/fb_helper: Minimize damage-helper overhead

2022-11-03 Thread Thomas Zimmermann
Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann

[PATCH v3 10/23] drm/tve200: Include

2022-11-03 Thread Thomas Zimmermann
Include for of_match_ptr(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/tve200/tve200_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 04db72e3fa9c2

[PATCH v3 12/23] drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper

2022-11-03 Thread Thomas Zimmermann
Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martine

[PATCH v3 11/23] drm/fb-helper: Cleanup include statements in header file

2022-11-03 Thread Thomas Zimmermann
Only include what we have to. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- include/drm/drm_fb_helper.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index fddd0d1af6891

[PATCH v3 13/23] drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix

2022-11-03 Thread Thomas Zimmermann
Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu

[PATCH v3 17/23] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-03 Thread Thomas Zimmermann
e(). Several drivers require these. Until now tegra used I/O read and write, although the memory buffer appears to be in system memory. So use _sys_ helpers now. v3: * fix docs (Javier) v2: * rebase onto vmwgfx changes Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Ca

[PATCH v3 06/23] drm/ingenic: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian, Sergey) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c

[PATCH v3 09/23] drm/panel-ili9341: Include

2022-11-03 Thread Thomas Zimmermann
Include for devm_of_find_backlight(). Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek

[PATCH v3 05/23] drm/imx/dcss: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx

[PATCH v3 15/23] drm/fb-helper: Disconnect damage worker from update logic

2022-11-03 Thread Thomas Zimmermann
on if they require damage handling; although no such drivers currently exist. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/drm_fb_helper.c | 75 - include/drm/drm_fb_helper.h | 15 +++ 2 files changed, 61

[PATCH v3 03/23] drm/vboxvideo: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as vboxvideo uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann R

[PATCH v3 08/23] drm/rockchip: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c

[PATCH v3 04/23] drm/amdgpu: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 2 files changed, 3 deletion

[PATCH v3 07/23] drm/logicvc: Don't set struct drm_driver.output_poll_changed

2022-11-03 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/logicvc/logicvc_mode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/logicvc/logicvc_mode.c b/drive

[PATCH v3 02/23] drm/mcde: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as mcde uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann R

[PATCH v3 00/23] drm/fb-helper: Untangle fbdev emulation and helpers

2022-11-03 Thread Thomas Zimmermann
ix several include statements * rebases v2: * fixed commit descriptions (Christian, Sergey) Thomas Zimmermann (23): drm/komeda: Don't set struct drm_driver.lastclose drm/mcde: Don't set struct drm_driver.lastclose drm/vboxvideo: Don't set struct drm_driver.last

[PATCH v3 01/23] drm/komeda: Don't set struct drm_driver.lastclose

2022-11-03 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as komeda uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann R

Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-11-02 Thread Thomas Zimmermann
Hi Am 02.11.22 um 10:32 schrieb Javier Martinez Canillas: On 10/24/22 13:19, Thomas Zimmermann wrote: Implement the fbdev's read/write helpers with the same functions. Use the generic fbdev's code as template. Convert all drivers. DRM's fb helpers must implement regular I/O f

[PATCH v2 21/21] drm/fb-helper: Remove unnecessary include statements

2022-10-24 Thread Thomas Zimmermann
Remove include statements for where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

[PATCH v2 19/21] drm/fb-helper: Always initialize generic fbdev emulation

2022-10-24 Thread Thomas Zimmermann
Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas

[PATCH v2 15/21] drm/fb-helper: Disconnect damage worker from update logic

2022-10-24 Thread Thomas Zimmermann
on if they require damage handling; although no such drivers currently exist. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 75 - include/drm/drm_fb_helper.h | 15 +++ 2 files changed, 61 insertions(+), 29 deletions(-) diff --git

[PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation

2022-10-24 Thread Thomas Zimmermann
e(). Several drivers require these. Until now tegra used I/O read and write, although the memory buffer appears to be in system memory. So use _sys_ helpers now. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_fbdev.c | 2 + drivers/gpu/drm/drm_fb_helpe

[PATCH v2 12/21] drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper

2022-10-24 Thread Thomas Zimmermann
Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_f

[PATCH v2 18/21] drm/fb_helper: Minimize damage-helper overhead

2022-10-24 Thread Thomas Zimmermann
Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann

[PATCH v2 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-10-24 Thread Thomas Zimmermann
Move the generic fbdev implementation into its own source and header file. Adapt drivers. No functonal changes, but some of the internal helpers have been renamed to fit into the drm_fbdev_ naming scheme. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 2

[PATCH v2 16/21] drm/fb-helper: Call fb_sync in I/O functions

2022-10-24 Thread Thomas Zimmermann
drivers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index f6d22cc4cd876..379e0d2f67198 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers

[PATCH v2 08/21] drm/rockchip: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_

[PATCH v2 09/21] drm/panel-ili9341: Include

2022-10-24 Thread Thomas Zimmermann
Include for devm_of_find_backlight(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c index 39dc40cf681f0

[PATCH v2 10/21] drm/tve200: Include

2022-10-24 Thread Thomas Zimmermann
Include for of_match_ptr(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tve200/tve200_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 04db72e3fa9c2..611785e097576 100644 --- a/drivers/gpu/drm

[PATCH v2 13/21] drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix

2022-10-24 Thread Thomas Zimmermann
Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c| 8

[PATCH v2 14/21] drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfix

2022-10-24 Thread Thomas Zimmermann
Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_fbdev.c | 2 +- drivers/gpu/drm/drm_fb_helper.c

[PATCH v2 00/21] drm/fb-helper: Untangle fbdev emulation and helpers

2022-10-24 Thread Thomas Zimmermann
on x86-64, aarch64, arm, ppc64le. Tested with various combinations of bochs, i915, simpledrm. v2: * fixed commit descriptions (Christian, Sergey) Thomas Zimmermann (21): drm/komeda: Don't set struct drm_driver.lastclose drm/mcde: Don't set struct drm_driver.lastclose drm/

[PATCH v2 05/21] drm/imx/dcss: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index b4f

[PATCH v2 11/21] drm/fb-helper: Cleanup include statements in header file

2022-10-24 Thread Thomas Zimmermann
Only include what we have to. Signed-off-by: Thomas Zimmermann --- include/drm/drm_fb_helper.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index fddd0d1af6891..e923089522896 100644 --- a/include/drm

[PATCH v2 06/21] drm/ingenic: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian, Sergey) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic

[PATCH v2 02/21] drm/mcde: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as mcde uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann --- d

[PATCH v2 07/21] drm/logicvc: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/logicvc/logicvc_mode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/logicvc/logicvc_mode.c b/drivers/gpu/drm/logicvc/logicvc_mode.c index d82

[PATCH v2 03/21] drm/vboxvideo: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as vboxvideo uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas

[PATCH v2 04/21] drm/amdgpu: Don't set struct drm_driver.output_poll_changed

2022-10-24 Thread Thomas Zimmermann
event() in drm_probe_helper.c. v2: * fix commit description (Christian) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH v2 01/21] drm/komeda: Don't set struct drm_driver.lastclose

2022-10-24 Thread Thomas Zimmermann
Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as komeda uses generic fbdev emulation, the console is being restored by the DRM client helpers already. See the call to drm_client_dev_restore() in drm_lastclose(). Signed-off-by: Thomas Zimmermann --

Re: [PATCH 01/21] drm/amdgpu: Don't set struct drm_driver.lastclose

2022-10-20 Thread Thomas Zimmermann
Hi Am 20.10.22 um 13:48 schrieb Christian König: Am 20.10.22 um 12:37 schrieb Thomas Zimmermann: Don't set struct drm_driver.lastclose. It's used to restore the fbdev console. But as amdgpu uses generic fbdev emulation, the console is being restored by the DRM client helpers alread

[PATCH 19/21] drm/fb-helper: Always initialize generic fbdev emulation

2022-10-20 Thread Thomas Zimmermann
Initialize the generic fbdev emulation even if it has been disabled on the kernel command line. The hotplug and mode initialization will fail accordingly. The kernel parameter can still be changed at runtime and the emulation will initialize after hotplugging the connector. Signed-off-by: Thomas

[PATCH 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file

2022-10-20 Thread Thomas Zimmermann
Move the generic fbdev implementation into its own source and header file. Adapt drivers. No functonal changes, but some of the internal helpers have been renamed to fit into the drm_fbdev_ naming scheme. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 2

[PATCH 18/21] drm/fb_helper: Minimize damage-helper overhead

2022-10-20 Thread Thomas Zimmermann
Pull the test for fb_dirty into the caller to avoid extra work if no callback has been set. In this case no damage handling is required and no damage area needs to be computed. Print a warning if the damage worker runs without getting an fb_dirty callback. Signed-off-by: Thomas Zimmermann

[PATCH 15/21] drm/fb-helper: Disconnect damage worker from update logic

2022-10-20 Thread Thomas Zimmermann
on if they require damage handling; although no such drivers currently exist. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 75 - include/drm/drm_fb_helper.h | 15 +++ 2 files changed, 61 insertions(+), 29 deletions(-) diff --git

[PATCH 16/21] drm/fb-helper: Call fb_sync in I/O functions

2022-10-20 Thread Thomas Zimmermann
drivers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index f6d22cc4cd876..379e0d2f67198 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers

  1   2   3   4   >