diff options
author | Samuel Li <[email protected]> | 2017-06-06 18:21:08 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-07 21:53:36 +0200 |
commit | c705caaff9e6cc874e90651d6f8e459741978b06 (patch) | |
tree | 4a1d9da31ed321150576505255ed00368196d5d3 /src/gallium/winsys | |
parent | 4ba4f0e97673bae2d3a8b7e5bac3210a4c2d944e (diff) |
radeonsi: Use libdrm to get chipset name
v2: Add a func pointer to radeon_winsys to support radeon later.
Change-Id: I614ea71424f9e5c97e4ae68654315d28c89eaa5f
Signed-off-by: Samuel Li <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 43f2ed2fbf4..2cbc39c0c70 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -221,6 +221,13 @@ static bool amdgpu_winsys_unref(struct radeon_winsys *rws) return destroy; } +static const char* amdgpu_get_chip_name(struct radeon_winsys *ws) +{ + amdgpu_device_handle dev = ((struct amdgpu_winsys *)ws)->dev; + return amdgpu_get_marketing_name(dev); +} + + PUBLIC struct radeon_winsys * amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create) { @@ -296,6 +303,7 @@ amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create) ws->base.cs_request_feature = amdgpu_cs_request_feature; ws->base.query_value = amdgpu_query_value; ws->base.read_registers = amdgpu_read_registers; + ws->base.get_chip_name = amdgpu_get_chip_name; amdgpu_bo_init_functions(ws); amdgpu_cs_init_functions(ws); |