msm: kgsl: Add property to determine GPU bitness
Add the property to determine GPU bitness which is used by the clients via KGSL ioctl. Certain clients of KGSL such as Open-CL driver need to know explicitly about the GPU mode. Change-Id: I77523d7816edb9776014aaf3aa85321af0d20aaf Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
This commit is contained in:
parent
6b8e9c2af6
commit
f667066182
2 changed files with 21 additions and 0 deletions
|
@ -1855,6 +1855,26 @@ static int adreno_getproperty(struct kgsl_device *device,
|
|||
}
|
||||
status = 0;
|
||||
break;
|
||||
case KGSL_PROP_DEVICE_BITNESS:
|
||||
{
|
||||
unsigned int bitness = 32;
|
||||
|
||||
if (sizebytes != sizeof(unsigned int)) {
|
||||
status = -EINVAL;
|
||||
break;
|
||||
}
|
||||
/* No of bits used by the GPU */
|
||||
if (adreno_support_64bit(adreno_dev))
|
||||
bitness = 48;
|
||||
|
||||
if (copy_to_user(value, &bitness,
|
||||
sizeof(unsigned int))) {
|
||||
status = -EFAULT;
|
||||
break;
|
||||
}
|
||||
status = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
status = -EINVAL;
|
||||
|
|
|
@ -307,6 +307,7 @@ enum kgsl_timestamp_type {
|
|||
#define KGSL_PROP_UCODE_VERSION 0x15
|
||||
#define KGSL_PROP_GPMU_VERSION 0x16
|
||||
#define KGSL_PROP_HIGHEST_BANK_BIT 0x17
|
||||
#define KGSL_PROP_DEVICE_BITNESS 0x18
|
||||
|
||||
struct kgsl_shadowprop {
|
||||
unsigned long gpuaddr;
|
||||
|
|
Loading…
Add table
Reference in a new issue