Re: [DPU PATCH 1/2] drm/msm/dsi-staging: compile out partial update path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 22, 2018 at 06:32:04PM -0800, Jeykumar Sankaran wrote:
> compile out partial update related changes from dsi-staging
> since the DPU dependencies are getting removed.
> 
> Change-Id: I02462f520cdf99c8445b18e60212ca46155f9710
> Signed-off-by: Jeykumar Sankaran <jsanka@xxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/msm/dsi-staging/dsi_display.c |  9 +++++++--
>  drivers/gpu/drm/msm/dsi-staging/dsi_display.h |  5 ++---
>  drivers/gpu/drm/msm/dsi-staging/dsi_drm.c     | 11 ++++++-----
>  drivers/gpu/drm/msm/dsi-staging/dsi_drm.h     |  4 +---
>  drivers/gpu/drm/msm/dsi-staging/dsi_panel.c   |  4 ++++
>  drivers/gpu/drm/msm/dsi-staging/dsi_panel.h   |  2 --
>  6 files changed, 20 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
> index 72055dc..3e32872 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c
> @@ -3414,8 +3414,10 @@ int dsi_display_get_info(struct msm_display_info *info, void *disp)
>  		break;
>  	}
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  	memcpy(&info->roi_caps, &display->panel->roi_caps,
>  			sizeof(info->roi_caps));
> +#endif
>  
>  error:
>  	mutex_unlock(&display->display_lock);
> @@ -3941,6 +3943,7 @@ int dsi_display_prepare(struct dsi_display *display)
>  	return rc;
>  }
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  static int dsi_display_calc_ctrl_roi(const struct dsi_display *display,
>  		const struct dsi_display_ctrl *ctrl,
>  		const struct msm_roi_list *req_rois,
> @@ -4036,9 +4039,9 @@ static int dsi_display_set_roi(struct dsi_display *display,
>  
>  	return rc;
>  }
> +#endif
>  
> -int dsi_display_pre_kickoff(struct dsi_display *display,
> -		struct msm_display_kickoff_params *params)
> +int dsi_display_pre_kickoff(struct dsi_display *display)
>  {
>  	int rc = 0;
>  
> @@ -4046,7 +4049,9 @@ int dsi_display_pre_kickoff(struct dsi_display *display,
>  	if (display->misr_enable)
>  		_dsi_display_setup_misr(display);
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  	rc = dsi_display_set_roi(display, params->rois);
> +#endif
>  
>  	return rc;
>  }
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
> index b23a84d..a0f9ccf 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
> @@ -524,11 +524,10 @@ int dsi_display_set_power(struct drm_connector *connector,
>  /*
>   * dsi_display_pre_kickoff - program kickoff-time features
>   * @display: Pointer to private display structure
> - * @params: Parameters for kickoff-time programming
>   * Returns: Zero on success
>   */
> -int dsi_display_pre_kickoff(struct dsi_display *display,
> -		struct msm_display_kickoff_params *params);
> +int dsi_display_pre_kickoff(struct dsi_display *display);
> +
>  /**
>   * dsi_display_get_dst_format() - get dst_format from DSI display
>   * @display:         Handle to display
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c b/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c
> index 6847c53..32a6e8f 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c
> @@ -443,6 +443,7 @@ int dsi_conn_post_init(struct drm_connector *connector,
>  		break;
>  	}
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  	if (panel->roi_caps.enabled) {
>  		dpu_kms_info_add_keyint(info, "partial_update_num_roi",
>  				panel->roi_caps.num_roi);
> @@ -460,7 +461,8 @@ int dsi_conn_post_init(struct drm_connector *connector,
>  				panel->roi_caps.align.min_height);
>  		dpu_kms_info_add_keyint(info, "partial_update_roimerge",
>  				panel->roi_caps.merge_rois);
> -	}
> +		}
> +#endif
>  
>  end:
>  	return 0;
> @@ -598,15 +600,14 @@ enum drm_mode_status dsi_conn_mode_valid(struct drm_connector *connector,
>  }
>  
>  int dsi_conn_pre_kickoff(struct drm_connector *connector,
> -		void *display,
> -		struct msm_display_kickoff_params *params)
> +		void *display)
>  {
> -	if (!connector || !display || !params) {
> +	if (!connector || !display) {
>  		pr_err("Invalid params\n");
>  		return -EINVAL;
>  	}
>  
> -	return dsi_display_pre_kickoff(display, params);
> +	return dsi_display_pre_kickoff(display);
>  }
>  
>  void dsi_conn_enable_event(struct drm_connector *connector,
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_drm.h b/drivers/gpu/drm/msm/dsi-staging/dsi_drm.h
> index f427340..38de33c 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_drm.h
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_drm.h
> @@ -112,12 +112,10 @@ struct dsi_bridge *dsi_drm_bridge_init(struct dsi_display *display,
>   * dsi_display_pre_kickoff - program kickoff-time features
>   * @connector: Pointer to drm connector structure
>   * @display: Pointer to private display structure
> - * @params: Parameters for kickoff-time programming
>   * Returns: Zero on success
>   */
>  int dsi_conn_pre_kickoff(struct drm_connector *connector,
> -		void *display,
> -		struct msm_display_kickoff_params *params);
> +		void *display);
>  
>  /**
>   * dsi_display_post_kickoff - program post kickoff-time features
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c b/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c
> index 2d94e5f..ef59433 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c
> @@ -2331,6 +2331,7 @@ static int dsi_panel_parse_topology(
>  	return rc;
>  }
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  static int dsi_panel_parse_roi_alignment(struct device_node *of_node,
>  					 struct msm_roi_alignment *align)
>  {
> @@ -2411,6 +2412,7 @@ static int dsi_panel_parse_partial_update_caps(struct dsi_panel *panel,
>  
>  	return rc;
>  }
> +#endif
>  
>  static int dsi_panel_parse_dms_info(struct dsi_panel *panel,
>  	struct device_node *of_node)
> @@ -2703,9 +2705,11 @@ struct dsi_panel *dsi_panel_get(struct device *parent,
>  	if (rc)
>  		pr_err("failed to parse hdr config, rc=%d\n", rc);
>  
> +#ifdef DSI_PARTIAL_UPDATE
>  	rc = dsi_panel_parse_partial_update_caps(panel, of_node);
>  	if (rc)
>  		pr_debug("failed to partial update caps, rc=%d\n", rc);
> +#endif
>  
>  	rc = dsi_panel_get_mode_count(panel, of_node);
>  	if (rc) {
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_panel.h b/drivers/gpu/drm/msm/dsi-staging/dsi_panel.h
> index c26a5db..3b1b47c 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_panel.h
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_panel.h
> @@ -155,8 +155,6 @@ struct dsi_panel {
>  	enum dsi_op_mode panel_mode;
>  
>  	struct dsi_dfps_capabilities dfps_caps;
> -	struct msm_roi_caps roi_caps;
> -

Removing this breaks things if you do define DSI_PARTIAL_UPDATE. Lets just
remove everything now since it'll probably become stale.

There are lots more references to roi in dsi-staging, but I guess since
dsi-staging isn't going upstream, it's less important. Perhaps you can take one
more pass at removing more code in v2?

Sean

>  	struct dsi_panel_phy_props phy_props;
>  
>  	struct dsi_display_mode *cur_mode;
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux