Re: [PATCH] drm/amd/display: fix compilation error due to shifting negative value

2023-06-02 Thread Hamza Mahfooz

On 6/2/23 06:12, GONG, Ruiqi wrote:

Currently compiling linux-next with allmodconfig triggers the following
error:

./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 
‘dc_fixpt_truncate’:
./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:528:22: error: 
left shift of negative value [-Werror=shift-negative-value]
   528 |  arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
   |  ^~

Use `unsigned long long` instead.

Signed-off-by: GONG, Ruiqi 


Applied, thanks!


---
  drivers/gpu/drm/amd/display/include/fixed31_32.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h 
b/drivers/gpu/drm/amd/display/include/fixed31_32.h
index ece97ae0e826..d4cf7ead1d87 100644
--- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
+++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
@@ -525,7 +525,7 @@ static inline struct fixed31_32 dc_fixpt_truncate(struct 
fixed31_32 arg, unsigne
  
  	if (negative)

arg.value = -arg.value;
-   arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
+   arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
if (negative)
arg.value = -arg.value;
return arg;

--
Hamza



[PATCH] drm/amd/display: fix compilation error due to shifting negative value

2023-06-02 Thread GONG, Ruiqi
Currently compiling linux-next with allmodconfig triggers the following
error:

./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h: In function 
‘dc_fixpt_truncate’:
./drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:528:22: error: 
left shift of negative value [-Werror=shift-negative-value]
  528 |  arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
  |  ^~

Use `unsigned long long` instead.

Signed-off-by: GONG, Ruiqi 
---
 drivers/gpu/drm/amd/display/include/fixed31_32.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h 
b/drivers/gpu/drm/amd/display/include/fixed31_32.h
index ece97ae0e826..d4cf7ead1d87 100644
--- a/drivers/gpu/drm/amd/display/include/fixed31_32.h
+++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h
@@ -525,7 +525,7 @@ static inline struct fixed31_32 dc_fixpt_truncate(struct 
fixed31_32 arg, unsigne
 
if (negative)
arg.value = -arg.value;
-   arg.value &= (~0LL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
+   arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - 
frac_bits);
if (negative)
arg.value = -arg.value;
return arg;
-- 
2.25.1



Re: [PATCH] drm/amd/display: [FIX] Compilation error

2020-10-05 Thread Rodrigo Siqueira
Reviewed-by: Rodrigo Siqueira 

On 10/02, Qingqing Zhuo wrote:
> [Why]
> ifdef mismatch.
> 
> [How]
> Update to the correct flag.
> 
> Signed-off-by: Qingqing Zhuo 
> Cc: 
> ---
>  drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h 
> b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
> index 389ca0d54d1b..829cd9a93ba9 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
> @@ -189,7 +189,7 @@
>  
>  #define ABM_MASK_SH_LIST_DCN20(mask_sh) ABM_MASK_SH_LIST_DCE110(mask_sh)
>  
> -#if defined(CONFIG_DRM_AMD_DC_DCN3_01)
> +#if defined(CONFIG_DRM_AMD_DC_DCN3_0) || defined(CONFIG_DRM_AMD_DC_DCN3_01)
>  #define ABM_MASK_SH_LIST_DCN301(mask_sh) ABM_MASK_SH_LIST_DCN10(mask_sh)
>  #endif
>  
> -- 
> 2.17.1
> 

-- 
Rodrigo Siqueira
https://siqueira.tech


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


Re: [PATCH] drm/amd/display: [FIX] Compilation error

2020-10-03 Thread Stephen Rothwell
Hi Qingqing,

On Fri, 2 Oct 2020 19:56:08 -0400 Qingqing Zhuo  wrote:
>
> [Why]
> ifdef mismatch.
> 
> [How]
> Update to the correct flag.
> 
> Signed-off-by: Qingqing Zhuo 
> Cc: 

This needs a Fixes: tag (if possible) and the error message, please.

-- 
Cheers,
Stephen Rothwell


pgpe3VtcahQGq.pgp
Description: OpenPGP digital signature
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amd/display: [FIX] Compilation error

2020-10-02 Thread Qingqing Zhuo
[Why]
ifdef mismatch.

[How]
Update to the correct flag.

Signed-off-by: Qingqing Zhuo 
Cc: 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
index 389ca0d54d1b..829cd9a93ba9 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
@@ -189,7 +189,7 @@
 
 #define ABM_MASK_SH_LIST_DCN20(mask_sh) ABM_MASK_SH_LIST_DCE110(mask_sh)
 
-#if defined(CONFIG_DRM_AMD_DC_DCN3_01)
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0) || defined(CONFIG_DRM_AMD_DC_DCN3_01)
 #define ABM_MASK_SH_LIST_DCN301(mask_sh) ABM_MASK_SH_LIST_DCN10(mask_sh)
 #endif
 
-- 
2.17.1

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


[PATCH] drm/amd/display: [FIX] Compilation error

2020-10-02 Thread Qingqing Zhuo
[Why]
ifdef mismatch.

[How]
Update to the correct flag.

Signed-off-by: Qingqing Zhuo 
Cc: 
---
 drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h 
b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
index 389ca0d54d1b..24f7fe374e13 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.h
@@ -189,7 +189,7 @@
 
 #define ABM_MASK_SH_LIST_DCN20(mask_sh) ABM_MASK_SH_LIST_DCE110(mask_sh)
 
-#if defined(CONFIG_DRM_AMD_DC_DCN3_01)
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
 #define ABM_MASK_SH_LIST_DCN301(mask_sh) ABM_MASK_SH_LIST_DCN10(mask_sh)
 #endif
 
-- 
2.17.1

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


Re: [PATCH] drm/amd/display: Fix compilation error on dcn3

2020-07-14 Thread Deucher, Alexander
[AMD Public Use]

Reviewed-by: Alex Deucher 

From: Siqueira, Rodrigo 
Sent: Tuesday, July 14, 2020 8:06 AM
To: amd-gfx@lists.freedesktop.org 
Cc: Wentland, Harry ; Li, Sun peng (Leo) 
; Deucher, Alexander ; Teng, Rui 
; Laktyushkin, Dmytro ; 
Kazlauskas, Nicholas ; Lee, Alvin 

Subject: [PATCH] drm/amd/display: Fix compilation error on dcn3

We have a compilation error when compiling dcn30_resource.c due to a
missing field in _vcs_dpi_soc_bounding_box_st. This commit fixes this
issue by introducing the required field and include file.

Cc: Rui Teng 
Cc: Dmytro Laktyushkin 
Cc: Nicholas Kazlauskas 
Cc: Alvin Lee 
Signed-off-by: Rodrigo Siqueira 
---
 drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h 
b/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
index 0fac7f754604..6ab74640c0da 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
@@ -24,6 +24,7 @@
  */

 #include "dc_features.h"
+#include "display_mode_enums.h"

 #ifndef __DISPLAY_MODE_STRUCTS_H__
 #define __DISPLAY_MODE_STRUCTS_H__
@@ -120,6 +121,7 @@ struct _vcs_dpi_soc_bounding_box_st {
 double urgent_latency_adjustment_fabric_clock_reference_mhz;
 bool disable_dram_clock_change_vactive_support;
 bool allow_dram_clock_one_display_vactive;
+   enum self_refresh_affinity 
allow_dram_self_refresh_or_dram_clock_change_in_vblank;
 };

 struct _vcs_dpi_ip_params_st {
--
2.27.0

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


[PATCH] drm/amd/display: Fix compilation error on dcn3

2020-07-14 Thread Rodrigo Siqueira
We have a compilation error when compiling dcn30_resource.c due to a
missing field in _vcs_dpi_soc_bounding_box_st. This commit fixes this
issue by introducing the required field and include file.

Cc: Rui Teng 
Cc: Dmytro Laktyushkin 
Cc: Nicholas Kazlauskas 
Cc: Alvin Lee 
Signed-off-by: Rodrigo Siqueira 
---
 drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h 
b/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
index 0fac7f754604..6ab74640c0da 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h
@@ -24,6 +24,7 @@
  */
 
 #include "dc_features.h"
+#include "display_mode_enums.h"
 
 #ifndef __DISPLAY_MODE_STRUCTS_H__
 #define __DISPLAY_MODE_STRUCTS_H__
@@ -120,6 +121,7 @@ struct _vcs_dpi_soc_bounding_box_st {
double urgent_latency_adjustment_fabric_clock_reference_mhz;
bool disable_dram_clock_change_vactive_support;
bool allow_dram_clock_one_display_vactive;
+   enum self_refresh_affinity 
allow_dram_self_refresh_or_dram_clock_change_in_vblank;
 };
 
 struct _vcs_dpi_ip_params_st {
-- 
2.27.0

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


Re: [PATCH] drm/amd/display: fix compilation error

2019-06-13 Thread Alex Deucher
On Thu, Jun 13, 2019 at 2:42 PM Sam Ravnborg  wrote:
>
> Hi Alex.
>
> On Wed, Jun 12, 2019 at 10:35:26PM -0400, Alex Deucher wrote:
> > On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam
> >  wrote:
> > >
> > > this patch fixes below compilation error
> > >
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
> > > function ‘dcn10_apply_ctx_for_surface’:
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
> > > error: implicit declaration of function ‘udelay’
> > > [-Werror=implicit-function-declaration]
> > >udelay(underflow_check_delay_us);
> > >
> > > Signed-off-by: Hariprasad Kelam 
>
> Am I right in assuming you took this patch?
>
> I expect that new code using udelay was added to the amd tree,
> and when merged with drm-misc-next it failed, because drm-misc-next no
> longer had drmP.h included so no implicit include of delay.h
>
> The root cause was that my original patchset should have been based
> on the amd tree, and applied there :-(

No worries.  I've picked it up.

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

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-13 Thread Sam Ravnborg
Hi Alex.

On Wed, Jun 12, 2019 at 10:35:26PM -0400, Alex Deucher wrote:
> On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam
>  wrote:
> >
> > this patch fixes below compilation error
> >
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
> > function ‘dcn10_apply_ctx_for_surface’:
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
> > error: implicit declaration of function ‘udelay’
> > [-Werror=implicit-function-declaration]
> >udelay(underflow_check_delay_us);
> >
> > Signed-off-by: Hariprasad Kelam 

Am I right in assuming you took this patch?

I expect that new code using udelay was added to the amd tree,
and when merged with drm-misc-next it failed, because drm-misc-next no
longer had drmP.h included so no implicit include of delay.h

The root cause was that my original patchset should have been based
on the amd tree, and applied there :-(

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

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-13 Thread Daniel Vetter
On Thu, Jun 13, 2019 at 08:18:54AM +0530, Hariprasad Kelam wrote:
> On Wed, Jun 12, 2019 at 10:35:26PM -0400, Alex Deucher wrote:
> > On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam
> >  wrote:
> > >
> > > this patch fixes below compilation error
> > >
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
> > > function ‘dcn10_apply_ctx_for_surface’:
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
> > > error: implicit declaration of function ‘udelay’
> > > [-Werror=implicit-function-declaration]
> > >udelay(underflow_check_delay_us);
> > >
> > > Signed-off-by: Hariprasad Kelam 
> > 
> > What branch is this patch based on?
> > 
> > Alex
> 
> Hi Alex,
> 
> It is on linux-next

drm-misc-next has Sam's header cleanup. I guess we pull linux/delay.h in
implicitly somewhere, but not for all configs.
-Daniel

> 
> Thanks,
> Hariprasad k
> > > ---
> > >  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
> > > b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > index d2352949..1ac9a4f 100644
> > > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > @@ -23,6 +23,7 @@
> > >   *
> > >   */
> > >
> > > +#include 
> > >  #include "dm_services.h"
> > >  #include "core_types.h"
> > >  #include "resource.h"
> > > --
> > > 2.7.4
> > >
> > > ___
> > > amd-gfx mailing list
> > > amd-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Hariprasad Kelam
On Wed, Jun 12, 2019 at 10:35:26PM -0400, Alex Deucher wrote:
> On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam
>  wrote:
> >
> > this patch fixes below compilation error
> >
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
> > function ‘dcn10_apply_ctx_for_surface’:
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
> > error: implicit declaration of function ‘udelay’
> > [-Werror=implicit-function-declaration]
> >udelay(underflow_check_delay_us);
> >
> > Signed-off-by: Hariprasad Kelam 
> 
> What branch is this patch based on?
> 
> Alex

Hi Alex,

It is on linux-next

Thanks,
Hariprasad k
> > ---
> >  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
> > b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > index d2352949..1ac9a4f 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > @@ -23,6 +23,7 @@
> >   *
> >   */
> >
> > +#include 
> >  #include "dm_services.h"
> >  #include "core_types.h"
> >  #include "resource.h"
> > --
> > 2.7.4
> >
> > ___
> > 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

Re: [PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Alex Deucher
On Wed, Jun 12, 2019 at 10:34 PM Hariprasad Kelam
 wrote:
>
> this patch fixes below compilation error
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
> function ‘dcn10_apply_ctx_for_surface’:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
> error: implicit declaration of function ‘udelay’
> [-Werror=implicit-function-declaration]
>udelay(underflow_check_delay_us);
>
> Signed-off-by: Hariprasad Kelam 

What branch is this patch based on?

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
> b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index d2352949..1ac9a4f 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -23,6 +23,7 @@
>   *
>   */
>
> +#include 
>  #include "dm_services.h"
>  #include "core_types.h"
>  #include "resource.h"
> --
> 2.7.4
>
> ___
> 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

[PATCH] drm/amd/display: fix compilation error

2019-06-12 Thread Hariprasad Kelam
this patch fixes below compilation error

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In
function ‘dcn10_apply_ctx_for_surface’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3:
error: implicit declaration of function ‘udelay’
[-Werror=implicit-function-declaration]
   udelay(underflow_check_delay_us);

Signed-off-by: Hariprasad Kelam 
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index d2352949..1ac9a4f 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -23,6 +23,7 @@
  *
  */
 
+#include 
 #include "dm_services.h"
 #include "core_types.h"
 #include "resource.h"
-- 
2.7.4

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