[Freedreno] [v2] drm/msm/dpu: request for display color blocks based on hw catalog entry

2020-06-11 Thread Krishna Manikandan
From: Kalyan Thota Request for color processing blocks only if they are available in the display hw catalog and they are sufficient in number for the selection. Changes in v2: - Include Fixes tag in commit message (Rob Clark) - Adding the Tested by tag as there are no code

Re: [Freedreno] [PATCH v8 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-11 Thread kernel test robot
Hi Jordan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on next-20200611] [cannot apply to iommu/next robh/for-next arm/for-next keystone/next rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next v5.7] [if your

[Freedreno] [PATCH] drm/msm: fix potential memleak issue

2020-06-11 Thread Bernard Zhao
Function msm_gpu_crashstate_capture maybe called for several times, and then the state->bos is a potential memleak. Also the state->pos maybe alloc failed, but now without any handle. This change is to fix some potential memleak and add error handle when alloc failed. Signed-off-by: Bernard Zhao

Re: [Freedreno] [PATCH v8 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-11 Thread kernel test robot
Hi Jordan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on next-20200611] [cannot apply to iommu/next robh/for-next arm/for-next keystone/next rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next v5.7

Re: [Freedreno] [PATCH v8 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-06-11 Thread kernel test robot
Hi Jordan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.7 next-20200611] [cannot apply to iommu/next robh/for-next arm/for-next keystone/next rockchip/for-next arm64/for-next/core shawnguo/for-next soc/for-next] [if your

Re: [Freedreno] [PATCH 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-11 Thread Rob Clark
On Thu, Jun 11, 2020 at 3:29 PM Jordan Crouse wrote: > > Add support for using per-instance pagetables if all the dependencies are > available. > > Signed-off-by: Jordan Crouse > --- > > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 69 ++- > drivers/gpu/drm/msm/msm_ringbuffer.

[Freedreno] [PATCH v6 4/5] drm/msm/dp: add support for DP PLL driver

2020-06-11 Thread Tanmay Shah
From: Chandan Uddaraju Add the needed DP PLL specific files to support display port interface on msm targets. The DP driver calls the DP PLL driver registration. The DP driver sets the link and pixel clock sources. Changes in v2: -- Update copyright markings on all relevant files. -- Use DRM_DE

[Freedreno] [PATCH v6 2/5] drm: add constant N value in helper file

2020-06-11 Thread Tanmay Shah
From: Chandan Uddaraju The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly. Change in v6: Change commit message Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Sig

[Freedreno] [PATCH v6 5/5] drm/msm/dpu: add display port support in DPU

2020-06-11 Thread Tanmay Shah
From: Jeykumar Sankaran Add display port support in DPU by creating hooks for DP encoder enumeration and encoder mode initialization. This change is based on the Snapdragon Display port driver changes[1]. changes in v2: - rebase on [2] (Sean Paul) - remove unwanted error checks

[Freedreno] [PATCH v6 1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon

2020-06-11 Thread Tanmay Shah
From: Chandan Uddaraju Add bindings for Snapdragon DisplayPort controller driver. Changes in V2: Provide details about sel-gpio Changes in V4: Provide details about max dp lanes Change the commit text Changes in V5: moved dp.txt to yaml file Changes in v6: - Squash all AUX LUT properties into

[Freedreno] [PATCH v6 0/5] Add support for DisplayPort driver on

2020-06-11 Thread Tanmay Shah
These patches add support for Display-Port driver on SnapDragon hardware. It adds DP driver and DP PLL driver files along with the needed device-tree bindings. The block diagram of DP driver is shown below: +-+ |DRM FRAMEWORK| +-

[Freedreno] [PATCH] drm/msm: fix potential memleak in error branch

2020-06-11 Thread Bernard Zhao
In fucntin msm_submitqueue_create, the queue is a local variable, in return -EINVAL branch, queue didn`t add to ctx`s list yet, and also didn`t kfree, this maybe bring in potential memleak. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/msm/msm_submitqueue.c | 4 +++- 1 file changed, 3 insertio

[Freedreno] [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-06-11 Thread Jordan Crouse
Add a new implementation hook to allow the implementation specific code to tweek the context bank configuration just before it gets written. The first user will be the Adreno GPU implementation to turn on SCTLR.HUPCF to ensure that a page fault doesn't terminating pending transactions. Doing so cou

[Freedreno] [PATCH 1/6] iommu/arm-smmu: Add auxiliary domain support for arm-smmuv2

2020-06-11 Thread Jordan Crouse
Support auxiliary domains for arm-smmu-v2 to initialize and support multiple pagetables for a single SMMU context bank. Since the smmu-v2 hardware doesn't have any built in support for switching the pagetable base it is left as an exercise to the caller to actually use the pagetable. Aux domains a

[Freedreno] [PATCH 2/6] iommu/io-pgtable: Allow a pgtable implementation to skip TLB operations

2020-06-11 Thread Jordan Crouse
Allow a io-pgtable implementation to skip TLB operations by checking for NULL pointers in the helper functions. It will be up to to the owner of the io-pgtable instance to make sure that they independently handle the TLB correctly. Signed-off-by: Jordan Crouse --- include/linux/io-pgtable.h | 1

[Freedreno] [PATCH 4/6] drm/msm: Add support to create a local pagetable

2020-06-11 Thread Jordan Crouse
Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables and auxiliary domains need to be supported and enabled. Signed-off-

[Freedreno] [PATCH 5/6] drm/msm: Add support for address space instances

2020-06-11 Thread Jordan Crouse
Add support for allocating an address space instance. Targets that support per-instance pagetables should implement their own function to allocate a new instance. The default will return the existing generic address space. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_drv.c | 15

[Freedreno] [PATCH 6/6] drm/msm/a6xx: Add support for per-instance pagetables

2020-06-11 Thread Jordan Crouse
Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 69 ++- drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 2 files changed, 69 insertions(+), 1 deletion(-) diff --gi

[Freedreno] [PATCH 3/6] iommu/arm-smmu: Add a domain attribute to pass the pagetable config

2020-06-11 Thread Jordan Crouse
The Adreno GPU has the capacity to manage its own pagetables and switch them dynamically from the hardware. Add a domain attribute for arm-smmu-v2 to get the default pagetable configuration so that the GPU driver can match the format for its own pagetables. Signed-off-by: Jordan Crouse --- driv

[Freedreno] [PATCH 0/6] iommu-arm-smmu: Add auxiliary domains and per-instance pagetables

2020-06-11 Thread Jordan Crouse
This is a new refresh of support for auxiliary domains for arm-smmu-v2 and per-instance pagetables for drm/msm. The big change here from past efforts is that outside of creating a single aux-domain to enable TTBR0 all of the per-instance pagetables are created and managed exclusively in drm/msm wit

[Freedreno] [PATCH v8 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-06-11 Thread Jordan Crouse
Add a link to the pointer to the struct device that is attached to a domain. This makes it easy to get the pointer if it is needed in the implementation specific code. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 1 + drivers/iommu/arm-smmu.h | 1 + 2 files changed, 2 insertions(

[Freedreno] [PATCH v8 2/7] iommu/arm-smmu: Add support for split pagetables

2020-06-11 Thread Jordan Crouse
Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu.c | 21 - drivers/iommu/arm-smmu.h | 25 +++-- 2 files changed, 35 insertions(+), 11 deletio

[Freedreno] [PATCH v8 6/7] drm/msm: Set the global virtual address range from the IOMMU domain

2020-06-11 Thread Jordan Crouse
Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 +++-- drivers/gpu/drm/ms

[Freedreno] [PATCH v8 1/7] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-06-11 Thread Jordan Crouse
Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 ++- drivers/i

[Freedreno] [PATCH v8 7/7] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-06-11 Thread Jordan Crouse
Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables. Signed-off-by: Jordan Crouse --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm8

[Freedreno] [PATCH v8 5/7] iommu/arm-smmu: Add implementation for the adreno GPU SMMU

2020-06-11 Thread Jordan Crouse
Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-gpu-smmu compatible string. When selected the driver will attempt to enable split pagetables. Signed-off-by: Jordan Crouse --- drivers/iommu/arm-smmu-impl.c | 3 +++ drivers/iommu/arm-sm

[Freedreno] [PATCH v8 3/7] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-06-11 Thread Jordan Crouse
Every Qcom Adreno GPU has an embedded SMMU for its own use. These devices depend on unique features such as split pagetables, different stall/halt requirements and other settings. Identify them with a compatible string so that they can be identified in the arm-smmu implementation specific code. Si

[Freedreno] [PATCH v8 0/7] iommu/arm-smmu: Enable split pagetable support

2020-06-11 Thread Jordan Crouse
Another iteration of the split-pagetable support for arm-smmu and the Adreno GPU SMMU. After email discussions [1] we opted to make a arm-smmu implementation for specifically for the Adreno GPU and use that to enable split pagetable support and later other implementation specific bits that we nee

Re: [Freedreno] [PATCH v6 4/5] drm/msm/dp: add support for DP PLL driver

2020-06-11 Thread tanmay
Hi Stephen, Thanks for reviews. Please ignore previous response to this patch. Here, I have re-organized it. Thanks, On 2020-06-11 13:07, tan...@codeaurora.org wrote: On 2020-06-09 19:06, Stephen Boyd wrote: Quoting Tanmay Shah (2020-06-08 20:46:23) diff --git a/drivers/gpu/drm/msm/dp/dp_ca

Re: [Freedreno] [PATCH v6 2/5] drm: add constant N value in helper file

2020-06-11 Thread tanmay
On 2020-06-09 19:20, Stephen Boyd wrote: Quoting Tanmay Shah (2020-06-08 20:40:47) From: Chandan Uddaraju The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly. Change in v6:

Re: [Freedreno] [PATCH v6 4/5] drm/msm/dp: add support for DP PLL driver

2020-06-11 Thread tanmay
On 2020-06-09 19:06, Stephen Boyd wrote: Quoting Tanmay Shah (2020-06-08 20:46:23) diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c b/drivers/gpu/drm/msm/dp/dp_catalog.c index d02f4eb..2b982f0 100644 --- a/drivers/gpu/drm/msm/dp/dp_catalog.c +++ b/drivers/gpu/drm/msm/dp/dp_catalog.c @@ -5,6 +5,

Re: [Freedreno] [PATCH v6 1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon

2020-06-11 Thread tanmay
On 2020-06-09 19:15, Stephen Boyd wrote: Quoting Tanmay Shah (2020-06-08 20:38:18) diff --git a/Documentation/devicetree/bindings/display/msm/dp-sc7180.yaml b/Documentation/devicetree/bindings/display/msm/dp-sc7180.yaml new file mode 100644 index 000..5fdb915 --- /dev/null +++ b/Documentat

Re: [Freedreno] [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry

2020-06-11 Thread John Stultz
On Thu, Jun 11, 2020 at 5:55 AM Krishna Manikandan wrote: > > From: Kalyan Thota > > Request for color processing blocks only if they are > available in the display hw catalog and they are > sufficient in number for the selection. > > Signed-off-by: Kalyan Thota Tested-by: John Stultz Thanks

Re: [Freedreno] [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry

2020-06-11 Thread Rob Clark
On Thu, Jun 11, 2020 at 5:55 AM Krishna Manikandan wrote: > > From: Kalyan Thota > > Request for color processing blocks only if they are > available in the display hw catalog and they are > sufficient in number for the selection. > I believe this should have: Fixes: e47616df008b ("drm/msm/dpu:

Re: [Freedreno] [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog

2020-06-11 Thread Dmitry Baryshkov
On 26/05/2020 06:22, Jonathan Marek wrote: This brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested. Signed-off-by: Jonathan Marek --

Re: [Freedreno] [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog

2020-06-11 Thread Jonathan Marek
On 6/11/20 10:37 AM, Dmitry Baryshkov wrote: On 26/05/2020 06:22, Jonathan Marek wrote: This brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is al

[Freedreno] [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry

2020-06-11 Thread Krishna Manikandan
From: Kalyan Thota Request for color processing blocks only if they are available in the display hw catalog and they are sufficient in number for the selection. Signed-off-by: Kalyan Thota --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 1 file changed, 8 insertions(+), 4 del

Re: [Freedreno] [v3] drm/bridge: ti-sn65dsi86: ensure bridge suspend happens during PM sleep

2020-06-11 Thread Stephen Boyd
Quoting Harigovindan P (2020-06-09 05:04:55) > ti-sn65dsi86 bridge is enumerated as a runtime device. When > suspend is triggered, PM core adds a refcount on all the > devices and calls device suspend, since usage count is > already incremented, runtime suspend will not be called > and it kept the

Re: [Freedreno] [PATCH v6 2/5] drm: add constant N value in helper file

2020-06-11 Thread Jani Nikula
On Mon, 08 Jun 2020, Tanmay Shah wrote: > From: Chandan Uddaraju > > The constant N value (0x8000) is used by i915 DP > driver. Define this value in dp helper header file > to use in multiple Display Port drivers. Change > i915 driver accordingly. > > Change in v6: Change commit message > > Signe