arm-sdk

os build toolkit for various embedded devices
git clone https://git.parazyd.org/arm-sdk
Log | Files | Refs | Submodules | README | LICENSE

0007-drm-omap-add-support-for-physical-size-hints-from-di.patch (1800B)


      1 From 1e66c0a2f776d6054c2324daf55fc3e3df126c33 Mon Sep 17 00:00:00 2001
      2 From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
      3 Date: Mon, 24 Jul 2017 19:33:04 +0200
      4 Subject: [PATCH 07/17] drm/omap: add support for physical size hints from
      5  display drivers
      6 
      7 While physical size information is automatically parsed for EDID
      8 based displays, we need to provide it manually for displays providing
      9 one fixed mode.
     10 
     11 Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
     12 Acked-by: Pavel Machek <pavel@ucw.cz>
     13 ---
     14  drivers/gpu/drm/omapdrm/dss/omapdss.h    | 2 ++
     15  drivers/gpu/drm/omapdrm/omap_connector.c | 6 ++++++
     16  2 files changed, 8 insertions(+)
     17 
     18 diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
     19 index 3d25359..5be6ff8 100644
     20 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
     21 +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
     22 @@ -562,6 +562,8 @@ struct omap_dss_driver {
     23  			    struct videomode *vm);
     24  	void (*get_timings)(struct omap_dss_device *dssdev,
     25  			    struct videomode *vm);
     26 +	void (*get_size)(struct omap_dss_device *dssdev,
     27 +			 unsigned int *width, unsigned int *height);
     28  
     29  	int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
     30  	u32 (*get_wss)(struct omap_dss_device *dssdev);
     31 diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
     32 index 4f4c7ef..8874f55 100644
     33 --- a/drivers/gpu/drm/omapdrm/omap_connector.c
     34 +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
     35 @@ -157,6 +157,12 @@ static int omap_connector_get_modes(struct drm_connector *connector)
     36  		drm_mode_set_name(mode);
     37  		drm_mode_probed_add(connector, mode);
     38  
     39 +		if (dssdrv->get_size) {
     40 +			dssdrv->get_size(dssdev,
     41 +					 &connector->display_info.width_mm,
     42 +					 &connector->display_info.height_mm);
     43 +		}
     44 +
     45  		n = 1;
     46  	}
     47  
     48 -- 
     49 2.1.4
     50