drm/vmwgfx: Remove initialization of connector status
Subsystems (3)
Thomas Zimmermann
maintainerPATCH 1/1 drm/vmwgfx: Remove initialization of connector status
Remove the connector-status initialization from several of vmwgfx's functions. It is not required by the driver or DRM helpers.
DRM initializes the connector to unknown status in __drm_connector_init() and reads the physical status when DRM clients or the user needs the information, or if it detects/polls a change to the status.
--- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +0 -1
@@ -479,7 +479,6 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_ldu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_legacy_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +0 -1
@@ -868,7 +868,6 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_sou_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_screen_object_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0 -1
@@ -1593,7 +1593,6 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_stdu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, false); ret =drm_encoder_init (dev, encoder, &vmw_stdu_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
Signature · 1 line
2.47.0
Thomas Zimmermann
maintainerPrepares for an update of https://patchwork.freedesktop.org/series/139879/ .
Am 05.11.24 um 14:20 schrieb Thomas Zimmermann:
Quoted 50 lines
Remove the connector-status initialization from several of vmwgfx's functions. It is not required by the driver or DRM helpers.
DRM initializes the connector to unknown status in
__drm_connector_init()and reads the physical status when DRM clients or the user needs the information, or if it detects/polls a change to the status.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 3 files changed, 3 deletions(-)drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +0
-1@@ -479,7 +479,6 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_ldu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_legacy_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +0
-1@@ -868,7 +868,6 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_sou_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_screen_object_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0
-1@@ -1593,7 +1593,6 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_stdu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, false); ret =drm_encoder_init (dev, encoder, &vmw_stdu_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
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)
Thomas Zimmermann
maintainerping for review
Am 05.11.24 um 14:20 schrieb Thomas Zimmermann:
Quoted 50 lines
Remove the connector-status initialization from several of vmwgfx's functions. It is not required by the driver or DRM helpers.
DRM initializes the connector to unknown status in
__drm_connector_init()and reads the physical status when DRM clients or the user needs the information, or if it detects/polls a change to the status.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 3 files changed, 3 deletions(-)drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +0
-1@@ -479,7 +479,6 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_ldu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_legacy_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +0
-1@@ -868,7 +868,6 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_sou_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_screen_object_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0
-1@@ -1593,7 +1593,6 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_stdu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, false); ret =drm_encoder_init (dev, encoder, &vmw_stdu_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
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)
Quoted 50 lines · Thomas Zimmermann
ping for review
Am 05.11.24 um 14:20 schrieb Thomas Zimmermann:
Quoted 45 lines
Remove the connector-status initialization from several of vmwgfx's functions. It is not required by the driver or DRM helpers.
DRM initializes the connector to unknown status in
__drm_connector_init()and reads the physical status when DRM clients or the user needs the information, or if it detects/polls a change to the status.Signed-off-by Thomas Zimmermann <[email protected]>--- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 1 - 3 files changed, 3 deletions(-)drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +0
-1@@ -479,7 +479,6 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_ldu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_legacy_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +0
-1@@ -868,7 +868,6 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit) }drm_connector_helper_add (connector, &vmw_sou_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, true); ret =drm_encoder_init (dev, encoder, &vmw_screen_object_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0
-0@@ -1593,7 +1593,6 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) }
Quoted 6 lines
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit) · line 1598
Quoted 5 lines
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +0
-1drm_connector_helper_add (connector, &vmw_stdu_connector_helper_funcs); - connector->status =vmw_du_connector_detect (connector, false); ret =drm_encoder_init (dev, encoder, &vmw_stdu_encoder_funcs,DRM_MODE_ENCODER_VIRTUAL ,NULL );
Thank you. Looks good.
z