Commit c24b6330 authored by Sean Paul's avatar Sean Paul Committed by Rob Clark

drm/msm: dpu: Don't use power_event for vbif_init_memtypes

power_events are only used for pm_runtime, and that's all handled in
dpu_kms. So just call vbif_init_memtypes at the correct times.

Changes in v2:
- Removed obsolete comment (Jeykumar)

Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: default avatarJeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 88447b9b
...@@ -652,10 +652,6 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms) ...@@ -652,10 +652,6 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms)
dpu_hw_intr_destroy(dpu_kms->hw_intr); dpu_hw_intr_destroy(dpu_kms->hw_intr);
dpu_kms->hw_intr = NULL; dpu_kms->hw_intr = NULL;
if (dpu_kms->power_event)
dpu_power_handle_unregister_event(
&dpu_kms->phandle, dpu_kms->power_event);
/* safe to call these more than once during shutdown */ /* safe to call these more than once during shutdown */
_dpu_debugfs_destroy(dpu_kms); _dpu_debugfs_destroy(dpu_kms);
_dpu_kms_mmu_destroy(dpu_kms); _dpu_kms_mmu_destroy(dpu_kms);
...@@ -836,16 +832,6 @@ u64 dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name) ...@@ -836,16 +832,6 @@ u64 dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name)
return clk_get_rate(clk->clk); return clk_get_rate(clk->clk);
} }
static void dpu_kms_handle_power_event(u32 event_type, void *usr)
{
struct dpu_kms *dpu_kms = usr;
if (!dpu_kms)
return;
dpu_vbif_init_memtypes(dpu_kms);
}
static int dpu_kms_hw_init(struct msm_kms *kms) static int dpu_kms_hw_init(struct msm_kms *kms)
{ {
struct dpu_kms *dpu_kms; struct dpu_kms *dpu_kms;
...@@ -1016,13 +1002,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms) ...@@ -1016,13 +1002,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
*/ */
dev->mode_config.allow_fb_modifiers = true; dev->mode_config.allow_fb_modifiers = true;
/* dpu_vbif_init_memtypes(dpu_kms);
* Handle (re)initializations during power enable
*/
dpu_kms_handle_power_event(DPU_POWER_EVENT_ENABLE, dpu_kms);
dpu_kms->power_event = dpu_power_handle_register_event(
&dpu_kms->phandle, DPU_POWER_EVENT_ENABLE,
dpu_kms_handle_power_event, dpu_kms, "kms");
pm_runtime_put_sync(&dpu_kms->pdev->dev); pm_runtime_put_sync(&dpu_kms->pdev->dev);
...@@ -1176,6 +1156,8 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev) ...@@ -1176,6 +1156,8 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev)
return rc; return rc;
} }
dpu_vbif_init_memtypes(dpu_kms);
rc = dpu_power_resource_enable(&dpu_kms->phandle, true); rc = dpu_power_resource_enable(&dpu_kms->phandle, true);
if (rc) if (rc)
DPU_ERROR("resource enable failed: %d\n", rc); DPU_ERROR("resource enable failed: %d\n", rc);
......
...@@ -114,7 +114,6 @@ struct dpu_kms { ...@@ -114,7 +114,6 @@ struct dpu_kms {
struct dpu_mdss_cfg *catalog; struct dpu_mdss_cfg *catalog;
struct dpu_power_handle phandle; struct dpu_power_handle phandle;
struct dpu_power_event *power_event;
/* directory entry for debugfs */ /* directory entry for debugfs */
struct dentry *debugfs_root; struct dentry *debugfs_root;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment