Skip to contentSkip to conversation

drm/bochs: Clear struct drm_connector_funcs.dpms

PATCH In review Thomas Zimmermann 4 participants 6 messages Feb 7, 2020 – Feb 11, 2020

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/2 drm/bochs: Clear struct drm_connector_funcs.dpms

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

---
 drivers/gpu/drm/bochs/bochs_kms.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/bochs/bochs_kms.c +0 -1
index cc93ff74fbd8..7410b0ea4623 100644
@@ -88,7 +88,6 @@ static const struct drm_connector_helper_funcs bochs_connector_connector_helper_
 };
 
 static const struct drm_connector_funcs bochs_connector_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.destroy = drm_connector_cleanup,
 	.reset = drm_atomic_helper_connector_reset,
Signature · 6 lines
2.25.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#1 lore raw

PATCH 2/2 drm/udl: Clear struct drm_connector_funcs.dpms

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

---
 drivers/gpu/drm/udl/udl_connector.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/udl/udl_connector.c +0 -1
index e9671d38b4a0..0afdfb0d1fe1 100644
@@ -109,7 +109,6 @@ static const struct drm_connector_helper_funcs udl_connector_helper_funcs = {
 };
 
 static const struct drm_connector_funcs udl_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
 	.reset = drm_atomic_helper_connector_reset,
 	.detect = udl_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
Signature · 6 lines
2.25.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/udl: Clear struct drm_connector_funcs.dpms

Quoted 5 lines · Thomas Zimmermann

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

On both patches:

I just suggested a drm_mode_config_validate() to Ville in his patch series, which runs in drm_dev_register(). Maybe we could add a check for that for atomic drivers? It's a bit a game of whack-a-mole otherwise :-) -Daniel

Quoted 19 lines
---
 drivers/gpu/drm/udl/udl_connector.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/udl/udl_connector.c +0 -1
index e9671d38b4a0..0afdfb0d1fe1 100644
@@ -109,7 +109,6 @@ static const struct drm_connector_helper_funcs udl_connector_helper_funcs = {
 };
 
 static const struct drm_connector_funcs udl_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
 	.reset = drm_atomic_helper_connector_reset,
 	.detect = udl_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
Signature · 1 line
2.25.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#3 lore raw

Re: [PATCH 2/2] drm/udl: Clear struct drm_connector_funcs.dpms

Hi

Am 07.02.20 um 17:41 schrieb Daniel Vetter:

Quoted 7 lines · Thomas Zimmermann
Quoted 5 lines

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

Quoted 7 lines

On both patches:

I just suggested a drm_mode_config_validate() to Ville in his patch series, which runs in drm_dev_register(). Maybe we could add a check for that for atomic drivers? It's a bit a game of whack-a-mole otherwise :-)

From the 'git grep' I'd say those where the only atomic drivers to set the callback. The others where non-atomic ones. OTOH, I recently thought on several occasions that this or that behaviour should be enforced at least by WARN_ON.

Best regards
Thomas

Quoted 22 lines

-Daniel

Quoted 19 lines
---
 drivers/gpu/drm/udl/udl_connector.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/udl/udl_connector.c +0 -1
index e9671d38b4a0..0afdfb0d1fe1 100644
@@ -109,7 +109,6 @@ static const struct drm_connector_helper_funcs udl_connector_helper_funcs = {
 };
 
 static const struct drm_connector_funcs udl_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
 	.reset = drm_atomic_helper_connector_reset,
 	.detect = udl_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
Signature · 1 line
2.25.0
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH 2/2] drm/udl: Clear struct drm_connector_funcs.dpms

Quoted 15 lines · Thomas Zimmermann

Hi

Am 07.02.20 um 17:41 schrieb Daniel Vetter:

Quoted 11 lines · Thomas Zimmermann
Quoted 5 lines

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

On both patches:

Quoted 9 lines
Quoted 3 lines

I just suggested a drm_mode_config_validate() to Ville in his patch series, which runs in drm_dev_register(). Maybe we could add a check for that for atomic drivers? It's a bit a game of whack-a-mole otherwise :-)

From the 'git grep' I'd say those where the only atomic drivers to set the callback. The others where non-atomic ones. OTOH, I recently thought on several occasions that this or that behaviour should be enforced at least by WARN_ON.

Having a WARN_ON was my first idea as I saw these patches fly-by.

Sure it will add some dmesg noise in the very odd corner-case. At the same time, it will high-light existing and future bugs so that we can address them promptly.

Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Acked-by on v1 1/2
#5 lore raw
In reply to Thomas Zimmermann
Quoted 5 lines · Thomas Zimmermann

Atomic modesetting doesn't use struct drm_connector_funcs.dpms and the set function, drm_helper_connector_dpms(), wouldn't support it anyway. So keep the pointer to NULL.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel