drm/omap: Merge display .get_modes() and .get_size() operations

Now that the .get_modes() operations takes a drm_connector and fills it
with modes, it becomes easy to fill display information in the same
operation without requiring a separate .get_size() opearation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Laurent Pinchart
2018-09-13 00:35:54 +03:00
committed by Tomi Valkeinen
parent 870e19d59f
commit a872d5e92a
3 changed files with 5 additions and 27 deletions

View File

@@ -225,19 +225,8 @@ static int omap_connector_get_modes(struct drm_connector *connector)
return omap_connector_get_modes_edid(connector, dssdev);
/*
* Otherwise we have either a fixed resolution panel or an output that
* doesn't support modes discovery (e.g. DVI or VGA with the DDC bus
* unconnected, or analog TV). Start by querying the size.
*/
dssdev = omap_connector->display;
if (dssdev->driver && dssdev->driver->get_size)
dssdev->driver->get_size(dssdev,
&connector->display_info.width_mm,
&connector->display_info.height_mm);
/*
* If the display pipeline reports modes (e.g. with a fixed resolution
* panel or an analog TV output), query it.
* 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)