[Freedreno] [PATCH] drm/msm/dp: deinitialize mainlink if link training failedo

2020-10-30 Thread Kuogee Hsieh
DP compo phy have to be enable to start link training. When link training failed phy need to be disabled so that next link trainng can be proceed smoothly at next plug in. This patch de initialize mainlink to disable phy if link training failed. This prevent system crash due to disp_cc_mdss_dp_link

[Freedreno] [PATCH v2] drm/msm/dp: skip checking LINK_STATUS_UPDATED bit

2020-10-30 Thread Kuogee Hsieh
Some dongle will not clear LINK_STATUS_UPDATED bit after DPCD read which cause link training failed. This patch just read 6 bytes of DPCD link status from sink and return without checking LINK_STATUS_UPDATED bit. Link rate read back from sink need to be convert into really rate by timing 2.7Mb. For

[Freedreno] [PATCH] drm/msm/dp: promote irq_hpd handle to handle link trainign correctly

2020-10-30 Thread Kuogee Hsieh
Some dongles, such as Apple, required link training done at irq_hpd request instead of plugin request. This patch promote irq_hpd hanlder to handle link training and setup hpd_state correctly. Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_display.c | 20 ++-- 1 file c

Re: [Freedreno] [PATCH] drm/msm/dp: skip checking LINK_STATUS_UPDATED bit

2020-10-30 Thread khsieh
On 2020-10-20 15:15, Stephen Boyd wrote: Quoting Kuogee Hsieh (2020-10-20 09:59:59) No need to check LINK_STATuS_UPDATED bit before LINK_STATUS_UPDATED? return 6 bytes of link status during link training. Why? This patch also fix phy compliance test link rate conversion error. How?

[Freedreno] [PATCH] drm/msm/dsi: do not try reading 28nm vco rate if it's not enabled

2020-10-30 Thread Dmitry Baryshkov
Reading VCO rate for this PLL can cause boot stalls, if it is not enabled. Guard clk_hw_get_rate with a call to dsi_pll_28nm_clk_is_enabled(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dr

Re: [Freedreno] [PATCH] drm/msm/dsi: save PLL registers across first PHY reset

2020-10-30 Thread Dmitry Baryshkov
Hello, On 07/10/2020 03:10, benl-kernelpatc...@squareup.com wrote: From: Benjamin Li Take advantage of previously-added support for persisting PLL registers across DSI PHY disable/enable cycles (see 328e1a6 'drm/msm/dsi: Save/Restore PLL status across PHY reset') to support persisting across t

Re: [Freedreno] [PATCH v4 3/3] dt-bindings: drm/msm/gpu: Add cooling device support

2020-10-30 Thread Rob Herring
On Thu, 29 Oct 2020 13:37:21 +0530, Akhil P Oommen wrote: > Add cooling device support to gpu. A cooling device is bound to a > thermal zone to allow thermal mitigation. > > Signed-off-by: Akhil P Oommen > --- > Documentation/devicetree/bindings/display/msm/gpu.txt | 7 +++ > 1 file changed,

Re: [Freedreno] [PATCH 0/3] Introduce devm_pm_opp_set_* API

2020-10-30 Thread Viresh Kumar
On 28-10-20, 11:36, Viresh Kumar wrote: > On 12-10-20, 21:55, Frank Lee wrote: > > Hi, this patchset introduce devm_pm_opp_set_prop_name() and > > devm_pm_opp_set_supported_hw(). > > > > Yangtao Li (3): > > opp: Add devres wrapper for dev_pm_opp_set_supported_hw > > opp: Add devres wrapper for

Re: [Freedreno] [PATCH 2/3] opp: Add devres wrapper for dev_pm_opp_set_prop_name

2020-10-30 Thread Viresh Kumar
On 30-10-20, 19:19, Frank Lee wrote: > GPU is also a relatively large number of opp consumers. I was talking about the number of files or locations from which this routine (the devm_* variant) is going to get called. And it is one right now. And I don't see if any of the other callers are going to

Re: [Freedreno] [PATCH 2/3] opp: Add devres wrapper for dev_pm_opp_set_prop_name

2020-10-30 Thread Frank Lee
On Wed, Oct 28, 2020 at 10:46 PM Viresh Kumar wrote: > > On 28-10-20, 19:02, Frank Lee wrote: > > On Wed, Oct 28, 2020 at 6:29 PM Viresh Kumar > > wrote: > > > > > > On 12-10-20, 21:55, Frank Lee wrote: > > > > From: Yangtao Li > > > > > > > > Add devres wrapper for dev_pm_opp_set_prop_name() t

[Freedreno] [PATCH v5 2/3] arm64: dts: qcom: sc7180: Add gpu cooling support

2020-10-30 Thread Akhil P Oommen
Add cooling-cells property and the cooling maps for the gpu tzones to support GPU cooling. Signed-off-by: Akhil P Oommen Reviewed-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/ar

[Freedreno] [PATCH v5 1/3] drm/msm: Add support for GPU cooling

2020-10-30 Thread Akhil P Oommen
Register GPU as a devfreq cooling device so that it can be passively cooled by the thermal framework. Signed-off-by: Akhil P Oommen Tested-by: Matthias Kaehlcke --- Changes in v5: 1. Update Reviewed-by/Tested-by tags Changes in v4: 1. Fix gpu cooling map. 2. Add mka's Rev

[Freedreno] [PATCH v5 3/3] dt-bindings: drm/msm/gpu: Add cooling device support

2020-10-30 Thread Akhil P Oommen
Add cooling device support to gpu. A cooling device is bound to a thermal zone to allow thermal mitigation. Signed-off-by: Akhil P Oommen Reviewed-by: Matthias Kaehlcke --- Documentation/devicetree/bindings/display/msm/gpu.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documenta

[Freedreno] [PATCHv7 7/7] iommu: arm-smmu-impl: Add a space before open parenthesis

2020-10-30 Thread Sai Prakash Ranjan
Fix the checkpatch warning for space required before the open parenthesis. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu

[Freedreno] [PATCHv7 6/7] iommu: arm-smmu-impl: Use table to list QCOM implementations

2020-10-30 Thread Sai Prakash Ranjan
Use table and of_match_node() to match qcom implementation instead of multiple of_device_compatible() calls for each QCOM SMMU implementation. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 9 + drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 21

[Freedreno] [PATCHv7 4/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-10-30 Thread Sai Prakash Ranjan
From: Sharat Masetty The last level system cache can be partitioned to 32 different slices of which GPU has two slices preallocated. One slice is used for caching GPU buffers and the other slice is used for caching the GPU SMMU pagetables. This talks to the core system cache driver to acquire the

[Freedreno] [PATCHv7 1/7] iommu/io-pgtable-arm: Add support to use system cache

2020-10-30 Thread Sai Prakash Ranjan
Add a quirk IO_PGTABLE_QUIRK_SYS_CACHE to override the attributes set in TCR for the page table walker when using system cache. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/io-pgtable-arm.c | 7 ++- include/linux/io-pgtable.h | 4 2 files changed, 10 insertions(+), 1 deletion

[Freedreno] [PATCHv7 5/7] drm/msm/a6xx: Add support for using system cache on MMU500 based targets

2020-10-30 Thread Sai Prakash Ranjan
From: Jordan Crouse This is an extension to the series [1] to enable the System Cache (LLC) for Adreno a6xx targets. GPU targets with an MMU-500 attached have a slightly different process for enabling system cache. Use the compatible string on the IOMMU phandle to see if an MMU-500 is attached a

[Freedreno] [PATCHv7 3/7] drm/msm: rearrange the gpu_rmw() function

2020-10-30 Thread Sai Prakash Ranjan
From: Sharat Masetty The register read-modify-write construct is generic enough that it can be used by other subsystems as needed, create a more generic rmw() function and have the gpu_rmw() use this new function. Signed-off-by: Sharat Masetty Reviewed-by: Jordan Crouse Signed-off-by: Sai Prak

[Freedreno] [PATCHv7 0/7] System Cache support for GPU and required SMMU support

2020-10-30 Thread Sai Prakash Ranjan
Some hardware variants contain a system cache or the last level cache(llc). This cache is typically a large block which is shared by multiple clients on the SOC. GPU uses the system cache to cache both the GPU data buffers(like textures) as well the SMMU pagetables. This helps with improved render

[Freedreno] [PATCHv7 2/7] iommu/arm-smmu: Add domain attribute for system cache

2020-10-30 Thread Sai Prakash Ranjan
Add iommu domain attribute for using system cache aka last level cache by client drivers like GPU to set right attributes for caching the hardware pagetables into the system cache. Signed-off-by: Sai Prakash Ranjan --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 17 + drivers/iommu/a

Re: [Freedreno] [PATCH v2 1/4] drm: allow drm_atomic_print_state() to accept any drm_printer

2020-10-30 Thread Daniel Vetter
On Thu, Oct 29, 2020 at 06:00:58PM -0700, Abhinav Kumar wrote: > Currently drm_atomic_print_state() internally allocates and uses a > drm_info printer. Allow it to accept any drm_printer type so that > the API can be leveraged even for taking drm snapshot. > > Rename the drm_atomic_print_state() t