Loading drivers/gpu/msm/kgsl_device.h +2 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,7 @@ struct kgsl_device_private { * @sysfs_read: Count of current reads via sysfs * @first_read: True until the snapshot read is started * @gmu_fault: Snapshot collected when GMU fault happened * @recovered: True if GPU was recovered after previous snapshot */ struct kgsl_snapshot { uint64_t ib1base; Loading @@ -521,6 +522,7 @@ struct kgsl_snapshot { unsigned int sysfs_read; bool first_read; bool gmu_fault; bool recovered; }; /** Loading drivers/gpu/msm/kgsl_gmu.c +21 −23 Original line number Diff line number Diff line Loading @@ -1343,7 +1343,6 @@ void gmu_snapshot(struct kgsl_device *device) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_device *gmu = &device->gmu; if (!gmu->fault_count) { /* Mask so there's no interrupt caused by NMI */ adreno_write_gmureg(adreno_dev, ADRENO_REG_GMU_GMU2HOST_INTR_MASK, 0xFFFFFFFF); Loading @@ -1365,7 +1364,6 @@ void gmu_snapshot(struct kgsl_device *device) adreno_write_gmureg(adreno_dev, ADRENO_REG_GMU_GMU2HOST_INTR_MASK, (unsigned int) ~HFI_IRQ_MASK); } gmu->fault_count++; } Loading drivers/gpu/msm/kgsl_pwrctrl.c +3 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,9 @@ _aware(struct kgsl_device *device) * GPU will not be powered on */ WARN_ONCE(1, "Failed to recover GMU\n"); device->snapshot->recovered = false; } else { device->snapshot->recovered = true; } clear_bit(GMU_FAULT, &gmu->flags); Loading drivers/gpu/msm/kgsl_snapshot.c +2 −1 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ void kgsl_device_snapshot(struct kgsl_device *device, * Overwrite a non-GMU fault snapshot if a GMU fault occurs. */ if (device->snapshot != NULL) { if (!gmu_fault || device->snapshot->gmu_fault) if (!gmu_fault || !device->snapshot->recovered) return; /* Loading @@ -689,6 +689,7 @@ void kgsl_device_snapshot(struct kgsl_device *device, snapshot->ptr = device->snapshot_memory.ptr; snapshot->remain = device->snapshot_memory.size; snapshot->gmu_fault = gmu_fault; snapshot->recovered = false; snapshot->first_read = true; snapshot->sysfs_read = 0; Loading Loading
drivers/gpu/msm/kgsl_device.h +2 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,7 @@ struct kgsl_device_private { * @sysfs_read: Count of current reads via sysfs * @first_read: True until the snapshot read is started * @gmu_fault: Snapshot collected when GMU fault happened * @recovered: True if GPU was recovered after previous snapshot */ struct kgsl_snapshot { uint64_t ib1base; Loading @@ -521,6 +522,7 @@ struct kgsl_snapshot { unsigned int sysfs_read; bool first_read; bool gmu_fault; bool recovered; }; /** Loading
drivers/gpu/msm/kgsl_gmu.c +21 −23 Original line number Diff line number Diff line Loading @@ -1343,7 +1343,6 @@ void gmu_snapshot(struct kgsl_device *device) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_device *gmu = &device->gmu; if (!gmu->fault_count) { /* Mask so there's no interrupt caused by NMI */ adreno_write_gmureg(adreno_dev, ADRENO_REG_GMU_GMU2HOST_INTR_MASK, 0xFFFFFFFF); Loading @@ -1365,7 +1364,6 @@ void gmu_snapshot(struct kgsl_device *device) adreno_write_gmureg(adreno_dev, ADRENO_REG_GMU_GMU2HOST_INTR_MASK, (unsigned int) ~HFI_IRQ_MASK); } gmu->fault_count++; } Loading
drivers/gpu/msm/kgsl_pwrctrl.c +3 −0 Original line number Diff line number Diff line Loading @@ -2691,6 +2691,9 @@ _aware(struct kgsl_device *device) * GPU will not be powered on */ WARN_ONCE(1, "Failed to recover GMU\n"); device->snapshot->recovered = false; } else { device->snapshot->recovered = true; } clear_bit(GMU_FAULT, &gmu->flags); Loading
drivers/gpu/msm/kgsl_snapshot.c +2 −1 Original line number Diff line number Diff line Loading @@ -663,7 +663,7 @@ void kgsl_device_snapshot(struct kgsl_device *device, * Overwrite a non-GMU fault snapshot if a GMU fault occurs. */ if (device->snapshot != NULL) { if (!gmu_fault || device->snapshot->gmu_fault) if (!gmu_fault || !device->snapshot->recovered) return; /* Loading @@ -689,6 +689,7 @@ void kgsl_device_snapshot(struct kgsl_device *device, snapshot->ptr = device->snapshot_memory.ptr; snapshot->remain = device->snapshot_memory.size; snapshot->gmu_fault = gmu_fault; snapshot->recovered = false; snapshot->first_read = true; snapshot->sysfs_read = 0; Loading