drm/ssd130x: drop DRM_GEM_SHADOW_PLANE_FUNCS override
Subsystems (3)
PATCH 1/1 drm/ssd130x: drop DRM_GEM_SHADOW_PLANE_FUNCS override
From: Arnd Bergmann <[email protected]>
It is not possible for ssd130x_primary_plane_funcs to use both its own reset/duplicate/destroy callbacks and the ones from DRM_GEM_SHADOW_PLANE_FUNCS:
In file included from drivers/gpu/drm/solomon/ssd130x.c:29:include/drm/drm_gem_atomic_helper.h:100:18: error: initialized field overwritten [-Werror=override-init]
100 | .reset = drm_gem_reset_shadow_plane, \
101 | .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
102 | .atomic_destroy_state = drm_gem_destroy_shadow_plane_state
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/solomon/ssd130x.c:744:9: note: in expansion of macro 'DRM_GEM_SHADOW_PLANE_FUNCS'
744 | DRM_GEM_SHADOW_PLANE_FUNCS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~Since the custom callbacks were just added, I assume these are the ones it is meant to use, so remvoe the generic overrides.
--- drivers/gpu/drm/solomon/ssd130x.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/solomon/ssd130x.c +0 -1
@@ -741,7 +741,6 @@ static const struct drm_plane_funcs ssd130x_primary_plane_funcs = { .atomic_duplicate_state = ssd130x_primary_plane_duplicate_state, .atomic_destroy_state = ssd130x_primary_plane_destroy_state, .destroy = drm_plane_cleanup, - DRM_GEM_SHADOW_PLANE_FUNCS, }; static enum drm_mode_status ssd130x_crtc_helper_mode_valid(struct drm_crtc *crtc,
Signature · 1 line
2.39.2
Javier Martinez Canillas
maintainerArnd Bergmann <[email protected]> writes:
Hello Arnd,
Thanks a lot for your patch.
Quoted 8 lines
From: Arnd Bergmann <[email protected]>
It is not possible for
ssd130x_primary_plane_funcsto use both its own reset/duplicate/destroy callbacks and the ones fromDRM_GEM_SHADOW_PLANE_FUNCS:In file included from
drivers/gpu/drm/solomon/ssd130x.c:29:include/drm/drm_gem_atomic_helper.h:100:18: error: initialized field overwritten [-Werror=override-init]
Quoted 8 lines
100 | .reset = drm_gem_reset_shadow_plane, \
101 | .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
102 | .atomic_destroy_state = drm_gem_destroy_shadow_plane_state
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/solomon/ssd130x.c:744:9: note: in expansion of macro 'DRM_GEM_SHADOW_PLANE_FUNCS'
744 | DRM_GEM_SHADOW_PLANE_FUNCS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~Gah, I missed that. I wonder how this compile warning doesn't show up for me.
Quoted 4 lines
Since the custom callbacks were just added, I assume these are the ones it is meant to use, so remvoe the generic overrides.
Fixes 45b58669e532b ("drm/ssd130x: Allocate buffer in the plane's .atomic_check() callback")
Unfortunately that's not enough, because the plane atomic state handlers that were introduced in that commit are broken so removing the macro will regress the driver.
I've posted a patch that drops the macro but also fixes the handlers for the driver to work with the custom callbacks:
https://lists.freedesktop.org/archives/dri-devel/2023-July/415897.html
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Quoted 23 lines · Javier Martinez Canillas
Arnd Bergmann <[email protected]> writes:
Hello Arnd,
Thanks a lot for your patch.
Quoted 8 lines
From: Arnd Bergmann <[email protected]>
It is not possible for
ssd130x_primary_plane_funcsto use both its own reset/duplicate/destroy callbacks and the ones fromDRM_GEM_SHADOW_PLANE_FUNCS:In file included from
drivers/gpu/drm/solomon/ssd130x.c:29:include/drm/drm_gem_atomic_helper.h:100:18: error: initialized field overwritten [-Werror=override-init]Quoted 8 lines
100 | .reset = drm_gem_reset_shadow_plane, \ 101 | .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \ 102 | .atomic_destroy_state = drm_gem_destroy_shadow_plane_state | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/solomon/ssd130x.c:744:9: note: in expansion of macro 'DRM_GEM_SHADOW_PLANE_FUNCS' 744 | DRM_GEM_SHADOW_PLANE_FUNCS, | ^~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 1 line
Gah, I missed that. I wonder how this compile warning doesn't show up for me.
The warning is normally disabled, I have it turned on in my local patch series on top of linux-next.
Quoted 5 lines
Quoted 4 lines
Since the custom callbacks were just added, I assume these are the ones it is meant to use, so remvoe the generic overrides.
Fixes 45b58669e532b ("drm/ssd130x: Allocate buffer in the plane's .atomic_check() callback")
Quoted 8 lines
Unfortunately that's not enough, because the plane atomic state handlers that were introduced in that commit are broken so removing the macro will regress the driver.
I've posted a patch that drops the macro but also fixes the handlers for the driver to work with the custom callbacks:
https://lists.freedesktop.org/archives/dri-devel/2023-July/415897.html
Ok, makes sense.
Arnd