diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index f64aa608..2540ab12 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -3748,21 +3748,24 @@ static int pmu_response_handle(struct pmu_gk20a *pmu, | |||
3748 | if (seq->msg) { | 3748 | if (seq->msg) { |
3749 | if (seq->msg->hdr.size >= msg->hdr.size) { | 3749 | if (seq->msg->hdr.size >= msg->hdr.size) { |
3750 | memcpy(seq->msg, msg, msg->hdr.size); | 3750 | memcpy(seq->msg, msg, msg->hdr.size); |
3751 | if (pv->pmu_allocation_get_dmem_size(pmu, | 3751 | } else { |
3752 | pv->get_pmu_seq_out_a_ptr(seq)) != 0) { | ||
3753 | pmu_copy_from_dmem(pmu, | ||
3754 | pv->pmu_allocation_get_dmem_offset(pmu, | ||
3755 | pv->get_pmu_seq_out_a_ptr(seq)), | ||
3756 | seq->out_payload, | ||
3757 | pv->pmu_allocation_get_dmem_size(pmu, | ||
3758 | pv->get_pmu_seq_out_a_ptr(seq)), 0); | ||
3759 | } | ||
3760 | } else { | ||
3761 | gk20a_err(dev_from_gk20a(g), | 3752 | gk20a_err(dev_from_gk20a(g), |
3762 | "sequence %d msg buffer too small", | 3753 | "sequence %d msg buffer too small", |
3763 | seq->id); | 3754 | seq->id); |
3764 | } | 3755 | } |
3765 | } | 3756 | } |
3757 | if (pv->pmu_allocation_get_dmem_size(pmu, | ||
3758 | pv->get_pmu_seq_out_a_ptr(seq)) != 0) { | ||
3759 | gk20a_err(dev_from_gk20a(g), "dmem offs %x size %x\n", pv->pmu_allocation_get_dmem_offset(pmu,pv->get_pmu_seq_out_a_ptr(seq)), pv->pmu_allocation_get_dmem_size(pmu, | ||
3760 | pv->get_pmu_seq_out_a_ptr(seq))); | ||
3761 | gk20a_err(dev_from_gk20a(g), "copying to %p \n", seq->out_payload); | ||
3762 | pmu_copy_from_dmem(pmu, | ||
3763 | pv->pmu_allocation_get_dmem_offset(pmu, | ||
3764 | pv->get_pmu_seq_out_a_ptr(seq)), | ||
3765 | seq->out_payload, | ||
3766 | pv->pmu_allocation_get_dmem_size(pmu, | ||
3767 | pv->get_pmu_seq_out_a_ptr(seq)), 0); | ||
3768 | } | ||
3766 | } else | 3769 | } else |
3767 | seq->callback = NULL; | 3770 | seq->callback = NULL; |
3768 | if (pv->pmu_allocation_get_dmem_size(pmu, | 3771 | if (pv->pmu_allocation_get_dmem_size(pmu, |
@@ -4584,6 +4587,7 @@ int gk20a_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, | |||
4584 | 4587 | ||
4585 | 4588 | ||
4586 | seq->state = PMU_SEQ_STATE_USED; | 4589 | seq->state = PMU_SEQ_STATE_USED; |
4590 | |||
4587 | err = pmu_write_cmd(pmu, cmd, queue_id, timeout); | 4591 | err = pmu_write_cmd(pmu, cmd, queue_id, timeout); |
4588 | if (err) | 4592 | if (err) |
4589 | seq->state = PMU_SEQ_STATE_PENDING; | 4593 | seq->state = PMU_SEQ_STATE_PENDING; |