diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 957537a9..6677798b 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -3884,9 +3884,20 @@ int gk20a_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, | |||
3884 | 3884 | ||
3885 | gk20a_dbg_fn(""); | 3885 | gk20a_dbg_fn(""); |
3886 | 3886 | ||
3887 | BUG_ON(!cmd); | 3887 | if ((!cmd) || (!seq_desc) || (!pmu->pmu_ready)) { |
3888 | BUG_ON(!seq_desc); | 3888 | if (!cmd) |
3889 | BUG_ON(!pmu->pmu_ready); | 3889 | gk20a_warn(dev_from_gk20a(g), |
3890 | "%s(): PMU cmd buffer is NULL", __func__); | ||
3891 | else if (!seq_desc) | ||
3892 | gk20a_warn(dev_from_gk20a(g), | ||
3893 | "%s(): Seq descriptor is NULL", __func__); | ||
3894 | else | ||
3895 | gk20a_warn(dev_from_gk20a(g), | ||
3896 | "%s(): PMU is not ready", __func__); | ||
3897 | |||
3898 | WARN_ON(1); | ||
3899 | return -EINVAL; | ||
3900 | } | ||
3890 | 3901 | ||
3891 | if (!pmu_validate_cmd(pmu, cmd, msg, payload, queue_id)) | 3902 | if (!pmu_validate_cmd(pmu, cmd, msg, payload, queue_id)) |
3892 | return -EINVAL; | 3903 | return -EINVAL; |