diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-08-30 04:13:10 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-31 15:21:12 -0400 |
commit | 5c1354bd30c118326236e13cfdc49db03d2b5855 (patch) | |
tree | cbcbcabc509367914f3224167c6aa2fa12e5b487 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 78fbb6859b739f7f67c820ab8c9e7a25add977b5 (diff) |
drm/amdgpu: link all gtt when binding them V2
V2:
spin lock instead of mutex for gtt list
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index f95bcb80dde3..bfdd445a8bb6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1577,6 +1577,9 @@ int amdgpu_device_init(struct amdgpu_device *adev, | |||
1577 | INIT_LIST_HEAD(&adev->shadow_list); | 1577 | INIT_LIST_HEAD(&adev->shadow_list); |
1578 | mutex_init(&adev->shadow_list_lock); | 1578 | mutex_init(&adev->shadow_list_lock); |
1579 | 1579 | ||
1580 | INIT_LIST_HEAD(&adev->gtt_list); | ||
1581 | spin_lock_init(&adev->gtt_list_lock); | ||
1582 | |||
1580 | if (adev->asic_type >= CHIP_BONAIRE) { | 1583 | if (adev->asic_type >= CHIP_BONAIRE) { |
1581 | adev->rmmio_base = pci_resource_start(adev->pdev, 5); | 1584 | adev->rmmio_base = pci_resource_start(adev->pdev, 5); |
1582 | adev->rmmio_size = pci_resource_len(adev->pdev, 5); | 1585 | adev->rmmio_size = pci_resource_len(adev->pdev, 5); |
@@ -1584,6 +1587,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, | |||
1584 | adev->rmmio_base = pci_resource_start(adev->pdev, 2); | 1587 | adev->rmmio_base = pci_resource_start(adev->pdev, 2); |
1585 | adev->rmmio_size = pci_resource_len(adev->pdev, 2); | 1588 | adev->rmmio_size = pci_resource_len(adev->pdev, 2); |
1586 | } | 1589 | } |
1590 | |||
1587 | adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size); | 1591 | adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size); |
1588 | if (adev->rmmio == NULL) { | 1592 | if (adev->rmmio == NULL) { |
1589 | return -ENOMEM; | 1593 | return -ENOMEM; |