[PATCH v2 10/20] drm/tilcdc: Remove unused encoder and connector tracking arrays

Kory Maincent (TI.com)
2025-12-11T16:40:16Z

The num_encoders/encoders and num_connectors/connectors arrays in
tilcdc_drm_private are never populated or used by the driver.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
---
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 +--
drivers/gpu/drm/tilcdc/tilcdc_drv.h | 6 ------
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index d2aae731b72c6..a753cc47a59d7 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -348,8 +348,7 @@ static int tilcdc_init(const struct drm_driver *ddrv, struct device *dev)
if (ret)
goto unregister_cpufreq_notif;

- if (!priv->external_connector &&
- ((priv->num_encoders == 0) || (priv->num_connectors == 0))) {
+ if (!priv->external_connector) {
dev_err(dev, "no encoders/connectors found\n");
ret = -EPROBE_DEFER;
goto unregister_cpufreq_notif;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 181b9d7a515b6..717529a331009 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -75,12 +75,6 @@ struct tilcdc_drm_private {

struct drm_crtc *crtc;

- unsigned int num_encoders;
- struct drm_encoder *encoders[8];
-
- unsigned int num_connectors;
- struct drm_connector *connectors[8];
-
struct drm_encoder *external_encoder;
struct drm_connector *external_connector;

--
2.43.0