Re: [Freedreno] [PATCH] drm/msm: Fix incorrect struct size for memory allocation
On 2/21/2019 2:54 PM, Jordan Crouse wrote: The allocation for the clock bulk data does a classic sizeof(pointer) instead of sizeof(struct) so the array ends up incorrectly sized for the clock data. Cc: sta...@vger.kernel.org Fixes: 8e54eea ("drm/msm: Add a helper function to parse clock names") Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 906b2bb..31e1481 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -96,7 +96,7 @@ int msm_clk_bulk_get(struct device *dev, struct clk_bulk_data **bulk) if (count < 1) return 0; - local = devm_kcalloc(dev, sizeof(struct clk_bulk_data *), + local = devm_kcalloc(dev, sizeof(struct clk_bulk_data), count, GFP_KERNEL); if (!local) return -ENOMEM; Isn't msm_clk_bulk_get a duplication of devm_clk_bulk_get_all() ? Surely it would be better to just use that instead? -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
[Freedreno] [PATCH] drm/msm: Fix incorrect struct size for memory allocation
The allocation for the clock bulk data does a classic sizeof(pointer) instead of sizeof(struct) so the array ends up incorrectly sized for the clock data. Cc: sta...@vger.kernel.org Fixes: 8e54eea ("drm/msm: Add a helper function to parse clock names") Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 906b2bb..31e1481 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -96,7 +96,7 @@ int msm_clk_bulk_get(struct device *dev, struct clk_bulk_data **bulk) if (count < 1) return 0; - local = devm_kcalloc(dev, sizeof(struct clk_bulk_data *), + local = devm_kcalloc(dev, sizeof(struct clk_bulk_data), count, GFP_KERNEL); if (!local) return -ENOMEM; -- 2.7.4 ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [Freedreno] [PATCH v3 2/3] dt-bindings: drm/msm/a6xx: Document interconnect properties for GPU
Hi, On 12/20/18 19:30, Jordan Crouse wrote: > Add documentation for the interconnect and interconnect-names bindings > for the GPU node as detailed by bindings/interconnect/interconnect.txt. > > Signed-off-by: Jordan Crouse > --- > > Documentation/devicetree/bindings/display/msm/gpu.txt | 4 > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/display/msm/gpu.txt > b/Documentation/devicetree/bindings/display/msm/gpu.txt > index 9c89f4fdb8ca..5b04393dcb15 100644 > --- a/Documentation/devicetree/bindings/display/msm/gpu.txt > +++ b/Documentation/devicetree/bindings/display/msm/gpu.txt > @@ -20,6 +20,8 @@ Required properties: > - qcom,adreno-630.2 > - iommus: optional phandle to an adreno iommu instance > - operating-points-v2: optional phandle to the OPP operating points > +- interconnect: optional phandle to a interconnect provider. See Nit: s/interconnect:/interconnects:/ Nit: s/a interconnect/an interconnect/ > + ../interconnect/interconnect.txt for details. > - qcom,gmu: For GMU attached devices a phandle to the GMU device that will >control the power for the GPU. Applicable targets: > - qcom,adreno-630.2 > @@ -68,6 +70,8 @@ Example a6xx (with GMU): > > operating-points-v2 = <&gpu_opp_table>; > > + interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>; > + > qcom,gmu = <&gmu>; > }; > }; > Acked-by: Georgi Djakov Thanks, Georgi ___ Freedreno mailing list Freedreno@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/freedreno