Re: amdgpu: Enable full DCN support on POWER

2019-12-06 Thread Timothy Pearson


- Original Message -
> From: "Michel Dänzer" 
> To: "Timothy Pearson" , "Harry Wentland" 
> 
> Cc: "Zhan Liu" , "amd-gfx" 
> Sent: Friday, December 6, 2019 10:12:42 AM
> Subject: Re: amdgpu: Enable full DCN support on POWER

> On 2019-12-06 12:34 a.m., Timothy Pearson wrote:
>>> From: "Harry Wentland"  On 2019-12-05 6:02 p.m.,
>>> Liu, Zhan wrote:
>>>>> From: amd-gfx  On Behalf
>>>>> Of Timothy Pearson
>>>>> 
>>>>> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile
>>>>> b/drivers/gpu/drm/amd/display/dc/Makefile index
>>>>> a160512a2f04..3e026a969386 100644 ---
>>>>> a/drivers/gpu/drm/amd/display/dc/Makefile +++
>>>>> b/drivers/gpu/drm/amd/display/dc/Makefile @@ -1,5 +1,6 @@ # #
>>>>> Copyright 2017 Advanced Micro Devices, Inc. +# Copyright 2019
>>>>> Raptor Engineering, LLC
>>>> 
>>>> NAK.
>>>> 
>>>> IANAL, but I don't think you can add your company's name by
>>>> modifying part of the code. The copyright notice shows the
>>>> authors of the original work.
>>>> 
>>>> When modifying the code, you are required to agree with that
>>>> copyright notice. That's the purpose of that copyright notice
>>>> piece.
> 
> Where did you get that from? Adding a copyright line like this to files
> containing code to which one holds the copyright is standard practice.
> 
> 
>>> I always thought these copyright notices are nearly meaningless.
>>> 
>>> That said, this patch doesn't have any change in this file. I
>>> don't think it warrants an additional copyright notice.
>>> 
>>> Harry
>> 
>> Agreed -- looks like that snuck in with the other changes.  I can
>> back this one out, however in general regardless of the notice having
>> any actual legal meaning (the GIT commit history has the actual legal
>> teeth from what I understand as it establishes shared ownership), our
>> general policy per recommendations is to add the copyright line.  It
>> helps anyone looking at the file know at a glance that there is more
>> than one corporate author, and therefore e.g. the only terms it can
>> be used on without a complex multi-party license renegotiation is (in
>> this case) the GPL v2.
> 
> Did you read the licence under the copyright line you added? :)

Nope, I didn't, at least not right before sending that reply -- I didn't have a 
copy of the file up on that device , and was wildly guessing based on the 
overall kernel distribution license.

> Or are you saying that your patch is intended to be available under the
> GPL only? I'm afraid that would be a problem.

No, there's no problem here with the existing license.  Updated version of the 
patch with a few technical issues fixed should be coming later today / tomorrow 
(depending on how quickly I can get an ACK/NACK on functionality from the 
person that has access to the Navi card).

> 
> --
> Earthling Michel Dänzer   |   https://redhat.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
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Re: amdgpu: Enable full DCN support on POWER

2019-12-06 Thread Michel Dänzer
On 2019-12-06 12:34 a.m., Timothy Pearson wrote:
>> From: "Harry Wentland"  On 2019-12-05 6:02 p.m.,
>> Liu, Zhan wrote:
 From: amd-gfx  On Behalf
 Of Timothy Pearson
 
 diff --git a/drivers/gpu/drm/amd/display/dc/Makefile 
 b/drivers/gpu/drm/amd/display/dc/Makefile index
 a160512a2f04..3e026a969386 100644 ---
 a/drivers/gpu/drm/amd/display/dc/Makefile +++
 b/drivers/gpu/drm/amd/display/dc/Makefile @@ -1,5 +1,6 @@ # #
 Copyright 2017 Advanced Micro Devices, Inc. +# Copyright 2019
 Raptor Engineering, LLC
>>> 
>>> NAK.
>>> 
>>> IANAL, but I don't think you can add your company's name by
>>> modifying part of the code. The copyright notice shows the
>>> authors of the original work.
>>> 
>>> When modifying the code, you are required to agree with that
>>> copyright notice. That's the purpose of that copyright notice
>>> piece.

Where did you get that from? Adding a copyright line like this to files
containing code to which one holds the copyright is standard practice.


>> I always thought these copyright notices are nearly meaningless.
>> 
>> That said, this patch doesn't have any change in this file. I
>> don't think it warrants an additional copyright notice.
>> 
>> Harry
> 
> Agreed -- looks like that snuck in with the other changes.  I can
> back this one out, however in general regardless of the notice having
> any actual legal meaning (the GIT commit history has the actual legal
> teeth from what I understand as it establishes shared ownership), our
> general policy per recommendations is to add the copyright line.  It
> helps anyone looking at the file know at a glance that there is more
> than one corporate author, and therefore e.g. the only terms it can
> be used on without a complex multi-party license renegotiation is (in
> this case) the GPL v2.

Did you read the licence under the copyright line you added? :)

Or are you saying that your patch is intended to be available under the
GPL only? I'm afraid that would be a problem.


-- 
Earthling Michel Dänzer   |   https://redhat.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: amdgpu: Enable full DCN support on POWER

2019-12-05 Thread Timothy Pearson


- Original Message -
> From: "Harry Wentland" 
> To: "Liu, Zhan" , "Timothy Pearson" 
> , "amd-gfx"
> 
> Sent: Thursday, December 5, 2019 5:19:22 PM
> Subject: Re: amdgpu: Enable full DCN support on POWER

> On 2019-12-05 6:02 p.m., Liu, Zhan wrote:
>> 
>> 
>>> -Original Message-
>>> From: amd-gfx  On Behalf Of
>>> Timothy Pearson
>>> Sent: 2019/December/05, Thursday 4:58 PM
>>> To: amd-gfx 
>>> Subject: [PATCH] [RFC v2] amdgpu: Enable full DCN support on POWER
>>>
>>> DCN requires floating point support to operate.  Add the appropriate
>>> x86/ppc64 guards and FPU / AltiVec / VSX context switches to DCN.
>>>
>>> Signed-off-by: Timothy Pearson 
>>> ---
>>>  drivers/gpu/drm/amd/display/Kconfig   |   8 +-
>>>  drivers/gpu/drm/amd/display/dc/Makefile   |   1 +
>>>  drivers/gpu/drm/amd/display/dc/calcs/Makefile |   8 +
>>>  .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c  | 157 ++
>>>  drivers/gpu/drm/amd/display/dc/dcn20/Makefile |   8 +
>>>  .../drm/amd/display/dc/dcn20/dcn20_resource.c |  27 +++
>>>  drivers/gpu/drm/amd/display/dc/dcn21/Makefile |   8 +
>>>  .../drm/amd/display/dc/dcn21/dcn21_resource.c |  27 +++
>>>  drivers/gpu/drm/amd/display/dc/dml/Makefile   |   9 +
>>>  drivers/gpu/drm/amd/display/dc/dsc/Makefile   |   8 +
>>>  drivers/gpu/drm/amd/display/dc/os_types.h |   6 +
>>>  11 files changed, 263 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/Kconfig
>>> b/drivers/gpu/drm/amd/display/Kconfig
>>> index 313183b80032..c73a63f3e245 100644
>>> --- a/drivers/gpu/drm/amd/display/Kconfig
>>> +++ b/drivers/gpu/drm/amd/display/Kconfig
>>> @@ -6,7 +6,7 @@ config DRM_AMD_DC
>>> bool "AMD DC - Enable new display engine"
>>> default y
>>> select SND_HDA_COMPONENT if SND_HDA_CORE
>>> -   select DRM_AMD_DC_DCN1_0 if X86 && !(KCOV_INSTRUMENT_ALL
>>> && KCOV_ENABLE_COMPARISONS)
>>> +   select DRM_AMD_DC_DCN1_0 if (X86 || PPC64)
>>> && !(KCOV_INSTRUMENT_ALL &&
>>> +KCOV_ENABLE_COMPARISONS)
>>> help
>>>   Choose this option if you want to use the new display engine
>>>   support for AMDGPU. This adds required support for Vega and @@
>>> -20,7 +20,7 @@ config DRM_AMD_DC_DCN1_0  config
>>> DRM_AMD_DC_DCN2_0
>>> bool "DCN 2.0 family"
>>> default y
>>> -   depends on DRM_AMD_DC && X86
>>> +   depends on DRM_AMD_DC && (X86 || PPC64)
>>> depends on DRM_AMD_DC_DCN1_0
>>> help
>>>   Choose this option if you want to have @@ -28,7 +28,7 @@ config
>>> DRM_AMD_DC_DCN2_0
>>>
>>>  config DRM_AMD_DC_DCN2_1
>>> bool "DCN 2.1 family"
>>> -   depends on DRM_AMD_DC && X86
>>> +   depends on DRM_AMD_DC && (X86 || PPC64)
>>> depends on DRM_AMD_DC_DCN2_0
>>> help
>>>   Choose this option if you want to have @@ -37,7 +37,7 @@ config
>>> DRM_AMD_DC_DCN2_1  config DRM_AMD_DC_DSC_SUPPORT
>>> bool "DSC support"
>>> default y
>>> -   depends on DRM_AMD_DC && X86
>>> +   depends on DRM_AMD_DC && (X86 || PPC64)
>>> depends on DRM_AMD_DC_DCN1_0
>>> depends on DRM_AMD_DC_DCN2_0
>>> help
>>> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile
>>> b/drivers/gpu/drm/amd/display/dc/Makefile
>>> index a160512a2f04..3e026a969386 100644
>>> --- a/drivers/gpu/drm/amd/display/dc/Makefile
>>> +++ b/drivers/gpu/drm/amd/display/dc/Makefile
>>> @@ -1,5 +1,6 @@
>>>  #
>>>  # Copyright 2017 Advanced Micro Devices, Inc.
>>> +# Copyright 2019 Raptor Engineering, LLC
>> 
>> NAK.
>> 
>> IANAL, but I don't think you can add your company's name by modifying part of
>> the code. The copyright notice shows the authors of the original work.
>> 
>> When modifying the code, you are required to agree with that copyright 
>> notice.
>> That's the purpose of that copyright notice piece.
>> 
> 
> I always thought these copyright notices are nearly meaningless.
> 
> That said, this patch doesn't have any change in this file. I don't
> think it warrants an additional copyright notice.
> 
> Harry

Agreed -- looks like that snuck in with the other changes.  I can back th

Re: amdgpu: Enable full DCN support on POWER

2019-12-05 Thread Harry Wentland
On 2019-12-05 6:02 p.m., Liu, Zhan wrote:
> 
> 
>> -Original Message-
>> From: amd-gfx  On Behalf Of
>> Timothy Pearson
>> Sent: 2019/December/05, Thursday 4:58 PM
>> To: amd-gfx 
>> Subject: [PATCH] [RFC v2] amdgpu: Enable full DCN support on POWER
>>
>> DCN requires floating point support to operate.  Add the appropriate
>> x86/ppc64 guards and FPU / AltiVec / VSX context switches to DCN.
>>
>> Signed-off-by: Timothy Pearson 
>> ---
>>  drivers/gpu/drm/amd/display/Kconfig   |   8 +-
>>  drivers/gpu/drm/amd/display/dc/Makefile   |   1 +
>>  drivers/gpu/drm/amd/display/dc/calcs/Makefile |   8 +
>>  .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c  | 157 ++
>>  drivers/gpu/drm/amd/display/dc/dcn20/Makefile |   8 +
>>  .../drm/amd/display/dc/dcn20/dcn20_resource.c |  27 +++
>>  drivers/gpu/drm/amd/display/dc/dcn21/Makefile |   8 +
>>  .../drm/amd/display/dc/dcn21/dcn21_resource.c |  27 +++
>>  drivers/gpu/drm/amd/display/dc/dml/Makefile   |   9 +
>>  drivers/gpu/drm/amd/display/dc/dsc/Makefile   |   8 +
>>  drivers/gpu/drm/amd/display/dc/os_types.h |   6 +
>>  11 files changed, 263 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/Kconfig
>> b/drivers/gpu/drm/amd/display/Kconfig
>> index 313183b80032..c73a63f3e245 100644
>> --- a/drivers/gpu/drm/amd/display/Kconfig
>> +++ b/drivers/gpu/drm/amd/display/Kconfig
>> @@ -6,7 +6,7 @@ config DRM_AMD_DC
>>  bool "AMD DC - Enable new display engine"
>>  default y
>>  select SND_HDA_COMPONENT if SND_HDA_CORE
>> -select DRM_AMD_DC_DCN1_0 if X86 && !(KCOV_INSTRUMENT_ALL
>> && KCOV_ENABLE_COMPARISONS)
>> +select DRM_AMD_DC_DCN1_0 if (X86 || PPC64)
>> && !(KCOV_INSTRUMENT_ALL &&
>> +KCOV_ENABLE_COMPARISONS)
>>  help
>>Choose this option if you want to use the new display engine
>>support for AMDGPU. This adds required support for Vega and @@
>> -20,7 +20,7 @@ config DRM_AMD_DC_DCN1_0  config
>> DRM_AMD_DC_DCN2_0
>>  bool "DCN 2.0 family"
>>  default y
>> -depends on DRM_AMD_DC && X86
>> +depends on DRM_AMD_DC && (X86 || PPC64)
>>  depends on DRM_AMD_DC_DCN1_0
>>  help
>>Choose this option if you want to have @@ -28,7 +28,7 @@ config
>> DRM_AMD_DC_DCN2_0
>>
>>  config DRM_AMD_DC_DCN2_1
>>  bool "DCN 2.1 family"
>> -depends on DRM_AMD_DC && X86
>> +depends on DRM_AMD_DC && (X86 || PPC64)
>>  depends on DRM_AMD_DC_DCN2_0
>>  help
>>Choose this option if you want to have @@ -37,7 +37,7 @@ config
>> DRM_AMD_DC_DCN2_1  config DRM_AMD_DC_DSC_SUPPORT
>>  bool "DSC support"
>>  default y
>> -depends on DRM_AMD_DC && X86
>> +depends on DRM_AMD_DC && (X86 || PPC64)
>>  depends on DRM_AMD_DC_DCN1_0
>>  depends on DRM_AMD_DC_DCN2_0
>>  help
>> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile
>> b/drivers/gpu/drm/amd/display/dc/Makefile
>> index a160512a2f04..3e026a969386 100644
>> --- a/drivers/gpu/drm/amd/display/dc/Makefile
>> +++ b/drivers/gpu/drm/amd/display/dc/Makefile
>> @@ -1,5 +1,6 @@
>>  #
>>  # Copyright 2017 Advanced Micro Devices, Inc.
>> +# Copyright 2019 Raptor Engineering, LLC
> 
> NAK.
> 
> IANAL, but I don't think you can add your company's name by modifying part of 
> the code. The copyright notice shows the authors of the original work.
> 
> When modifying the code, you are required to agree with that copyright 
> notice. That's the purpose of that copyright notice piece.
> 

I always thought these copyright notices are nearly meaningless.

That said, this patch doesn't have any change in this file. I don't
think it warrants an additional copyright notice.

Harry

>>  #
>>  # Permission is hereby granted, free of charge, to any person obtaining a  #
>> copy of this software and associated documentation files (the "Software"),
>> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
>> index 26c6d735cdc7..20c88aff930a 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  #
>>
>> +ifdef CONFIG_X86_64
>>  calcs_ccflags := -mhard-float -msse
>> +endif
>> +
>> +ifdef CONFIG_PPC64
>> +calcs_ccflags := -mhard-float -maltivec endif
>>
>>  ifdef CONFIG_CC_IS_GCC
>>  ifeq ($(call cc-ifversion, -lt, 0701, y), y) @@ -32,6 +38,7 @@ IS_OLD_GCC =
>> 1  endif  endif
>>
>> +ifdef CONFIG_X86_64
>>  ifdef IS_OLD_GCC
>>  # Stack alignment mismatch, proceed with caution.
>>  # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-
>> boundary=3 @@ -40,6 +47,7 @@ calcs_ccflags += -mpreferred-stack-
>> boundary=4  else  calcs_ccflags += -msse2  endif
>> +endif
>>
>>  CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calcs.o := $(calcs_ccflags)
>> CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_auto.o := $(calcs_ccflags) diff -
>> -git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
>> 

RE: amdgpu: Enable full DCN support on POWER

2019-12-05 Thread Liu, Zhan


> -Original Message-
> From: amd-gfx  On Behalf Of
> Timothy Pearson
> Sent: 2019/December/05, Thursday 4:58 PM
> To: amd-gfx 
> Subject: [PATCH] [RFC v2] amdgpu: Enable full DCN support on POWER
> 
> DCN requires floating point support to operate.  Add the appropriate
> x86/ppc64 guards and FPU / AltiVec / VSX context switches to DCN.
> 
> Signed-off-by: Timothy Pearson 
> ---
>  drivers/gpu/drm/amd/display/Kconfig   |   8 +-
>  drivers/gpu/drm/amd/display/dc/Makefile   |   1 +
>  drivers/gpu/drm/amd/display/dc/calcs/Makefile |   8 +
>  .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c  | 157 ++
>  drivers/gpu/drm/amd/display/dc/dcn20/Makefile |   8 +
>  .../drm/amd/display/dc/dcn20/dcn20_resource.c |  27 +++
>  drivers/gpu/drm/amd/display/dc/dcn21/Makefile |   8 +
>  .../drm/amd/display/dc/dcn21/dcn21_resource.c |  27 +++
>  drivers/gpu/drm/amd/display/dc/dml/Makefile   |   9 +
>  drivers/gpu/drm/amd/display/dc/dsc/Makefile   |   8 +
>  drivers/gpu/drm/amd/display/dc/os_types.h |   6 +
>  11 files changed, 263 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/Kconfig
> b/drivers/gpu/drm/amd/display/Kconfig
> index 313183b80032..c73a63f3e245 100644
> --- a/drivers/gpu/drm/amd/display/Kconfig
> +++ b/drivers/gpu/drm/amd/display/Kconfig
> @@ -6,7 +6,7 @@ config DRM_AMD_DC
>   bool "AMD DC - Enable new display engine"
>   default y
>   select SND_HDA_COMPONENT if SND_HDA_CORE
> - select DRM_AMD_DC_DCN1_0 if X86 && !(KCOV_INSTRUMENT_ALL
> && KCOV_ENABLE_COMPARISONS)
> + select DRM_AMD_DC_DCN1_0 if (X86 || PPC64)
> && !(KCOV_INSTRUMENT_ALL &&
> +KCOV_ENABLE_COMPARISONS)
>   help
> Choose this option if you want to use the new display engine
> support for AMDGPU. This adds required support for Vega and @@
> -20,7 +20,7 @@ config DRM_AMD_DC_DCN1_0  config
> DRM_AMD_DC_DCN2_0
>   bool "DCN 2.0 family"
>   default y
> - depends on DRM_AMD_DC && X86
> + depends on DRM_AMD_DC && (X86 || PPC64)
>   depends on DRM_AMD_DC_DCN1_0
>   help
> Choose this option if you want to have @@ -28,7 +28,7 @@ config
> DRM_AMD_DC_DCN2_0
> 
>  config DRM_AMD_DC_DCN2_1
>   bool "DCN 2.1 family"
> - depends on DRM_AMD_DC && X86
> + depends on DRM_AMD_DC && (X86 || PPC64)
>   depends on DRM_AMD_DC_DCN2_0
>   help
> Choose this option if you want to have @@ -37,7 +37,7 @@ config
> DRM_AMD_DC_DCN2_1  config DRM_AMD_DC_DSC_SUPPORT
>   bool "DSC support"
>   default y
> - depends on DRM_AMD_DC && X86
> + depends on DRM_AMD_DC && (X86 || PPC64)
>   depends on DRM_AMD_DC_DCN1_0
>   depends on DRM_AMD_DC_DCN2_0
>   help
> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile
> b/drivers/gpu/drm/amd/display/dc/Makefile
> index a160512a2f04..3e026a969386 100644
> --- a/drivers/gpu/drm/amd/display/dc/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/Makefile
> @@ -1,5 +1,6 @@
>  #
>  # Copyright 2017 Advanced Micro Devices, Inc.
> +# Copyright 2019 Raptor Engineering, LLC

NAK.

IANAL, but I don't think you can add your company's name by modifying part of 
the code. The copyright notice shows the authors of the original work.

When modifying the code, you are required to agree with that copyright notice. 
That's the purpose of that copyright notice piece.

>  #
>  # Permission is hereby granted, free of charge, to any person obtaining a  #
> copy of this software and associated documentation files (the "Software"),
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> b/drivers/gpu/drm/amd/display/dc/calcs/Makefile
> index 26c6d735cdc7..20c88aff930a 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  #
> 
> +ifdef CONFIG_X86_64
>  calcs_ccflags := -mhard-float -msse
> +endif
> +
> +ifdef CONFIG_PPC64
> +calcs_ccflags := -mhard-float -maltivec endif
> 
>  ifdef CONFIG_CC_IS_GCC
>  ifeq ($(call cc-ifversion, -lt, 0701, y), y) @@ -32,6 +38,7 @@ IS_OLD_GCC =
> 1  endif  endif
> 
> +ifdef CONFIG_X86_64
>  ifdef IS_OLD_GCC
>  # Stack alignment mismatch, proceed with caution.
>  # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-
> boundary=3 @@ -40,6 +47,7 @@ calcs_ccflags += -mpreferred-stack-
> boundary=4  else  calcs_ccflags += -msse2  endif
> +endif
> 
>  CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calcs.o := $(calcs_ccflags)
> CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_auto.o := $(calcs_ccflags) diff -
> -git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
> b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
> index 9b2cb57bf2ba..236e852ea60b 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
> @@ -1,5 +1,6 @@
>  /*
>   * Copyright 2017 Advanced Micro Devices, Inc.
> + * Copyright 2019 Raptor Engineering, LLC
>   *
>   *