drm/omap: add support for physical size hints from display drivers
authorSebastian Reichel <sebastian.reichel@collabora.co.uk>
Mon, 24 Jul 2017 17:33:04 +0000 (19:33 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 19 Dec 2017 08:32:00 +0000 (10:32 +0200)
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>
drivers/gpu/drm/omapdrm/dss/omapdss.h
drivers/gpu/drm/omapdrm/omap_connector.c

index 6c6d888416a75ecd8b8fa0409ba2f133913fb1c5..6aa4c377492d93430ee74abdac1c0c841fb64ac9 100644 (file)
@@ -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);
index aa5ba9ae2191c15518ee1aa326165793653912e1..188124adc8a852a6ee91ccd19fc0674c8ae528a5 100644 (file)
@@ -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;
        }