diff options
| author | Laurent Pinchart <[email protected]> | 2018-09-12 21:37:35 +0000 |
|---|---|---|
| committer | Tomi Valkeinen <[email protected]> | 2019-03-18 09:42:12 +0000 |
| commit | 46b3847d7f680d51a29384a5ee9e1d54e6739f5d (patch) | |
| tree | 1c69160019ef3706cffad42e97e36ab915f4793c /drivers/gpu/drm/omapdrm/omap_connector.c | |
| parent | drm/omap: Merge display .get_modes() and .get_size() operations (diff) | |
| download | kernel-46b3847d7f680d51a29384a5ee9e1d54e6739f5d.tar.gz kernel-46b3847d7f680d51a29384a5ee9e1d54e6739f5d.zip | |
drm/omap: Add a dss device operation flag for .get_modes()
Instead of manually iterating over the dss devices in the pipeline to
find the first one that implements the .get_modes() operation, add a new
operation flag for .get_modes() and use the omap_connector_find_device()
helper function to locate the right dss device.
Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Tested-by: Sebastian Reichel <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_connector.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_connector.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index c0157554c12f..dc4533c8cbb4 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -228,10 +228,10 @@ static int omap_connector_get_modes(struct drm_connector *connector) * Otherwise if the display pipeline reports modes (e.g. with a fixed * resolution panel or an analog TV output), query it. */ - for (dssdev = omap_connector->display; dssdev; dssdev = dssdev->src) { - if (dssdev->ops->get_modes) - return dssdev->ops->get_modes(dssdev, connector); - } + dssdev = omap_connector_find_device(connector, + OMAP_DSS_DEVICE_OP_MODES); + if (dssdev) + return dssdev->ops->get_modes(dssdev, connector); /* * We can't retrieve modes, which can happen for instance for a DVI or |
