summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-04-22 14:49:28 -0400
committerRob Clark <robclark@freedesktop.org>2013-04-22 14:49:28 -0400
commit86709ba5373730a438602459e104bf0a9a49559d (patch)
tree447caaffdfeb2bea9adeb577388c90c3544444f3 /freedreno
parent9768af201e9aba2093c80a8da3632fe9e4c044fe (diff)
freedreno: add gpu-id property
Gallium driver will need to query this to figure out whether to load the a2xx or a3xx driver. Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/freedreno_drmif.h1
-rw-r--r--freedreno/freedreno_pipe.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/freedreno/freedreno_drmif.h b/freedreno/freedreno_drmif.h
index 775d6995..ba99afde 100644
--- a/freedreno/freedreno_drmif.h
+++ b/freedreno/freedreno_drmif.h
@@ -48,6 +48,7 @@ enum fd_pipe_id {
enum fd_param_id {
FD_DEVICE_ID,
FD_GMEM_SIZE,
+ FD_GPU_ID,
};
/* bo flags: */
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 49949ecc..1698c466 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -142,6 +142,9 @@ int fd_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
case FD_DEVICE_ID:
*value = pipe->devinfo.device_id;
return 0;
+ case FD_GPU_ID:
+ *value = pipe->devinfo.gpu_id;
+ return 0;
case FD_GMEM_SIZE:
*value = pipe->devinfo.gmem_sizebytes;
return 0;