summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-12-09 19:59:21 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-09 19:59:21 -0800
commitcfd61208ea8de5da4db85feb3334fb349ce6acee (patch)
tree9029981890ba34dcec2013a0cbdd3ded557b09ba /drivers/gpu/msm
parent6a1ef577f43d9cf6903c3e99b77a03eca43102de (diff)
parentac4034d803e0adee0dfa826fadf607f6bf4d148d (diff)
Merge "ARM: dts: msm: Add GPU coresight properties for msm8998"
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r--drivers/gpu/msm/adreno.h2
-rw-r--r--drivers/gpu/msm/adreno_coresight.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h
index 1c30b43fdfcf..2c8345aadc07 100644
--- a/drivers/gpu/msm/adreno.h
+++ b/drivers/gpu/msm/adreno.h
@@ -676,11 +676,13 @@ ssize_t adreno_coresight_store_register(struct device *dev,
* @registers - Array of GPU specific registers to configure trace bus output
* @count - Number of registers in the array
* @groups - Pointer to an attribute list of control files
+ * @atid - The unique ATID value of the coresight device
*/
struct adreno_coresight {
struct adreno_coresight_register *registers;
unsigned int count;
const struct attribute_group **groups;
+ unsigned int atid;
};
diff --git a/drivers/gpu/msm/adreno_coresight.c b/drivers/gpu/msm/adreno_coresight.c
index 02a39278ccb3..901e2144c6d8 100644
--- a/drivers/gpu/msm/adreno_coresight.c
+++ b/drivers/gpu/msm/adreno_coresight.c
@@ -200,6 +200,9 @@ static int _adreno_coresight_set(struct adreno_device *adreno_dev)
kgsl_regwrite(device, coresight->registers[i].offset,
coresight->registers[i].value);
+ kgsl_property_read_u32(device, "coresight-atid",
+ (unsigned int *)&(coresight->atid));
+
return 0;
}
/**
@@ -281,7 +284,16 @@ void adreno_coresight_start(struct adreno_device *adreno_dev)
_adreno_coresight_set(adreno_dev);
}
+static int adreno_coresight_trace_id(struct coresight_device *csdev)
+{
+ struct kgsl_device *device = dev_get_drvdata(csdev->dev.parent);
+ struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(ADRENO_DEVICE(device));
+
+ return gpudev->coresight->atid;
+}
+
static const struct coresight_ops_source adreno_coresight_source_ops = {
+ .trace_id = adreno_coresight_trace_id,
.enable = adreno_coresight_enable,
.disable = adreno_coresight_disable,
};