[PULL] drm-misc-fixes

2025-05-15 Thread Thomas Zimmermann
changed, 10 insertions(+), 6 deletions(-) -- 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 1/5] drm: Add helpers for programming hardware gamma LUTs

2025-05-12 Thread Thomas Zimmermann
Hi Am 12.05.25 um 15:31 schrieb Jocelyn Falempe: On 09/05/2025 10:23, Thomas Zimmermann wrote: Provide helpers that program hardware gamma LUTs. Tha gamma ramp is either provided by the driver or generated by the helper. The DRM driver exports the GAMMA_LUT property with a fixed number of

Re: [PATCH 0/5] drm: Provide helpers for programming gamma ramps and palettes

2025-05-12 Thread Thomas Zimmermann
Am 09.05.25 um 10:23 schrieb Thomas Zimmermann: We have a number of drivers that offer simple gamma correction and palette modes. Depending on their hardware, the drivers process the provided data in similar ways. Unify the functionality in several DRM color-management helpers and update the

Re: [PATCH v3] drm/sitronix: move tiny Sitronix drivers to their own subdir

2025-05-12 Thread Thomas Zimmermann
Folkesson Acked-by: Thomas Zimmermann --- Changes in v3: - Keep old Kconfig symbols and let the new one defaults to it - Link to v2: https://lore.kernel.org/r/20250503-sitronix-v2-1-5efbed896...@gmail.com Changes in v2: - Rebase on drm-misc-next - Link to v1: https://lore.kernel.org/r/20250428

Re: [PATCH v2] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()

2025-05-11 Thread Thomas Zimmermann
/fb-helper: Don't use the preferred depth for the BPP default") Signed-off-by: Fabio Estevam Reviewed-by: Thomas Zimmermann --- Reviewed-by: Javier Martinez Canillas Could you please help apply this fix? Merged into drm-misc-fixes Best regards Thomas Thanks -- -- Thomas Zimmer

Re: [PATCH] drm: drm_auth: Convert mutex usage to guard(mutex)

2025-05-11 Thread Thomas Zimmermann
Hi Am 09.05.25 um 16:26 schrieb André Almeida: Replace open-coded mutex handling with cleanup.h guard(mutex). This simplifies the code and removes the "goto unlock" pattern. Tested with igt tests core_auth and core_setmaster. Signed-off-by: André Almeida Reviewed-by: Thomas

[PATCH 5/5] drm/vesadrm: Use helpers for programming gamma ramps

2025-05-09 Thread Thomas Zimmermann
it to make them fit into hardware registers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/sysfb/vesadrm.c | 100 1 file changed, 36 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/sysfb/vesadrm.c b/drivers/gpu/drm/sysfb/vesadrm.c index 4d62c78

[PATCH 1/5] drm: Add helpers for programming hardware gamma LUTs

2025-05-09 Thread Thomas Zimmermann
s can change this. For PCs, a VGA default palette could be used. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_color_mgmt.c | 206 +++ include/drm/drm_color_mgmt.h | 27 2 files changed, 233 insertions(+) diff --git a/drivers/gpu/drm/drm_color_mgm

[PATCH 3/5] drm/mgag200: Use helpers for programming gamma ramps

2025-05-09 Thread Thomas Zimmermann
it to make them fit into hardware registers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h| 4 +- drivers/gpu/drm/mgag200/mgag200_g200er.c | 4 +- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 4 +- drivers/gpu/drm/mgag200/mgag200_g200se.c | 4 +- drivers/gp

[PATCH 0/5] drm: Provide helpers for programming gamma ramps and palettes

2025-05-09 Thread Thomas Zimmermann
lette. Thomas Zimmermann (5): drm: Add helpers for programming hardware gamma LUTs drm/ast: Use helpers for programming gamma ramps and palettes drm/mgag200: Use helpers for programming gamma ramps drm/ofdrm: Use helpers for programming gamma ramps drm/vesadrm: Use helpers for programming

[PATCH 2/5] drm/ast: Use helpers for programming gamma ramps and palettes

2025-05-09 Thread Thomas Zimmermann
8 bit to make them fit into hardware registers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_mode.c | 69 +- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c

[PATCH 4/5] drm/ofdrm: Use helpers for programming gamma ramps

2025-05-09 Thread Thomas Zimmermann
it to make them fit into hardware registers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/sysfb/ofdrm.c | 78 +-- 1 file changed, 29 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/sysfb/ofdrm.c b/drivers/gpu/drm/sysfb/ofdrm.c index fddfe8b

Re: [PATCH v4 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-08 Thread Thomas Zimmermann
_import_dev(struct drm_device *dev, struct dma_buf *dma_buf, struct device *attach_dev); -- -- 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)

[PULL] drm-misc-fixes

2025-05-08 Thread Thomas Zimmermann
| 18 +++ include/drm/ttm/ttm_tt.h | 2 +- 10 files changed, 86 insertions(+), 78 deletions(-) -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Bo

Re: [PATCH v3 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-08 Thread Thomas Zimmermann
f); + struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev, struct dma_buf *dma_buf, struct device *attach_dev); -- -- 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] drm/fbdev-client: Ignore EOPNOTSUPP errors

2025-05-08 Thread Thomas Zimmermann
, "Failed to register client: %d\n", ret); + else + ret = 0; + goto err_drm_client_init; } -- -- 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] MAINTAINERS: Add entries for drm_panic, drm_panic_qr_code and drm_log

2025-05-06 Thread Thomas Zimmermann
Am 06.05.25 um 15:29 schrieb Jocelyn Falempe: Add myself and Javier as maintainer for drm_panic, drm_panic_qr_code and drm_log. Signed-off-by: Jocelyn Falempe Acked-by: Thomas Zimmermann --- MAINTAINERS | 28 1 file changed, 28 insertions(+) diff --git

Re: [PATCH v3] drm/gem: Internally test import_attach for imported objects

2025-05-06 Thread Thomas Zimmermann
Hi Am 05.05.25 um 09:29 schrieb Boris Brezillon: On Wed, 30 Apr 2025 11:07:17 +0200 Simona Vetter wrote: On Wed, Apr 16, 2025 at 11:38:03AM +0200, Simona Vetter wrote: On Wed, Apr 16, 2025 at 08:57:45AM +0200, Thomas Zimmermann wrote: Test struct drm_gem_object.import_attach to detect

Re: [PATCH v2] video: screen_info: Relocate framebuffers behind PCI bridges

2025-05-05 Thread Thomas Zimmermann
Hi Am 22.04.25 um 23:47 schrieb Bjorn Helgaas: On Tue, Apr 22, 2025 at 09:49:57AM +0200, Thomas Zimmermann wrote: Apply bridge window offsets to screen_info framebuffers during relocation. Fixes invalid access to I/O memory. Resources behind a PCI bridge can be located at a certain offset in

Re: [PATCH 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-05 Thread Thomas Zimmermann
LE_DRIVER_OPS \ + .gem_prime_import = drm_gem_shmem_prime_import, \ + .dumb_create= drm_gem_shmem_dumb_create + #endif /* __DRM_GEM_SHMEM_HELPER_H__ */ -- -- 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] drm/sitronix: move tiny Sitronix drivers to their own subdir

2025-05-05 Thread Thomas Zimmermann
Hi Javier, Marcus Am 05.05.25 um 11:27 schrieb Javier Martinez Canillas: Thomas Zimmermann writes: Hello Thomas, Hi, there's one major issue here. You must not change the Kconfig symbols or you'll break kernel updates for a lot of people. So those TINYDRM_* must remain as is.

Re: [PATCH v2] drm/sitronix: move tiny Sitronix drivers to their own subdir

2025-05-05 Thread Thomas Zimmermann
SHARP_MEMORY)+= sharp-memory.o -obj-$(CONFIG_TINYDRM_ST7586) += st7586.o -obj-$(CONFIG_TINYDRM_ST7735R) += st7735r.o --- base-commit: e782ac936941cff4c5580bb5cc2ec0e91468068c change-id: 20250424-sitronix-2c1f68b46866 Best regards, -- -- 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)

[PULL] drm-misc-fixes

2025-04-22 Thread Thomas Zimmermann
| 13 +- drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c | 4 +- 6 files changed, 128 insertions(+), 117 deletions(-) -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonal

[PATCH v2] video: screen_info: Relocate framebuffers behind PCI bridges

2025-04-22 Thread Thomas Zimmermann
d tags (Takashi, Ivan) - Updated information on efifb Signed-off-by: Thomas Zimmermann Reported-by: "Ivan T. Ivanov" Closes: https://bugzilla.suse.com/show_bug.cgi?id=1240696 Tested-by: "Ivan T. Ivanov" Fixes: 78aa89d1dfba ("firmware/sysfb: Update screen_info for rel

Re: [PATCH drm-next] drm/hyperv: Replace simple-KMS with regular atomic helpers

2025-04-22 Thread Thomas Zimmermann
ret = drm_connector_attach_encoder(connector, encoder); + if (ret) return ret; - drm_plane_enable_fb_damage_clips(&hv->pipe.plane); + drm_plane_enable_fb_damage_clips(&hv->plane); This is a plane function you can move it close to the plane init. Bes

Re: [PATCH] video: screen_info: Update framebuffers behind PCI bridges

2025-04-21 Thread Thomas Zimmermann
cc'ing PCI devs Am 17.04.25 um 09:27 schrieb Thomas Zimmermann: Apply bridge window offsets to screen_info framebuffers during relocation. Fixes invalid access to I/O memory. Resources behind a PCI bridge can be located at a certain offset in the kernel's I/O range. The framebuf

[PULL] drm-misc-fixes

2025-04-17 Thread Thomas Zimmermann
V3D 7.1.6 and later Thomas Zimmermann (2): drm/gem: Internally test import_attach for imported objects drm/mgag200: Fix value in register drivers/accel/ivpu/ivpu_drv.c | 10 +-- drivers/accel/ivpu/ivpu_fw.c | 17 - drivers/accel/ivpu/ivpu_hw.h

[PATCH] video: screen_info: Update framebuffers behind PCI bridges

2025-04-17 Thread Thomas Zimmermann
amebuffers") added the code for updating screen_info. It is based on similar functionality that pre-existed in efifb. But efifb did not handle bridges correctly, so the problem presumably exists only on newer systems. Signed-off-by: Thomas Zimmermann Reported-by: Tested-by: "Ivan T. Iv

Re: [PATCH v2] virtgpu: don't reset on shutdown

2025-04-17 Thread Thomas Zimmermann
p talking to the device */ + drm_dev_unplug(dev); } It's the correct approach but also requires drm_dev_enter() and drm_dev_exit() around all of the driver's hardware access. Best regards Thomas static void virtio_gpu_config_changed(struct virtio_device *vdev) -- -- Thomas Zimmermann Graphi

Re: [PATCH] drm/tiny: panel-mipi-dbi: Pass drm_client_setup_with_fourcc()

2025-04-17 Thread Thomas Zimmermann
("drm/fb-helper: Don't use the preferred depth for the BPP default") Signed-off-by: Fabio Estevam Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/panel-mipi

Re: [PATCH] drm/mgag200: Fix value in register

2025-04-16 Thread Thomas Zimmermann
Hi Am 16.04.25 um 17:22 schrieb Wakko Warner: Thomas Zimmermann wrote: Fix an off-by-one error when setting the vblanking start in . Commit d6460bd52c27 ("drm/mgag200: Add dedicated variables for blanking fields") switched the value from crtc_vdisplay to crtc_vblank_start, which D

Re: [PATCH next] drm/udl: Set error code in udl_init()

2025-04-16 Thread Thomas Zimmermann
Hi, thanks for the fix. Am 16.04.25 um 13:09 schrieb Dan Carpenter: Return -ENOMEM if udl_alloc_urb_list() fails. Don't return success. Fixes: fb10144ba426 ("drm/udl: Support adapters without firmware descriptor") Signed-off-by: Dan Carpenter Reviewed-by: Th

Re: MGA G200 issue in 6.12 and up

2025-04-16 Thread Thomas Zimmermann
ppreciated. Best regards Thomas -- Microsoft has beaten Volkswagen's world record. Volkswagen only created 22 million bugs. -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers,

[PATCH] drm/mgag200: Fix value in register

2025-04-16 Thread Thomas Zimmermann
Signed-off-by: Thomas Zimmermann Fixes: d6460bd52c27 ("drm/mgag200: Add dedicated variables for blanking fields") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v6.12+ --- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- 1 file

Re: [PATCH] drm/virtio: Support drm_panic with non-vmapped shmem BO

2025-04-16 Thread Thomas Zimmermann
m->pages) + return -ENODEV; + /* map scanout buffer later */ + sb->pages = shmem->pages; + } sb->format = plane->state->fb->format; sb->height = plane->state->fb->height; base-commit: e7bb7d44c3b97aea

[PATCH v3] drm/gem: Internally test import_attach for imported objects

2025-04-16 Thread Thomas Zimmermann
a_buf field in drm_gem_object_exported_dma_buf_free(). v3: - only test for import_attach (Boris) v2: - use import_attach.dmabuf instead of dma_buf (Christian) Signed-off-by: Thomas Zimmermann Fixes: b57aa47d39e9 ("drm/gem: Test for imported GEM buffers with helper") Reported-by: Andy Yan

Re: Reggression caused by "drm/fb-helper: Don't use the preferred depth for the BPP default"

2025-04-15 Thread Thomas Zimmermann
559358282e5b43b1b01e7f6afac6e0beb33cb4a2 Author: Thomas Zimmermann Date: Wed Nov 23 12:53:48 2022 +0100 drm/fb-helper: Don't use the preferred depth for the BPP default If no preferred value for bits-per-pixel has been given, fall back to 32. Never use the preferred depth. The color depth is the number

Re: [PATCH] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 14:52 schrieb Christian König: Am 15.04.25 um 14:40 schrieb Thomas Zimmermann: Hi Am 15.04.25 um 14:19 schrieb Christian König: Am 15.04.25 um 12:45 schrieb Thomas Zimmermann: Hi Am 15.04.25 um 11:39 schrieb Christian König: Am 15.04.25 um 11:20 schrieb Thomas Zimmermann

[PATCH 02/11] drm/exynos: Test for imported buffers with drm_gem_is_imported()

2025-04-15 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Inki Dae Cc: Seung-Woo

Re: [PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 06:00 schrieb Andy Yan: Hi Thomas, At 2025-04-14 21:48:12, "Thomas Zimmermann" wrote: Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artif

Re: [PATCH v2] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 16:19 schrieb Boris Brezillon: On Tue, 15 Apr 2025 16:02:20 +0200 Thomas Zimmermann wrote: Test struct drm_gem_object.import_attach.dmabuf to detect imported objects. Warn if the stored state is inconsistent. During object clenaup, the dma_buf field might be NULL. Testing

[PATCH v2] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
ls to drm_mode_destroy_dumb_ioctl() that clears the dma_buf field in drm_gem_object_exported_dma_buf_free(). v2: - use import_attach.dmabuf instead of dma_buf (Christian) Signed-off-by: Thomas Zimmermann Fixes: b57aa47d39e9 ("drm/gem: Test for imported GEM buffers with helper") Reported-by: A

Re: [PATCH] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 14:19 schrieb Christian König: Am 15.04.25 um 12:45 schrieb Thomas Zimmermann: Hi Am 15.04.25 um 11:39 schrieb Christian König: Am 15.04.25 um 11:20 schrieb Thomas Zimmermann: Test struct drm_gem_object.import_attach to detect imported objects during cleanup. At that point

Re: [PATCH] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 11:39 schrieb Christian König: Am 15.04.25 um 11:20 schrieb Thomas Zimmermann: Test struct drm_gem_object.import_attach to detect imported objects during cleanup. At that point, the imported DMA buffer might have already been released and the dma_buf field is NULL. The

Re: [PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 10:46 schrieb Andy Yan: Hi, 在 2025-04-15 15:51:31,"Thomas Zimmermann" 写道: Hi Am 15.04.25 um 09:15 schrieb Andy Yan: Hi Thomas, 在 2025-04-15 14:54:21,"Thomas Zimmermann" 写道: Hi Am 15.04.25 um 06:00 schrieb Andy Yan: Hi Thomas, At 2025-04-

[PATCH] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Thomas Zimmermann
ls to drm_mode_destroy_dumb_ioctl() that eventually clear the dma_buf field in drm_gem_object_exported_dma_buf_free(). Signed-off-by: Thomas Zimmermann Fixes: b57aa47d39e9 ("drm/gem: Test for imported GEM buffers with helper") Reported-by: Andy Yan Closes: https://lore.kernel.org/dri-devel/38d09d34.4

Re: [PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 09:15 schrieb Andy Yan: Hi Thomas, 在 2025-04-15 14:54:21,"Thomas Zimmermann" 写道: Hi Am 15.04.25 um 06:00 schrieb Andy Yan: Hi Thomas, At 2025-04-14 21:48:12, "Thomas Zimmermann" wrote: Instead of testing import_attach for imported

Re: [PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()

2025-04-15 Thread Thomas Zimmermann
Hi Am 15.04.25 um 09:15 schrieb Andy Yan: Hi Thomas, 在 2025-04-15 14:54:21,"Thomas Zimmermann" 写道: Hi Am 15.04.25 um 06:00 schrieb Andy Yan: Hi Thomas, At 2025-04-14 21:48:12, "Thomas Zimmermann" wrote: Instead of testing import_attach for imported

[PATCH 08/11] drm/i915: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Jani Nikula Cc: Joonas

[PATCH 2/2] drm/amdgpu: Use dma_buf from GEM object instance

2025-04-14 Thread Thomas Zimmermann
Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +- drivers/gpu

[PATCH 0/2] drm/amdgpu: Avoid struct drm_gem_object.import_attach

2025-04-14 Thread Thomas Zimmermann
7;s buffer has been imported into the driver. The corresponding dma-buf is referenced by the object itself. Both cases avoid import_attach. Thomas Zimmermann (2): drm/amdgpu: Test for imported buffers with drm_gem_is_imported() drm/amdgpu: Use dma_buf from GEM object instance drivers/gpu/drm/

[PATCH 1/2] drm/tegra: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tegra

[PATCH 11/11] drm/nouveau: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Lyude Paul Cc: Danilo

[PATCH 03/11] drm/gud: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/gud

[PATCH 07/11] drm/xen: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Oleksandr Andrushchenko

[PATCH 0/2] drm/tegra: Avoid struct drm_gem_object.import_attach

2025-04-14 Thread Thomas Zimmermann
7;s buffer has been imported into the driver. The corresponding dma-buf is referenced by the object itself. Both cases avoid import_attach. Thomas Zimmermann (2): drm/tegra: Test for imported buffers with drm_gem_is_imported() drm/tegra: Use dma_buf from GEM object instance drivers/gpu/drm/t

[PATCH 06/11] drm/vc4: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Maxime Ripard Cc: Dave

[PATCH 04/11] drm/omapdrm: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Tomi Valkeinen

[PATCH 05/11] drm/rockchip: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Sandy Huang Cc: "

[PATCH 10/11] drm/xe: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Lucas De Marchi Cc

[PATCH 09/11] drm/radeon: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Alex Deucher Cc

[PATCH 01/11] drm/armada: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann Cc: Russell King

[PATCH 2/2] drm/tegra: Use dma_buf from GEM object instance

2025-04-14 Thread Thomas Zimmermann
Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tegra/gem.c | 2 +- 1 file changed, 1 insertion

[PATCH 1/2] drm/amdgpu: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd

[PATCH 2/2] drm/virtio: Use dma_buf from GEM object instance

2025-04-14 Thread Thomas Zimmermann
Avoid dereferencing struct drm_gem_object.import_attach for the imported dma-buf. The dma_buf field in the GEM object instance refers to the same buffer. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/virtio/virtgpu_prime.c | 5 ++--- 1 file

[PATCH 1/2] drm/virtio: Test for imported buffers with drm_gem_is_imported()

2025-04-14 Thread Thomas Zimmermann
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/virtio

[PATCH 0/2] drm/virtio: Avoid struct drm_gem_object.import_attach

2025-04-14 Thread Thomas Zimmermann
7;s buffer has been imported into the driver. The corresponding dma-buf is referenced by the object itself. Both cases avoid import_attach. Thomas Zimmermann (2): drm/virtio: Test for imported buffers with drm_gem_is_imported() drm/virtio: Use dma_buf from GEM object instance drivers/gpu/

Re: [PATCH 0/4] drm: Restrict GEM's pin/unpin to PRIME

2025-04-14 Thread Thomas Zimmermann
Ping for review Am 04.04.25 um 15:23 schrieb Thomas Zimmermann: The pin and unpin callbacks in struct drm_gem_object_funcs are for PRIME exported dma-bufs. Remove the pin calls in the client code, drop the unnecessary pin callbacks from gem-vram and inline drm_gem_pin() into the only remaining

Re: [PATCH] drm/efidrm: ensure screen_base is initialized

2025-04-11 Thread Thomas Zimmermann
drm for EFI displays") Signed-off-by: Arnd Bergmann --- A similar patch has been proposed by Nathan already and acked by Thomas: https://lists.freedesktop.org/archives/dri-devel/2025-April/500539.html I've meanwhile merged this patch into drm-misc-next. Best regards Thomas

Re: [PATCH v2] drm/sysfb: efidrm: Avoid clang -Wsometimes-uninitialized in efidrm_device_create()

2025-04-11 Thread Thomas Zimmermann
of the four valid values. Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays") Reviewed-by: Thomas Zimmermann Signed-off-by: Nathan Chancellor Reviewed-by: Thomas Zimmermann Best regards Thomas --- Changes in v2: - Upgrade drm_warn() to drm_err() and adjust mes

Re: [PATCH 00/19] drm: Eliminate redundant drm_format_info lookups

2025-04-11 Thread Thomas Zimmermann
Hi, a really nice cleanup. With the various comments fixed, you can add Reviewed-by: Thomas Zimmermann to the series. Best regards Thomas Am 10.04.25 um 18:31 schrieb Ville Syrjala: From: Ville Syrjälä I noticed a bunch of redundant (and rather expensive) drm_format_info lookups in some

Re: [PATCH 02/19] drm: Pass pixel_format+modifier directly to drm_get_format_info()

2025-04-11 Thread Thomas Zimmermann
st struct drm_format_info * drm_get_format_info(struct drm_device *dev, - const struct drm_mode_fb_cmd2 *mode_cmd); + u32 pixel_format, u64 modifier); uint32_t drm_mode_legacy_fb_format(uint32_t bpp, uint32_t depth); uint32_t drm_driver_legacy_fb_format

Re: [PATCH 03/19] drm: Look up the format info earlier

2025-04-11 Thread Thomas Zimmermann
&r->pixel_format); + return ERR_PTR(-EINVAL); + } + + /* now let the driver pick its own format info */ + info = drm_get_format_info(dev, r->pixel_format, r->modifier[0]); + + ret = framebuffer_check(dev, info, r); if (ret)

[PATCH v2 0/9] drm/udl: Support adapters without vendor firmware descriptor

2025-04-10 Thread Thomas Zimmermann
s now more compatible and validates the raw input more reliably. Patch 9 adds support for the additional devices. Tested with various DisplayLink adapters, including one without vendor firmware descriptor. Thomas Zimmermann (9): drm/udl: Remove unused field dev from struct udl_device drm/u

[PATCH v2 3/9] drm/udl: Improve type safety when using struct udl_device

2025-04-10 Thread Thomas Zimmermann
Push upcasts from struct drm_device to struct udl_device outwards in the call chain; cast earlier and call functions with the upcasted value. Improves type safety. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_drv.c | 6 -- drivers/gpu/drm

Re: [PATCH v2 3/3] MAINTAINERS: add antry for Sitronix ST7571 LCD controller

2025-04-10 Thread Thomas Zimmermann
Am 04.04.25 um 15:50 schrieb Marcus Folkesson: Add MAINTAINERS entry for the Sitronix ST7571 dot matrix LCD controller. Signed-off-by: Marcus Folkesson Reviewed-by: Thomas Zimmermann --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS

Re: [PATCH 0/7] drm/tests: Fix drm_display_mode memory leaks

2025-04-10 Thread Thomas Zimmermann
Am 08.04.25 um 09:34 schrieb Maxime Ripard: Hi, Here's a series that fixes some memory leaks in our kunit tests that eventually show up in kmemleak. Let me know what you think, Maxime Signed-off-by: Maxime Ripard On the series: Reviewed-by: Thomas Zimmermann --- Maxime Ripa

Re: [PATCH 07/10] panel/boe-tv101wum-ll2: Use refcounted allocation in place of devm_kzalloc()

2025-04-10 Thread Thomas Zimmermann
IPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_HSE; - drm_panel_init(&ctx->panel, dev, &boe_tv101wum_ll2_panel_funcs, - DRM_MODE_CONNECTOR_DSI); ctx->panel.prepare_prev_first = true; ret = drm_panel_of_

Re: [PATCH 06/10] panel/th101mb31ig002-28a: Use refcounted allocation in place of devm_kzalloc()

2025-04-10 Thread Thomas Zimmermann
panel, &dsi->dev, &boe_th101mb31ig002_funcs, - DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&ctx->panel); if (ret) return ret; -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstra

Re: [PATCH 00/15] drm: Do not use import_attach in drivers

2025-04-10 Thread Thomas Zimmermann
Ping for additional reviews of this series. Am 17.03.25 um 14:06 schrieb Thomas Zimmermann: Avoid struct drm_gem_object.import_attach in many DRM drivers that use it to get the object's dma-buf or test for an imported buffer. The helper drm_gem_is_imported() tests if a GEM object's

[PATCH] drm: Mark CONFIG_DRM_HEADER_TEST as BROKEN

2025-04-10 Thread Thomas Zimmermann
The flag got lost during a merge. Add it back. Signed-off-by: Thomas Zimmermann Reported-by: Simona Vetter Closes: https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-04-10&show_html=true Fixes: 1afba39f9305 ("Merge drm/drm-next i

[PULL] drm-misc-fixes

2025-04-10 Thread Thomas Zimmermann
_mode memory leak drm/tests: modes: Fix drm_display_mode memory leak drm/tests: modes: Fix drm_display_mode memory leak drm/tests: probe-helper: Fix drm_display_mode memory leak Rolf Eike Beer (1): drm/sti: remove duplicate object names Thomas Zimmermann (1): Merge dr

[PATCH v2 6/9] drm/udl: Return error if vendor descriptor is too short

2025-04-10 Thread Thomas Zimmermann
-value pairs has exactly 5 bytes and is still valid, change the test to accept this case as well. v2 - clarify changes to length test in commit description (Patrik) Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_main.c | 72

[PATCH v2 9/9] drm/udl: Support adapters without firmware descriptor

2025-04-10 Thread Thomas Zimmermann
still an error. v2: - fix typo in constant (Patrik) Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_main.c | 37 +++--- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_main.c b/driver

[PATCH v2 8/9] drm/udl: Validate length in vendor-descriptor parser

2025-04-10 Thread Thomas Zimmermann
pixels is significantly above the limit, it is likely invalid. - Drop the obsolete print macros. There is still a warning about invalid firmware descriptors. The rest of the output is bogus. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_main.c | 77

[PATCH v2 7/9] drm/udl: Treat vendor descriptor as u8

2025-04-10 Thread Thomas Zimmermann
The vendor descriptor is an array of unsigned bytes. It is raw data that is not to be modified. Declare it as 'const u8'. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_main.c | 16 1 file changed, 8 insertions(+), 8

[PATCH v2 5/9] drm/udl: Handle errors from usb_get_descriptor()

2025-04-10 Thread Thomas Zimmermann
Reading the vendor descriptor from the udl device can fail with an error, which the current code fails to capture. Store the return value in an integer and test for the error. Abort parsing on errors or treat the value as length on success. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik

[PATCH v2 2/9] drm/udl: Remove unused field gem_lock from struct udl_device

2025-04-10 Thread Thomas Zimmermann
Reduce the size of struct udl_device by removing the unused field gem_lock. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_drv.h | 2 -- drivers/gpu/drm/udl/udl_main.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/gpu/drm/udl

[PATCH v2 4/9] drm/udl: The number of pixels is always positive

2025-04-10 Thread Thomas Zimmermann
Store sku_pixel_limit as type unsigned long instead of int. The number of pixels available is always positive. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v2 1/9] drm/udl: Remove unused field dev from struct udl_device

2025-04-10 Thread Thomas Zimmermann
Reduce the size of struct udl_device by removing the unused field dev. Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson --- drivers/gpu/drm/udl/udl_drv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index

[PATCH v2 2/3] drm/sysfb: Share helpers for integer validation

2025-04-10 Thread Thomas Zimmermann
Provide sysfb helpers for validating framebuffer integer values against limits. Update drivers. If a driver did not specify a limit for a certain value, use INT_MAX. v2: - declare module information near EOF (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas

[PATCH v2 0/3] drm/sysfb: Share framebuffer validation helpers

2025-04-10 Thread Thomas Zimmermann
Drivers for system framebuffers validate the provided values against limits. Share most of the drivers' validation code in the sysfb helper library and update drivers. v2: - fix typos and style Thomas Zimmermann (3): drm/sysfb: Split source file drm/sysfb: Share helpers for in

[PATCH v2 3/3] drm/sysfb: Share helpers for screen_info validation

2025-04-10 Thread Thomas Zimmermann
ed list of color formats. These screen_info helpers are only available if CONFIG_SCREEN_INFO has been selected, as done by efidrm and vesadrm. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/sysfb/Makefile| 1 + drivers/gpu

[PATCH v2 1/3] drm/sysfb: Split source file

2025-04-10 Thread Thomas Zimmermann
Split drm_sysfb_helper.c into two source files. There's now one source file for the mode-setting pipeline and one source file for module meta data. Prepares for adding additional source code to sysfb helpers. v2: - fix typo in commit message (Javier) Signed-off-by: Thomas Zimmermann Review

Re: [PATCH] drm/sysfb: efidrm: Avoid clang -Wsometimes-uninitialized in efidrm_device_create()

2025-04-10 Thread Thomas Zimmermann
Hi thanks for the fix. Reviewed-by: Thomas Zimmermann with a remark below. Am 09.04.25 um 21:03 schrieb Nathan Chancellor: Clang warns (or errors with CONFIG_WERROR=y): drivers/gpu/drm/sysfb/efidrm.c:353:11: error: variable 'screen_base' is used uninitialized whenever 'i

[PATCH 3/3] drm/sysfb: Share helpers for screen_info validation

2025-04-09 Thread Thomas Zimmermann
ed list of color formats. These screen_info helpers are only available if CONFIG_SCREEN_INFO has been selected, as done by efidrm and vesadrm. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/sysfb/Makefile| 1 + drivers/gpu/drm/sysfb/drm_sysfb_helper.h | 34 ++ d

[PATCH 2/3] drm/sysfb: Share helpers for integer validation

2025-04-09 Thread Thomas Zimmermann
Provide sysfb helpers for validating framebuffer integer values against limits. Update drivers. If a driver did not specify a limit for a certain value, use INT_MAX. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/sysfb/drm_sysfb.c| 27 ++ drivers/gpu/drm/sysfb

[PATCH 1/3] drm/sysfb: Split source file

2025-04-09 Thread Thomas Zimmermann
Split drm_sysfb_helper.c into two source files. There's no one source file for the mode-setting pipeline and one source file for module meta data. Prepares for adding additional source code to sysfb helpers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/sysfb/Mak

[PATCH 0/3] drm/sysfb: Share framebuffer validation helpers

2025-04-09 Thread Thomas Zimmermann
Drivers for system framebuffers validate the provided values against limits. Share most of the driver code in the sysfb helper library and update drivers. Thomas Zimmermann (3): drm/sysfb: Split source file drm/sysfb: Share helpers for integer validation drm/sysfb: Share helpers for

Re: [PATCH v3 2/3] drm/st7571-i2c: add support for Sitronix ST7571 LCD controller

2025-04-09 Thread Thomas Zimmermann
Hi Am 08.04.25 um 16:58 schrieb Marcus Folkesson: Hi, On Tue, Apr 08, 2025 at 03:57:22PM +0200, Thomas Zimmermann wrote: Hi Am 08.04.25 um 15:20 schrieb Marcus Folkesson: [...] +static int st7571_set_pixel_format(struct st7571_device *st7571, + u32

  1   2   3   4   5   6   7   8   9   10   >