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

Commit 3ec1164c 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: Update GMU hang processing in adreno_stop"

parents 754f2699 f6c15bd7
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -1772,8 +1772,19 @@ static int adreno_stop(struct kgsl_device *device)
	 * because some idle level transitions require VBIF and MMU.
	 */
	if (gpudev->wait_for_lowest_idle &&
			gpudev->wait_for_lowest_idle(adreno_dev))
		return -EINVAL;
			gpudev->wait_for_lowest_idle(adreno_dev)) {
		struct gmu_device *gmu = &device->gmu;

		set_bit(GMU_FAULT, &gmu->flags);
		gmu_snapshot(device);
		/*
		 * Assume GMU hang after 10ms without responding.
		 * It shall be relative safe to clear vbif and stop
		 * MMU later. Early return in adreno_stop function
		 * will result in kernel panic in adreno_start
		 */
		error = -EINVAL;
	}

	adreno_vbif_clear_pending_transactions(device);

@@ -1787,7 +1798,7 @@ static int adreno_stop(struct kgsl_device *device)

	clear_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv);

	return 0;
	return error;
}

static inline bool adreno_try_soft_reset(struct kgsl_device *device, int fault)
+2 −1
Original line number Diff line number Diff line
@@ -1860,6 +1860,7 @@ static int a6xx_wait_for_lowest_idle(struct adreno_device *adreno_dev)

	dev_err(&gmu->pdev->dev,
		"Timeout waiting for lowest idle level: %d\n", reg);
	WARN_ON(1);
	return -ETIMEDOUT;
}

+1 −3
Original line number Diff line number Diff line
@@ -59,8 +59,6 @@ struct gmu_vma {
	unsigned int image_start;
};

static void gmu_snapshot(struct kgsl_device *device);

struct gmu_iommu_context {
	const char *name;
	struct device *dev;
@@ -1339,7 +1337,7 @@ static int gmu_suspend(struct kgsl_device *device)
	return 0;
}

static void gmu_snapshot(struct kgsl_device *device)
void gmu_snapshot(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct gmu_device *gmu = &device->gmu;
+1 −0
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ struct gmu_device {
	unsigned int fault_count;
};

void gmu_snapshot(struct kgsl_device *device);
bool kgsl_gmu_isenabled(struct kgsl_device *device);
int gmu_probe(struct kgsl_device *device);
void gmu_remove(struct kgsl_device *device);