All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/4] amdgpu/dc/dml: Consolidate redundant CFLAGS
@ 2018-02-08 20:53 ` Matthias Kaehlcke
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
	Matthias Kaehlcke, amd-gfx, Guenter Roeck

Use a variable for common CFLAGS instead of specifying the same flags
for every source file.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- Use variable for compiler options instead of subdir-ccflags-y

 drivers/gpu/drm/amd/display/dc/dml/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 3488af2b5786..96b337a03172 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -24,15 +24,16 @@
 # It provides the general basic services required by other DAL
 # subcomponents.
 
-CFLAGS_display_mode_vba.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_mode_lib.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_pipe_clocks.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dml1_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_rq_dlg_helpers.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_soc_bounding_box.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dml_common_defs.o := -mhard-float -msse -mpreferred-stack-boundary=4
+dml_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
 
+CFLAGS_display_mode_vba.o := $(dml_ccflags)
+CFLAGS_display_mode_lib.o := $(dml_ccflags)
+CFLAGS_display_pipe_clocks.o := $(dml_ccflags)
+CFLAGS_display_rq_dlg_calc.o := $(dml_ccflags)
+CFLAGS_dml1_display_rq_dlg_calc.o := $(dml_ccflags)
+CFLAGS_display_rq_dlg_helpers.o := $(dml_ccflags)
+CFLAGS_soc_bounding_box.o := $(dml_ccflags)
+CFLAGS_dml_common_defs.o := $(dml_ccflags)
 
 DML = display_mode_lib.o display_rq_dlg_calc.o \
 	  display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v3 1/4] amdgpu/dc/dml: Consolidate redundant CFLAGS
@ 2018-02-08 20:53 ` Matthias Kaehlcke
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
	Craig Bergstrom, Matthias Kaehlcke

Use a variable for common CFLAGS instead of specifying the same flags
for every source file.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- Use variable for compiler options instead of subdir-ccflags-y

 drivers/gpu/drm/amd/display/dc/dml/Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 3488af2b5786..96b337a03172 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -24,15 +24,16 @@
 # It provides the general basic services required by other DAL
 # subcomponents.
 
-CFLAGS_display_mode_vba.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_mode_lib.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_pipe_clocks.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dml1_display_rq_dlg_calc.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_display_rq_dlg_helpers.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_soc_bounding_box.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dml_common_defs.o := -mhard-float -msse -mpreferred-stack-boundary=4
+dml_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
 
+CFLAGS_display_mode_vba.o := $(dml_ccflags)
+CFLAGS_display_mode_lib.o := $(dml_ccflags)
+CFLAGS_display_pipe_clocks.o := $(dml_ccflags)
+CFLAGS_display_rq_dlg_calc.o := $(dml_ccflags)
+CFLAGS_dml1_display_rq_dlg_calc.o := $(dml_ccflags)
+CFLAGS_display_rq_dlg_helpers.o := $(dml_ccflags)
+CFLAGS_soc_bounding_box.o := $(dml_ccflags)
+CFLAGS_dml_common_defs.o := $(dml_ccflags)
 
 DML = display_mode_lib.o display_rq_dlg_calc.o \
 	  display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \
-- 
2.16.0.rc1.238.g530d649a79-goog

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

* [PATCH v3 2/4] amdgpu/dc/calcs: Consolidate redundant CFLAGS
  2018-02-08 20:53 ` Matthias Kaehlcke
@ 2018-02-08 20:53   ` Matthias Kaehlcke
  -1 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
	Matthias Kaehlcke, amd-gfx, Guenter Roeck

Use a variable for common CFLAGS instead of specifying the same flags
for every source file.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- patch added

 drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index 7959e382ed28..af0f452f3c9f 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -24,9 +24,11 @@
 # It calculates Bandwidth and Watermarks values for HW programming
 #
 
-CFLAGS_dcn_calcs.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dcn_calc_auto.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dcn_calc_math.o := -mhard-float -msse -mpreferred-stack-boundary=4 -Wno-tautological-compare
+calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
+
+CFLAGS_dcn_calcs.o := $(calcs_ccflags)
+CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
+CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare
 
 BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o
 
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v3 2/4] amdgpu/dc/calcs: Consolidate redundant CFLAGS
@ 2018-02-08 20:53   ` Matthias Kaehlcke
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
	Craig Bergstrom, Matthias Kaehlcke

Use a variable for common CFLAGS instead of specifying the same flags
for every source file.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- patch added

 drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index 7959e382ed28..af0f452f3c9f 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -24,9 +24,11 @@
 # It calculates Bandwidth and Watermarks values for HW programming
 #
 
-CFLAGS_dcn_calcs.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dcn_calc_auto.o := -mhard-float -msse -mpreferred-stack-boundary=4
-CFLAGS_dcn_calc_math.o := -mhard-float -msse -mpreferred-stack-boundary=4 -Wno-tautological-compare
+calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
+
+CFLAGS_dcn_calcs.o := $(calcs_ccflags)
+CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
+CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare
 
 BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o
 
-- 
2.16.0.rc1.238.g530d649a79-goog

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

* [PATCH v3 3/4] amdgpu/dc/dml: Support clang option for stack alignment
  2018-02-08 20:53 ` Matthias Kaehlcke
@ 2018-02-08 20:53   ` Matthias Kaehlcke
  -1 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
	Matthias Kaehlcke, amd-gfx, Guenter Roeck

DML uses the compiler option -mpreferred-stack-boundary=4 to configure
a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
instead, which expects as parameter the alignment in bytes, and not a
power of two like -mpreferred-stack-boundary.

Probe for both compiler options and use the correct one, similar to
what is done in arch/x86/Makefile.

Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- adapted use of variable instead of subdir-ccflags-y

 drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 96b337a03172..782886cac61c 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -24,7 +24,13 @@
 # It provides the general basic services required by other DAL
 # subcomponents.
 
-dml_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
+ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
+	cc_stack_align := -mpreferred-stack-boundary=4
+else ifneq ($(call cc-option, -mstack-alignment=16),)
+	cc_stack_align := -mstack-alignment=16
+endif
+
+dml_ccflags := -mhard-float -msse $(cc_stack_align)
 
 CFLAGS_display_mode_vba.o := $(dml_ccflags)
 CFLAGS_display_mode_lib.o := $(dml_ccflags)
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH v3 3/4] amdgpu/dc/dml: Support clang option for stack alignment
@ 2018-02-08 20:53   ` Matthias Kaehlcke
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
	Craig Bergstrom, Matthias Kaehlcke

DML uses the compiler option -mpreferred-stack-boundary=4 to configure
a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
instead, which expects as parameter the alignment in bytes, and not a
power of two like -mpreferred-stack-boundary.

Probe for both compiler options and use the correct one, similar to
what is done in arch/x86/Makefile.

Reported-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- adapted use of variable instead of subdir-ccflags-y

 drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile
index 96b337a03172..782886cac61c 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile
@@ -24,7 +24,13 @@
 # It provides the general basic services required by other DAL
 # subcomponents.
 
-dml_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
+ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
+	cc_stack_align := -mpreferred-stack-boundary=4
+else ifneq ($(call cc-option, -mstack-alignment=16),)
+	cc_stack_align := -mstack-alignment=16
+endif
+
+dml_ccflags := -mhard-float -msse $(cc_stack_align)
 
 CFLAGS_display_mode_vba.o := $(dml_ccflags)
 CFLAGS_display_mode_lib.o := $(dml_ccflags)
-- 
2.16.0.rc1.238.g530d649a79-goog

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

* [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment
  2018-02-08 20:53 ` Matthias Kaehlcke
                   ` (2 preceding siblings ...)
  (?)
@ 2018-02-08 20:53 ` Matthias Kaehlcke
  2018-02-08 21:03     ` Harry Wentland
  -1 siblings, 1 reply; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 20:53 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Zhou, David Airlie,
	Harry Wentland, Felix Kuehling, Dmytro Laktyushkin
  Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
	Craig Bergstrom, Matthias Kaehlcke

calcs uses the compiler option -mpreferred-stack-boundary=4 to configure
a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
instead, which expects as parameter the alignment in bytes, and not a
power of two like -mpreferred-stack-boundary.

Probe for both compiler options and use the correct one, similar to
what is done in arch/x86/Makefile.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- patch added

Note to self: if this patterns proliferates further we probably want to
put the evaluation of the correct compiler flag in some common place.

 drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
index af0f452f3c9f..95f332ee3e7e 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
@@ -24,7 +24,13 @@
 # It calculates Bandwidth and Watermarks values for HW programming
 #
 
-calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
+ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
+	cc_stack_align := -mpreferred-stack-boundary=4
+else ifneq ($(call cc-option, -mstack-alignment=16),)
+	cc_stack_align := -mstack-alignment=16
+endif
+
+calcs_ccflags := -mhard-float -msse $(cc_stack_align)
 
 CFLAGS_dcn_calcs.o := $(calcs_ccflags)
 CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
-- 
2.16.0.rc1.238.g530d649a79-goog

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

* Re: [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment
  2018-02-08 20:53 ` [PATCH v3 4/4] amdgpu/dc/calcs: " Matthias Kaehlcke
@ 2018-02-08 21:03     ` Harry Wentland
  0 siblings, 0 replies; 11+ messages in thread
From: Harry Wentland @ 2018-02-08 21:03 UTC (permalink / raw)
  To: Matthias Kaehlcke, Alex Deucher, Christian König, David Zhou,
	David Airlie, Felix Kuehling, Dmytro Laktyushkin
  Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
	amd-gfx, Guenter Roeck

On 2018-02-08 03:53 PM, Matthias Kaehlcke wrote:
> calcs uses the compiler option -mpreferred-stack-boundary=4 to configure
> a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
> instead, which expects as parameter the alignment in bytes, and not a
> power of two like -mpreferred-stack-boundary.
> 
> Probe for both compiler options and use the correct one, similar to
> what is done in arch/x86/Makefile.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

Series is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
> Changes in v3:
> - patch added
> 
> Note to self: if this patterns proliferates further we probably want to
> put the evaluation of the correct compiler flag in some common place.
> 
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> index af0f452f3c9f..95f332ee3e7e 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> @@ -24,7 +24,13 @@
>  # It calculates Bandwidth and Watermarks values for HW programming
>  #
>  
> -calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
> +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
> +	cc_stack_align := -mpreferred-stack-boundary=4
> +else ifneq ($(call cc-option, -mstack-alignment=16),)
> +	cc_stack_align := -mstack-alignment=16
> +endif
> +
> +calcs_ccflags := -mhard-float -msse $(cc_stack_align)
>  
>  CFLAGS_dcn_calcs.o := $(calcs_ccflags)
>  CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment
@ 2018-02-08 21:03     ` Harry Wentland
  0 siblings, 0 replies; 11+ messages in thread
From: Harry Wentland @ 2018-02-08 21:03 UTC (permalink / raw)
  To: Matthias Kaehlcke, Alex Deucher, Christian König, David Zhou,
	David Airlie, Felix Kuehling, Dmytro Laktyushkin
  Cc: amd-gfx, dri-devel, linux-kernel, Guenter Roeck, Justin TerAvest,
	Craig Bergstrom

On 2018-02-08 03:53 PM, Matthias Kaehlcke wrote:
> calcs uses the compiler option -mpreferred-stack-boundary=4 to configure
> a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
> instead, which expects as parameter the alignment in bytes, and not a
> power of two like -mpreferred-stack-boundary.
> 
> Probe for both compiler options and use the correct one, similar to
> what is done in arch/x86/Makefile.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

Series is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
> Changes in v3:
> - patch added
> 
> Note to self: if this patterns proliferates further we probably want to
> put the evaluation of the correct compiler flag in some common place.
> 
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> index af0f452f3c9f..95f332ee3e7e 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> @@ -24,7 +24,13 @@
>  # It calculates Bandwidth and Watermarks values for HW programming
>  #
>  
> -calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
> +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
> +	cc_stack_align := -mpreferred-stack-boundary=4
> +else ifneq ($(call cc-option, -mstack-alignment=16),)
> +	cc_stack_align := -mstack-alignment=16
> +endif
> +
> +calcs_ccflags := -mhard-float -msse $(cc_stack_align)
>  
>  CFLAGS_dcn_calcs.o := $(calcs_ccflags)
>  CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
> 

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

* Re: [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment
  2018-02-08 21:03     ` Harry Wentland
  (?)
@ 2018-02-08 21:44     ` Harry Wentland
  2018-02-08 22:07       ` Matthias Kaehlcke
  -1 siblings, 1 reply; 11+ messages in thread
From: Harry Wentland @ 2018-02-08 21:44 UTC (permalink / raw)
  To: Matthias Kaehlcke, Alex Deucher, Christian König, David Zhou,
	David Airlie, Felix Kuehling, Dmytro Laktyushkin
  Cc: Craig Bergstrom, linux-kernel, dri-devel, Justin TerAvest,
	amd-gfx, Guenter Roeck

On 2018-02-08 04:03 PM, Harry Wentland wrote:
> On 2018-02-08 03:53 PM, Matthias Kaehlcke wrote:
>> calcs uses the compiler option -mpreferred-stack-boundary=4 to configure
>> a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
>> instead, which expects as parameter the alignment in bytes, and not a
>> power of two like -mpreferred-stack-boundary.
>>
>> Probe for both compiler options and use the correct one, similar to
>> what is done in arch/x86/Makefile.
>>
>> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> 
> Series is
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>

... and merged to amd-staging-drm-next.

I had to resolve a small conflict with patches 1 & 2. Not a big deal but curious what development branch you use. We normally use this for amd-gfx development: https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next (although it might be a bit behind our internal dev tree).

Harry

> 
> Harry
> 
>> ---
>> Changes in v3:
>> - patch added
>>
>> Note to self: if this patterns proliferates further we probably want to
>> put the evaluation of the correct compiler flag in some common place.
>>
>>  drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> index af0f452f3c9f..95f332ee3e7e 100644
>> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> @@ -24,7 +24,13 @@
>>  # It calculates Bandwidth and Watermarks values for HW programming
>>  #
>>  
>> -calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
>> +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
>> +	cc_stack_align := -mpreferred-stack-boundary=4
>> +else ifneq ($(call cc-option, -mstack-alignment=16),)
>> +	cc_stack_align := -mstack-alignment=16
>> +endif
>> +
>> +calcs_ccflags := -mhard-float -msse $(cc_stack_align)
>>  
>>  CFLAGS_dcn_calcs.o := $(calcs_ccflags)
>>  CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

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

* Re: [PATCH v3 4/4] amdgpu/dc/calcs: Support clang option for stack alignment
  2018-02-08 21:44     ` Harry Wentland
@ 2018-02-08 22:07       ` Matthias Kaehlcke
  0 siblings, 0 replies; 11+ messages in thread
From: Matthias Kaehlcke @ 2018-02-08 22:07 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Alex Deucher, Christian König, David Zhou, David Airlie,
	Felix Kuehling, Dmytro Laktyushkin, Craig Bergstrom, linux-kernel,
	dri-devel, Justin TerAvest, amd-gfx, Guenter Roeck

El Thu, Feb 08, 2018 at 04:44:21PM -0500 Harry Wentland ha dit:

> On 2018-02-08 04:03 PM, Harry Wentland wrote:
> > On 2018-02-08 03:53 PM, Matthias Kaehlcke wrote:
> >> calcs uses the compiler option -mpreferred-stack-boundary=4 to configure
> >> a stack alignment of 16 bytes. Clang uses the option -mstack-alignment
> >> instead, which expects as parameter the alignment in bytes, and not a
> >> power of two like -mpreferred-stack-boundary.
> >>
> >> Probe for both compiler options and use the correct one, similar to
> >> what is done in arch/x86/Makefile.
> >>
> >> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > 
> > Series is
> > Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> 
> ... and merged to amd-staging-drm-next.

Thanks!

> I had to resolve a small conflict with patches 1 & 2. Not a big deal but curious what development branch you use. We normally use this for amd-gfx development: https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next (although it might be a bit behind our internal dev tree).

I typically use Linus' tree as base, will try to remember to check
future patches against amd-staging-drm-next.

> >> ---
> >> Changes in v3:
> >> - patch added
> >>
> >> Note to self: if this patterns proliferates further we probably want to
> >> put the evaluation of the correct compiler flag in some common place.
> >>
> >>  drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 +++++++-
> >>  1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> >> index af0f452f3c9f..95f332ee3e7e 100644
> >> --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> >> +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> >> @@ -24,7 +24,13 @@
> >>  # It calculates Bandwidth and Watermarks values for HW programming
> >>  #
> >>  
> >> -calcs_ccflags := -mhard-float -msse -mpreferred-stack-boundary=4
> >> +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),)
> >> +	cc_stack_align := -mpreferred-stack-boundary=4
> >> +else ifneq ($(call cc-option, -mstack-alignment=16),)
> >> +	cc_stack_align := -mstack-alignment=16
> >> +endif
> >> +
> >> +calcs_ccflags := -mhard-float -msse $(cc_stack_align)
> >>  
> >>  CFLAGS_dcn_calcs.o := $(calcs_ccflags)
> >>  CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
> >>
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> > 

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

end of thread, other threads:[~2018-02-08 22:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 20:53 [PATCH v3 1/4] amdgpu/dc/dml: Consolidate redundant CFLAGS Matthias Kaehlcke
2018-02-08 20:53 ` Matthias Kaehlcke
2018-02-08 20:53 ` [PATCH v3 2/4] amdgpu/dc/calcs: " Matthias Kaehlcke
2018-02-08 20:53   ` Matthias Kaehlcke
2018-02-08 20:53 ` [PATCH v3 3/4] amdgpu/dc/dml: Support clang option for stack alignment Matthias Kaehlcke
2018-02-08 20:53   ` Matthias Kaehlcke
2018-02-08 20:53 ` [PATCH v3 4/4] amdgpu/dc/calcs: " Matthias Kaehlcke
2018-02-08 21:03   ` Harry Wentland
2018-02-08 21:03     ` Harry Wentland
2018-02-08 21:44     ` Harry Wentland
2018-02-08 22:07       ` Matthias Kaehlcke

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.