Lines Matching refs:hw_sema
147 struct hw_sema_t *hw_sema = mtk_smmu_get_hw_sema_cfg(id); in mtk_smmu_pm_get() local
151 if (!hw_sema || !hw_sema->active) in mtk_smmu_pm_get()
154 spin_lock(&hw_sema->lock); in mtk_smmu_pm_get()
155 count = vote_count(hw_sema); in mtk_smmu_pm_get()
158 __func__, id, source_id, hw_sema->vote[source_id], count); in mtk_smmu_pm_get()
162 vote_count_inc(hw_sema, source_id); in mtk_smmu_pm_get()
169 ret = mm_pm_get_if_in_use(hw_sema, source_id); in mtk_smmu_pm_get()
173 vote_count_inc(hw_sema, source_id); in mtk_smmu_pm_get()
176 count = vote_count(hw_sema); in mtk_smmu_pm_get()
178 __func__, id, source_id, hw_sema->vote[source_id], count, ret); in mtk_smmu_pm_get()
180 spin_unlock(&hw_sema->lock); in mtk_smmu_pm_get()
186 struct hw_sema_t *hw_sema = mtk_smmu_get_hw_sema_cfg(id); in mtk_smmu_pm_put() local
190 if (!hw_sema || !hw_sema->active) in mtk_smmu_pm_put()
193 spin_lock(&hw_sema->lock); in mtk_smmu_pm_put()
194 count = vote_count(hw_sema); in mtk_smmu_pm_put()
197 __func__, id, source_id, hw_sema->vote[source_id], count); in mtk_smmu_pm_put()
205 if (hw_sema->vote[source_id] == 0) { in mtk_smmu_pm_put()
212 vote_count_dec(hw_sema, source_id); in mtk_smmu_pm_put()
213 count = vote_count(hw_sema); in mtk_smmu_pm_put()
220 ret = mm_pm_put(hw_sema, source_id); in mtk_smmu_pm_put()
224 __func__, id, source_id, hw_sema->vote[source_id], count, ret); in mtk_smmu_pm_put()
226 spin_unlock(&hw_sema->lock); in mtk_smmu_pm_put()