dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm: Improve the output_poll_changed description
@ 2021-01-15  3:33 ZhiJie.Zhang
  2021-01-15 14:05 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: ZhiJie.Zhang @ 2021-01-15  3:33 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, daniel
  Cc: zhangzhijie, linux-kernel, dri-devel

From: zhangzhijie <zhangzhijie@loongson.cn>

this callback was used by drm_kms_helper_hotplug_event()

V2: (Thanks for Daniel's suggestions)
- remove the FIXME below.since with the drm_client
- infrastructure and the generic fbdev emulation we've
- resolved this all very neatly now.

Signed-off-by: zhangzhijie <zhangzhijie@loongson.cn>
Signed-off-by: ZhiJie.Zhang <zhangzhijie@loongson.cn>
---
 include/drm/drm_mode_config.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index ab424ddd7665..50541980f7f2 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -104,13 +104,8 @@ struct drm_mode_config_funcs {
 	 * changes.
 	 *
 	 * Drivers implementing fbdev emulation with the helpers can call
-	 * drm_fb_helper_hotplug_changed from this hook to inform the fbdev
+	 * drm_kms_helper_hotplug_event() from this hook to inform the fbdev
 	 * helper of output changes.
-	 *
-	 * FIXME:
-	 *
-	 * Except that there's no vtable for device-level helper callbacks
-	 * there's no reason this is a core function.
 	 */
 	void (*output_poll_changed)(struct drm_device *dev);
 
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm: Improve the output_poll_changed description
  2021-01-15  3:33 [PATCH v2] drm: Improve the output_poll_changed description ZhiJie.Zhang
@ 2021-01-15 14:05 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2021-01-15 14:05 UTC (permalink / raw)
  To: ZhiJie.Zhang; +Cc: tzimmermann, airlied, linux-kernel, dri-devel

On Fri, Jan 15, 2021 at 11:33:28AM +0800, ZhiJie.Zhang wrote:
> From: zhangzhijie <zhangzhijie@loongson.cn>
> 
> this callback was used by drm_kms_helper_hotplug_event()
> 
> V2: (Thanks for Daniel's suggestions)
> - remove the FIXME below.since with the drm_client
> - infrastructure and the generic fbdev emulation we've
> - resolved this all very neatly now.
> 
> Signed-off-by: zhangzhijie <zhangzhijie@loongson.cn>
> Signed-off-by: ZhiJie.Zhang <zhangzhijie@loongson.cn>
> ---
>  include/drm/drm_mode_config.h | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
> index ab424ddd7665..50541980f7f2 100644
> --- a/include/drm/drm_mode_config.h
> +++ b/include/drm/drm_mode_config.h
> @@ -104,13 +104,8 @@ struct drm_mode_config_funcs {
>  	 * changes.
>  	 *
>  	 * Drivers implementing fbdev emulation with the helpers can call
> -	 * drm_fb_helper_hotplug_changed from this hook to inform the fbdev
> +	 * drm_kms_helper_hotplug_event() from this hook to inform the fbdev

Hm I looked at this again, and this change is actually wrong. Both
functions exists, but calling drm_kms_helper_hotplug_event() from this hook
would result in an endless loop until we crash somewhere.

>  	 * helper of output changes.

Ah I meant not just removing this, but explaining what to do now instead.
Suggestion:

	 * This hook is deprecated, drivers should instead use
	 * drm_fbdev_generic_setup() which takes care of any necessary
	 * hotplug event forwarding already without further involvement by
	 * the driver.

Can you pls respin, with the function change dropped and the fixme
replaced with the above?

Thanks, Daniel


> -	 *
> -	 * FIXME:
> -	 *
> -	 * Except that there's no vtable for device-level helper callbacks
> -	 * there's no reason this is a core function.
>  	 */
>  	void (*output_poll_changed)(struct drm_device *dev);
>  
> -- 
> 2.29.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-15 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15  3:33 [PATCH v2] drm: Improve the output_poll_changed description ZhiJie.Zhang
2021-01-15 14:05 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).