arm-sdk

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

0005-drm-omap-add-manual-update-detection-helper.patch (1976B)


      1 From 6dae0575adf3b15c51832bfa8c0320e8526e9b8e Mon Sep 17 00:00:00 2001
      2 From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
      3 Date: Mon, 24 Jul 2017 19:33:02 +0200
      4 Subject: [PATCH 05/17] drm/omap: add manual update detection helper
      5 
      6 In preparation for manually updated display support, such as DSI
      7 command mode panels, this adds a simple helper to see if a connector
      8 is manually updated.
      9 
     10 Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
     11 ---
     12  drivers/gpu/drm/omapdrm/omap_connector.c | 8 ++++++++
     13  drivers/gpu/drm/omapdrm/omap_drv.h       | 1 +
     14  2 files changed, 9 insertions(+)
     15 
     16 diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
     17 index aa5ba9a..4f4c7ef 100644
     18 --- a/drivers/gpu/drm/omapdrm/omap_connector.c
     19 +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
     20 @@ -59,6 +59,14 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector)
     21  	return omap_connector->hdmi_mode;
     22  }
     23  
     24 +bool omap_connector_get_manually_updated(struct drm_connector *connector)
     25 +{
     26 +	struct omap_connector *omap_connector = to_omap_connector(connector);
     27 +
     28 +	return !!(omap_connector->dssdev->caps &
     29 +		  OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE);
     30 +}
     31 +
     32  static enum drm_connector_status omap_connector_detect(
     33  		struct drm_connector *connector, bool force)
     34  {
     35 diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
     36 index 22f3d94..f6c48f2 100644
     37 --- a/drivers/gpu/drm/omapdrm/omap_drv.h
     38 +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
     39 @@ -142,6 +142,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
     40  struct drm_encoder *omap_connector_attached_encoder(
     41  		struct drm_connector *connector);
     42  bool omap_connector_get_hdmi_mode(struct drm_connector *connector);
     43 +bool omap_connector_get_manually_updated(struct drm_connector *connector);
     44  
     45  struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
     46  		struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd);
     47 -- 
     48 2.1.4
     49