summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYintian Tao <yttao@amd.com>2017-01-22 15:16:51 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 12:20:37 -0500
commit967de2a9dcd52b248e447608fa03d30db4eb05ed (patch)
tree872920f63d224d658a9564d57a98565511aeb86a
parent50ddc75e32bba7cce994d530ec27aec697a372f8 (diff)
downloadlinux-967de2a9dcd52b248e447608fa03d30db4eb05ed.tar.bz2
drm/amdgpu: add new virtual display ID
In the case of pass-through, amdgpu.ko may be included into a image with the hard code ID therefore loading driver with specified virtual display ID will lose efficacy when the BDF of GPU modifies.So add the new ID string "all" for it as same as vf case what does. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Yintian Tao <yttao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 786c3c3bb48d..c6ce0c586d59 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1257,7 +1257,8 @@ static void amdgpu_device_enable_virtual_display(struct amdgpu_device *adev)
pciaddstr_tmp = pciaddstr;
while ((pciaddname_tmp = strsep(&pciaddstr_tmp, ";"))) {
pciaddname = strsep(&pciaddname_tmp, ",");
- if (!strcmp(pci_address_name, pciaddname)) {
+ if (!strcmp("all", pciaddname)
+ || !strcmp(pci_address_name, pciaddname)) {
long num_crtc;
int res = -1;