Loading drivers/gpu/msm/adreno.c +8 −0 Original line number Diff line number Diff line Loading @@ -2074,6 +2074,14 @@ static int _adreno_start(struct adreno_device *adreno_dev) if (status) goto error_oob_clear; /* * At this point it is safe to assume that we recovered. Setting * this field allows us to take a new snapshot for the next failure * if we are prioritizing the first unrecoverable snapshot. */ if (device->snapshot) device->snapshot->recovered = true; /* Start the dispatcher */ adreno_dispatcher_start(device); Loading drivers/gpu/msm/adreno_dispatch.c +0 −8 Original line number Diff line number Diff line Loading @@ -2225,14 +2225,6 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev) atomic_add(halt, &adreno_dev->halt); /* * At this point it is safe to assume that we recovered. Setting * this field allows us to take a new snapshot for the next failure * if we are prioritizing the first unrecoverable snapshot. */ if (device->snapshot) device->snapshot->recovered = true; return 1; } Loading drivers/gpu/msm/kgsl_snapshot.c +20 −8 Original line number Diff line number Diff line Loading @@ -628,14 +628,20 @@ void kgsl_device_snapshot(struct kgsl_device *device, /* increment the hang count for good book keeping */ device->snapshot_faultcount++; if (device->snapshot != NULL) { /* * Overwrite a fault snapshot only if GMU is * enabled and we managed to recover from it. * Snapshot over-write policy: * 1. By default, don't over-write the very first snapshot, * be it a gmu or gpu fault. * 2. Never over-write existing snapshot on a gpu fault. * 3. Never over-write a snapshot that we didn't recover from. * 4. In order to over-write a new gmu fault snapshot with a * previously recovered fault, then set the sysfs knob * prioritize_recoverable to true. */ if (device->snapshot != NULL) { if (!gmu_core_gpmu_isenabled(device) || !device->prioritize_unrecoverable || !device->snapshot->recovered) if (!device->prioritize_unrecoverable || !device->snapshot->recovered || !gmu_fault) return; /* Loading Loading @@ -1083,10 +1089,16 @@ int kgsl_device_snapshot_init(struct kgsl_device *device) device->snapshot = NULL; device->snapshot_faultcount = 0; device->force_panic = false; device->prioritize_unrecoverable = true; device->snapshot_crashdumper = true; device->snapshot_legacy = false; /* * Set this to false so that we only ever keep the first snapshot around * If we want to over-write with a gmu snapshot, then set it to true * via sysfs */ device->prioritize_unrecoverable = false; ret = kobject_init_and_add(&device->snapshot_kobj, &ktype_snapshot, &device->dev->kobj, "snapshot"); if (ret) Loading Loading
drivers/gpu/msm/adreno.c +8 −0 Original line number Diff line number Diff line Loading @@ -2074,6 +2074,14 @@ static int _adreno_start(struct adreno_device *adreno_dev) if (status) goto error_oob_clear; /* * At this point it is safe to assume that we recovered. Setting * this field allows us to take a new snapshot for the next failure * if we are prioritizing the first unrecoverable snapshot. */ if (device->snapshot) device->snapshot->recovered = true; /* Start the dispatcher */ adreno_dispatcher_start(device); Loading
drivers/gpu/msm/adreno_dispatch.c +0 −8 Original line number Diff line number Diff line Loading @@ -2225,14 +2225,6 @@ static int dispatcher_do_fault(struct adreno_device *adreno_dev) atomic_add(halt, &adreno_dev->halt); /* * At this point it is safe to assume that we recovered. Setting * this field allows us to take a new snapshot for the next failure * if we are prioritizing the first unrecoverable snapshot. */ if (device->snapshot) device->snapshot->recovered = true; return 1; } Loading
drivers/gpu/msm/kgsl_snapshot.c +20 −8 Original line number Diff line number Diff line Loading @@ -628,14 +628,20 @@ void kgsl_device_snapshot(struct kgsl_device *device, /* increment the hang count for good book keeping */ device->snapshot_faultcount++; if (device->snapshot != NULL) { /* * Overwrite a fault snapshot only if GMU is * enabled and we managed to recover from it. * Snapshot over-write policy: * 1. By default, don't over-write the very first snapshot, * be it a gmu or gpu fault. * 2. Never over-write existing snapshot on a gpu fault. * 3. Never over-write a snapshot that we didn't recover from. * 4. In order to over-write a new gmu fault snapshot with a * previously recovered fault, then set the sysfs knob * prioritize_recoverable to true. */ if (device->snapshot != NULL) { if (!gmu_core_gpmu_isenabled(device) || !device->prioritize_unrecoverable || !device->snapshot->recovered) if (!device->prioritize_unrecoverable || !device->snapshot->recovered || !gmu_fault) return; /* Loading Loading @@ -1083,10 +1089,16 @@ int kgsl_device_snapshot_init(struct kgsl_device *device) device->snapshot = NULL; device->snapshot_faultcount = 0; device->force_panic = false; device->prioritize_unrecoverable = true; device->snapshot_crashdumper = true; device->snapshot_legacy = false; /* * Set this to false so that we only ever keep the first snapshot around * If we want to over-write with a gmu snapshot, then set it to true * via sysfs */ device->prioritize_unrecoverable = false; ret = kobject_init_and_add(&device->snapshot_kobj, &ktype_snapshot, &device->dev->kobj, "snapshot"); if (ret) Loading