summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/msm/adreno.c22
-rw-r--r--drivers/gpu/msm/adreno.h12
2 files changed, 4 insertions, 30 deletions
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 24c5186340e5..fa981cf575a6 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -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 (type == KGSL_TIMESTAMP_QUEUED) {
+ 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);
diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h
index 875b186cde3f..b8029178f932 100644
--- a/drivers/gpu/msm/adreno.h
+++ b/drivers/gpu/msm/adreno.h
@@ -968,18 +968,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