Loading msm/dsi/dsi_display.c +13 −1 Original line number Diff line number Diff line Loading @@ -3784,6 +3784,8 @@ static int dsi_display_res_init(struct dsi_display *display) goto error_ctrl_put; } display->is_active = true; return 0; error_ctrl_put: for (i = i - 1; i >= 0; i--) { Loading Loading @@ -5447,6 +5449,16 @@ int dsi_display_get_active_displays(void **display_array, u32 max_display_count) return count; } void dsi_display_set_active_state(struct dsi_display *display, bool is_active) { if (!display) return; mutex_lock(&display->display_lock); display->is_active = is_active; mutex_unlock(&display->display_lock); } int dsi_display_drm_bridge_init(struct dsi_display *display, struct drm_encoder *enc) { Loading Loading @@ -5986,7 +5998,7 @@ int dsi_display_get_info(struct drm_connector *connector, for (i = 0; i < info->num_of_h_tiles; i++) info->h_tile_instance[i] = display->ctrl[i].ctrl->cell_index; info->is_connected = true; info->is_connected = display->is_active; if (!strcmp(display->display_type, "primary")) info->display_type = SDE_CONNECTOR_PRIMARY; Loading msm/dsi/dsi_display.h +2 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ struct dsi_display_ext_bridge { * @queue_cmd_waits Indicates if wait for dma commands done has to be queued. * @dma_cmd_workq: Pointer to the workqueue of DMA command transfer done * wait sequence. * @is_active: status of the display */ struct dsi_display { struct platform_device *pdev; Loading Loading @@ -279,6 +280,7 @@ struct dsi_display { /* panel id of the display */ u64 panel_id; bool is_active; }; int dsi_display_dev_probe(struct platform_device *pdev); Loading msm/msm_gem.c +0 −6 Original line number Diff line number Diff line Loading @@ -1259,12 +1259,6 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev, int ret; unsigned long flags = 0; /* if we don't have IOMMU, don't bother pretending we can import: */ if (!iommu_present(&platform_bus_type)) { dev_err(dev->dev, "cannot import without IOMMU\n"); return ERR_PTR(-EINVAL); } size = PAGE_ALIGN(dmabuf->size); ret = msm_gem_new_impl(dev, size, MSM_BO_WC, dmabuf->resv, &obj, Loading msm/sde/sde_crtc.c +8 −0 Original line number Diff line number Diff line Loading @@ -1739,6 +1739,8 @@ int sde_crtc_find_plane_fb_modes(struct drm_crtc *crtc, case SDE_DRM_FB_SEC_DIR_TRANS: (*fb_sec_dir)++; break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: break; default: SDE_ERROR("Error: Plane[%d], fb_trans_mode:%d", DRMID(plane), mode); Loading Loading @@ -1786,6 +1788,8 @@ int sde_crtc_state_find_plane_fb_modes(struct drm_crtc_state *state, case SDE_DRM_FB_SEC_DIR_TRANS: (*fb_sec_dir)++; break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: break; default: SDE_ERROR("Error: Plane[%d], fb_trans_mode:%d", DRMID(plane), mode); Loading Loading @@ -1940,6 +1944,10 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, old_valid_fb, post_commit, &ops); break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: ops = 0; break; default: SDE_ERROR("crtc%d: invalid plane fb_mode %d\n", DRMID(crtc), translation_mode); Loading msm/sde/sde_hw_catalog.c +54 −4 Original line number Diff line number Diff line Loading @@ -161,6 +161,11 @@ /************************************************************* * DTSI PROPERTY INDEX *************************************************************/ enum { SDE_HW_VERSION, SDE_HW_PROP_MAX, }; enum { HW_OFF, HW_LEN, Loading Loading @@ -524,6 +529,10 @@ struct sde_dt_props { /************************************************************* * dts property list *************************************************************/ static struct sde_prop_type sde_hw_prop[] = { {SDE_HW_VERSION, "qcom,sde-hw-version", false, PROP_TYPE_U32}, }; static struct sde_prop_type sde_prop[] = { {SDE_OFF, "qcom,sde-off", true, PROP_TYPE_U32}, {SDE_LEN, "qcom,sde-len", false, PROP_TYPE_U32}, Loading Loading @@ -4791,10 +4800,48 @@ void sde_hw_catalog_deinit(struct sde_mdss_cfg *sde_cfg) kfree(sde_cfg); } static int sde_hw_ver_parse_dt(struct drm_device *dev, struct device_node *np, struct sde_mdss_cfg *cfg) { int rc, len, prop_count[SDE_HW_PROP_MAX]; struct sde_prop_value *prop_value = NULL; bool prop_exists[SDE_HW_PROP_MAX]; if (!cfg) { SDE_ERROR("invalid argument\n"); return -EINVAL; } prop_value = kzalloc(SDE_HW_PROP_MAX * sizeof(struct sde_prop_value), GFP_KERNEL); if (!prop_value) return -ENOMEM; rc = _validate_dt_entry(np, sde_hw_prop, ARRAY_SIZE(sde_hw_prop), prop_count, &len); if (rc) goto end; rc = _read_dt_entry(np, sde_hw_prop, ARRAY_SIZE(sde_hw_prop), prop_count, prop_exists, prop_value); if (rc) goto end; if (prop_exists[SDE_HW_VERSION]) cfg->hwversion = PROP_VALUE_ACCESS(prop_value, SDE_HW_VERSION, 0); else cfg->hwversion = sde_kms_get_hw_version(dev); end: kfree(prop_value); return rc; } /************************************************************* * hardware catalog init *************************************************************/ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev) { int rc; struct sde_mdss_cfg *sde_cfg; Loading @@ -4807,10 +4854,13 @@ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) if (!sde_cfg) return ERR_PTR(-ENOMEM); sde_cfg->hwversion = hw_rev; INIT_LIST_HEAD(&sde_cfg->irq_offset_list); rc = _sde_hardware_pre_caps(sde_cfg, hw_rev); rc = sde_hw_ver_parse_dt(dev, np, sde_cfg); if (rc) goto end; rc = _sde_hardware_pre_caps(sde_cfg, sde_cfg->hwversion); if (rc) goto end; Loading Loading @@ -4906,7 +4956,7 @@ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) if (rc) goto end; rc = _sde_hardware_post_caps(sde_cfg, hw_rev); rc = _sde_hardware_post_caps(sde_cfg, sde_cfg->hwversion); if (rc) goto end; Loading Loading
msm/dsi/dsi_display.c +13 −1 Original line number Diff line number Diff line Loading @@ -3784,6 +3784,8 @@ static int dsi_display_res_init(struct dsi_display *display) goto error_ctrl_put; } display->is_active = true; return 0; error_ctrl_put: for (i = i - 1; i >= 0; i--) { Loading Loading @@ -5447,6 +5449,16 @@ int dsi_display_get_active_displays(void **display_array, u32 max_display_count) return count; } void dsi_display_set_active_state(struct dsi_display *display, bool is_active) { if (!display) return; mutex_lock(&display->display_lock); display->is_active = is_active; mutex_unlock(&display->display_lock); } int dsi_display_drm_bridge_init(struct dsi_display *display, struct drm_encoder *enc) { Loading Loading @@ -5986,7 +5998,7 @@ int dsi_display_get_info(struct drm_connector *connector, for (i = 0; i < info->num_of_h_tiles; i++) info->h_tile_instance[i] = display->ctrl[i].ctrl->cell_index; info->is_connected = true; info->is_connected = display->is_active; if (!strcmp(display->display_type, "primary")) info->display_type = SDE_CONNECTOR_PRIMARY; Loading
msm/dsi/dsi_display.h +2 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ struct dsi_display_ext_bridge { * @queue_cmd_waits Indicates if wait for dma commands done has to be queued. * @dma_cmd_workq: Pointer to the workqueue of DMA command transfer done * wait sequence. * @is_active: status of the display */ struct dsi_display { struct platform_device *pdev; Loading Loading @@ -279,6 +280,7 @@ struct dsi_display { /* panel id of the display */ u64 panel_id; bool is_active; }; int dsi_display_dev_probe(struct platform_device *pdev); Loading
msm/msm_gem.c +0 −6 Original line number Diff line number Diff line Loading @@ -1259,12 +1259,6 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev, int ret; unsigned long flags = 0; /* if we don't have IOMMU, don't bother pretending we can import: */ if (!iommu_present(&platform_bus_type)) { dev_err(dev->dev, "cannot import without IOMMU\n"); return ERR_PTR(-EINVAL); } size = PAGE_ALIGN(dmabuf->size); ret = msm_gem_new_impl(dev, size, MSM_BO_WC, dmabuf->resv, &obj, Loading
msm/sde/sde_crtc.c +8 −0 Original line number Diff line number Diff line Loading @@ -1739,6 +1739,8 @@ int sde_crtc_find_plane_fb_modes(struct drm_crtc *crtc, case SDE_DRM_FB_SEC_DIR_TRANS: (*fb_sec_dir)++; break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: break; default: SDE_ERROR("Error: Plane[%d], fb_trans_mode:%d", DRMID(plane), mode); Loading Loading @@ -1786,6 +1788,8 @@ int sde_crtc_state_find_plane_fb_modes(struct drm_crtc_state *state, case SDE_DRM_FB_SEC_DIR_TRANS: (*fb_sec_dir)++; break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: break; default: SDE_ERROR("Error: Plane[%d], fb_trans_mode:%d", DRMID(plane), mode); Loading Loading @@ -1940,6 +1944,10 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, old_valid_fb, post_commit, &ops); break; case SDE_DRM_FB_NON_SEC_DIR_TRANS: ops = 0; break; default: SDE_ERROR("crtc%d: invalid plane fb_mode %d\n", DRMID(crtc), translation_mode); Loading
msm/sde/sde_hw_catalog.c +54 −4 Original line number Diff line number Diff line Loading @@ -161,6 +161,11 @@ /************************************************************* * DTSI PROPERTY INDEX *************************************************************/ enum { SDE_HW_VERSION, SDE_HW_PROP_MAX, }; enum { HW_OFF, HW_LEN, Loading Loading @@ -524,6 +529,10 @@ struct sde_dt_props { /************************************************************* * dts property list *************************************************************/ static struct sde_prop_type sde_hw_prop[] = { {SDE_HW_VERSION, "qcom,sde-hw-version", false, PROP_TYPE_U32}, }; static struct sde_prop_type sde_prop[] = { {SDE_OFF, "qcom,sde-off", true, PROP_TYPE_U32}, {SDE_LEN, "qcom,sde-len", false, PROP_TYPE_U32}, Loading Loading @@ -4791,10 +4800,48 @@ void sde_hw_catalog_deinit(struct sde_mdss_cfg *sde_cfg) kfree(sde_cfg); } static int sde_hw_ver_parse_dt(struct drm_device *dev, struct device_node *np, struct sde_mdss_cfg *cfg) { int rc, len, prop_count[SDE_HW_PROP_MAX]; struct sde_prop_value *prop_value = NULL; bool prop_exists[SDE_HW_PROP_MAX]; if (!cfg) { SDE_ERROR("invalid argument\n"); return -EINVAL; } prop_value = kzalloc(SDE_HW_PROP_MAX * sizeof(struct sde_prop_value), GFP_KERNEL); if (!prop_value) return -ENOMEM; rc = _validate_dt_entry(np, sde_hw_prop, ARRAY_SIZE(sde_hw_prop), prop_count, &len); if (rc) goto end; rc = _read_dt_entry(np, sde_hw_prop, ARRAY_SIZE(sde_hw_prop), prop_count, prop_exists, prop_value); if (rc) goto end; if (prop_exists[SDE_HW_VERSION]) cfg->hwversion = PROP_VALUE_ACCESS(prop_value, SDE_HW_VERSION, 0); else cfg->hwversion = sde_kms_get_hw_version(dev); end: kfree(prop_value); return rc; } /************************************************************* * hardware catalog init *************************************************************/ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev) { int rc; struct sde_mdss_cfg *sde_cfg; Loading @@ -4807,10 +4854,13 @@ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) if (!sde_cfg) return ERR_PTR(-ENOMEM); sde_cfg->hwversion = hw_rev; INIT_LIST_HEAD(&sde_cfg->irq_offset_list); rc = _sde_hardware_pre_caps(sde_cfg, hw_rev); rc = sde_hw_ver_parse_dt(dev, np, sde_cfg); if (rc) goto end; rc = _sde_hardware_pre_caps(sde_cfg, sde_cfg->hwversion); if (rc) goto end; Loading Loading @@ -4906,7 +4956,7 @@ struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev) if (rc) goto end; rc = _sde_hardware_post_caps(sde_cfg, hw_rev); rc = _sde_hardware_post_caps(sde_cfg, sde_cfg->hwversion); if (rc) goto end; Loading