RE: [PATCH] drm/amd/display: fix static checker warning

2017-11-16 Thread S, Shirish
Done, applied to amd-staging-drm-next.

Thanks.

Regards,
Shirish S


-Original Message-
From: Wentland, Harry 
Sent: Tuesday, November 14, 2017 8:56 PM
To: S, Shirish <shiris...@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Dan Carpenter <dan.carpen...@oracle.com>
Subject: Re: [PATCH] drm/amd/display: fix static checker warning

On 2017-11-10 04:14 AM, S, Shirish wrote:
> From: Shirish S <shiris...@amd.com>
> 
> This patch fixes static checker warning of
> "warn: cast after binop" introduced by
> 56087b31 drm/amd/display: fix high part address in 
> dm_plane_helper_prepare_fb()
> 
> Signed-off-by: Shirish S <shiris...@amd.com>

Reviewed-by: Harry Wentland <harry.wentl...@amd.com>

Feel free to push to amd-staging-drm-next at your leisure.

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ed8b7524..0537523e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2955,7 +2955,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
> *plane,
>   = 
> lower_32_bits(afb->address);
>   
> plane_state->address.video_progressive.luma_addr.high_part
>   = 
> upper_32_bits(afb->address);
> - chroma_addr = afb->address + (u64)(awidth * 
> new_state->fb->height);
> + chroma_addr = afb->address + (u64)awidth * 
> new_state->fb->height;
>   
> plane_state->address.video_progressive.chroma_addr.low_part
>   = 
> lower_32_bits(chroma_addr);
>   
> plane_state->address.video_progressive.chroma_addr.high_part
> 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amd/display: fix static checker warning

2017-11-14 Thread Harry Wentland
On 2017-11-10 04:14 AM, S, Shirish wrote:
> From: Shirish S 
> 
> This patch fixes static checker warning of
> "warn: cast after binop" introduced by
> 56087b31 drm/amd/display: fix high part address in 
> dm_plane_helper_prepare_fb()
> 
> Signed-off-by: Shirish S 

Reviewed-by: Harry Wentland 

Feel free to push to amd-staging-drm-next at your leisure.

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ed8b7524..0537523e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2955,7 +2955,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
> *plane,
>   = 
> lower_32_bits(afb->address);
>   
> plane_state->address.video_progressive.luma_addr.high_part
>   = 
> upper_32_bits(afb->address);
> - chroma_addr = afb->address + (u64)(awidth * 
> new_state->fb->height);
> + chroma_addr = afb->address + (u64)awidth * 
> new_state->fb->height;
>   
> plane_state->address.video_progressive.chroma_addr.low_part
>   = 
> lower_32_bits(chroma_addr);
>   
> plane_state->address.video_progressive.chroma_addr.high_part
> 
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amd/display: fix static checker warning

2017-11-10 Thread Michel Dänzer
On 10/11/17 10:14 AM, S, Shirish wrote:
> From: Shirish S 
> 
> This patch fixes static checker warning of
> "warn: cast after binop" introduced by
> 56087b31 drm/amd/display: fix high part address in 
> dm_plane_helper_prepare_fb()
> 
> Signed-off-by: Shirish S 
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index ed8b7524..0537523e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2955,7 +2955,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
> *plane,
>   = 
> lower_32_bits(afb->address);
>   
> plane_state->address.video_progressive.luma_addr.high_part
>   = 
> upper_32_bits(afb->address);
> - chroma_addr = afb->address + (u64)(awidth * 
> new_state->fb->height);
> + chroma_addr = afb->address + (u64)awidth * 
> new_state->fb->height;
>   
> plane_state->address.video_progressive.chroma_addr.low_part
>   = 
> lower_32_bits(chroma_addr);
>   
> plane_state->address.video_progressive.chroma_addr.high_part
> 

Reviewed-by: Michel Dänzer 


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: FW: [PATCH] drm/amd/display: fix static checker warning

2017-11-10 Thread Michel Dänzer
On 10/11/17 06:10 AM, S, Shirish wrote:
> On 11/7/2017 2:06 PM, Michel Dänzer wrote:
>> On 07/11/17 04:29 AM, S, Shirish wrote:
>>> From: Shirish S 
>>>
>>> This patch fixes static checker warning of
>>> "warn: cast after binop" introduced by
>>> 4d3e00dad80a: "drm/amd/display : add high part address calculation for 
>>> underlay"
>>>
>>> Signed-off-by: Shirish S 
>>> ---
>>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
>>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> index a87e5ac..e1bdf5e 100644
>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> @@ -1827,7 +1827,7 @@ static int fill_plane_attributes_from_fb(struct 
>>> amdgpu_device *adev,
>>> = lower_32_bits(fb_location);
>>> plane_state->address.video_progressive.luma_addr.high_part
>>> = upper_32_bits(fb_location);
>>> -   chroma_addr = fb_location + (u64)(awidth * fb->height);
>>> +   chroma_addr = fb_location + (u64)awidth * fb->height;
>>> plane_state->address.video_progressive.chroma_addr.low_part
>>> = lower_32_bits(chroma_addr);
>>> plane_state->address.video_progressive.chroma_addr.high_part
>>> @@ -2959,7 +2959,7 @@ static int dm_plane_helper_prepare_fb(struct 
>>> drm_plane *plane,
>>> = 
>>> lower_32_bits(afb->address);
>>> 
>>> plane_state->address.video_progressive.luma_addr.high_part
>>> = 
>>> upper_32_bits(afb->address);
>>> -   chroma_addr = afb->address + (u64)(awidth * 
>>> new_state->fb->height);
>>> +   chroma_addr = afb->address + (u64)awidth * 
>>> new_state->fb->height;
>>> 
>>> plane_state->address.video_progressive.chroma_addr.low_part
>>> = 
>>> lower_32_bits(chroma_addr);
>>> 
>>> plane_state->address.video_progressive.chroma_addr.high_part
>>>
>> This code should really be removed, since fb_location is always 0 now 
>> in this function, so the values derived from it cannot be used for 
>> anything anyway.
> I remember Andrey had some concerns with it, if he is ok with it i
> can move it as a separate patch, for future bisect-ability.

Harry already removed this code in amd-staging-drm-next commit
f5887bb33b1e ("amdgpu/dm: Remove fb_location form fill_plane_attributes").


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


FW: [PATCH] drm/amd/display: fix static checker warning

2017-11-09 Thread S, Shirish

On 11/7/2017 2:06 PM, Michel Dänzer wrote:
> On 07/11/17 04:29 AM, S, Shirish wrote:
>> From: Shirish S 
>>
>> This patch fixes static checker warning of
>> "warn: cast after binop" introduced by
>> 4d3e00dad80a: "drm/amd/display : add high part address calculation for 
>> underlay"
>>
>> Signed-off-by: Shirish S 
>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
>> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index a87e5ac..e1bdf5e 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -1827,7 +1827,7 @@ static int fill_plane_attributes_from_fb(struct 
>> amdgpu_device *adev,
>>  = lower_32_bits(fb_location);
>>  plane_state->address.video_progressive.luma_addr.high_part
>>  = upper_32_bits(fb_location);
>> -chroma_addr = fb_location + (u64)(awidth * fb->height);
>> +chroma_addr = fb_location + (u64)awidth * fb->height;
>>  plane_state->address.video_progressive.chroma_addr.low_part
>>  = lower_32_bits(chroma_addr);
>>  plane_state->address.video_progressive.chroma_addr.high_part
>> @@ -2959,7 +2959,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
>> *plane,
>>  = 
>> lower_32_bits(afb->address);
>>  
>> plane_state->address.video_progressive.luma_addr.high_part
>>  = 
>> upper_32_bits(afb->address);
>> -chroma_addr = afb->address + (u64)(awidth * 
>> new_state->fb->height);
>> +chroma_addr = afb->address + (u64)awidth * 
>> new_state->fb->height;
>>  
>> plane_state->address.video_progressive.chroma_addr.low_part
>>  = 
>> lower_32_bits(chroma_addr);
>>  
>> plane_state->address.video_progressive.chroma_addr.high_part
>>
> This code should really be removed, since fb_location is always 0 now 
> in this function, so the values derived from it cannot be used for 
> anything anyway.
I remember Andrey had some concerns with it, if he is ok with it i can move it 
as a separate patch, for future bisect-ability.

Regards,
Shirish S
>
>

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


Re: [PATCH] drm/amd/display: fix static checker warning

2017-11-07 Thread Michel Dänzer
On 07/11/17 04:29 AM, S, Shirish wrote:
> From: Shirish S 
> 
> This patch fixes static checker warning of
> "warn: cast after binop" introduced by
> 4d3e00dad80a: "drm/amd/display : add high part address calculation for 
> underlay"
> 
> Signed-off-by: Shirish S 
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a87e5ac..e1bdf5e 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1827,7 +1827,7 @@ static int fill_plane_attributes_from_fb(struct 
> amdgpu_device *adev,
>   = lower_32_bits(fb_location);
>   plane_state->address.video_progressive.luma_addr.high_part
>   = upper_32_bits(fb_location);
> - chroma_addr = fb_location + (u64)(awidth * fb->height);
> + chroma_addr = fb_location + (u64)awidth * fb->height;
>   plane_state->address.video_progressive.chroma_addr.low_part
>   = lower_32_bits(chroma_addr);
>   plane_state->address.video_progressive.chroma_addr.high_part
> @@ -2959,7 +2959,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
> *plane,
>   = 
> lower_32_bits(afb->address);
>   
> plane_state->address.video_progressive.luma_addr.high_part
>   = 
> upper_32_bits(afb->address);
> - chroma_addr = afb->address + (u64)(awidth * 
> new_state->fb->height);
> + chroma_addr = afb->address + (u64)awidth * 
> new_state->fb->height;
>   
> plane_state->address.video_progressive.chroma_addr.low_part
>   = 
> lower_32_bits(chroma_addr);
>   
> plane_state->address.video_progressive.chroma_addr.high_part
> 

This code should really be removed, since fb_location is always 0 now in
this function, so the values derived from it cannot be used for anything
anyway.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amd/display: fix static checker warning

2017-11-06 Thread S, Shirish
From: Shirish S 

This patch fixes static checker warning of
"warn: cast after binop" introduced by
4d3e00dad80a: "drm/amd/display : add high part address calculation for underlay"

Signed-off-by: Shirish S 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a87e5ac..e1bdf5e 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1827,7 +1827,7 @@ static int fill_plane_attributes_from_fb(struct 
amdgpu_device *adev,
= lower_32_bits(fb_location);
plane_state->address.video_progressive.luma_addr.high_part
= upper_32_bits(fb_location);
-   chroma_addr = fb_location + (u64)(awidth * fb->height);
+   chroma_addr = fb_location + (u64)awidth * fb->height;
plane_state->address.video_progressive.chroma_addr.low_part
= lower_32_bits(chroma_addr);
plane_state->address.video_progressive.chroma_addr.high_part
@@ -2959,7 +2959,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane 
*plane,
= 
lower_32_bits(afb->address);

plane_state->address.video_progressive.luma_addr.high_part
= 
upper_32_bits(afb->address);
-   chroma_addr = afb->address + (u64)(awidth * 
new_state->fb->height);
+   chroma_addr = afb->address + (u64)awidth * 
new_state->fb->height;

plane_state->address.video_progressive.chroma_addr.low_part
= 
lower_32_bits(chroma_addr);

plane_state->address.video_progressive.chroma_addr.high_part
-- 
2.7.4

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