mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
msm: kgsl: Add a property to query gpu model name
Usermode driver can query gpu model name to log it. So add support for new gpu model property. Change-Id: Ifc3a76c3e6856161e76dfbe26be2a950db71aa5e Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
This commit is contained in:
parent
6f46b62b26
commit
014a2f41ce
2 changed files with 18 additions and 1 deletions
|
|
@ -2339,6 +2339,17 @@ static int adreno_prop_device_info(struct kgsl_device *device,
|
|||
return copy_prop(param, &devinfo, sizeof(devinfo));
|
||||
}
|
||||
|
||||
static int adreno_prop_gpu_model(struct kgsl_device *device,
|
||||
struct kgsl_device_getproperty *param)
|
||||
{
|
||||
struct kgsl_gpu_model model = {0};
|
||||
|
||||
strlcpy(model.gpu_model, adreno_get_gpu_model(device),
|
||||
sizeof(model.gpu_model));
|
||||
|
||||
return copy_prop(param, &model, sizeof(model));
|
||||
}
|
||||
|
||||
static int adreno_prop_device_shadow(struct kgsl_device *device,
|
||||
struct kgsl_device_getproperty *param)
|
||||
{
|
||||
|
|
@ -2482,6 +2493,7 @@ static const struct {
|
|||
{ KGSL_PROP_DEVICE_BITNESS, adreno_prop_u32 },
|
||||
{ KGSL_PROP_SPEED_BIN, adreno_prop_u32 },
|
||||
{ KGSL_PROP_GAMING_BIN, adreno_prop_gaming_bin },
|
||||
{ KGSL_PROP_GPU_MODEL, adreno_prop_gpu_model},
|
||||
};
|
||||
|
||||
static int adreno_getproperty(struct kgsl_device *device,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_MSM_KGSL_H
|
||||
|
|
@ -341,6 +341,7 @@ enum kgsl_timestamp_type {
|
|||
#define KGSL_PROP_GAMING_BIN 0x26
|
||||
#define KGSL_PROP_QUERY_CAPABILITIES 0x27
|
||||
#define KGSL_PROP_CONTEXT_PROPERTY 0x28
|
||||
#define KGSL_PROP_GPU_MODEL 0x29
|
||||
|
||||
/*
|
||||
* kgsl_capabilities_properties returns a list of supported properties.
|
||||
|
|
@ -423,6 +424,10 @@ struct kgsl_context_property_fault {
|
|||
__u32 timestamp;
|
||||
};
|
||||
|
||||
struct kgsl_gpu_model {
|
||||
char gpu_model[32];
|
||||
};
|
||||
|
||||
/* Context property sub types */
|
||||
#define KGSL_CONTEXT_PROP_FAULTS 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue