|
@@ -1,6 +1,6 @@
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
/*
|
|
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
|
|
|
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
|
*/
|
|
*/
|
|
|
|
|
|
@@ -709,6 +709,13 @@ static int write_kick_off_v1(struct sde_reg_dma_kickoff_cfg *cfg)
|
|
SDE_EVT32(val);
|
|
SDE_EVT32(val);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (cfg->last_command) {
|
|
|
|
+ /* ensure all packets are queued in packet queue before
|
|
|
|
+ * queuing last command descriptor (last command)
|
|
|
|
+ */
|
|
|
|
+ wmb();
|
|
|
|
+ }
|
|
|
|
+
|
|
if (cfg->dma_type == REG_DMA_TYPE_DB) {
|
|
if (cfg->dma_type == REG_DMA_TYPE_DB) {
|
|
SDE_REG_WRITE(&hw, reg_dma_ctl_queue_off[cfg->ctl->idx],
|
|
SDE_REG_WRITE(&hw, reg_dma_ctl_queue_off[cfg->ctl->idx],
|
|
cfg->dma_buf->iova);
|
|
cfg->dma_buf->iova);
|
|
@@ -722,6 +729,9 @@ static int write_kick_off_v1(struct sde_reg_dma_kickoff_cfg *cfg)
|
|
}
|
|
}
|
|
|
|
|
|
if (cfg->last_command) {
|
|
if (cfg->last_command) {
|
|
|
|
+ /* ensure last command is queued before lut dma trigger */
|
|
|
|
+ wmb();
|
|
|
|
+
|
|
mask = ctl_trigger_done_mask[cfg->ctl->idx][cfg->queue_select];
|
|
mask = ctl_trigger_done_mask[cfg->ctl->idx][cfg->queue_select];
|
|
SDE_REG_WRITE(&hw, reg_dma_intr_0_clear_offset[cfg->ctl->idx][cfg->queue_select],
|
|
SDE_REG_WRITE(&hw, reg_dma_intr_0_clear_offset[cfg->ctl->idx][cfg->queue_select],
|
|
mask);
|
|
mask);
|