From: Laurent Pinchart Date: Wed, 12 Sep 2018 21:17:01 +0000 (+0300) Subject: drm/omap: Expose DRM modes instead of timings in display devices X-Git-Tag: v5.2-rc1~118^2~38^2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=870e19d59f8a2e13750861d8f8f49e93188634ec;p=thirdparty%2Flinux.git drm/omap: Expose DRM modes instead of timings in display devices omap_dss_device operations expose fixed video timings through a .get_timings() operation that return a single timing for the device. To prepare for the move to drm_bridge, modify the API to instead add DRM modes directly to the connector. As this puts more burden on display devices, we also create a helper function for panels to add a single DRM mode from the panel video timings. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index eee44d9ea0c3b..d6a584292e918 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -68,12 +68,12 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) regulator_disable(ddata->vcc_supply); } -static void panel_dpi_get_timings(struct omap_dss_device *dssdev, - struct videomode *vm) +static int panel_dpi_get_modes(struct omap_dss_device *dssdev, + struct drm_connector *connector) { struct panel_drv_data *ddata = to_panel_data(dssdev); - *vm = ddata->vm; + return omapdss_display_get_modes(connector, &ddata->vm); } static const struct omap_dss_device_ops panel_dpi_ops = { @@ -83,7 +83,7 @@ static const struct omap_dss_device_ops panel_dpi_ops = { .enable = panel_dpi_enable, .disable = panel_dpi_disable, - .get_timings = panel_dpi_get_timings, + .get_modes = panel_dpi_get_modes, }; static int panel_dpi_probe_of(struct platform_device *pdev) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index ffbf20e6ebe90..9cd9ab487a24c 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -24,6 +24,8 @@ #include #include +#include + #include