drm: Link drm_rect.o into DRM core module
Subsystems (2)
Thomas Zimmermann
maintainerPATCH 1/1 drm: Link drm_rect.o into DRM core module
Several places in drm.ko use struct drm_rect and its helpers. This only works as the called interfaces are declared as static inline in the header file. Fix the issue by linking drm_rect.o into drm.ko.
--- drivers/gpu/drm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/Makefile +1 -1
@@ -68,6 +68,7 @@ drm-y := \ drm_prime.o \ drm_print.o \ drm_property.o \ + drm_rect.o \ drm_syncobj.o \ drm_sysfs.o \ drm_trace_points.o \
@@ -140,7 +141,6 @@ drm_kms_helper-y := \ drm_modeset_helper.o \ drm_plane_helper.o \ drm_probe_helper.o \ - drm_rect.o \ drm_self_refresh_helper.o \ drm_simple_kms_helper.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
Signature · 1 line
2.46.0
Quoted 3 lines · Thomas Zimmermann
Several places in drm.ko use struct
drm_rectand its helpers. This only works as the called interfaces are declared as static inline in the header file. Fix the issue by linking drm_rect.o into drm.ko.
Seems reasonable.
PS when grepping for drm_rect I noticed drm_atomic_plane_set_property() is using it as the format of the fb_damage_clips blob. That can't be right as drm_rect is an internal thing and should not be used in the uapi.
Quoted 29 lines
Signed-off-by Thomas Zimmermann <[email protected]>Suggested-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/Makefile +1
-1@@ -68,6 +68,7 @@ drm-y := \ drm_prime.o \ drm_print.o \ drm_property.o \ + drm_rect.o \ drm_syncobj.o \ drm_sysfs.o \ drm_trace_points.o \@@ -140,7 +141,6 @@ drm_kms_helper-y := \ drm_modeset_helper.o \ drm_plane_helper.o \ drm_probe_helper.o \ - drm_rect.o \ drm_self_refresh_helper.o \ drm_simple_kms_helper.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.oSignature · 1 line
2.46.0
Signature · 2 lines
Ville Syrjälä Intel
Thomas Zimmermann
maintainerHi
Am 20.09.24 um 12:12 schrieb Ville Syrjälä:
Quoted 11 lines · Thomas Zimmermann
Quoted 3 lines
Several places in drm.ko use struct
drm_rectand its helpers. This only works as the called interfaces are declared as static inline in the header file. Fix the issue by linking drm_rect.o into drm.ko.Seems reasonable.
Reviewed-by Ville Syrjälä <[email protected]>PS when grepping for
drm_rectI noticeddrm_atomic_plane_set_property()is using it as the format of thefb_damage_clipsblob. That can't be right asdrm_rectis an internal thing and should not be used in the uapi.
Yes, indeed. The correct type is struct drm_mode_rect according to [1]. I'll send out a patch. The userspace side doesn't look super careful either with pixman_box32_t. [2]
Best regards
Thomas
[1] https://elixir.bootlin.com/linux/v6.11/source/drivers/gpu/drm/drm_plane.c#L1657
[2] https://gitlab.freedesktop.org/wayland/weston/-/blob/60d777803d5b451d4ca17b4ca8795b903cee8c8c/libweston/backend-drm/drm.c#L470
Quoted 29 lines
Quoted 29 lines
Signed-off-by Thomas Zimmermann <[email protected]>Suggested-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/Makefile +1
-1@@ -68,6 +68,7 @@ drm-y := \ drm_prime.o \ drm_print.o \ drm_property.o \ + drm_rect.o \ drm_syncobj.o \ drm_sysfs.o \ drm_trace_points.o \@@ -140,7 +141,6 @@ drm_kms_helper-y := \ drm_modeset_helper.o \ drm_plane_helper.o \ drm_probe_helper.o \ - drm_rect.o \ drm_self_refresh_helper.o \ drm_simple_kms_helper.o drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.oSignature · 1 line
2.46.0
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)