On Tue, Feb 27, 2018 at 06:55:10PM -0800, Jeykumar Sankaran wrote: > Remove support partial update and related changes from dsi-staging > since the DPU dependencies are getting cleaned up. >
Can you please add a "Changes in v2:" section to the commit message summarizing what you've changed since the last version? This is super helpful for reviewers. > Change-Id: I02462f520cdf99c8445b18e60212ca46155f9710 I forgot this during my last patchset too, but please try to strip the Change-Id tag. With the commit message changes, Reviewed-by: Sean Paul <seanp...@chromium.org> > Signed-off-by: Jeykumar Sankaran <jsa...@codeaurora.org> > --- > drivers/gpu/drm/msm/dsi-staging/dsi_display.c | 104 > +------------------------- > drivers/gpu/drm/msm/dsi-staging/dsi_display.h | 5 +- > drivers/gpu/drm/msm/dsi-staging/dsi_drm.c | 26 +------ > drivers/gpu/drm/msm/dsi-staging/dsi_drm.h | 4 +- > drivers/gpu/drm/msm/dsi-staging/dsi_panel.c | 85 --------------------- > drivers/gpu/drm/msm/dsi-staging/dsi_panel.h | 2 - > 6 files changed, 7 insertions(+), 219 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..31b7d7e 100644 > --- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c > +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c > @@ -3414,9 +3414,6 @@ int dsi_display_get_info(struct msm_display_info *info, > void *disp) > break; > } > > - memcpy(&info->roi_caps, &display->panel->roi_caps, > - sizeof(info->roi_caps)); > - > error: > mutex_unlock(&display->display_lock); > return rc; > @@ -3941,104 +3938,7 @@ int dsi_display_prepare(struct dsi_display *display) > return rc; > } > > -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, > - struct dsi_rect *out_roi) > -{ > - const struct dsi_rect *bounds = &ctrl->ctrl->mode_bounds; > - struct dsi_rect req_roi = { 0 }; > - int rc = 0; > - > - if (req_rois->num_rects > display->panel->roi_caps.num_roi) { > - pr_err("request for %d rois greater than max %d\n", > - req_rois->num_rects, > - display->panel->roi_caps.num_roi); > - rc = -EINVAL; > - goto exit; > - } > - > - /** > - * if no rois, user wants to reset back to full resolution > - * note: h_active is already divided by ctrl_count > - */ > - if (!req_rois->num_rects) { > - *out_roi = *bounds; > - goto exit; > - } > - > - /* intersect with the bounds */ > - req_roi.x = req_rois->roi[0].x1; > - req_roi.y = req_rois->roi[0].y1; > - req_roi.w = req_rois->roi[0].x2 - req_rois->roi[0].x1; > - req_roi.h = req_rois->roi[0].y2 - req_rois->roi[0].y1; > - dsi_rect_intersect(&req_roi, bounds, out_roi); > - > -exit: > - /* adjust the ctrl origin to be top left within the ctrl */ > - out_roi->x = out_roi->x - bounds->x; > - > - pr_debug("ctrl%d:%d: req (%d,%d,%d,%d) bnd (%d,%d,%d,%d) out > (%d,%d,%d,%d)\n", > - ctrl->dsi_ctrl_idx, ctrl->ctrl->cell_index, > - req_roi.x, req_roi.y, req_roi.w, req_roi.h, > - bounds->x, bounds->y, bounds->w, bounds->h, > - out_roi->x, out_roi->y, out_roi->w, out_roi->h); > - > - return rc; > -} > - > -static int dsi_display_set_roi(struct dsi_display *display, > - struct msm_roi_list *rois) > -{ > - int rc = 0; > - int i; > - > - if (!display || !rois || !display->panel) > - return -EINVAL; > - > - if (!display->panel->roi_caps.enabled) > - return 0; > - > - for (i = 0; i < display->ctrl_count; i++) { > - struct dsi_display_ctrl *ctrl = &display->ctrl[i]; > - struct dsi_rect ctrl_roi; > - bool changed = false; > - > - rc = dsi_display_calc_ctrl_roi(display, ctrl, rois, &ctrl_roi); > - if (rc) { > - pr_err("dsi_display_calc_ctrl_roi failed rc %d\n", rc); > - return rc; > - } > - > - rc = dsi_ctrl_set_roi(ctrl->ctrl, &ctrl_roi, &changed); > - if (rc) { > - pr_err("dsi_ctrl_set_roi failed rc %d\n", rc); > - return rc; > - } > - > - if (!changed) > - continue; > - > - /* send the new roi to the panel via dcs commands */ > - rc = dsi_panel_send_roi_dcs(display->panel, i, &ctrl_roi); > - if (rc) { > - pr_err("dsi_panel_set_roi failed rc %d\n", rc); > - return rc; > - } > - > - /* re-program the ctrl with the timing based on the new roi */ > - rc = dsi_ctrl_setup(ctrl->ctrl); > - if (rc) { > - pr_err("dsi_ctrl_setup failed rc %d\n", rc); > - return rc; > - } > - } > - > - return rc; > -} > - > -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,8 +3946,6 @@ int dsi_display_pre_kickoff(struct dsi_display *display, > if (display->misr_enable) > _dsi_display_setup_misr(display); > > - rc = dsi_display_set_roi(display, params->rois); > - > 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..017f881 100644 > --- a/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c > +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_drm.c > @@ -443,25 +443,6 @@ int dsi_conn_post_init(struct drm_connector *connector, > break; > } > > - if (panel->roi_caps.enabled) { > - dpu_kms_info_add_keyint(info, "partial_update_num_roi", > - panel->roi_caps.num_roi); > - dpu_kms_info_add_keyint(info, "partial_update_xstart", > - panel->roi_caps.align.xstart_pix_align); > - dpu_kms_info_add_keyint(info, "partial_update_walign", > - panel->roi_caps.align.width_pix_align); > - dpu_kms_info_add_keyint(info, "partial_update_wmin", > - panel->roi_caps.align.min_width); > - dpu_kms_info_add_keyint(info, "partial_update_ystart", > - panel->roi_caps.align.ystart_pix_align); > - dpu_kms_info_add_keyint(info, "partial_update_halign", > - panel->roi_caps.align.height_pix_align); > - dpu_kms_info_add_keyint(info, "partial_update_hmin", > - panel->roi_caps.align.min_height); > - dpu_kms_info_add_keyint(info, "partial_update_roimerge", > - panel->roi_caps.merge_rois); > - } > - > end: > return 0; > } > @@ -598,15 +579,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..fd20eba 100644 > --- a/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c > +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_panel.c > @@ -2331,87 +2331,6 @@ static int dsi_panel_parse_topology( > return rc; > } > > -static int dsi_panel_parse_roi_alignment(struct device_node *of_node, > - struct msm_roi_alignment *align) > -{ > - int len = 0, rc = 0; > - u32 value[6]; > - struct property *data; > - > - if (!align || !of_node) > - return -EINVAL; > - > - memset(align, 0, sizeof(*align)); > - > - data = of_find_property(of_node, "qcom,panel-roi-alignment", &len); > - len /= sizeof(u32); > - if (!data) { > - pr_err("panel roi alignment not found\n"); > - rc = -EINVAL; > - } else if (len != 6) { > - pr_err("incorrect roi alignment len %d\n", len); > - rc = -EINVAL; > - } else { > - rc = of_property_read_u32_array(of_node, > - "qcom,panel-roi-alignment", value, len); > - if (rc) > - pr_debug("error reading panel roi alignment values\n"); > - else { > - align->xstart_pix_align = value[0]; > - align->ystart_pix_align = value[1]; > - align->width_pix_align = value[2]; > - align->height_pix_align = value[3]; > - align->min_width = value[4]; > - align->min_height = value[5]; > - } > - > - pr_info("roi alignment: [%d, %d, %d, %d, %d, %d]\n", > - align->xstart_pix_align, > - align->width_pix_align, > - align->ystart_pix_align, > - align->height_pix_align, > - align->min_width, > - align->min_height); > - } > - > - return rc; > -} > - > -static int dsi_panel_parse_partial_update_caps(struct dsi_panel *panel, > - struct device_node *of_node) > -{ > - struct msm_roi_caps *roi_caps = &panel->roi_caps; > - const char *data; > - int rc = 0; > - > - memset(roi_caps, 0, sizeof(*roi_caps)); > - > - data = of_get_property(of_node, "qcom,partial-update-enabled", NULL); > - if (data) { > - if (!strcmp(data, "dual_roi")) > - roi_caps->num_roi = 2; > - else > - roi_caps->num_roi = 1; > - } > - > - roi_caps->merge_rois = of_property_read_bool(of_node, > - "qcom,partial-update-roi-merge"); > - > - roi_caps->enabled = roi_caps->num_roi > 0; > - > - pr_info("partial update num_rois=%d enabled=%d\n", roi_caps->num_roi, > - roi_caps->enabled); > - > - if (roi_caps->enabled) > - rc = dsi_panel_parse_roi_alignment(of_node, > - &panel->roi_caps.align); > - > - if (rc) > - memset(roi_caps, 0, sizeof(*roi_caps)); > - > - return rc; > -} > - > static int dsi_panel_parse_dms_info(struct dsi_panel *panel, > struct device_node *of_node) > { > @@ -2703,10 +2622,6 @@ struct dsi_panel *dsi_panel_get(struct device *parent, > if (rc) > pr_err("failed to parse hdr config, rc=%d\n", rc); > > - rc = dsi_panel_parse_partial_update_caps(panel, of_node); > - if (rc) > - pr_debug("failed to partial update caps, rc=%d\n", rc); > - > rc = dsi_panel_get_mode_count(panel, of_node); > if (rc) { > pr_err("failed to get mode count, rc=%d\n", 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; > - > 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 _______________________________________________ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno