Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98ff4b94 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Improve GPU snapshot design"

parents 963ffb8e a411409e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
@@ -521,6 +522,7 @@ struct kgsl_snapshot {
	unsigned int sysfs_read;
	bool first_read;
	bool gmu_fault;
	bool recovered;
};

/**
+21 −23
Original line number Diff line number Diff line
@@ -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);
@@ -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++;
}
+3 −0
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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;

		/*
@@ -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;