Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/omap: drop unused DSS next pointer

Since all encoders and panels are using the bridge API now,
we next pointer is no longer useful and can be dropped.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-45-tomi.valkeinen@ti.com

authored by

Sebastian Reichel and committed by
Tomi Valkeinen
811860dd 4a555518

+2 -18
+1 -1
drivers/gpu/drm/omapdrm/dss/base.c
··· 135 135 goto done; 136 136 } 137 137 138 - if (dssdev->id && (dssdev->next || dssdev->bridge)) 138 + if (dssdev->id && dssdev->bridge) 139 139 goto done; 140 140 } 141 141
-1
drivers/gpu/drm/omapdrm/dss/omapdss.h
··· 296 296 struct module *owner; 297 297 298 298 struct dss_device *dss; 299 - struct omap_dss_device *next; 300 299 struct drm_bridge *bridge; 301 300 struct drm_bridge *next_bridge; 302 301 struct drm_panel *panel;
+1 -12
drivers/gpu/drm/omapdrm/dss/output.c
··· 30 30 return 0; 31 31 } 32 32 33 - out->next = omapdss_find_device_by_node(remote_node); 34 33 out->bridge = of_drm_find_bridge(remote_node); 35 34 out->panel = of_drm_find_panel(remote_node); 36 35 if (IS_ERR(out->panel)) 37 36 out->panel = NULL; 38 37 39 38 of_node_put(remote_node); 40 - 41 - if (out->next && out->type != out->next->type) { 42 - dev_err(out->dev, "output type and display type don't match\n"); 43 - ret = -EINVAL; 44 - goto error; 45 - } 46 39 47 40 if (out->panel) { 48 41 struct drm_bridge *bridge; ··· 62 69 out->bridge = local_bridge; 63 70 } 64 71 65 - if (!out->next && !out->bridge) { 72 + if (!out->bridge) { 66 73 ret = -EPROBE_DEFER; 67 74 goto error; 68 75 } ··· 71 78 72 79 error: 73 80 omapdss_device_cleanup_output(out); 74 - out->next = NULL; 75 81 return ret; 76 82 } 77 83 EXPORT_SYMBOL(omapdss_device_init_output); ··· 80 88 if (out->bridge && out->panel) 81 89 drm_panel_bridge_remove(out->next_bridge ? 82 90 out->next_bridge : out->bridge); 83 - 84 - if (out->next) 85 - omapdss_device_put(out->next); 86 91 } 87 92 EXPORT_SYMBOL(omapdss_device_cleanup_output); 88 93
-4
drivers/gpu/drm/omapdrm/omap_encoder.c
··· 75 75 { 76 76 struct omap_encoder *omap_encoder = to_omap_encoder(encoder); 77 77 struct omap_dss_device *output = omap_encoder->output; 78 - struct omap_dss_device *dssdev; 79 78 struct drm_device *dev = encoder->dev; 80 79 struct drm_connector *connector; 81 80 struct drm_bridge *bridge; ··· 97 98 * 98 99 * A better solution is to use DRM's bus-flags through the whole driver. 99 100 */ 100 - for (dssdev = output; dssdev; dssdev = dssdev->next) 101 - omap_encoder_update_videomode_flags(&vm, dssdev->bus_flags); 102 - 103 101 for (bridge = output->bridge; bridge; 104 102 bridge = drm_bridge_get_next_bridge(bridge)) { 105 103 if (!bridge->timings)