[v8,26/38] drm/i915/icl: Add DSI connector helper functions

Submitted by Jani Nikula on Oct. 30, 2018, 11:56 a.m.

Details

Message ID 6f35cf69a3ed356a6ac739292c369e5717135da2.1540900289.git.jani.nikula@intel.com
State New
Headers show
Series "drm/i915/icl: dsi enabling" ( rev: 3 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula Oct. 30, 2018, 11:56 a.m.
From: Madhav Chauhan <madhav.chauhan@intel.com>

This patch registers DSI connectors helper functions
with DRM driver.

v2 by Jani:
 - Indentation change

Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/icl_dsi.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
index 5b33b7ac8e8f..c12c7d53bcff 100644
--- a/drivers/gpu/drm/i915/icl_dsi.c
+++ b/drivers/gpu/drm/i915/icl_dsi.c
@@ -1128,6 +1128,12 @@  static const struct drm_connector_funcs gen11_dsi_connector_funcs = {
 	.atomic_duplicate_state = intel_digital_connector_duplicate_state,
 };
 
+static const struct drm_connector_helper_funcs gen11_dsi_connector_helper_funcs = {
+	.get_modes = intel_dsi_get_modes,
+	.mode_valid = intel_dsi_mode_valid,
+	.atomic_check = intel_digital_connector_atomic_check,
+};
+
 static int gen11_dsi_host_attach(struct mipi_dsi_host *host,
 				 struct mipi_dsi_device *dsi)
 {
@@ -1224,6 +1230,7 @@  void icl_dsi_init(struct drm_i915_private *dev_priv)
 	/* register DSI connector with DRM subsystem */
 	drm_connector_init(dev, connector, &gen11_dsi_connector_funcs,
 			   DRM_MODE_CONNECTOR_DSI);
+	drm_connector_helper_add(connector, &gen11_dsi_connector_helper_funcs);
 	connector->display_info.subpixel_order = SubPixelHorizontalRGB;
 	connector->interlace_allowed = false;
 	connector->doublescan_allowed = false;

Comments

On 10/30/2018 5:26 PM, Jani Nikula wrote:
> From: Madhav Chauhan <madhav.chauhan@intel.com>
>
> This patch registers DSI connectors helper functions
> with DRM driver.
>
> v2 by Jani:
>   - Indentation change

Ok.

Regards,
Madhav

>
> Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/i915/icl_dsi.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c
> index 5b33b7ac8e8f..c12c7d53bcff 100644
> --- a/drivers/gpu/drm/i915/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/icl_dsi.c
> @@ -1128,6 +1128,12 @@ static const struct drm_connector_funcs gen11_dsi_connector_funcs = {
>   	.atomic_duplicate_state = intel_digital_connector_duplicate_state,
>   };
>   
> +static const struct drm_connector_helper_funcs gen11_dsi_connector_helper_funcs = {
> +	.get_modes = intel_dsi_get_modes,
> +	.mode_valid = intel_dsi_mode_valid,
> +	.atomic_check = intel_digital_connector_atomic_check,
> +};
> +
>   static int gen11_dsi_host_attach(struct mipi_dsi_host *host,
>   				 struct mipi_dsi_device *dsi)
>   {
> @@ -1224,6 +1230,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
>   	/* register DSI connector with DRM subsystem */
>   	drm_connector_init(dev, connector, &gen11_dsi_connector_funcs,
>   			   DRM_MODE_CONNECTOR_DSI);
> +	drm_connector_helper_add(connector, &gen11_dsi_connector_helper_funcs);
>   	connector->display_info.subpixel_order = SubPixelHorizontalRGB;
>   	connector->interlace_allowed = false;
>   	connector->doublescan_allowed = false;