Re: [Freedreno] [PATCH 2/2] drm/bridge: lt9611: Do not generate HFP/HBP/HSA and EOT packet

2023-07-04 Thread Dmitry Baryshkov
[Adding freedreno@ to cc list] On Wed, 5 Jul 2023 at 08:31, Jagan Teki wrote: > > Hi Amit, > > On Wed, Jul 5, 2023 at 10:15 AM Amit Pundir wrote: > > > > Hi Marek, > > > > On Wed, 5 Jul 2023 at 01:48, Marek Vasut wrote: > > > > > > Do not generate the HS front and back porch gaps, the HSA gap a

Re: [Freedreno] [PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 10:28 AM, Dmitry Baryshkov wrote: On Tue, 4 Jul 2023 at 19:10, Abhinav Kumar wrote: On 7/4/2023 4:52 AM, Dmitry Baryshkov wrote: On Tue, 4 Jul 2023 at 13:06, Dmitry Baryshkov wrote: On Tue, 4 Jul 2023 at 07:04, Abhinav Kumar wrote: On 7/3/2023 7:20 PM, Dmitry Baryshko

[Freedreno] [PATCH v4 2/4] drm/msm/dpu: move resource allocation to the _probe function

2023-07-04 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. While we are at it, replace irq_of_parse_and_map() with platform_get_irq(). This also drops devm_iounmap() calls. It is too early to have them _dpu_k

[Freedreno] [PATCH v4 3/4] drm/msm/mdp4: move resource allocation to the _probe function

2023-07-04 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. While we are at it, replace irq_of_parse_and_map() with platform_get_irq(). Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers

[Freedreno] [PATCH v4 4/4] drm/msm/mdp5: move resource allocation to the _probe function

2023-07-04 Thread Dmitry Baryshkov
To let the probe function bail early if any of the resources is unavailable, move resource allocattion from kms_init directly to the probe callback. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 100 ++- 1 file chan

[Freedreno] [PATCH v4 1/4] drm/msm: allow passing struct msm_kms to msm_drv_probe()

2023-07-04 Thread Dmitry Baryshkov
In preparation of moving resource allocation to the probe time, allow MSM KMS drivers to pass struct msm_kms pointer via msm_drv_probe(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 +- drivers/gpu/drm/msm/disp

[Freedreno] [PATCH v4 0/4] drm/msm: move resource allocation to the _probe function

2023-07-04 Thread Dmitry Baryshkov
This patchset was left untouched for almost a year. Let's reiterate it in attempt to solve the long-standing issue. As discussed several times on IRC, move display subdriver resource allocation from kms_init to probe time to let it bail early. Changes since v3: - Fixed MMIO unmaping in the DPU ca

Re: [Freedreno] [PATCH v2 05/14] drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus()

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 18:55, Abhinav Kumar wrote: > > > > On 7/4/2023 8:03 AM, Dmitry Baryshkov wrote: > > Move perf mode handling for the bandwidth to > > _dpu_core_perf_crtc_update_bus() rather than overriding per-CRTC data > > and then aggregating known values. > > > > Note, this changes the fi

Re: [Freedreno] [PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 19:10, Abhinav Kumar wrote: > > > > On 7/4/2023 4:52 AM, Dmitry Baryshkov wrote: > > On Tue, 4 Jul 2023 at 13:06, Dmitry Baryshkov > > wrote: > >> > >> On Tue, 4 Jul 2023 at 07:04, Abhinav Kumar > >> wrote: > >>> > >>> > >>> > >>> On 7/3/2023 7:20 PM, Dmitry Baryshkov wrot

Re: [Freedreno] [PATCH 1/2] drm/msm/adreno: Fix warn splat for devices without revn

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 19:36, Rob Clark wrote: > > From: Rob Clark > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > adreno_is_aXYZ is called. This however doesn't work very well when revn is > 0 by design (such as for A635). > > Cc: Konrad Dybcio > Fixes: cc943f43ec

[Freedreno] [PATCH 1/2] drm/msm/adreno: Fix warn splat for devices without revn

2023-07-04 Thread Rob Clark
From: Rob Clark Recently, a WARN_ON() was introduced to ensure that revn is filled before adreno_is_aXYZ is called. This however doesn't work very well when revn is 0 by design (such as for A635). Cc: Konrad Dybcio Fixes: cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before bein

[Freedreno] [PATCH 2/2] drm/msm/a690: Remove revn and name

2023-07-04 Thread Rob Clark
From: Rob Clark These fields are deprecated. But any userspace new enough to support a690 also knows how to identify the GPU based on chip-id. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 -- drivers/gpu/drm/msm/adreno/adreno_gpu.h| 3 ++- 2 files changed, 2

Re: [Freedreno] [PATCH] drm/msm/dpu: add missing flush and fetch bits for DMA4/DMA5 planes

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 9:01 AM, Jonathan Marek wrote: Note that with this, DMA4/DMA5 are still non-functional, but at least display *something* in modetest instead of nothing or underflow. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Signed-off-by: Jonathan Marek --- Reviewed-by: Abhin

Re: [Freedreno] [PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 4:52 AM, Dmitry Baryshkov wrote: On Tue, 4 Jul 2023 at 13:06, Dmitry Baryshkov wrote: On Tue, 4 Jul 2023 at 07:04, Abhinav Kumar wrote: On 7/3/2023 7:20 PM, Dmitry Baryshkov wrote: On 03/07/2023 05:01, Abhinav Kumar wrote: On 6/19/2023 2:25 PM, Dmitry Baryshkov wrote:

[Freedreno] [PATCH] drm/msm/dpu: add missing flush and fetch bits for DMA4/DMA5 planes

2023-07-04 Thread Jonathan Marek
Note that with this, DMA4/DMA5 are still non-functional, but at least display *something* in modetest instead of nothing or underflow. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Signed-off-by: Jonathan Marek --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 8 +++- 1 file cha

Re: [Freedreno] [PATCH v2 14/14] drm/msm/dpu: drop dpu_core_perf_destroy()

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 8:03 AM, Dmitry Baryshkov wrote: This function does nothing, just clears several data pointers. Drop it now. Now, it doesnt even do that. Just resets the clk_rate to 0. Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.

Re: [Freedreno] [PATCH v2 05/14] drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus()

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 8:03 AM, Dmitry Baryshkov wrote: Move perf mode handling for the bandwidth to _dpu_core_perf_crtc_update_bus() rather than overriding per-CRTC data and then aggregating known values. Note, this changes the fix_core_ab_vote. Previously it would be multiplied per the CRTC number, no

Re: [Freedreno] [PATCH v2 06/14] drm/msm/dpu: rework core_perf debugfs overrides

2023-07-04 Thread Abhinav Kumar
On 7/4/2023 8:03 AM, Dmitry Baryshkov wrote: Currently debugfs provides separate 'modes' to override calculated MDP_CLK rate and interconnect bandwidth votes. Change that to allow overriding individual values (e.g. one can override just clock or just average bandwidth vote). Signed-off-by: Dm

[Freedreno] [PATCH v2 14/14] drm/msm/dpu: drop dpu_core_perf_destroy()

2023-07-04 Thread Dmitry Baryshkov
This function does nothing, just clears several data pointers. Drop it now. Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 10 -- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 6 -- drivers/gpu/drm/msm/disp/dpu1/dpu_kms

[Freedreno] [PATCH v2 11/14] drm/msm/dpu: remove unused fields from struct dpu_core_perf

2023-07-04 Thread Dmitry Baryshkov
Remove dpu_core_perf::dev and dpu_core_perf::debugfs_root fields, they are not used by the code. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 6 -- drivers/gpu/drm/msm/di

[Freedreno] [PATCH v2 13/14] drm/msm/dpu: move max clock decision to dpu_kms.

2023-07-04 Thread Dmitry Baryshkov
dpu_core_perf should not make decisions on the maximum possible core clock rate. Pass the value from dpu_kms_hw_init(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 11 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 8 ++-- drivers/gpu/drm

[Freedreno] [PATCH v2 12/14] drm/msm/dpu: core_perf: remove extra clk_round_rate() call

2023-07-04 Thread Dmitry Baryshkov
The dev_pm_opp_set_rate() already contains a call for clk_round_rate for the passed value. Stop calling it manually from _dpu_core_perf_get_core_clk_rate(). It is slightly incorrect to call it this way, as we should round the final calculated clock rate rather than rounding all the intermediate val

[Freedreno] [PATCH v2 08/14] drm/msm/dpu: rework indentation in dpu_core_perf

2023-07-04 Thread Dmitry Baryshkov
dpu_core_perf.c contains several multi-line conditions which are hard to comprehent because of the indentation. Rework the identation of these conditions to make it easier to understand them. Reviewed-by: Abhinav Kumar Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm

[Freedreno] [PATCH v2 10/14] drm/msm/dpu: use dpu_perf_cfg in DPU core_perf code

2023-07-04 Thread Dmitry Baryshkov
Simplify dpu_core_perf code by using only dpu_perf_cfg instead of using full-featured catalog data. Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 58 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 8 +-- drivers

[Freedreno] [PATCH v2 09/14] drm/msm/dpu: drop the dpu_core_perf_crtc_update()'s stop_req param

2023-07-04 Thread Dmitry Baryshkov
The stop_req is true only in the dpu_crtc_disable() case, when crtc->enable has already been set to false. This renders the stop_req argument useless. Remove it completely. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 12 ++--

[Freedreno] [PATCH v2 06/14] drm/msm/dpu: rework core_perf debugfs overrides

2023-07-04 Thread Dmitry Baryshkov
Currently debugfs provides separate 'modes' to override calculated MDP_CLK rate and interconnect bandwidth votes. Change that to allow overriding individual values (e.g. one can override just clock or just average bandwidth vote). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1

[Freedreno] [PATCH v2 04/14] drm/msm/dpu: drop separate dpu_core_perf_tune overrides

2023-07-04 Thread Dmitry Baryshkov
The values in struct dpu_core_perf_tune are fixed per the core perf mode. Drop the 'tune' values and substitute them with known values when performing perf management. Note: min_bus_vote was not used at all, so it is just silently dropped. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

[Freedreno] [PATCH v2 05/14] drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus()

2023-07-04 Thread Dmitry Baryshkov
Move perf mode handling for the bandwidth to _dpu_core_perf_crtc_update_bus() rather than overriding per-CRTC data and then aggregating known values. Note, this changes the fix_core_ab_vote. Previously it would be multiplied per the CRTC number, now it will be used directly for interconnect voting

[Freedreno] [PATCH v2 07/14] drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib

2023-07-04 Thread Dmitry Baryshkov
The max_per_pipe_ib is a constant across all CRTCs and is read from the catalog. Drop corresponding calculations and read the value directly at icc_set_bw() time. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 17 +

[Freedreno] [PATCH v2 03/14] drm/msm/dpu: core_perf: bail earlier if there are no ICC paths

2023-07-04 Thread Dmitry Baryshkov
Skip bandwidth aggregation and return early if there are no interconnect paths defined for the DPU device. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_c

[Freedreno] [PATCH v2 02/14] drm/msm/dpu: core_perf: extract bandwidth aggregation function

2023-07-04 Thread Dmitry Baryshkov
In preparation to refactoring the dpu_core_perf debugfs interface, extract the bandwidth aggregation function from _dpu_core_perf_crtc_update_bus(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 39 +++ 1 file changed, 22 insertions(+), 17 de

[Freedreno] [PATCH v2 00/14] drm/msm/dpu: cleanup dpu_core_perf module

2023-07-04 Thread Dmitry Baryshkov
Apply several cleanups to the DPU's core_perf module. Changes since v1: - Reworked overrides for the perf parameters instead of completely dropping them. Abhinav described why these overrides are useful. - Moved max clock rate determination to dpu_kms.c Dmitry Baryshkov (14): drm/msm/dpu: dro

[Freedreno] [PATCH v2 01/14] drm/msm/dpu: drop enum dpu_core_perf_data_bus_id

2023-07-04 Thread Dmitry Baryshkov
Drop the leftover of bus-client -> interconnect conversion, the enum dpu_core_perf_data_bus_id. Fixes: cb88482e2570 ("drm/msm/dpu: clean up references of DPU custom bus scaling") Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp

Re: [Freedreno] [PATCH] dt-bindings: cleanup DTS example whitespaces

2023-07-04 Thread Jonas Gorski
On Sun, 2 Jul 2023 at 20:24, Krzysztof Kozlowski wrote: > > The DTS code coding style expects spaces around '=' sign. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Rob, > > Maybe this could go via your tree? Rebased on your for-next: > v6.4-rc2-45-gf0ac35049606 > --- > .../bindings/arm/arm,

Re: [Freedreno] [PATCH 7/8] drm/msm/dpu: drop dpu_core_perf_destroy()

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 03:19, Abhinav Kumar wrote: > > > > On 7/3/2023 3:59 PM, Dmitry Baryshkov wrote: > > On Tue, 4 Jul 2023 at 01:57, Abhinav Kumar > > wrote: > >> > >> > >> > >> On 6/19/2023 5:08 PM, Dmitry Baryshkov wrote: > >>> This function does nothing, just clears several data pointers.

Re: [Freedreno] [PATCH] dt-bindings: cleanup DTS example whitespaces

2023-07-04 Thread Dmitry Baryshkov
On Sun, 2 Jul 2023 at 21:23, Krzysztof Kozlowski wrote: > > The DTS code coding style expects spaces around '=' sign. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Rob, > > Maybe this could go via your tree? Rebased on your for-next: > v6.4-rc2-45-gf0ac35049606 > --- > .../bindings/arm/arm,

Re: [Freedreno] [PATCH] dt-bindings: cleanup DTS example whitespaces

2023-07-04 Thread Matthias Brugger
On 02/07/2023 20:23, Krzysztof Kozlowski wrote: The DTS code coding style expects spaces around '=' sign. Signed-off-by: Krzysztof Kozlowski --- Rob, Maybe this could go via your tree? Rebased on your for-next: v6.4-rc2-45-gf0ac35049606 --- [...] .../bindings/net/mediatek-dwmac.yaml

Re: [Freedreno] [PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 13:06, Dmitry Baryshkov wrote: > > On Tue, 4 Jul 2023 at 07:04, Abhinav Kumar wrote: > > > > > > > > On 7/3/2023 7:20 PM, Dmitry Baryshkov wrote: > > > On 03/07/2023 05:01, Abhinav Kumar wrote: > > >> > > >> > > >> On 6/19/2023 2:25 PM, Dmitry Baryshkov wrote: > > >>> There

Re: [Freedreno] [PATCH] dt-bindings: cleanup DTS example whitespaces

2023-07-04 Thread Vinod Koul
On 02-07-23, 20:23, Krzysztof Kozlowski wrote: > The DTS code coding style expects spaces around '=' sign. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Rob, > > Maybe this could go via your tree? Rebased on your for-next: > v6.4-rc2-45-gf0ac35049606 > --- > .../bindings/arm/arm,coresigh

Re: [Freedreno] [PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-07-04 Thread Dmitry Baryshkov
On Tue, 4 Jul 2023 at 07:04, Abhinav Kumar wrote: > > > > On 7/3/2023 7:20 PM, Dmitry Baryshkov wrote: > > On 03/07/2023 05:01, Abhinav Kumar wrote: > >> > >> > >> On 6/19/2023 2:25 PM, Dmitry Baryshkov wrote: > >>> There is always a single MDP TOP block. Drop the mdp_count field and > >>> stop de

Re: [Freedreno] [PATCH 03/14] dt-bindings: display/msm/gpu: Allow A7xx SKUs

2023-07-04 Thread Krzysztof Kozlowski
On 28/06/2023 22:35, Konrad Dybcio wrote: > Allow A7xx SKUs, such as the A730 GPU found on SM8450 and friends. > They use GMU for all things DVFS, just like most A6xx GPUs. > > Signed-off-by: Konrad Dybcio > --- Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [Freedreno] [PATCH 02/14] dt-bindings: display/msm/gmu: Allow passing QMP handle

2023-07-04 Thread Krzysztof Kozlowski
On 28/06/2023 22:35, Konrad Dybcio wrote: > When booting the GMU, the QMP mailbox should be pinged about some tunables > (e.g. adaptive clock distribution state). To achieve that, a reference to > it is necessary. Allow it and require it with A730. > > Signed-off-by: Konrad Dybcio > --- > Docume

Re: [Freedreno] [PATCH 01/14] dt-bindings: display/msm/gmu: Add Adreno 7[34]0 GMU

2023-07-04 Thread Krzysztof Kozlowski
On 28/06/2023 22:35, Konrad Dybcio wrote: > The GMU on the A7xx series is pretty much the same as on the A6xx parts. > It's now "smarter", needs a bit less register writes and controls more > things (like inter-frame power collapse) mostly internally (instead of > us having to write to G[PM]U_[CG]X