From 86709ba5373730a438602459e104bf0a9a49559d Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 22 Apr 2013 14:49:28 -0400 Subject: [PATCH] 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 --- freedreno/freedreno_drmif.h | 1 + freedreno/freedreno_pipe.c | 3 +++ 2 files changed, 4 insertions(+) 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;