Re: [Freedreno] [PATCH v5 0/6] Add support for GPU DDR BW scaling

2020-07-20 Thread Viresh Kumar
On 20-07-20, 08:03, Rob Clark wrote: > On Mon, Jul 20, 2020 at 3:01 AM Viresh Kumar wrote: > > > > On 15-07-20, 08:36, Rob Clark wrote: > > > I can take the first two into msm-next, the 3rd will need to wait > > > until dev_pm_opp_set_bw() lands > > > > You can base that on a8351c12c6c7 in

Re: [Freedreno] [PATCH] drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets

2020-07-20 Thread Rob Clark
On Mon, Jul 20, 2020 at 4:32 PM Stephen Boyd wrote: > > Quoting khs...@codeaurora.org (2020-07-20 15:48:13) > > On 2020-07-20 13:18, Stephen Boyd wrote: > > > Quoting Kuogee Hsieh (2020-07-07 11:41:25) > > >> drivers/gpu/drm/msm/dp/dp_power.c | 32 +- > > >>

[Freedreno] [Resend][PATCH] drm/msm: use kthread_create_worker instead of kthread_run

2020-07-20 Thread Bernard
Use kthread_create_worker to simplify the code and optimise the manager struct: msm_drm_thread. With this change, we could remove struct element (struct task_struct *thread & struct kthread_worker worker), instead, use one point (struct kthread_worker *worker). Signed-off-by: Bernard Zhao ---

Re: [Freedreno] [PATCH] drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets

2020-07-20 Thread Stephen Boyd
Quoting khs...@codeaurora.org (2020-07-20 15:48:13) > On 2020-07-20 13:18, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2020-07-07 11:41:25) > >> drivers/gpu/drm/msm/dp/dp_power.c | 32 +- > >> drivers/gpu/drm/msm/dp/dp_power.h | 1 + > >> drivers/gpu/drm/msm/dp/dp_reg.h

Re: [Freedreno] [PATCH] drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets

2020-07-20 Thread khsieh
On 2020-07-20 13:18, Stephen Boyd wrote: Quoting Kuogee Hsieh (2020-07-07 11:41:25) add event thread to execute events serially from event queue. Also timeout mode is supported which allow an event be deferred to be executed at later time. Both link and phy compliant tests had been done

[Freedreno] [PATCH V2] drm: hold gem reference until object is no longer accessed

2020-07-20 Thread Steve Cohen
A use-after-free in drm_gem_open_ioctl can happen if the GEM object handle is closed between the idr lookup and retrieving the size from said object since a local reference is not being held at that point. Hold the local reference while the object can still be accessed to fix this and plug the

Re: [Freedreno] [v3] arm64: dts: sc7180: add nodes for idp display

2020-07-20 Thread Stephen Boyd
Quoting harig...@codeaurora.org (2020-06-29 06:50:09) > On 2020-06-25 06:37, Stephen Boyd wrote: > > Quoting Harigovindan P (2020-02-17 00:58:42) > >> diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts > >> b/arch/arm64/boot/dts/qcom/sc7180-idp.dts > >> index 388f50ad4fde..349db8fe78a5 100644 >

Re: [Freedreno] [PATCH v3] arm64: dts: qcom: sc7180: Add Display Port dt node

2020-07-20 Thread Stephen Boyd
Quoting Tanmay Shah (2020-06-30 12:51:51) > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi > b/arch/arm64/boot/dts/qcom/sc7180.dtsi > index 31b9217bb5bf..271d55db62ab 100644 > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi > @@ -2440,6 +2447,44 @@

Re: [Freedreno] [PATCH] drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets

2020-07-20 Thread Stephen Boyd
Quoting Kuogee Hsieh (2020-07-07 11:41:25) > add event thread to execute events serially from event queue. Also > timeout mode is supported which allow an event be deferred to be > executed at later time. Both link and phy compliant tests had been > done successfully. > > This change depends-on

Re: [Freedreno] arm64: Internal error: Oops: qcom_iommu_tlb_inv_context free_io_pgtable_ops on db410c

2020-07-20 Thread Naresh Kamboju
On Mon, 20 Jul 2020 at 21:27, Rob Clark wrote: > > On Mon, Jul 20, 2020 at 4:28 AM Robin Murphy wrote: > > > > On 2020-07-20 08:17, Arnd Bergmann wrote: > > > On Mon, Jul 20, 2020 at 8:36 AM Naresh Kamboju > > > wrote: <> > > >> [5.444121] Unable to handle kernel NULL pointer dereference at

Re: [Freedreno] arm64: Internal error: Oops: qcom_iommu_tlb_inv_context free_io_pgtable_ops on db410c

2020-07-20 Thread Rob Clark
On Mon, Jul 20, 2020 at 4:28 AM Robin Murphy wrote: > > On 2020-07-20 08:17, Arnd Bergmann wrote: > > On Mon, Jul 20, 2020 at 8:36 AM Naresh Kamboju > > wrote: > >> > >> This kernel oops while boot linux mainline kernel on arm64 db410c device. > >> > >> metadata: > >>git branch: master > >>

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

2020-07-20 Thread Jordan Crouse
Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable split pagetables and per-instance pagetables for drm/msm. Signed-off-by: Jordan Crouse --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Freedreno] [PATCH v10 10/13] drm/msm: Add support to create a local pagetable

2020-07-20 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 enabled. Signed-off-by: Jordan Crouse ---

[Freedreno] [PATCH v10 03/13] iommu/arm-smmu: Add implementation hooks to configure contexts

2020-07-20 Thread Jordan Crouse
Add a new hook to allow implementations to implement their own context bank allocation scheme and update the existing init_context function to take the device pointer. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it

[Freedreno] [PATCH v10 04/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-07-20 Thread Jordan Crouse
Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-smmu compatible string. The new Adreno SMMU implementation will enable split pagetables (TTBR1) for the domain attached to the GPU device (SID 0) and hard code it context bank 0 so the GPU

[Freedreno] [PATCH v10 11/13] drm/msm: Add support for private address space instances

2020-07-20 Thread Jordan Crouse
Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse ---

[Freedreno] [PATCH v10 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation

2020-07-20 Thread Jordan Crouse
(reworded the summary to reflect ongoing changes in the code) This series adds an Adreno SMMU implementation to arm-smmu to allow GPU hardware pagetable switching. The Adreno GPU has built in capabilities to switch the TTBR0 pagetable during runtime to allow each individual instance or

[Freedreno] [PATCH v10 05/13] iommu: Add a domain attribute to get/set a pagetable configuration

2020-07-20 Thread Jordan Crouse
Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by arm-smmu to share the current pagetable configuration with the leaf driver and to allow the leaf driver to set up a new pagetable configuration under certain circumstances. Signed-off-by: Jordan Crouse --- include/linux/iommu.h

[Freedreno] [PATCH v10 09/13] drm/msm: Set the global virtual address range from the IOMMU domain

2020-07-20 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 +++--

[Freedreno] [PATCH v10 06/13] iommu/arm-smmu-qcom: Get and set the pagetable config for split pagetables

2020-07-20 Thread Jordan Crouse
The Adreno GPU has the capability to manage its own pagetables and switch them dynamically from the hardware. To do this the GPU uses TTBR1 for "global" GPU memory and creates local pagetables for each context and switches them dynamically with the GPU. Use DOMAIN_ATTR_PGTABLE_CFG to get the

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

2020-07-20 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 | 53 +++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 3 files

[Freedreno] [PATCH v10 07/13] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-07-20 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.

[Freedreno] [PATCH v10 08/13] drm/msm: Add a context pointer to the submitqueue

2020-07-20 Thread Jordan Crouse
Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. GPU submissions can access the active context via the submitqueue instead of requiring it to be passed around from

[Freedreno] [PATCH v10 02/13] iommu/arm-smmu: Add support for split pagetables

2020-07-20 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

[Freedreno] [PATCH v10 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-07-20 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 ++-

Re: [Freedreno] [PATCH] drm/msm/dpu: fix/enable 6bpc dither with split-lm

2020-07-20 Thread Rob Clark
On Mon, Jul 20, 2020 at 5:53 AM wrote: > > On 2020-07-16 03:49, Rob Clark wrote: > > From: Rob Clark > > > > If split-lm is used (for ex, on sdm845), we can have multiple ping- > > pongs, but only a single phys encoder. We need to configure dithering > > on each of them. > > > > Signed-off-by:

Re: [Freedreno] [PATCH v5 0/6] Add support for GPU DDR BW scaling

2020-07-20 Thread Rob Clark
On Mon, Jul 20, 2020 at 3:01 AM Viresh Kumar wrote: > > On 15-07-20, 08:36, Rob Clark wrote: > > I can take the first two into msm-next, the 3rd will need to wait > > until dev_pm_opp_set_bw() lands > > You can base that on a8351c12c6c7 in linux-next, I will make sure not to > rebase > it

Re: [Freedreno] [PATCH] drm/msm/dpu: fix/enable 6bpc dither with split-lm

2020-07-20 Thread kalyan_t
On 2020-07-16 03:49, Rob Clark wrote: From: Rob Clark If split-lm is used (for ex, on sdm845), we can have multiple ping- pongs, but only a single phys encoder. We need to configure dithering on each of them. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 22

Re: [Freedreno] arm64: Internal error: Oops: qcom_iommu_tlb_inv_context free_io_pgtable_ops on db410c

2020-07-20 Thread Robin Murphy
On 2020-07-20 08:17, Arnd Bergmann wrote: On Mon, Jul 20, 2020 at 8:36 AM Naresh Kamboju wrote: This kernel oops while boot linux mainline kernel on arm64 db410c device. metadata: git branch: master git repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git

Re: [Freedreno] [PATCH v5 0/6] Add support for GPU DDR BW scaling

2020-07-20 Thread Viresh Kumar
On 15-07-20, 08:36, Rob Clark wrote: > I can take the first two into msm-next, the 3rd will need to wait > until dev_pm_opp_set_bw() lands You can base that on a8351c12c6c7 in linux-next, I will make sure not to rebase it anymore. -- viresh ___

Re: [Freedreno] [Mesa-dev] [XDC 2020] Virtual conference + Call for Proposals extended 2 weeks more

2020-07-20 Thread Samuel Iglesias Gonsálvez
On 7/3/20 4:41 PM, Samuel Iglesias Gonsálvez wrote: > Hi, > > In the last meeting, X.Org Foundation board has decided that XDC 2020 > will be a virtual conference, given the uncertain COVID-19 situation in > Europe by September, including the possibility of a second wave, > outbreaks and travel

Re: [Freedreno] arm64: Internal error: Oops: qcom_iommu_tlb_inv_context free_io_pgtable_ops on db410c

2020-07-20 Thread Arnd Bergmann
On Mon, Jul 20, 2020 at 8:36 AM Naresh Kamboju wrote: > > This kernel oops while boot linux mainline kernel on arm64 db410c device. > > metadata: > git branch: master > git repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git commit: