Skip to content

Commit

Permalink
drm/amdkgd: Temporary fix for HBM width
Browse files Browse the repository at this point in the history
The current computation for vram width is outdated. For permanent
solution this has to be fixed.

Change-Id: I1ec2895fae698def72d5047961bdf041f92f8194
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
  • Loading branch information
Harish Kasiviswanathan authored and Andres Rodriguez committed Apr 14, 2016
1 parent 7973237 commit 11fd00e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
break;
}
adev->mc.vram_width = numchan * chansize;
/* FIXME: The above calculation is outdated.
* For HBM provide a temporary fix */
if (adev->mc.vram_type == AMDGPU_VRAM_TYPE_HBM)
adev->mc.vram_width = AMDGPU_VRAM_TYPE_HBM_WIDTH;

/* Could aper size report 0 ? */
adev->mc.aper_base = pci_resource_start(adev->pdev, 0);
adev->mc.aper_size = pci_resource_len(adev->pdev, 0);
Expand Down
2 changes: 2 additions & 0 deletions include/uapi/drm/amdgpu_drm.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ struct drm_amdgpu_info_firmware {
#define AMDGPU_VRAM_TYPE_HBM 6
#define AMDGPU_VRAM_TYPE_DDR3 7

#define AMDGPU_VRAM_TYPE_HBM_WIDTH 4096

struct drm_amdgpu_info_device {
/** PCI Device ID */
uint32_t device_id;
Expand Down

0 comments on commit 11fd00e

Please sign in to comment.