]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: add new virtual display ID
authorYintian Tao <yttao@amd.com>
Sun, 22 Jan 2017 07:16:51 +0000 (15:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 17:20:37 +0000 (12:20 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 786c3c3bb48de4b73b632c34f46d571fa452d780..c6ce0c586d593c3beb2bef38fd3b2af85cb8e53e 100644 (file)
@@ -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;