3
3
* Copyright © 2009 Joakim Sindholt <opensource@zhasha.com>
4
4
* Copyright © 2011 Marek Olšák <maraeo@gmail.com>
5
5
* Copyright © 2015 Advanced Micro Devices, Inc.
8
* Permission is hereby granted, free of charge, to any person obtaining
9
* a copy of this software and associated documentation files (the
10
* "Software"), to deal in the Software without restriction, including
11
* without limitation the rights to use, copy, modify, merge, publish,
12
* distribute, sub license, and/or sell copies of the Software, and to
13
* permit persons to whom the Software is furnished to do so, subject to
14
* the following conditions:
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
* NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
20
* AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
23
* USE OR OTHER DEALINGS IN THE SOFTWARE.
25
* The above copyright notice and this permission notice (including the
26
* next paragraph) shall be included in all copies or substantial portions
7
* SPDX-License-Identifier: MIT
30
10
#include "amdgpu_cs.h"
95
75
const struct pipe_screen_config *config,
98
if (!ac_query_gpu_info(fd, ws->dev, &ws->info))
78
if (!ac_query_gpu_info(fd, ws->dev, &ws->info, false))
101
ac_query_pci_bus_info(fd, &ws->info);
103
81
/* TODO: Enable this once the kernel handles it efficiently. */
104
82
if (ws->info.has_dedicated_vram)
105
83
ws->info.has_local_buffers = false;