mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: reduce CCM for "nvgpu_rc_pbdma_fault"
- This API has CCM of 12, it should be <= 10. JIRA NVGPU-7057 Change-Id: I42f1972c29aaa179760a4fb7c6d1f7112456520e Signed-off-by: shashank singh <shashsingh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2602678 (cherry picked from commit c601f8b6bb07a504e01b57c42c1964b885744cbf) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2745517 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Sagar Kamble <skamble@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
2ca87051e1
commit
b1802085f2
@@ -101,10 +101,13 @@ int nvgpu_rc_pbdma_fault(struct gk20a *g, u32 pbdma_id, u32 error_notifier,
|
||||
u32 id_type = PBDMA_STATUS_ID_TYPE_INVALID;
|
||||
int err = 0;
|
||||
u32 id;
|
||||
struct nvgpu_tsg *tsg = NULL;
|
||||
struct nvgpu_channel *ch = NULL;
|
||||
|
||||
if (error_notifier >= NVGPU_ERR_NOTIFIER_INVAL) {
|
||||
nvgpu_err(g, "Invalid error notifier %u", error_notifier);
|
||||
err = -EINVAL;
|
||||
nvgpu_sw_quiesce(g);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -126,45 +129,51 @@ int nvgpu_rc_pbdma_fault(struct gk20a *g, u32 pbdma_id, u32 error_notifier,
|
||||
} else {
|
||||
nvgpu_err(g, "pbdma status not valid");
|
||||
err = -EINVAL;
|
||||
nvgpu_sw_quiesce(g);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (id_type == PBDMA_STATUS_ID_TYPE_TSGID) {
|
||||
struct nvgpu_tsg *tsg = nvgpu_tsg_get_from_id(g, id);
|
||||
switch (id_type) {
|
||||
case PBDMA_STATUS_ID_TYPE_TSGID:
|
||||
{
|
||||
tsg = nvgpu_tsg_get_from_id(g, id);
|
||||
|
||||
nvgpu_tsg_set_error_notifier(g, tsg, error_notifier);
|
||||
nvgpu_rc_tsg_and_related_engines(g, tsg, true,
|
||||
RC_TYPE_PBDMA_FAULT);
|
||||
} else if(id_type == PBDMA_STATUS_ID_TYPE_CHID) {
|
||||
struct nvgpu_channel *ch = nvgpu_channel_from_id(g, id);
|
||||
struct nvgpu_tsg *tsg;
|
||||
nvgpu_rc_tsg_and_related_engines(g, tsg, true, RC_TYPE_PBDMA_FAULT);
|
||||
break;
|
||||
}
|
||||
case PBDMA_STATUS_ID_TYPE_CHID:
|
||||
{
|
||||
ch = nvgpu_channel_from_id(g, id);
|
||||
if (ch == NULL) {
|
||||
nvgpu_err(g, "channel is not referenceable");
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
nvgpu_sw_quiesce(g);
|
||||
break;
|
||||
}
|
||||
|
||||
tsg = nvgpu_tsg_from_ch(ch);
|
||||
if (tsg != NULL) {
|
||||
nvgpu_tsg_set_error_notifier(g, tsg, error_notifier);
|
||||
nvgpu_rc_tsg_and_related_engines(g, tsg, true,
|
||||
RC_TYPE_PBDMA_FAULT);
|
||||
} else {
|
||||
if (tsg == NULL) {
|
||||
nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid);
|
||||
nvgpu_channel_put(ch);
|
||||
err = -EINVAL;
|
||||
nvgpu_sw_quiesce(g);
|
||||
break;
|
||||
}
|
||||
nvgpu_tsg_set_error_notifier(g, tsg, error_notifier);
|
||||
nvgpu_rc_tsg_and_related_engines(g, tsg, true, RC_TYPE_PBDMA_FAULT);
|
||||
|
||||
nvgpu_channel_put(ch);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
nvgpu_err(g, "Invalid pbdma_status id_type or next_id_type");
|
||||
err = -EINVAL;
|
||||
nvgpu_sw_quiesce(g);
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
if (err != 0) {
|
||||
nvgpu_sw_quiesce(g);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user