<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 31.05.2017 um 18:29 schrieb Deucher,
Alexander:<br>
</div>
<blockquote type="cite"
cite="mid:BN6PR12MB16529494252B5889988E00BBF7F10@BN6PR12MB1652.namprd12.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">> -----Original Message-----<br>
> From: amd-gfx [<a
href="mailto:amd-gfx-bounces@lists.freedesktop.org"
moz-do-not-send="true">mailto:amd-gfx-bounces@lists.freedesktop.org</a>]
On Behalf<br>
> Of Huang Rui<br>
> Sent: Wednesday, May 31, 2017 12:15 PM<br>
> To: <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>; Deucher, Alexander;
Koenig, Christian<br>
> Cc: Wang, Ken; Huang, Ray; Huan, Alvin<br>
> Subject: [PATCH 18/18] drm/amdgpu: fix the gart table
cleared issue for S3<br>
> <br>
> Signed-off-by: Huang Rui <a class="moz-txt-link-rfc2396E" href="mailto:ray.huang@amd.com"><ray.huang@amd.com></a><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-<br>
> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 ++<br>
> drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 ++<br>
> drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 ++<br>
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++<br>
> 6 files changed, 11 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
> index 37f9869..50ed985 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
> @@ -624,6 +624,7 @@ struct amdgpu_mc {<br>
> uint32_t srbm_soft_reset;<br>
> struct amdgpu_mode_mc_save save;<br>
> bool prt_warning;<br>
> + unsigned long stollen_size;<br>
<br>
Typo: stolen_size<br>
With that fixed:<br>
Reviewed-by: Alex Deucher <a class="moz-txt-link-rfc2396E" href="mailto:alexander.deucher@amd.com"><alexander.deucher@amd.com></a><br>
</div>
</span></font></blockquote>
<br>
Additional to that this should be an uint64_t otherwise 32bit
systems will break.<br>
<br>
Please also add a "/* TODO: Figure out how to avoid that... */ to
setting the size to 8MB on Vega10.<br>
<br>
With that fixed Reviewed-by: Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a>.<br>
<br>
<blockquote type="cite"
cite="mid:BN6PR12MB16529494252B5889988E00BBF7F10@BN6PR12MB1652.namprd12.prod.outlook.com"><font
size="2"><span style="font-size:10pt;">
<div class="PlainText">
<br>
> /* apertures */<br>
> u64
shared_aperture_start;<br>
> u64
shared_aperture_end;<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> index 29c0deb..0406759 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
> @@ -1381,7 +1381,7 @@ int amdgpu_ttm_init(struct
amdgpu_device *adev)<br>
> /* Change the size here instead of the init
above so only lpfn is<br>
> affected */<br>
> amdgpu_ttm_set_active_vram_size(adev, adev-<br>
> >mc.visible_vram_size);<br>
> <br>
> - r = amdgpu_bo_create(adev, 256 * 1024, PAGE_SIZE,
true,<br>
> + r = amdgpu_bo_create(adev,
adev->mc.stollen_size, PAGE_SIZE,<br>
> true,<br>
> AMDGPU_GEM_DOMAIN_VRAM,<br>
>
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED<br>
> |<br>
>
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
> index d576edc..540adae 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
> @@ -873,6 +873,8 @@ static int gmc_v6_0_sw_init(void
*handle)<br>
> <br>
> adev->mc.mc_mask = 0xffffffffffULL;<br>
> <br>
> + adev->mc.stollen_size = 256 * 1024;<br>
> +<br>
> adev->need_dma32 = false;<br>
> dma_bits = adev->need_dma32 ? 32 : 40;<br>
> r = pci_set_dma_mask(adev->pdev,
DMA_BIT_MASK(dma_bits));<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c<br>
> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c<br>
> index 681dda3..92e6e20 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c<br>
> @@ -1060,6 +1060,8 @@ static int gmc_v7_0_sw_init(void
*handle)<br>
> */<br>
> adev->mc.mc_mask = 0xffffffffffULL; /* 40 bit
MC */<br>
> <br>
> + adev->mc.stollen_size = 256 * 1024;<br>
> +<br>
> /* set DMA mask + need_dma32 flags.<br>
> * PCIE - can handle 40-bits.<br>
> * IGP - can handle 40-bits<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c<br>
> b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c<br>
> index b5a3852..7738f4c 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c<br>
> @@ -1148,6 +1148,8 @@ static int gmc_v8_0_sw_init(void
*handle)<br>
> */<br>
> adev->mc.mc_mask = 0xffffffffffULL; /* 40 bit
MC */<br>
> <br>
> + adev->mc.stollen_size = 256 * 1024;<br>
> +<br>
> /* set DMA mask + need_dma32 flags.<br>
> * PCIE - can handle 40-bits.<br>
> * IGP - can handle 40-bits<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
> index fed00f7..31f4f44 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
> @@ -591,6 +591,9 @@ static int gmc_v9_0_sw_init(void
*handle)<br>
> */<br>
> adev->mc.mc_mask = 0xffffffffffffULL; /* 48
bit MC */<br>
> <br>
> + /* it needs to reserve 8M stollen memory for
vega10 */<br>
> + adev->mc.stollen_size = 8 * 1024 * 1024;<br>
> +<br>
> /* set DMA mask + need_dma32 flags.<br>
> * PCIE - can handle 44-bits.<br>
> * IGP - can handle 44-bits<br>
> --<br>
> 2.7.4<br>
> <br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
> <a
href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font>
</blockquote>
<p><br>
</p>
</body>
</html>