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

2025-08-21 Thread Thomas Zimmermann
Hi Am 21.08.25 um 13:28 schrieb Biju Das: Hi Thomas Zimmermann, Thanks for the patch. -Original Message- From: Thomas Zimmermann Sent: 21 August 2025 09:17 Subject: [PATCH v6 18/25] drm/renesas/rz-du: Compute dumb-buffer sizes with drm_mode_size_dumb() Call drm_mode_size_dumb() to

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

2025-08-21 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 Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/drm_dumb_buffers.c | 40 ++ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/dr

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

2025-08-21 Thread Thomas Zimmermann
accordingly. v5: - fix typo in commit description Signed-off-by: Thomas Zimmermann Reviewed-by: Philipp Zabel 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

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

2025-08-21 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 v6 07/25] drm/exynos: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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 Acked-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_gem.c

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

2025-08-21 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 Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/xlnx

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

2025-08-21 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 v6 20/25] drm/tegra: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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 Acked-by: Thierry Reding Cc: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed

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

2025-08-21 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 v6 16/25] drm/qxl: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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 v6 14/25] drm/nouveau: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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 Reviewed-by: Lyude Paul Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1

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

2025-08-21 Thread Thomas Zimmermann
against 32-bit wide limits. Hance, it is safe to limit the driver code to 32-bit calculations as well. v3: - mention 32-bit calculation in commit description (Matthew) Signed-off-by: Thomas Zimmermann Reviewed-by: Matthew Auld Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vi

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

2025-08-21 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 Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1

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

2025-08-21 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 Acked-by: Heiko Stuebner Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_

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

2025-08-21 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 v6 17/25] drm/renesas/rcar-du: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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 Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/renesas

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

2025-08-21 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 Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8

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

2025-08-21 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 128. v4: - align pitch to 128 bytes (Russell) Signed-off-by: Thomas Zimmermann Cc: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7

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

2025-08-21 Thread Thomas Zimmermann
replaces the existing code in the driver's align_pitch() helper. v3: - clarify pitch alignment in commit message (Dmitry) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten --- drivers/gp

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

2025-08-21 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. v5: - include dumb-buffers header for drm_mode_size_dumb() (kernel test robot) Signed-off-by: Thomas Zimmermann Cc: Biju Das --- drivers/gpu/drm/renesas/rz-du

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

2025-08-21 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 Reviewed-by: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file

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

2025-08-21 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 v6 05/25] drm/gem-vram: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-08-21 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

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

2025-08-21 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 Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/drm_gem_shmem_helper.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions

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

2025-08-21 Thread Thomas Zimmermann
,6 +648,43 @@ Contact: Thomas Zimmermann , Simona Vetter Level: Advanced +Implement a new DUMB_CREATE2 ioctl +-- + +The current DUMB_CREATE ioctl is not well defined. Instead of a pixel and +framebuffer format, it only accepts a color mode of vague semantics. Assuming

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

2025-08-21 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. v5: - avoid reset of arguments (Tomi) Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/drm_gem_dma_helper.c | 7 +

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

2025-08-21 Thread Thomas Zimmermann
v2: - rewrite series - convert many individual drivers besides the shared GEM helpers Thomas Zimmermann (25): drm/dumb-buffers: Sanitize output on errors drm/dumb-buffers: Provide helper to set pitch and size drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb() drm/gem-shmem: Comp

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

2025-07-22 Thread Thomas Zimmermann
Ping for additional reviews. Especially patches 3, 4, and 5, which cover a wide range of drivers.. Am 13.06.25 um 11:00 schrieb Thomas Zimmermann: Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these values

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

2025-07-22 Thread Thomas Zimmermann
Ping for additional reviews. Especially patches 3, 4, and 5, which cover a wide range of drivers.. Am 13.06.25 um 11:00 schrieb Thomas Zimmermann: Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these values

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

2025-06-13 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 v5 21/25] drm/virtio: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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 v5 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 Thread Thomas Zimmermann
against 32-bit wide limits. Hance, it is safe to limit the driver code to 32-bit calculations as well. v3: - mention 32-bit calculation in commit description (Matthew) Signed-off-by: Thomas Zimmermann Reviewed-by: Matthew Auld Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vi

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

2025-06-13 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 Acked-by: Heiko Stuebner Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_

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

2025-06-13 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 v5 16/25] drm/qxl: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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 v5 14/25] drm/nouveau: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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 Reviewed-by: Lyude Paul Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1

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

2025-06-13 Thread Thomas Zimmermann
replaces the existing code in the driver's align_pitch() helper. v3: - clarify pitch alignment in commit message (Dmitry) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten --- drivers/gp

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

2025-06-13 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 v5 24/25] drm/xen: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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 v5 22/25] drm/vmwgfx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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 Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1

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

2025-06-13 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 Reviewed-by: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file

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

2025-06-13 Thread Thomas Zimmermann
accordingly. v5: - fix typo in commit description Signed-off-by: Thomas Zimmermann Reviewed-by: Philipp Zabel 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

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

2025-06-13 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 Acked-by: Thierry Reding Cc: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed

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

2025-06-13 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch according to hardware requirements. v5: - include dumb-buffers header for drm_mode_size_dumb() (kernel test robot) Signed-off-by: Thomas Zimmermann Cc: Biju Das --- drivers/gpu/drm/renesas/rz-du

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

2025-06-13 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 v5 06/25] drm/armada: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 128. v4: - align pitch to 128 bytes (Russell) Signed-off-by: Thomas Zimmermann Cc: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7

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

2025-06-13 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 Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8

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

2025-06-13 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

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

2025-06-13 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 v5 03/25] drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-06-13 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. v5: - avoid reset of arguments (Tomi) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_dma_helper.c | 7 +-- drivers/gpu/drm/im

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

2025-06-13 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 v5 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-06-13 Thread Thomas Zimmermann
- clarify parameters for hardware alignment - add a TODO item for DUMB_CREATE2 v3: - document the UAPI semantics - compute scanline pitch from for unknown color modes (Andy, Tomi) Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen --- Documentation/gpu/todo.rst | 27 ++ d

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

2025-06-13 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 v5 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation

2025-06-13 Thread Thomas Zimmermann
red GEM helpers Thomas Zimmermann (25): drm/dumb-buffers: Sanitize output on errors drm/dumb-buffers: Provide helper to set pitch and size drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb() drm/gem-shmem: Compute dumb-buffer sizes with drm_mode_size_dumb() drm/gem-vram: Comp

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

2025-06-13 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 Reviewed-by: Tomi Valkeinen --- drivers/gpu/drm/drm_dumb_buffers.c | 40 ++ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/dr

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

2025-06-13 Thread Thomas Zimmermann
Hi Am 12.06.25 um 10:43 schrieb Tomi Valkeinen: Hi, On 11/03/2025 17:47, 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. Push the current calculation into the only direct caller imx. Imx's har

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

2025-06-13 Thread Thomas Zimmermann
Hi Am 12.06.25 um 10:36 schrieb Tomi Valkeinen: Hi, On 11/03/2025 17:47, 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 for their size

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

2025-05-28 Thread Thomas Zimmermann
ping I'm still looking for more reviews; especially patches 1 and 2. Best regards Thomas Am 11.03.25 um 16:47 schrieb Thomas Zimmermann: Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these valu

Re: [RFC] PCI: add CONFIG_MMU dependency

2025-04-08 Thread Thomas Zimmermann
i/Kconfig index 0cc06c2ce0b8..75ace2302fed 100644 --- a/drivers/scsi/bnx2i/Kconfig +++ b/drivers/scsi/bnx2i/Kconfig @@ -4,7 +4,6 @@ config SCSI_BNX2_ISCSI depends on NET depends on PCI depends on (IPV6 || IPV6=n) - depends on MMU select SCSI_ISCSI_ATTRS select NETDEVICES select ETHERNET diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig index c3bcb6911c53..2b0172f54665 100644 --- a/drivers/vfio/pci/Kconfig +++ b/drivers/vfio/pci/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menu "VFIO support for PCI devices" - depends on PCI && MMU + depends on PCI config VFIO_PCI_CORE tristate -- -- 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)

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

2025-03-11 Thread Thomas Zimmermann
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and buffer size. Align the pitch to a multiple of 128. v4: - align pitch to 128 bytes (Russell) Signed-off-by: Thomas Zimmermann Cc: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 16 +++- 1 file changed, 7

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

2025-03-11 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 v4 02/25] drm/dumb-buffers: Provide helper to set pitch and size

2025-03-11 Thread Thomas Zimmermann
O item for DUMB_CREATE2 v3: - document the UAPI semantics - compute scanline pitch from for unknown color modes (Andy, Tomi) Signed-off-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 28 ++ drivers/gpu/drm/drm_dumb_buffers.c | 132 + i

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

2025-03-11 Thread Thomas Zimmermann
accordingly. Signed-off-by: Thomas Zimmermann Reviewed-by: Philipp Zabel 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

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

2025-03-11 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 v4 15/25] drm/omapdrm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8

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

2025-03-11 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 v4 12/25] drm/mediatek: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 Thread Thomas Zimmermann
against 32-bit wide limits. Hance, it is safe to limit the driver code to 32-bit calculations as well. v3: - mention 32-bit calculation in commit description (Matthew) Signed-off-by: Thomas Zimmermann Reviewed-by: Matthew Auld Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vi

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

2025-03-11 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 Acked-by: Heiko Stuebner Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan --- drivers/gpu/drm/rockchip/rockchip_drm_

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

2025-03-11 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 Acked-by: Thierry Reding Cc: Thierry Reding Cc: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 8 +--- 1 file changed

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

2025-03-11 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 Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1

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

2025-03-11 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 v4 16/25] drm/qxl: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 11/25] drm/loongson: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 Reviewed-by: Sui Jingfeng Cc: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_gem.c | 29 - 1 file

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

2025-03-11 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 Reviewed-by: Lyude Paul Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_display.c | 7 --- 1

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

2025-03-11 Thread Thomas Zimmermann
replaces the existing code in the driver's align_pitch() helper. v3: - clarify pitch alignment in commit message (Dmitry) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten --- drivers/gp

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

2025-03-11 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

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

2025-03-11 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 v4 09/25] drm/hibmc: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 07/25] drm/exynos: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 08/25] drm/gma500: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 03/25] drm/gem-dma: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-03-11 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 v4 01/25] drm/dumb-buffers: Sanitize output on errors

2025-03-11 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 v4 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation

2025-03-11 Thread Thomas Zimmermann
v3: - document UAPI semantics - fall back to bpp-based allocation for unknown color modes - cleanups v2: - rewrite series - convert many individual drivers besides the shared GEM helpers Thomas Zimmermann (25): drm/dumb-buffers: Sanitize output on errors drm/dumb-buffers: Provide helper to

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

2025-02-26 Thread Thomas Zimmermann
Hi Am 25.02.25 um 14:45 schrieb Tomi Valkeinen: Hi, On 21/02/2025 11:19, Thomas Zimmermann wrote: Hi Am 20.02.25 um 11:53 schrieb Tomi Valkeinen: Hi, On 20/02/2025 12:05, Thomas Zimmermann wrote: Hi Am 20.02.25 um 10:18 schrieb Tomi Valkeinen: [...] + * Color modes of 10, 12, 15, 30 and

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

2025-02-21 Thread Thomas Zimmermann
Hi Am 21.02.25 um 10:57 schrieb Geert Uytterhoeven: Hi Thomas, On Fri, 21 Feb 2025 at 10:19, Thomas Zimmermann wrote: Am 20.02.25 um 11:53 schrieb Tomi Valkeinen: This change also first calls the drm_driver_color_mode_format(), which could change the behavior even more, but afaics at the

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

2025-02-21 Thread Thomas Zimmermann
Hi Am 20.02.25 um 11:53 schrieb Tomi Valkeinen: Hi, On 20/02/2025 12:05, Thomas Zimmermann wrote: Hi Am 20.02.25 um 10:18 schrieb Tomi Valkeinen: [...] + * Color modes of 10, 12, 15, 30 and 64 are only supported for use by + * legacy user space. Please don't use them in new code.

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

2025-02-20 Thread Thomas Zimmermann
nd better for the buffer allocation, but for the time being, I'd be more comfortable just keep the current behavior, at least for all the drivers I use or maintain: omapdrm, tidss, renesas, xlnx, tilcdc.  Tomi -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions G

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

2025-02-19 Thread Thomas Zimmermann
Hi Am 18.02.25 um 16:57 schrieb Russell King (Oracle): On Tue, Feb 18, 2025 at 03:23:29PM +0100, Thomas Zimmermann wrote: 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 armada_pitch

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

2025-02-19 Thread Thomas Zimmermann
+ * with single-plane RGB data. Allocation of other framebuffer + * layouts requires dedicated ioctls in the respective DRM driver. */ struct drm_mode_create_dumb { __u32 height; Gr{oetje,eeting}s, Geert -- -- Thomas Zimmermann Graphics Driver Developer S

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

2025-02-18 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 v3 24/25] drm/xen: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-18 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 v3 06/25] drm/armada: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-18 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 v3 15/25] drm/omapdrm: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-18 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 Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_gem.c | 15 +++ 1 file changed, 7 insertions(+), 8

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

2025-02-18 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 v3 20/25] drm/tegra: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-18 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 v3 23/25] drm/xe: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-18 Thread Thomas Zimmermann
against 32-bit wide limits. Hance, it is safe to limit the driver code to 32-bit calculations as well. v3: - mention 32-bit calculation in commit description (Matthew) Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc: "Thomas Hellström" Cc: Rodrigo Vivi --- drivers/gp

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

2025-02-18 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 Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Broadcom internal kernel review list --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 21 - 1

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

2025-02-18 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

  1   2   3   4   5   >