Skip to contentSkip to conversation

drm/vmwgfx: Remove initialization of connector status

PATCH In review Thomas Zimmermann 2 participants 4 messages Nov 5, 2024 – Dec 2, 2024

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 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
index 39949e0a493f..f0b429525467 100644
@@ -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
index 0f4bfd98480a..32029d80b72b 100644
@@ -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
index 82d18b88f4a7..114a75069e1c 100644
@@ -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
author maintainer
#1 lore raw

Prepares 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.

---
  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
index 39949e0a493f..f0b429525467 100644
@@ -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
index 0f4bfd98480a..32029d80b72b 100644
@@ -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
index 82d18b88f4a7..114a75069e1c 100644
@@ -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)
author maintainer
#2 lore raw
In reply to Thomas Zimmermann

ping 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.

---
  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
index 39949e0a493f..f0b429525467 100644
@@ -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
index 0f4bfd98480a..32029d80b72b 100644
@@ -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
index 82d18b88f4a7..114a75069e1c 100644
@@ -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)
maintainer Reviewed-by
#3 lore raw
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.

---
  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
index 39949e0a493f..f0b429525467 100644
@@ -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
index 0f4bfd98480a..32029d80b72b 100644
@@ -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
index 82d18b88f4a7..114a75069e1c 100644
@@ -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 -1
      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);

Thank you. Looks good.

z