[Freedreno] [PATCH 2/2] arm64: dts: qcom: sm8250: Enable per-process page tables.

2022-06-14 Thread Emma Anholt
This is an SMMU for the adreno gpu, and adding this compatible lets the driver use per-fd page tables, which are required for security between GPU clients. Signed-off-by: Emma Anholt --- Tested with a full deqp-vk run on RB5, which did involve some iommu faults. arch/arm64/boot/dts/qcom/sm8250

[Freedreno] [PATCH 1/2] iommu: arm-smmu-impl: Add 8250 display compatible to the client list.

2022-06-14 Thread Emma Anholt
Required for turning on per-process page tables for the GPU. Signed-off-by: Emma Anholt --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index d8e1ef83c01b.

Re: [Freedreno] [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 2:59 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-14 14:05:02) Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel cloc

Re: [Freedreno] [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 2:59 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-14 14:05:02) Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel cloc

Re: [Freedreno] [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-06-14 14:05:02) > Display resolution change is implemented through drm modeset. Older > modeset (resolution) has to be disabled first before newer modeset > (resolution) can be enabled. Display disable will turn off both > pixel clock and main link clock so that main link

[Freedreno] [PATCH v2 0/3] Expand CRC to support interface blocks

2022-06-14 Thread Jessica Zhang
Refactor existing CRC code for layer mixer and add CRC support for interface blocks Changes since V1: - Create helper methods for collect_misr and setup_misr in dpu_hw_util.c - Move common bitmasks into dpu_hw_util.h - Update copyrights - Create a dynamically allocated crcs array in dpu_crtc_stat

[Freedreno] [PATCH v2 1/3] drm/msm/dpu: Move LM CRC code into separate method

2022-06-14 Thread Jessica Zhang
Move layer mixer-specific section of dpu_crtc_get_crc() into a separate helper method. This way, we can make it easier to get CRCs from other HW blocks by adding other get_crc helper methods. Changes since V1: - Moved common bitmasks to dpu_hw_util.h - Moved common CRC methods to dpu_hw_util.c - U

[Freedreno] [PATCH v2 3/3] drm/msm/dpu: Add interface support for CRC debugfs

2022-06-14 Thread Jessica Zhang
Add support for writing CRC values for the interface block to the debugfs by calling the necessary MISR setup/collect methods. Changes since V1: - Set values_cnt to only include phys with backing hw_intf - Loop over all drm_encs connected to crtc Signed-off-by: Jessica Zhang --- drivers/gpu/drm

[Freedreno] [PATCH v2 2/3] drm/msm/dpu: Add MISR register support for interface

2022-06-14 Thread Jessica Zhang
Add support for setting MISR registers within the interface Changes since V1: - Replaced dpu_hw_intf collect_misr and setup_misr implementations with calls to dpu_hw_utils helper methods Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 19 ++- dri

[Freedreno] [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel clock and main link clock so that main link have to be re-trained during display enable to hav

[Freedreno] [PATCH v2 4/4] arm64: dts: qcom: msm8953: add MDSS

2022-06-14 Thread Luca Weiss
From: Vladimir Lypak Add the MDSS, MDP and DSI nodes that are found on msm8953 SoC. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss --- Changes from v1: - disable nodes by default, thanks Dmitry! - enable iommu for mdp arch/arm64/boot/dts/qcom/msm8953.dtsi | 208 +

[Freedreno] [PATCH v2 2/4] arm64: dts: qcom: msm8953: add APPS IOMMU

2022-06-14 Thread Luca Weiss
From: Vladimir Lypak Add the nodes describing the iommu and its context banks that are found on msm8953 SoCs. Signed-off-by: Vladimir Lypak Signed-off-by: Luca Weiss --- Changes from v1: - new patch arch/arm64/boot/dts/qcom/msm8953.dtsi | 36 +++ 1 file changed, 36 in

[Freedreno] [PATCH v2 1/4] dt-bindings: qcom-iommu: Add Qualcomm MSM8953 compatible

2022-06-14 Thread Luca Weiss
Document the compatible used for IOMMU on the msm8953 SoC. Signed-off-by: Luca Weiss --- Changes from v1: - new patch Documentation/devicetree/bindings/iommu/qcom,iommu.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentatio

Re: [Freedreno] [PATCH v5] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 1:38 AM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-13 14:48:37) During display resolution changes display have to be disabled first followed by display enabling with new resolution. Display disable will turn off both pixel clock and main link clock so that main link have t

[Freedreno] [PATCH 3/3] drm/msm/dpu: remove hard-coded linewidth limit for writeback

2022-06-14 Thread Abhinav Kumar
Remove the hard-coded limit for writeback and lets start using the one from catalog instead. Fixes: d7d0e73f7de3 ("introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++ 1 file changed, 2 insertions(+), 4

[Freedreno] [PATCH 2/3] drm/msm/dpu: fix maxlinewidth for writeback block

2022-06-14 Thread Abhinav Kumar
Writeback block for sm8250 was using the default maxlinewidth of 2048. But this is not right as it supports upto 4096. This should have no effect on most resolutions as we are still limiting upto maxlinewidth of SSPP for adding the modes. Fix the maxlinewidth for writeback block on sm8250. Fixes

[Freedreno] [PATCH 1/3] drm/msm/dpu: move intf and wb assignment to dpu_encoder_setup_display()

2022-06-14 Thread Abhinav Kumar
intf and wb resources are not dependent on the rm global state so need not be allocated during dpu_encoder_virt_atomic_mode_set(). Move the allocation of intf and wb resources to dpu_encoder_setup_display() so that we can utilize the hw caps even during atomic_check() phase. Since dpu_encoder_set

Re: [Freedreno] [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-14 Thread Abhinav Kumar
On 6/14/2022 3:09 AM, Dmitry Baryshkov wrote: On 14/06/2022 13:07, Miaoqian Lin wrote: Hi, Abhinav On 2022/6/11 7:20, Abhinav Kumar wrote: On 6/7/2022 4:08 AM, Miaoqian Lin wrote: of_graph_get_remote_node() returns remote device node pointer with refcount incremented, we should use of_no

Re: [Freedreno] [PATCH] drm/msm: Make msm_gem_free_object() static

2022-06-14 Thread Dmitry Baryshkov
On Mon, 13 Jun 2022 at 23:49, Rob Clark wrote: > > From: Rob Clark > > Misc small cleanup I noticed. Not called from another object file since > 3c9edd9c85f5 ("drm/msm: Introduce GEM object funcs") > > Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/msm_ge

Re: [Freedreno] [PATCH v5] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 1:38 AM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-13 14:48:37) During display resolution changes display have to be disabled first followed by display enabling with new resolution. Display disable will turn off both pixel clock and main link clock so that main link have t

[Freedreno] [PATCH v5] drm/msm: Avoid unclocked GMU register access in a6xx gpu_busy

2022-06-14 Thread Douglas Anderson
>From testing on sc7180-trogdor devices, reading the GMU registers needs the GMU clocks to be enabled. Those clocks get turned on in a6xx_gmu_resume(). Confusingly enough, that function is called as a result of the runtime_pm of the GPU "struct device", not the GMU "struct device". Unfortunately th

Re: [Freedreno] [PATCH v3] drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy

2022-06-14 Thread Doug Anderson
Hi, On Tue, Jun 14, 2022 at 7:42 AM Akhil P Oommen wrote: > > On 6/10/2022 5:39 AM, Douglas Anderson wrote: > > >From testing on sc7180-trogdor devices, reading the GMU registers > > needs the GMU clocks to be enabled. Those clocks get turned on in > > a6xx_gmu_resume(). Confusingly enough, that

Re: [Freedreno] [PATCH v3] drm/msm: Avoid unclocked GMU register access in 6xx gpu_busy

2022-06-14 Thread Akhil P Oommen
On 6/10/2022 5:39 AM, Douglas Anderson wrote: >From testing on sc7180-trogdor devices, reading the GMU registers needs the GMU clocks to be enabled. Those clocks get turned on in a6xx_gmu_resume(). Confusingly enough, that function is called as a result of the runtime_pm of the GPU "struct device

Re: [Freedreno] [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-14 Thread Dmitry Baryshkov
On 14/06/2022 13:07, Miaoqian Lin wrote: Hi, Abhinav On 2022/6/11 7:20, Abhinav Kumar wrote: On 6/7/2022 4:08 AM, Miaoqian Lin wrote: of_graph_get_remote_node() returns remote device node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing

Re: [Freedreno] [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-14 Thread Miaoqian Lin
Hi, Abhinav On 2022/6/11 7:20, Abhinav Kumar wrote: > > > On 6/7/2022 4:08 AM, Miaoqian Lin wrote: >> of_graph_get_remote_node() returns remote device node pointer with >> refcount incremented, we should use of_node_put() on it >> when not need anymore. >> Add missing of_node_put() to avoid refcou

Re: [Freedreno] [PATCH v5] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-06-13 14:48:37) > During display resolution changes display have to be disabled first > followed by display enabling with new resolution. Display disable > will turn off both pixel clock and main link clock so that main link > have to be re-trained during display enable t