Skip to content

Commit 1ff79a4

Browse files
austriancoderlynxeye-dev
authored andcommitted
drm/etnaviv: provide more ID values via GET_PARAM ioctl.
Make it possible for the user space to access these ID values. Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
1 parent 3650b22 commit 1ff79a4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ int etnaviv_gpu_get_param(struct etnaviv_gpu *gpu, u32 param, u64 *value)
156156
*value = ~0ULL;
157157
break;
158158

159+
case ETNAVIV_PARAM_GPU_PRODUCT_ID:
160+
*value = gpu->identity.product_id;
161+
break;
162+
163+
case ETNAVIV_PARAM_GPU_CUSTOMER_ID:
164+
*value = gpu->identity.customer_id;
165+
break;
166+
167+
case ETNAVIV_PARAM_GPU_ECO_ID:
168+
*value = gpu->identity.eco_id;
169+
break;
170+
159171
default:
160172
DBG("%s: invalid param: %u", dev_name(gpu->dev), param);
161173
return -EINVAL;

include/uapi/drm/etnaviv_drm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ struct drm_etnaviv_timespec {
7474
#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19
7575
#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a
7676
#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b
77+
#define ETNAVIV_PARAM_GPU_PRODUCT_ID 0x1c
78+
#define ETNAVIV_PARAM_GPU_CUSTOMER_ID 0x1d
79+
#define ETNAVIV_PARAM_GPU_ECO_ID 0x1e
7780

7881
#define ETNA_MAX_PIPES 4
7982

0 commit comments

Comments
 (0)