All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB
@ 2017-01-24 14:09 Christian König
       [not found] ` <1485266973-1664-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2017-01-24 14:09 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Christian König <christian.koenig@amd.com>

Fixes "access stolen VRAM directly on KV/KB" otherwise that won't
work as expected with more than 4GB RAM.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index ccce04d..8d05e0c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -378,7 +378,7 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
 
 #ifdef CONFIG_X86_64
 	if (adev->flags & AMD_IS_APU) {
-		adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) << 22ULL;
+		adev->mc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
 		adev->mc.aper_size = adev->mc.real_vram_size;
 	}
 #endif
-- 
2.5.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ
       [not found] ` <1485266973-1664-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-01-24 14:09   ` Christian König
       [not found]     ` <1485266973-1664-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  2017-01-24 15:48   ` [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB Deucher, Alexander
  1 sibling, 1 reply; 5+ messages in thread
From: Christian König @ 2017-01-24 14:09 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Christian König <christian.koenig@amd.com>

Fixes "access stolen VRAM directly on CZ", otherwise that won't
work as expected with more than 4GB RAM.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index a564e89..7669b32 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -470,7 +470,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
 
 #ifdef CONFIG_X86_64
 	if (adev->flags & AMD_IS_APU) {
-		adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) << 22ULL;
+		adev->mc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
 		adev->mc.aper_size = adev->mc.real_vram_size;
 	}
 #endif
-- 
2.5.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ
       [not found]     ` <1485266973-1664-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-01-24 14:47       ` StDenis, Tom
  0 siblings, 0 replies; 5+ messages in thread
From: StDenis, Tom @ 2017-01-24 14:47 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1898 bytes --]

Works on my CZ system:


Ack-by: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>


________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
Sent: Tuesday, January 24, 2017 09:09
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ

From: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>

Fixes "access stolen VRAM directly on CZ", otherwise that won't
work as expected with more than 4GB RAM.

Signed-off-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index a564e89..7669b32 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -470,7 +470,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)

 #ifdef CONFIG_X86_64
         if (adev->flags & AMD_IS_APU) {
-               adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) << 22ULL;
+               adev->mc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
                 adev->mc.aper_size = adev->mc.real_vram_size;
         }
 #endif
--
2.5.0

_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - lists.freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
To see the collection of prior postings to the list, visit the amd-gfx Archives. Using amd-gfx: To post a message to all the list members, send email ...




[-- Attachment #1.2: Type: text/html, Size: 5082 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB
       [not found] ` <1485266973-1664-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  2017-01-24 14:09   ` [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ Christian König
@ 2017-01-24 15:48   ` Deucher, Alexander
       [not found]     ` <BN6PR12MB16529661EF1DA7D24876B445F7750-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Deucher, Alexander @ 2017-01-24 15:48 UTC (permalink / raw)
  To: 'Christian König', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Tuesday, January 24, 2017 9:10 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB
> 
> From: Christian König <christian.koenig@amd.com>
> 
> Fixes "access stolen VRAM directly on KV/KB" otherwise that won't
> work as expected with more than 4GB RAM.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Series is:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> index ccce04d..8d05e0c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> @@ -378,7 +378,7 @@ static int gmc_v7_0_mc_init(struct amdgpu_device
> *adev)
> 
>  #ifdef CONFIG_X86_64
>  	if (adev->flags & AMD_IS_APU) {
> -		adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) <<
> 22ULL;
> +		adev->mc.aper_base =
> ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
>  		adev->mc.aper_size = adev->mc.real_vram_size;
>  	}
>  #endif
> --
> 2.5.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB
       [not found]     ` <BN6PR12MB16529661EF1DA7D24876B445F7750-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-01-24 16:09       ` Felix Kuehling
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Kuehling @ 2017-01-24 16:09 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Series reviewed by me as well:

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


On 17-01-24 10:48 AM, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>> Of Christian König
>> Sent: Tuesday, January 24, 2017 9:10 AM
>> To: amd-gfx@lists.freedesktop.org
>> Subject: [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB
>>
>> From: Christian König <christian.koenig@amd.com>
>>
>> Fixes "access stolen VRAM directly on KV/KB" otherwise that won't
>> work as expected with more than 4GB RAM.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
> Series is:
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
>> index ccce04d..8d05e0c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
>> @@ -378,7 +378,7 @@ static int gmc_v7_0_mc_init(struct amdgpu_device
>> *adev)
>>
>>  #ifdef CONFIG_X86_64
>>  	if (adev->flags & AMD_IS_APU) {
>> -		adev->mc.aper_base = RREG32(mmMC_VM_FB_OFFSET) <<
>> 22ULL;
>> +		adev->mc.aper_base =
>> ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
>>  		adev->mc.aper_size = adev->mc.real_vram_size;
>>  	}
>>  #endif
>> --
>> 2.5.0
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-24 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 14:09 [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB Christian König
     [not found] ` <1485266973-1664-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-24 14:09   ` [PATCH 2/2] drm/amdgpu: fix 64bit shift for CZ Christian König
     [not found]     ` <1485266973-1664-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-24 14:47       ` StDenis, Tom
2017-01-24 15:48   ` [PATCH 1/2] drm/amdgpu: fix 64bit shift for KV/KB Deucher, Alexander
     [not found]     ` <BN6PR12MB16529661EF1DA7D24876B445F7750-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-24 16:09       ` Felix Kuehling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.