Re: [Freedreno] [RFC] drm/msm/adreno: clean up gpu bindings

2017-01-24 Thread Rob Clark
On Tue, Jan 24, 2017 at 1:01 PM, Jordan Crouse  wrote:
> On Tue, Jan 24, 2017 at 12:11:32PM -0500, Rob Clark wrote:
>> So, cleaning up the GPU bindings is something that has been on my TODO
>> list for a while, but always $bigger_fires.  Existing bindings are a bit
>> ugly, but served a purpose when too many of the other drivers the GPU
>> depends on where still working their way upstream.  But now enough of
>> that is in place for a few devices, that we should start trying to get
>> the GPU nodes into the upstream dts files.
>>
>> This drops the "qcom,chipid" property and parses the GPU revision out of
>> the compat string.  It does mean you need to list both "qcom,adreno" and
>> the more specific string, for example "qcom,adreno-530.2".  I'm not sure
>> if that is "weird" or anyone has better ideas (hence this RFC).
>>
>> It also drops "qcom,gpu-pwrlevels".  Jordan tells me we can probably
>> replace that w/ OPP bindings, which seems more sane.  For now, the code
>> just falls back to a super-slow safe clock until we get the OPP bindings
>> sorted.
>>
>> In both cases, the code is still compatible with the old bindings, so
>> dts files that exist on top of upstream will still work.  But it is
>> removed from the documentation, and for merging GPU nodes in upstream
>> dts files, we should use the new bindings.
>>
>> (I'll ofc split out the .dtsi changes, but figured for an RFC it was
>> easier to include them in this patch for discussion.)
>>
>> Signed-off-by: Rob Clark 
>> ---
>>  .../devicetree/bindings/display/msm/gpu.txt| 24 +++--
>>  arch/arm64/boot/dts/qcom/msm8916.dtsi  |  3 +-
>>  arch/arm64/boot/dts/qcom/msm8996.dtsi  |  8 +
>>  drivers/gpu/drm/msm/adreno/adreno_device.c | 42 
>> --
>>  drivers/gpu/drm/msm/msm_drv.c  |  1 +
>>  5 files changed, 47 insertions(+), 31 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/gpu.txt 
>> b/Documentation/devicetree/bindings/display/msm/gpu.txt
>> index 67d0a58..760194d 100644
>> --- a/Documentation/devicetree/bindings/display/msm/gpu.txt
>> +++ b/Documentation/devicetree/bindings/display/msm/gpu.txt
>> @@ -1,7 +1,11 @@
>>  Qualcomm adreno/snapdragon GPU
>>
>>  Required properties:
>> -- compatible: "qcom,adreno-3xx"
>> +- compatible: "qcom,adreno-XYZ.W", "qcom,adreno"
>> +for example: "qcom,adreno-306.0", "qcom,adreno"
>> +  Note that you need to list the less specific "qcom,adreno" (since this
>> +  is what the device is matched on), in addition to the more specific
>> +  with the chip-id.
>>  - reg: Physical base address and length of the controller's registers.
>>  - interrupts: The interrupt signal from the gpu.
>>  - clocks: device clocks
>> @@ -10,14 +14,6 @@ Required properties:
>>* "core_clk"
>>* "iface_clk"
>>* "mem_iface_clk"
>> -- qcom,chipid: gpu chip-id.  Note this may become optional for future
>> -  devices if we can reliably read the chipid from hw
>> -- qcom,gpu-pwrlevels: list of operating points
>> -  - compatible: "qcom,gpu-pwrlevels"
>> -  - for each qcom,gpu-pwrlevel:
>> -- qcom,gpu-freq: requested gpu clock speed
>> -- NOTE: downstream android driver defines additional parameters to
>> -  configure memory bandwidth scaling per OPP.
>>
>>  Example:
>>
>> @@ -38,15 +34,5 @@ Example:
>>   < GFX3D_CLK>,
>>   < GFX3D_AHB_CLK>,
>>   < MMSS_IMEM_AHB_CLK>;
>> - qcom,chipid = <0x03020100>;
>> - qcom,gpu-pwrlevels {
>> - compatible = "qcom,gpu-pwrlevels";
>> - qcom,gpu-pwrlevel@0 {
>> - qcom,gpu-freq = <45000>;
>> - };
>> - qcom,gpu-pwrlevel@1 {
>> - qcom,gpu-freq = <2700>;
>> - };
>> - };
>>   };
>>  };
>> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
>> b/arch/arm64/boot/dts/qcom/msm8916.dtsi
>> index 681486c..6dcbda6 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
>> @@ -758,7 +758,7 @@
>>   };
>>
>>   adreno-3xx@01c0 {
>> - compatible = "qcom,adreno-3xx";
>> + compatible = "qcom,adreno-306.0", "qcom,adreno";
>>   #stream-id-cells = <16>;
>>   reg = <0x01c0 0x2>;
>>   reg-names = "kgsl_3d0_reg_memory";
>> @@ -779,7 +779,6 @@
>>   < GCC_BIMC_GPU_CLK>,
>>   < GFX3D_CLK_SRC>;
>>   power-domains = < OXILI_GDSC>;
>> - qcom,chipid = <0x03000600>;
>>   qcom,gpu-pwrlevels {
>>   compatible = "qcom,gpu-pwrlevels";
>>   qcom,gpu-pwrlevel@0 {
>> diff --git 

Re: [Freedreno] [RFC] drm/msm/adreno: clean up gpu bindings

2017-01-24 Thread Jordan Crouse
On Tue, Jan 24, 2017 at 12:11:32PM -0500, Rob Clark wrote:
> So, cleaning up the GPU bindings is something that has been on my TODO
> list for a while, but always $bigger_fires.  Existing bindings are a bit
> ugly, but served a purpose when too many of the other drivers the GPU
> depends on where still working their way upstream.  But now enough of
> that is in place for a few devices, that we should start trying to get
> the GPU nodes into the upstream dts files.
> 
> This drops the "qcom,chipid" property and parses the GPU revision out of
> the compat string.  It does mean you need to list both "qcom,adreno" and
> the more specific string, for example "qcom,adreno-530.2".  I'm not sure
> if that is "weird" or anyone has better ideas (hence this RFC).
> 
> It also drops "qcom,gpu-pwrlevels".  Jordan tells me we can probably
> replace that w/ OPP bindings, which seems more sane.  For now, the code
> just falls back to a super-slow safe clock until we get the OPP bindings
> sorted.
> 
> In both cases, the code is still compatible with the old bindings, so
> dts files that exist on top of upstream will still work.  But it is
> removed from the documentation, and for merging GPU nodes in upstream
> dts files, we should use the new bindings.
> 
> (I'll ofc split out the .dtsi changes, but figured for an RFC it was
> easier to include them in this patch for discussion.)
> 
> Signed-off-by: Rob Clark 
> ---
>  .../devicetree/bindings/display/msm/gpu.txt| 24 +++--
>  arch/arm64/boot/dts/qcom/msm8916.dtsi  |  3 +-
>  arch/arm64/boot/dts/qcom/msm8996.dtsi  |  8 +
>  drivers/gpu/drm/msm/adreno/adreno_device.c | 42 
> --
>  drivers/gpu/drm/msm/msm_drv.c  |  1 +
>  5 files changed, 47 insertions(+), 31 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/gpu.txt 
> b/Documentation/devicetree/bindings/display/msm/gpu.txt
> index 67d0a58..760194d 100644
> --- a/Documentation/devicetree/bindings/display/msm/gpu.txt
> +++ b/Documentation/devicetree/bindings/display/msm/gpu.txt
> @@ -1,7 +1,11 @@
>  Qualcomm adreno/snapdragon GPU
>  
>  Required properties:
> -- compatible: "qcom,adreno-3xx"
> +- compatible: "qcom,adreno-XYZ.W", "qcom,adreno"
> +for example: "qcom,adreno-306.0", "qcom,adreno"
> +  Note that you need to list the less specific "qcom,adreno" (since this
> +  is what the device is matched on), in addition to the more specific
> +  with the chip-id.
>  - reg: Physical base address and length of the controller's registers.
>  - interrupts: The interrupt signal from the gpu.
>  - clocks: device clocks
> @@ -10,14 +14,6 @@ Required properties:
>* "core_clk"
>* "iface_clk"
>* "mem_iface_clk"
> -- qcom,chipid: gpu chip-id.  Note this may become optional for future
> -  devices if we can reliably read the chipid from hw
> -- qcom,gpu-pwrlevels: list of operating points
> -  - compatible: "qcom,gpu-pwrlevels"
> -  - for each qcom,gpu-pwrlevel:
> -- qcom,gpu-freq: requested gpu clock speed
> -- NOTE: downstream android driver defines additional parameters to
> -  configure memory bandwidth scaling per OPP.
>  
>  Example:
>  
> @@ -38,15 +34,5 @@ Example:
>   < GFX3D_CLK>,
>   < GFX3D_AHB_CLK>,
>   < MMSS_IMEM_AHB_CLK>;
> - qcom,chipid = <0x03020100>;
> - qcom,gpu-pwrlevels {
> - compatible = "qcom,gpu-pwrlevels";
> - qcom,gpu-pwrlevel@0 {
> - qcom,gpu-freq = <45000>;
> - };
> - qcom,gpu-pwrlevel@1 {
> - qcom,gpu-freq = <2700>;
> - };
> - };
>   };
>  };
> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> index 681486c..6dcbda6 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> @@ -758,7 +758,7 @@
>   };
>  
>   adreno-3xx@01c0 {
> - compatible = "qcom,adreno-3xx";
> + compatible = "qcom,adreno-306.0", "qcom,adreno";
>   #stream-id-cells = <16>;
>   reg = <0x01c0 0x2>;
>   reg-names = "kgsl_3d0_reg_memory";
> @@ -779,7 +779,6 @@
>   < GCC_BIMC_GPU_CLK>,
>   < GFX3D_CLK_SRC>;
>   power-domains = < OXILI_GDSC>;
> - qcom,chipid = <0x03000600>;
>   qcom,gpu-pwrlevels {
>   compatible = "qcom,gpu-pwrlevels";
>   qcom,gpu-pwrlevel@0 {
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index c5226a7..941493f 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ 

Re: [Freedreno] [PATCH] firmware: qcom_scm: Add set remote state API

2017-01-24 Thread Andy Gross
On 24 January 2017 at 03:54, Stanimir Varbanov  wrote:
> Andy,
>
> Could you queue this patch for 4.11?

This patch is in the qcom-drivers-for-4.11 pull request I sent 9 hours
ago.  So you should be good.

https://www.spinics.net/lists/arm-kernel/msg557325.html
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno