summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>2017-07-24 20:33:04 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-12-19 11:32:00 +0300
commitb070d6e84ad20666a8856cfb8f9bd90197ec6c6d (patch)
tree7a9caa768138035a7210c0eb6da3fc723d6d1507 /drivers/gpu/drm
parent1a80d6ac2f82cd587bb12012b52d555e0a27d121 (diff)
downloadlinux-b070d6e84ad20666a8856cfb8f9bd90197ec6c6d.tar.xz
drm/omap: add support for physical size hints from display drivers
While physical size information is automatically parsed for EDID based displays, we need to provide it manually for displays providing one fixed mode. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h2
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 6c6d888416a7..6aa4c377492d 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -563,6 +563,8 @@ struct omap_dss_driver {
struct videomode *vm);
void (*get_timings)(struct omap_dss_device *dssdev,
struct videomode *vm);
+ void (*get_size)(struct omap_dss_device *dssdev,
+ unsigned int *width, unsigned int *height);
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
u32 (*get_wss)(struct omap_dss_device *dssdev);
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index aa5ba9ae2191..188124adc8a8 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -149,6 +149,12 @@ static int omap_connector_get_modes(struct drm_connector *connector)
drm_mode_set_name(mode);
drm_mode_probed_add(connector, mode);
+ if (dssdrv->get_size) {
+ dssdrv->get_size(dssdev,
+ &connector->display_info.width_mm,
+ &connector->display_info.height_mm);
+ }
+
n = 1;
}