Loading msm/msm_atomic.c +11 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (C) 2014 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -689,6 +689,16 @@ int msm_atomic_commit(struct drm_device *dev, c->plane_mask |= (1 << drm_plane_index(plane)); } /* Protection for prepare_fence callback */ retry: ret = drm_modeset_lock(&state->dev->mode_config.connection_mutex, state->acquire_ctx); if (ret == -EDEADLK) { drm_modeset_backoff(state->acquire_ctx); goto retry; } /* * Wait for pending updates on any of the same crtc's and then * mark our set of crtc's as busy: Loading msm/sde/sde_crtc.c +4 −0 Original line number Diff line number Diff line Loading @@ -6148,6 +6148,9 @@ static int _sde_debugfs_fence_status_show(struct seq_file *s, void *data) dev = crtc->dev; cstate = to_sde_crtc_state(crtc->state); if (!sde_crtc->kickoff_in_progress) goto skip_input_fence; /* Dump input fence info */ seq_puts(s, "===Input fence===\n"); drm_atomic_crtc_for_each_plane(plane, crtc) { Loading Loading @@ -6175,6 +6178,7 @@ static int _sde_debugfs_fence_status_show(struct seq_file *s, void *data) } } skip_input_fence: /* Dump release fence info */ seq_puts(s, "\n"); seq_puts(s, "===Release fence===\n"); Loading msm/sde/sde_encoder_phys_cmd.c +11 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ Loading Loading @@ -1509,20 +1509,27 @@ static int _sde_encoder_phys_cmd_wait_for_wr_ptr( struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc); struct sde_encoder_wait_info wait_info = {0}; int ret; struct sde_connector *c_conn; bool frame_pending = true; struct sde_hw_ctl *ctl; unsigned long lock_flags; int ret, timeout_ms; if (!phys_enc || !phys_enc->hw_ctl) { if (!phys_enc || !phys_enc->hw_ctl || !phys_enc->connector) { SDE_ERROR("invalid argument(s)\n"); return -EINVAL; } ctl = phys_enc->hw_ctl; c_conn = to_sde_connector(phys_enc->connector); timeout_ms = KICKOFF_TIMEOUT_MS; if (c_conn->lp_mode == SDE_MODE_DPMS_LP1 || c_conn->lp_mode == SDE_MODE_DPMS_LP2) timeout_ms = (KICKOFF_TIMEOUT_MS) * 2; wait_info.wq = &phys_enc->pending_kickoff_wq; wait_info.atomic_cnt = &phys_enc->pending_retire_fence_cnt; wait_info.timeout_ms = KICKOFF_TIMEOUT_MS; wait_info.timeout_ms = timeout_ms; /* slave encoder doesn't enable for ppsplit */ if (_sde_encoder_phys_is_ppsplit_slave(phys_enc)) Loading msm/sde/sde_kms.c +6 −11 Original line number Diff line number Diff line Loading @@ -1589,7 +1589,7 @@ static void sde_kms_prepare_fence(struct msm_kms *kms, { struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state; int i, rc; int i; if (!kms || !old_state || !old_state->dev || !old_state->acquire_ctx) { SDE_ERROR("invalid argument(s)\n"); Loading @@ -1597,15 +1597,6 @@ static void sde_kms_prepare_fence(struct msm_kms *kms, } SDE_ATRACE_BEGIN("sde_kms_prepare_fence"); retry: /* attempt to acquire ww mutex for connection */ rc = drm_modeset_lock(&old_state->dev->mode_config.connection_mutex, old_state->acquire_ctx); if (rc == -EDEADLK) { drm_modeset_backoff(old_state->acquire_ctx); goto retry; } /* old_state actually contains updated crtc pointers */ for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { Loading Loading @@ -3501,6 +3492,11 @@ static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms, if (sde_encoder_in_clone_mode(conn->encoder)) continue; crtc_id = drm_crtc_index(conn->state->crtc); if (priv->disp_thread[crtc_id].thread) kthread_flush_worker( &priv->disp_thread[crtc_id].worker); ret = sde_encoder_wait_for_event(conn->encoder, MSM_ENC_TX_COMPLETE); if (ret && ret != -EWOULDBLOCK) { Loading @@ -3508,7 +3504,6 @@ static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms, "[conn: %d] wait for commit done returned %d\n", conn->base.id, ret); } else if (!ret) { crtc_id = drm_crtc_index(conn->state->crtc); if (priv->event_thread[crtc_id].thread) kthread_flush_worker( &priv->event_thread[crtc_id].worker); Loading msm/sde_dbg.c +18 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,18 @@ struct sde_dbg_evtlog *sde_dbg_base_evtlog; /* sde_dbg_base_reglog - global pointer to main sde reg log for macro use */ struct sde_dbg_reglog *sde_dbg_base_reglog; u32 sde_mini_dump_add_region(const char *name, u32 size, void *virt_addr) { struct md_region md_entry; strlcpy(md_entry.name, name, sizeof(md_entry.name)); md_entry.virt_addr = (uintptr_t)virt_addr; md_entry.phys_addr = virt_to_phys(virt_addr); md_entry.size = size; return msm_minidump_add_region(&md_entry); } static void _sde_debug_bus_xbar_dump(void __iomem *mem_base, struct sde_debug_bus_entry *entry, u32 val, u32 block_id_off, u32 test_id_off) Loading Loading @@ -856,6 +868,9 @@ static void _sde_dbg_dump_sde_dbg_bus(struct sde_dbg_sde_debug_bus *bus) dev_info(sde_dbg_base.dev, "%s: start_addr:0x%pK len:0x%x\n", __func__, dump_addr, list_size); if (sde_mini_dump_add_region("sde_dbgbus", list_size, *dump_mem) < 0) pr_err("minidump add sde debug bus failed\n"); } else { in_mem = false; pr_err("dump_mem: allocation fails\n"); Loading Loading @@ -986,6 +1001,9 @@ static void _sde_dbg_dump_vbif_dbg_bus(struct sde_dbg_vbif_debug_bus *bus) dev_info(sde_dbg_base.dev, "%s: start_addr:0x%pK len:0x%x\n", __func__, dump_addr, list_size); if (sde_mini_dump_add_region("vbif_dbgbus", list_size, *dump_mem) < 0) pr_err("minidump add vbif debug bus failed\n"); } else { in_mem = false; pr_err("dump_mem: allocation fails\n"); Loading Loading
msm/msm_atomic.c +11 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (C) 2014 Red Hat * Author: Rob Clark <robdclark@gmail.com> * Loading Loading @@ -689,6 +689,16 @@ int msm_atomic_commit(struct drm_device *dev, c->plane_mask |= (1 << drm_plane_index(plane)); } /* Protection for prepare_fence callback */ retry: ret = drm_modeset_lock(&state->dev->mode_config.connection_mutex, state->acquire_ctx); if (ret == -EDEADLK) { drm_modeset_backoff(state->acquire_ctx); goto retry; } /* * Wait for pending updates on any of the same crtc's and then * mark our set of crtc's as busy: Loading
msm/sde/sde_crtc.c +4 −0 Original line number Diff line number Diff line Loading @@ -6148,6 +6148,9 @@ static int _sde_debugfs_fence_status_show(struct seq_file *s, void *data) dev = crtc->dev; cstate = to_sde_crtc_state(crtc->state); if (!sde_crtc->kickoff_in_progress) goto skip_input_fence; /* Dump input fence info */ seq_puts(s, "===Input fence===\n"); drm_atomic_crtc_for_each_plane(plane, crtc) { Loading Loading @@ -6175,6 +6178,7 @@ static int _sde_debugfs_fence_status_show(struct seq_file *s, void *data) } } skip_input_fence: /* Dump release fence info */ seq_puts(s, "\n"); seq_puts(s, "===Release fence===\n"); Loading
msm/sde/sde_encoder_phys_cmd.c +11 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ Loading Loading @@ -1509,20 +1509,27 @@ static int _sde_encoder_phys_cmd_wait_for_wr_ptr( struct sde_encoder_phys_cmd *cmd_enc = to_sde_encoder_phys_cmd(phys_enc); struct sde_encoder_wait_info wait_info = {0}; int ret; struct sde_connector *c_conn; bool frame_pending = true; struct sde_hw_ctl *ctl; unsigned long lock_flags; int ret, timeout_ms; if (!phys_enc || !phys_enc->hw_ctl) { if (!phys_enc || !phys_enc->hw_ctl || !phys_enc->connector) { SDE_ERROR("invalid argument(s)\n"); return -EINVAL; } ctl = phys_enc->hw_ctl; c_conn = to_sde_connector(phys_enc->connector); timeout_ms = KICKOFF_TIMEOUT_MS; if (c_conn->lp_mode == SDE_MODE_DPMS_LP1 || c_conn->lp_mode == SDE_MODE_DPMS_LP2) timeout_ms = (KICKOFF_TIMEOUT_MS) * 2; wait_info.wq = &phys_enc->pending_kickoff_wq; wait_info.atomic_cnt = &phys_enc->pending_retire_fence_cnt; wait_info.timeout_ms = KICKOFF_TIMEOUT_MS; wait_info.timeout_ms = timeout_ms; /* slave encoder doesn't enable for ppsplit */ if (_sde_encoder_phys_is_ppsplit_slave(phys_enc)) Loading
msm/sde/sde_kms.c +6 −11 Original line number Diff line number Diff line Loading @@ -1589,7 +1589,7 @@ static void sde_kms_prepare_fence(struct msm_kms *kms, { struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state; int i, rc; int i; if (!kms || !old_state || !old_state->dev || !old_state->acquire_ctx) { SDE_ERROR("invalid argument(s)\n"); Loading @@ -1597,15 +1597,6 @@ static void sde_kms_prepare_fence(struct msm_kms *kms, } SDE_ATRACE_BEGIN("sde_kms_prepare_fence"); retry: /* attempt to acquire ww mutex for connection */ rc = drm_modeset_lock(&old_state->dev->mode_config.connection_mutex, old_state->acquire_ctx); if (rc == -EDEADLK) { drm_modeset_backoff(old_state->acquire_ctx); goto retry; } /* old_state actually contains updated crtc pointers */ for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { Loading Loading @@ -3501,6 +3492,11 @@ static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms, if (sde_encoder_in_clone_mode(conn->encoder)) continue; crtc_id = drm_crtc_index(conn->state->crtc); if (priv->disp_thread[crtc_id].thread) kthread_flush_worker( &priv->disp_thread[crtc_id].worker); ret = sde_encoder_wait_for_event(conn->encoder, MSM_ENC_TX_COMPLETE); if (ret && ret != -EWOULDBLOCK) { Loading @@ -3508,7 +3504,6 @@ static void _sde_kms_pm_suspend_idle_helper(struct sde_kms *sde_kms, "[conn: %d] wait for commit done returned %d\n", conn->base.id, ret); } else if (!ret) { crtc_id = drm_crtc_index(conn->state->crtc); if (priv->event_thread[crtc_id].thread) kthread_flush_worker( &priv->event_thread[crtc_id].worker); Loading
msm/sde_dbg.c +18 −0 Original line number Diff line number Diff line Loading @@ -300,6 +300,18 @@ struct sde_dbg_evtlog *sde_dbg_base_evtlog; /* sde_dbg_base_reglog - global pointer to main sde reg log for macro use */ struct sde_dbg_reglog *sde_dbg_base_reglog; u32 sde_mini_dump_add_region(const char *name, u32 size, void *virt_addr) { struct md_region md_entry; strlcpy(md_entry.name, name, sizeof(md_entry.name)); md_entry.virt_addr = (uintptr_t)virt_addr; md_entry.phys_addr = virt_to_phys(virt_addr); md_entry.size = size; return msm_minidump_add_region(&md_entry); } static void _sde_debug_bus_xbar_dump(void __iomem *mem_base, struct sde_debug_bus_entry *entry, u32 val, u32 block_id_off, u32 test_id_off) Loading Loading @@ -856,6 +868,9 @@ static void _sde_dbg_dump_sde_dbg_bus(struct sde_dbg_sde_debug_bus *bus) dev_info(sde_dbg_base.dev, "%s: start_addr:0x%pK len:0x%x\n", __func__, dump_addr, list_size); if (sde_mini_dump_add_region("sde_dbgbus", list_size, *dump_mem) < 0) pr_err("minidump add sde debug bus failed\n"); } else { in_mem = false; pr_err("dump_mem: allocation fails\n"); Loading Loading @@ -986,6 +1001,9 @@ static void _sde_dbg_dump_vbif_dbg_bus(struct sde_dbg_vbif_debug_bus *bus) dev_info(sde_dbg_base.dev, "%s: start_addr:0x%pK len:0x%x\n", __func__, dump_addr, list_size); if (sde_mini_dump_add_region("vbif_dbgbus", list_size, *dump_mem) < 0) pr_err("minidump add vbif debug bus failed\n"); } else { in_mem = false; pr_err("dump_mem: allocation fails\n"); Loading