Loading drivers/gpu/msm/adreno.c +12 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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, Loading include/uapi/linux/msm_kgsl.h +6 −1 Original line number Diff line number Diff line /* 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 Loading Loading @@ -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. Loading Loading @@ -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 Loading
drivers/gpu/msm/adreno.c +12 −0 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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, Loading
include/uapi/linux/msm_kgsl.h +6 −1 Original line number Diff line number Diff line /* 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 Loading Loading @@ -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. Loading Loading @@ -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