Re: [Freedreno] [PATCH -next] drm/msm/dpu: remove duplicated include from dpu_hw_lm.c

2018-10-05 Thread Abhinav Kumar
On 2018-10-05 18:49, YueHaibing wrote: Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c

[Freedreno] [PATCH v3 1/4] drm/msm/dpu: Remove dpu_kms_pm_suspend/resume

2018-10-05 Thread Bruce Wang
PM resume was crashing during dpu_kms_pm_resume. This patch removes dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic helpers instead (see next patch). This patch also removes dpu_kms_is_suspend_blocked since it is never called. v2: Reorganized patches in patchset

[Freedreno] [PATCH v3 3/4] drm/msm/dpu: Remove suspend state tracking from crtc

2018-10-05 Thread Bruce Wang
Since drm core's modeset locks serialize atomic commits, we don't need to track whether or not we're in a suspended state from inside the crtc for dpu_crtc_enable/disable. This patch removes the suspend logic from the crtc and removes the relevant tracing from dpu_trace. Since we removed all calls

[Freedreno] [PATCH v3 2/4] drm/msm: Cut dpu_kms hooks from msm_pm_suspend/resume

2018-10-05 Thread Bruce Wang
Removes the traces of the non-atomic helper calls in msm_pm_suspend/resume since we just deleted those functions (see patch 1). Also removes the drm_kms_helper_poll_disable/enable calls, since the DRM_CONNECTOR_POLL_CONNECT flag is never set so periodic polling doesn't happen anyways. v2:

[Freedreno] [PATCH v3 4/4] drm/msm/dpu: Replace dpu_crtc_reset by atomic helper

2018-10-05 Thread Bruce Wang
Since we removed all suspend logic from the crtc code (see patch 3/4), dpu_crtc_reset does the same things as drm_atomic_helper_crtc_reset, so let's just replace it with a call to the atomic helper. v3: added patch to patchset Signed-off-by: Bruce Wang ---

[Freedreno] [PATCH v3 0/4] drm/msm: Use atomic helpers for PM suspend/resume

2018-10-05 Thread Bruce Wang
Patches 1-2: Changes msm_pm_resume implementation to use atomic helpers and removes the previously used dpu_kms_pm_suspend/resume functions. Patches 3-4: Removes reliance on knowledge about suspend state from crtc and removes dpu_crtc_reset in favour of the atomic helper. v2: Reorganized patch

Re: [Freedreno] [PATCH] drm/msm: validate display and event threads

2018-10-05 Thread Abhinav Kumar
On 2018-10-05 12:49, Jeykumar Sankaran wrote: While creating display and event threads per crtc, validate them before setting their priorities. Change-Id: I1dda805286df981c0f0e2b26507d089d3a21ff6c Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/msm_drv.c | 49

[Freedreno] [PATCH] drm/msm/a6xx: Remove CP perfcounter selects from the protected list

2018-10-05 Thread Jordan Crouse
The CP performance counter selects were accidentally marked as protected so they couldn't be written from PM4 streams. Remove the protection because user space does have an interest in setting up their own counters. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 +---

[Freedreno] [PATCH] drm/msm: validate display and event threads

2018-10-05 Thread Jeykumar Sankaran
While creating display and event threads per crtc, validate them before setting their priorities. Change-Id: I1dda805286df981c0f0e2b26507d089d3a21ff6c Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/msm_drv.c | 49 ++- 1 file changed, 16

Re: [Freedreno] [PATCH 4/4] drm/msm/dpu: Remove suspend_state from dpu_kms

2018-10-05 Thread Sean Paul
On Fri, Oct 05, 2018 at 11:48:43AM -0400, Bruce Wang wrote: > The suspend_state field is no longer used and can be removed along with > dpu_kms_is_suspend_state. > This can be rolled up into patch 3, since that's where the usage of these is being removed. Sean > Signed-off-by: Bruce Wang >

Re: [Freedreno] [PATCH 3/4] drm/msm/dpu: Remove suspend state tracking from crtc

2018-10-05 Thread Sean Paul
On Fri, Oct 05, 2018 at 11:48:42AM -0400, Bruce Wang wrote: > dpu_crtc_enable/disable/reset are only being called upon > initialization/destruction of the device and as part of the PM > suspend/resume handling. *and dpms/enable on/off > Since core suspend and resume calls > are guarenteed to

Re: [Freedreno] [PATCH 1/4] drm/msm/dpu: Remove dpu_kms_pm_suspend/resume

2018-10-05 Thread Sean Paul
On Fri, Oct 05, 2018 at 01:27:54PM -0400, Sean Paul wrote: > On Fri, Oct 05, 2018 at 11:48:40AM -0400, Bruce Wang wrote: > > PM resume was crashing during dpu_kms_pm_resume. This patch removes > > dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic > > helpers instead (see next

Re: [Freedreno] [PATCH 2/4] drm/msm: Cut dpu_kms hooks from msm_pm_suspend/resume

2018-10-05 Thread Sean Paul
On Fri, Oct 05, 2018 at 11:48:41AM -0400, Bruce Wang wrote: > Removes the traces of the non-atomic helper calls in > msm_pm_suspend/resume since we just deleted those functions (see patch > 1). Also removes the drm_kms_helper_poll_disable/enable calls, since > the DRM_CONNECTOR_POLL_CONNECT flag

Re: [Freedreno] [PATCH 1/4] drm/msm/dpu: Remove dpu_kms_pm_suspend/resume

2018-10-05 Thread Sean Paul
On Fri, Oct 05, 2018 at 11:48:40AM -0400, Bruce Wang wrote: > PM resume was crashing during dpu_kms_pm_resume. This patch removes > dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic > helpers instead (see next patch). This patch also removes > dpu_kms_is_suspend_blocked since

Re: [Freedreno] [PATCH 7/9] OPP: Add dev_pm_opp_get_interconnect_bw()

2018-10-05 Thread Jordan Crouse
On Fri, Oct 05, 2018 at 12:06:06PM +0530, Sharat Masetty wrote: > > > On 8/27/2018 8:41 PM, Jordan Crouse wrote: > >Add dev_pm_opp_get_interconnect_bw() to read the interconnect > >bandwidth values for a given OPP. > > > >Signed-off-by: Jordan Crouse > >--- > > drivers/opp/of.c | 36

[Freedreno] [PATCH 3/4] drm/msm/dpu: Remove suspend state tracking from crtc

2018-10-05 Thread Bruce Wang
dpu_crtc_enable/disable/reset are only being called upon initialization/destruction of the device and as part of the PM suspend/resume handling. Since core suspend and resume calls are guarenteed to not overlap with one another we don't need to track whether or not we're in a suspended state from

[Freedreno] [PATCH 0/4] drm/msm: Use atomic helpers for PM suspend/resume

2018-10-05 Thread Bruce Wang
Patches 1-2: Changes msm_pm_resume implementation to use atomic helpers and removes the previously used dpu_kms_pm_suspend/resume functions. Patches 3-4: Removes reliance on knowledge about suspend state from crtc Bruce Wang (4): drm/msm/dpu: Remove dpu_kms_pm_suspend/resume drm/msm: Cut

[Freedreno] [PATCH 4/4] drm/msm/dpu: Remove suspend_state from dpu_kms

2018-10-05 Thread Bruce Wang
The suspend_state field is no longer used and can be removed along with dpu_kms_is_suspend_state. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 16 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h

[Freedreno] [PATCH 2/4] drm/msm: Cut dpu_kms hooks from msm_pm_suspend/resume

2018-10-05 Thread Bruce Wang
Removes the traces of the non-atomic helper calls in msm_pm_suspend/resume since we just deleted those functions (see patch 1). Also removes the drm_kms_helper_poll_disable/enable calls, since the DRM_CONNECTOR_POLL_CONNECT flag is never set so periodic polling doesn't happen anyways.

[Freedreno] [PATCH 1/4] drm/msm/dpu: Remove dpu_kms_pm_suspend/resume

2018-10-05 Thread Bruce Wang
PM resume was crashing during dpu_kms_pm_resume. This patch removes dpu_kms_pm_suspend/resume so that msm_pm_suspend/resume uses the atomic helpers instead (see next patch). This patch also removes dpu_kms_is_suspend_blocked since it is never called. Signed-off-by: Bruce Wang ---

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

2018-10-05 Thread Jordan Crouse
On Fri, Oct 05, 2018 at 06:38:35PM +0530, Sharat Masetty wrote: > 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

Re: [Freedreno] [v2 4/7] drm/msm/adreno: Add registers in the GPU CX domain

2018-10-05 Thread Jordan Crouse
On Fri, Oct 05, 2018 at 06:38:32PM +0530, Sharat Masetty wrote: > Add the registers needed for configuring the system cache slice info and > other parameters in the GPU. This would conflict with msm-next or at least with the latest update from the rnndb. It is good to have this out here for

[Freedreno] [v2 6/7] drm/msm: Pass mmu features to generic layers

2018-10-05 Thread Sharat Masetty
Allow different Adreno targets the ability to pass specific mmu features to the generic layers. This will help conditionally configure certain iommu features for certain Adreno targets. Also Add a few simple support functions to support a bitmask of features that a specific MMU implementation

[Freedreno] [v2 5/7] arm64:dts:sdm845: Add register range for gpu CX

2018-10-05 Thread Sharat Masetty
This patch adds a register range in the gpu CX domain. This is needed to support the last level system cache(LLC). Signed-off-by: Sharat Masetty --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi

[Freedreno] [v2 2/7] iommu/arm-smmu: Add support to use Last level cache

2018-10-05 Thread Sharat Masetty
From: Vivek Gautam Qualcomm SoCs have an additional level of cache called as System cache or Last level cache[1]. This cache sits right before the DDR, and is tightly coupled with the memory controller. The cache is available to all the clients present in the SoC system. The clients request

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

2018-10-05 Thread 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 --- drivers/gpu/drm/msm/msm_drv.c | 8

[Freedreno] [v2 4/7] drm/msm/adreno: Add registers in the GPU CX domain

2018-10-05 Thread Sharat Masetty
Add the registers needed for configuring the system cache slice info and other parameters in the GPU. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx.xml.h

[Freedreno] [v2 1/7] soc: qcom: llcc-slice: Add error checks for API functions

2018-10-05 Thread Sharat Masetty
From: Jordan Crouse llcc_slice_getd can return a ERR_PTR code on failure. Add a IS_ERR_OR_NULL check to subsequent API calls that use struct llcc_slice_desc to guard against faults and to let the leaf drivers get away with safely using a ERR_PTR() encoded "pointer" in the aftermath of a

[Freedreno] [v2 0/7] drm/msm/a6xx: System Cache Support

2018-10-05 Thread Sharat Masetty
Some hardware variants contain a system level 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

Re: [Freedreno] [PATCH 7/9] OPP: Add dev_pm_opp_get_interconnect_bw()

2018-10-05 Thread Sharat Masetty
On 8/27/2018 8:41 PM, Jordan Crouse wrote: Add dev_pm_opp_get_interconnect_bw() to read the interconnect bandwidth values for a given OPP. Signed-off-by: Jordan Crouse --- drivers/opp/of.c | 36 include/linux/pm_opp.h | 7 +++ 2 files