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

Commit f0dd632b 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: For soft fault detect only check rbbm_status"

parents 5103cdfd c7b80d71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2213,7 +2213,7 @@ bool adreno_hw_isidle(struct adreno_device *adreno_dev)
	adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS,
		&reg_rbbm_status);

	if (reg_rbbm_status & ~0x80000001)
	if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK)
		return false;

	/* Don't consider ourselves idle if there is an IRQ pending */
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@
#define DEVICE_3D_NAME "kgsl-3d"
#define DEVICE_3D0_NAME "kgsl-3d0"

#define ADRENO_RBBM_STATUS_BUSY_MASK	~0x80000001

#define ADRENO_PRIORITY_MAX_RB_LEVELS	4

/* ADRENO_DEVICE - Given a kgsl_device return the adreno device struct */
+7 −11
Original line number Diff line number Diff line
@@ -170,24 +170,20 @@ static void fault_detect_read(struct kgsl_device *device)
static inline bool _isidle(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	unsigned int ts, i;
	unsigned int i;
	unsigned int reg_rbbm_status;

	if (!kgsl_state_is_awake(device))
		goto ret;

	/* If GPU HW status is not idle then return false */
	if (!adreno_hw_isidle(adreno_dev))
		return false;
	adreno_readreg(adreno_dev, ADRENO_REG_RBBM_STATUS,
			&reg_rbbm_status);

	/*
	 * only compare the current RB timestamp because the device has gone
	 * idle and therefore only the current RB ts can be equal, the other
	 * RB's may not be scheduled by dispatcher yet
	 * Check if gpu is busy by checking bits in RBBM_STATUS register
	 * which indicate gpu activity
	 */
	if (adreno_rb_readtimestamp(device,
		adreno_dev->cur_rb, KGSL_TIMESTAMP_RETIRED, &ts))
		return false;
	if (ts != adreno_dev->cur_rb->timestamp)
	if (reg_rbbm_status & ADRENO_RBBM_STATUS_BUSY_MASK)
		return false;
ret:
	for (i = 0; i < adreno_ft_regs_num; i++)