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

Commit 5ec39eda 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: Remove superfluous NULL checks when reading timestamps"

parents 8d298eb5 eca608a5
Loading
Loading
Loading
Loading
+4 −18
Original line number Diff line number Diff line
@@ -2437,13 +2437,6 @@ int adreno_rb_readtimestamp(struct adreno_device *adreno_dev,
	int status = 0;
	struct adreno_ringbuffer *rb = priv;

	/*
	 * If user passed in a NULL pointer for timestamp, return without
	 * doing anything.
	 */
	if (!timestamp)
		return status;

	if (KGSL_TIMESTAMP_QUEUED == type)
		*timestamp = rb->timestamp;
	else
@@ -2474,19 +2467,12 @@ static int adreno_readtimestamp(struct kgsl_device *device,
{
	int status = 0;
	struct kgsl_context *context = priv;
	unsigned int id = KGSL_CONTEXT_ID(context);

	BUG_ON(NULL == context || id >= KGSL_MEMSTORE_MAX);
	/*
	 * If user passed in a NULL pointer for timestamp, return without
	 * doing anything.
	 */
	if (!timestamp)
		return status;
	if (KGSL_TIMESTAMP_QUEUED == type) {
		struct adreno_context *ctxt = ADRENO_CONTEXT(context);

	if (KGSL_TIMESTAMP_QUEUED == type)
		*timestamp = adreno_context_timestamp(context);
	else
		*timestamp = ctxt->timestamp;
	} else
		status = __adreno_readtimestamp(ADRENO_DEVICE(device),
				context->id, type, timestamp);

+0 −12
Original line number Diff line number Diff line
@@ -967,18 +967,6 @@ static inline int adreno_is_a540v1(struct adreno_device *adreno_dev)
	return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A540) &&
		(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
}
/**
 * adreno_context_timestamp() - Return the last queued timestamp for the context
 * @k_ctxt: Pointer to the KGSL context to query
 *
 * Return the last queued context for the given context. This is used to verify
 * that incoming requests are not using an invalid (unsubmitted) timestamp
 */
static inline int adreno_context_timestamp(struct kgsl_context *k_ctxt)
{
	struct adreno_context *drawctxt = ADRENO_CONTEXT(k_ctxt);
	return drawctxt->timestamp;
}

/*
 * adreno_checkreg_off() - Checks the validity of a register enum