Re: [Freedreno] [PATCH v2 10/14] drm/msm/a6xx: Fix up A6XX protected registers

2023-02-14 Thread Rob Clark
On Tue, Feb 14, 2023 at 4:38 PM Konrad Dybcio wrote: > > > > On 15.02.2023 01:10, Dmitry Baryshkov wrote: > > On 14/02/2023 23:56, Rob Clark wrote: > >> On Tue, Feb 14, 2023 at 9:32 AM Konrad Dybcio > >> wrote: > >>> > >>> One of the protected ranges was too small (compared to the data we > >>>

Re: [Freedreno] [PATCH v2 10/14] drm/msm/a6xx: Fix up A6XX protected registers

2023-02-14 Thread Konrad Dybcio
On 15.02.2023 01:10, Dmitry Baryshkov wrote: > On 14/02/2023 23:56, Rob Clark wrote: >> On Tue, Feb 14, 2023 at 9:32 AM Konrad Dybcio >> wrote: >>> >>> One of the protected ranges was too small (compared to the data we >>> have downstream). Fix it. >>> >>> Fixes: 408434036958 ("drm/msm/a6xx:

Re: [Freedreno] [PATCH v2 10/14] drm/msm/a6xx: Fix up A6XX protected registers

2023-02-14 Thread Dmitry Baryshkov
On 14/02/2023 23:56, Rob Clark wrote: On Tue, Feb 14, 2023 at 9:32 AM Konrad Dybcio wrote: One of the protected ranges was too small (compared to the data we have downstream). Fix it. Fixes: 408434036958 ("drm/msm/a6xx: update/fix CP_PROTECT initialization") Signed-off-by: Konrad Dybcio ---

Re: [Freedreno] [PATCH v3 15/27] drm/msm/dpu: move the rest of plane checks to dpu_plane_atomic_check()

2023-02-14 Thread Dmitry Baryshkov
On 15/02/2023 01:25, Abhinav Kumar wrote: Hi Dmitry Sorry for the late response on this one. On 2/3/2023 2:55 PM, Dmitry Baryshkov wrote: On 04/02/2023 00:44, Abhinav Kumar wrote: On 2/3/2023 10:21 AM, Dmitry Baryshkov wrote: Move plane state updates from dpu_crtc_atomic_check() to the

Re: [Freedreno] [PATCH 02/10] dt-bindings: display/msm: dsi-controller-main: Add SM6375

2023-02-14 Thread Rob Herring
On Sat, 11 Feb 2023 13:26:48 +0100, Konrad Dybcio wrote: > Add the DSI host found on SM6375. > > Signed-off-by: Konrad Dybcio > --- > .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 ++ > 1 file changed, 2 insertions(+) > Acked-by: Rob Herring

Re: [Freedreno] [PATCH 01/10] dt-bindings: display/msm: dsi-controller-main: Add SM6350

2023-02-14 Thread Rob Herring
On Sat, 11 Feb 2023 13:26:47 +0100, Konrad Dybcio wrote: > Add the DSI host found on SM6350. > > Signed-off-by: Konrad Dybcio > --- > .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 ++ > 1 file changed, 2 insertions(+) > Acked-by: Rob Herring

Re: [Freedreno] [PATCH v3 15/27] drm/msm/dpu: move the rest of plane checks to dpu_plane_atomic_check()

2023-02-14 Thread Abhinav Kumar
Hi Dmitry Sorry for the late response on this one. On 2/3/2023 2:55 PM, Dmitry Baryshkov wrote: On 04/02/2023 00:44, Abhinav Kumar wrote: On 2/3/2023 10:21 AM, Dmitry Baryshkov wrote: Move plane state updates from dpu_crtc_atomic_check() to the function where they belong: to

Re: [Freedreno] [PATCH v2 00/14] GMU-less A6xx support (A610, A619_holi)

2023-02-14 Thread Rob Clark
+ Akhil On Tue, Feb 14, 2023 at 10:03 AM Konrad Dybcio wrote: > > > v1 -> v2: > - Fix A630 values in [2/14] > - Fix [6/14] for GMU-equipped GPUs > > Link to v1: > https://lore.kernel.org/linux-arm-msm/20230126151618.225127-1-konrad.dyb...@linaro.org/ > > This series concludes my

Re: [Freedreno] [PATCH v2 10/14] drm/msm/a6xx: Fix up A6XX protected registers

2023-02-14 Thread Rob Clark
On Tue, Feb 14, 2023 at 9:32 AM Konrad Dybcio wrote: > > One of the protected ranges was too small (compared to the data we > have downstream). Fix it. > > Fixes: 408434036958 ("drm/msm/a6xx: update/fix CP_PROTECT initialization") > Signed-off-by: Konrad Dybcio > --- >

[Freedreno] [PATCH v2 00/14] GMU-less A6xx support (A610, A619_holi)

2023-02-14 Thread Konrad Dybcio
v1 -> v2: - Fix A630 values in [2/14] - Fix [6/14] for GMU-equipped GPUs Link to v1: https://lore.kernel.org/linux-arm-msm/20230126151618.225127-1-konrad.dyb...@linaro.org/ This series concludes my couple-weeks-long suffering of figuring out the ins and outs of the "non-standard" A6xx GPUs

Re: [Freedreno] [RFC PATCH 5/7] drm/msm/dpu: Document and enable TEAR interrupts on DSI interfaces

2023-02-14 Thread Abhinav Kumar
On 2/14/2023 5:06 AM, Marijn Suijten wrote: On 2023-02-13 19:09:32, Abhinav Kumar wrote: On 2/13/2023 1:46 PM, Dmitry Baryshkov wrote: On 13/02/2023 21:37, Jessica Zhang wrote: On 12/31/2022 1:50 PM, Marijn Suijten wrote: All SoCs since DPU 5.0.0 (and seemingly up until and including

Re: [Freedreno] [PATCH 4/4] drm/msm/a5xx: fix context faults during ring switch

2023-02-14 Thread Rob Clark
On Mon, Feb 13, 2023 at 6:10 PM Dmitry Baryshkov wrote: > > The rptr_addr is set in the preempt_init_ring(), which is called from > a5xx_gpu_init(). It uses shadowptr() to set the address, however the > shadow_iova is not yet initialized at that time. Move the rptr_addr > setting to the

[Freedreno] [PATCH v2 00/14] GMU-less A6xx support (A610, A619_holi)

2023-02-14 Thread Konrad Dybcio
Subject: [PATCH v2 00/14] GMU-less A6xx support (A610, A619_holi) Date: Tue, 14 Feb 2023 18:31:31 +0100 From: Konrad Dybcio To: linux-arm-...@vger.kernel.org, anders...@kernel.org, agr...@kernel.org CC: marijn.suij...@somainline.org, Konrad Dybcio v1 -> v2: - Fix A630 values in [2/14] - Fix

[Freedreno] [PATCH v2 14/14] drm/msm/a6xx: Add A610 speedbin support

2023-02-14 Thread Konrad Dybcio
A610 is implemented on at least three SoCs: SM6115 (bengal), SM6125 (trinket) and SM6225 (khaje). Trinket does not support speed binning (only a single SKU exists) and we don't yet support khaje upstream. Hence, add a fuse mapping table for bengal to allow for per-chip frequency limiting.

[Freedreno] [PATCH v2 11/14] drm/msm/a6xx: Enable optional icc voting from OPP tables

2023-02-14 Thread Konrad Dybcio
On GMU-equipped GPUs, the GMU requests appropriate bandwidth votes for us. This is however not the case for the other GPUs. Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. Signed-off-by: Konrad Dybcio ---

[Freedreno] [PATCH v2 13/14] drm/msm/a6xx: Add A619_holi speedbin support

2023-02-14 Thread Konrad Dybcio
A619_holi is implemented on at least two SoCs: SM4350 (holi) and SM6375 (blair). This is what seems to be a first occurrence of this happening, but it's easy to overcome by guarding the SoC-specific fuse values with of_machine_is_compatible(). Do just that to enable frequency limiting on these

[Freedreno] [PATCH v2 12/14] drm/msm/a6xx: Use "else if" in GPU speedbin rev matching

2023-02-14 Thread Konrad Dybcio
The GPU can only be one at a time. Turn a series of ifs into if + elseifs to save some CPU cycles. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c

[Freedreno] [PATCH v2 09/14] drm/msm/a6xx: Fix some A619 tunables

2023-02-14 Thread Konrad Dybcio
Adreno 619 expects some tunables to be set differently. Make up for it. Fixes: b7616b5c69e6 ("drm/msm/adreno: Add A619 support") Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[Freedreno] [PATCH v2 10/14] drm/msm/a6xx: Fix up A6XX protected registers

2023-02-14 Thread Konrad Dybcio
One of the protected ranges was too small (compared to the data we have downstream). Fix it. Fixes: 408434036958 ("drm/msm/a6xx: update/fix CP_PROTECT initialization") Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Freedreno] [PATCH v2 08/14] drm/msm/a6xx: Add A610 support

2023-02-14 Thread Konrad Dybcio
A610 is one of (if not the) lowest-tier SKUs in the A6XX family. It features no GMU, as it's implemented solely on SoCs with SMD_RPM. What's more interesting is that it does not feature a VDDGX line either, being powered solely by VDDCX and has an unfortunate hardware quirk that makes its reset

[Freedreno] [PATCH v2 07/14] drm/msm/a6xx: Add support for A619_holi

2023-02-14 Thread Konrad Dybcio
A619_holi is a GMU-less variant of the already-supported A619 GPU. It's present on at least SM4350 (holi) and SM6375 (blair). No mesa changes are required. Add the required kernel-side support for it. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 37

[Freedreno] [PATCH v2 06/14] drm/msm/gpu: Use dev_pm_opp_set_rate for non-GMU GPUs

2023-02-14 Thread Konrad Dybcio
Currently we only utilize the OPP table connected to the GPU for getting (available) frequencies. We do however need to scale the voltage rail(s) accordingly to ensure that we aren't trying to run the GPU at 1GHz with a VDD_LOW vote, as that would result in an otherwise inexplainable hang. Tell

[Freedreno] [PATCH v2 05/14] drm/msm/adreno: Disable has_cached_coherent for A610/A619_holi

2023-02-14 Thread Konrad Dybcio
These SKUs don't support the feature. Disable it to make the GPU stop crashing after almost each and every submission - the received data on the GPU end was simply incomplete in garbled, resulting in almost nothing being executed properly. Signed-off-by: Konrad Dybcio ---

[Freedreno] [PATCH v2 01/14] drm/msm/a6xx: De-staticize sptprac en/disable functions

2023-02-14 Thread Konrad Dybcio
These two will be reused by at least A619_holi in the non-gmu paths. De-staticize them to make it possible. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 4 ++-- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[Freedreno] [PATCH v2 04/14] drm/msm/a6xx: Remove both GBIF and RBBM GBIF halt on hw init

2023-02-14 Thread Konrad Dybcio
Currently we're only deasserting REG_A6XX_RBBM_GBIF_HALT, but we also need REG_A6XX_GBIF_HALT to be set to 0. For GMU-equipped GPUs this is done in a6xx_bus_clear_pending_transactions(), but for the GMU-less ones we have to do it *somewhere*. Unhalting both side by side sounds like a good plan and

[Freedreno] [PATCH v2 03/14] drm/msm/a6xx: Introduce GMU wrapper support

2023-02-14 Thread Konrad Dybcio
Some (particularly SMD_RPM, a.k.a non-RPMh) SoCs implement A6XX GPUs but don't implement the associated GMUs. This is due to the fact that the GMU directly pokes at RPMh. Sadly, this means we have to take care of enabling & scaling power rails, clocks and bandwidth ourselves. Reuse existing

[Freedreno] [PATCH v2 02/14] drm/msm/a6xx: Extend UBWC config

2023-02-14 Thread Konrad Dybcio
Port setting min_access_length, ubwc_mode and upper_bit from downstream. Values were validated using downstream device trees for SM8[123]50 and left default (as per downstream) elsewhere. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 29 +++ 1

Re: [Freedreno] [RFT PATCH v2 3/3] drm/msm/dsi: More properly handle errors in regards to dsi_mgr_bridge_power_on()

2023-02-14 Thread Doug Anderson
Hi, On Mon, Feb 13, 2023 at 6:02 PM Abhinav Kumar wrote: > > Hi Doug > > Sorry for the delayed response. > > On 2/2/2023 2:46 PM, Doug Anderson wrote: > > Hi, > > > > On Thu, Feb 2, 2023 at 2:37 PM Abhinav Kumar > > wrote: > >> > >> Hi Doug > >> > >> On 1/31/2023 2:18 PM, Douglas Anderson

Re: [Freedreno] [RFC PATCH 5/7] drm/msm/dpu: Document and enable TEAR interrupts on DSI interfaces

2023-02-14 Thread Marijn Suijten
On 2023-02-13 19:09:32, Abhinav Kumar wrote: > > > On 2/13/2023 1:46 PM, Dmitry Baryshkov wrote: > > On 13/02/2023 21:37, Jessica Zhang wrote: > >> > >> > >> On 12/31/2022 1:50 PM, Marijn Suijten wrote: > >>> All SoCs since DPU 5.0.0 (and seemingly up until and including 6.0.0, > >>> but

[Freedreno] [PATCH 3/3] drm/msm/a5xx: add devcoredump support to the fault handler

2023-02-14 Thread Dmitry Baryshkov
Use adreno_fault_handler() to implement a5xx_fault_handler(). This enables devcoredump support on a5xx platforms, allowing one to capture the crashed GPU state at the time of context fault. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 13 - 1 file

[Freedreno] [PATCH 2/3] drm/msm/adreno: split a6xx fault handler into generic and a6xx parts

2023-02-14 Thread Dmitry Baryshkov
Split the a6xx_fault_handler() into the generic adreno_fault_handler() and platform-specific parts. The adreno_fault_handler() can further be used by a5xx and hopefully by a4xx (at some point). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 64

[Freedreno] [PATCH 1/3] drm/msm/adreno: stall translation on fault for all GPU families

2023-02-14 Thread Dmitry Baryshkov
The commit e25e92e08e32 ("drm/msm: devcoredump iommu fault support") enabled SMMU stalling to collect GPU state, but only for a6xx. It tied enabling the stall with tha per-instance pagetables creation. Since that commit SoCs with a5xx also gained support for adreno-smmu-priv. Move stalling into

[Freedreno] [PATCH 0/3] drm/msm/adreno: implement devcoredump support for a5xx

2023-02-14 Thread Dmitry Baryshkov
During the debug of the a5xx preempt issue, having the devcoredump support was a great help. These patches port necessary code bits from being a6xx-specific to generic code path and then enables devcoredump for a5xx. Dmitry Baryshkov (3): drm/msm/adreno: stall translation on fault for all GPU

Re: [Freedreno] [PATCH 09/14] drm/msm/a6xx: Fix some A619 tunables

2023-02-14 Thread Konrad Dybcio
On 8.02.2023 19:21, Jordan Crouse wrote: > On Thu, Jan 26, 2023 at 04:16:13PM +0100, Konrad Dybcio wrote: >> Adreno 619 expects some tunables to be set differently. Make up for it. >> >> Fixes: b7616b5c69e6 ("drm/msm/adreno: Add A619 support") >> Signed-off-by: Konrad Dybcio >> --- >>