Re: [Freedreno] [PATCH v2 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-01 Thread Rob Clark
On Fri, Apr 28, 2023 at 4:05 AM Tvrtko Ursulin wrote: > > > On 27/04/2023 18:53, Rob Clark wrote: > > From: Rob Clark > > > > These are useful in particular for VM scenarios where the process which > > has opened to drm device file is just a proxy for the real user in a VM > > guest. > > > >

[Freedreno] [PATCH v3 6/9] drm/msm: Add memory stats to fdinfo

2023-05-01 Thread Rob Clark
From: Rob Clark Use the new helper to export stats about memory usage. v2: Drop unintended hunk v3: Rebase Signed-off-by: Rob Clark Reviewed-by: Emil Velikov --- drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_gem.c | 15 +++ 2 files changed, 17 insertions(+)

[Freedreno] [PATCH v3 8/9] drm/fdinfo: Add comm/cmdline override fields

2023-05-01 Thread Rob Clark
From: Rob Clark These are useful in particular for VM scenarios where the process which has opened to drm device file is just a proxy for the real user in a VM guest. v2: doc cleanups Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 10 ++

[Freedreno] [PATCH v3 7/9] drm/doc: Relax fdinfo string constraints

2023-05-01 Thread Rob Clark
From: Rob Clark The restriction about no whitespace, etc, really only applies to the usage of strings in keys. Values can contain anything (other than newline). Signed-off-by: Rob Clark Acked-by: Tvrtko Ursulin --- Documentation/gpu/drm-usage-stats.rst | 27 ++- 1

[Freedreno] [PATCH v3 9/9] drm/msm: Wire up comm/cmdline override for fdinfo

2023-05-01 Thread Rob Clark
From: Rob Clark Also store the override strings in drm_file so that fdinfo can display them. We still need to keep our original copy as we could need these override strings after the device file has been closed and drm_file freed. Signed-off-by: Rob Clark ---

[Freedreno] [PATCH v3 3/9] drm/msm: Switch to fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Now that we have a common helper, use it. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.c | 11 +-- drivers/gpu/drm/msm/msm_gpu.c | 2 -- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git

[Freedreno] [PATCH v3 5/9] drm: Add fdinfo memory stats

2023-05-01 Thread Rob Clark
From: Rob Clark Add support to dump GEM stats to fdinfo. v2: Fix typos, change size units to match docs, use div_u64 v3: Do it in core v4: more kerneldoc v5: doc fixes Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter --- Documentation/gpu/drm-usage-stats.rst |

[Freedreno] [PATCH v3 2/9] drm: Add common fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Handle a bit of the boiler-plate in a single case, and make it easier to add some core tracked stats. This also ensures consistent behavior across drivers for standardised fields. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo Reviewed-by: Daniel Vetter

[Freedreno] [PATCH v3 4/9] drm/amdgpu: Switch to fdinfo helper

2023-05-01 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 16 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.h | 2 +- 3 files changed, 9 insertions(+), 12

[Freedreno] [PATCH v3 0/9] drm: fdinfo memory stats

2023-05-01 Thread Rob Clark
From: Rob Clark Similar motivation to other similar recent attempt[1]. But with an attempt to have some shared code for this. As well as documentation. It is probably a bit UMA-centric, I guess devices with VRAM might want some placement stats as well. But this seems like a reasonable start.

[Freedreno] [PATCH v3 1/9] drm/docs: Fix usage stats typos

2023-05-01 Thread Rob Clark
From: Rob Clark Fix a couple missing ':'s. Signed-off-by: Rob Clark Reviewed-by: Rodrigo Vivi --- Documentation/gpu/drm-usage-stats.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst index

Re: [Freedreno] [PATCH v3] drm/msm/dpu: drop unused SSPP sub-block information

2023-05-01 Thread Abhinav Kumar
On 4/29/2023 2:25 PM, Dmitry Baryshkov wrote: The driver doesn't support hsic/memcolor and pcc SSPP subblocks. Drop corresponding definitions. Signed-off-by: Dmitry Baryshkov --- Changes since v2: - Fixed commit message to remove igc block mention. Changes since v1: - Rebased on top of

Re: [Freedreno] [PATCH v3] drm/msm/dpu: drop unused SSPP sub-block information

2023-05-01 Thread Dmitry Baryshkov
On 01/05/2023 21:49, Abhinav Kumar wrote: On 4/29/2023 2:25 PM, Dmitry Baryshkov wrote: The driver  doesn't support hsic/memcolor and pcc SSPP subblocks. Drop corresponding definitions. Signed-off-by: Dmitry Baryshkov --- Changes since v2: - Fixed commit message to remove igc block

[Freedreno] [PATCH v2] drm/msm: Fix submit error-path leaks

2023-05-01 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. v2: Only drop

Re: [Freedreno] [PATCH v3] drm/msm/dpu: drop unused SSPP sub-block information

2023-05-01 Thread Abhinav Kumar
On 5/1/2023 11:56 AM, Dmitry Baryshkov wrote: On 01/05/2023 21:49, Abhinav Kumar wrote: On 4/29/2023 2:25 PM, Dmitry Baryshkov wrote: The driver  doesn't support hsic/memcolor and pcc SSPP subblocks. Drop corresponding definitions. Signed-off-by: Dmitry Baryshkov --- Changes since v2:

[Freedreno] [PATCH] drm/msm: Fix submit error-path leaks

2023-05-01 Thread Rob Clark
From: Rob Clark For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. Reported-by:

Re: [Freedreno] [PATCH] drm/msm/dsi: don't allow enabling 14nm VCO with unprogrammed rate

2023-05-01 Thread Konrad Dybcio
On 1.05.2023 14:39, Dmitry Baryshkov wrote: > On 01/05/2023 15:37, Konrad Dybcio wrote: >> >> >> On 1.05.2023 03:12, Dmitry Baryshkov wrote: >>> If the dispcc uses CLK_OPS_PARENT_ENABLE (e.g. on QCM2290), CCF can try >>> enabling VCO before the rate has been programmed. This can cause clock >>>

Re: [Freedreno] [PATCH] drm/msm/dsi: don't allow enabling 14nm VCO with unprogrammed rate

2023-05-01 Thread Konrad Dybcio
On 1.05.2023 03:12, Dmitry Baryshkov wrote: > If the dispcc uses CLK_OPS_PARENT_ENABLE (e.g. on QCM2290), CCF can try > enabling VCO before the rate has been programmed. This can cause clock > lockups and/or other boot issues. Program the VCO to the minimal PLL > rate if the read rate is 0 Hz.

Re: [Freedreno] [PATCH] drm/msm/dsi: don't allow enabling 14nm VCO with unprogrammed rate

2023-05-01 Thread Dmitry Baryshkov
On 01/05/2023 15:37, Konrad Dybcio wrote: On 1.05.2023 03:12, Dmitry Baryshkov wrote: If the dispcc uses CLK_OPS_PARENT_ENABLE (e.g. on QCM2290), CCF can try enabling VCO before the rate has been programmed. This can cause clock lockups and/or other boot issues. Program the VCO to the minimal

Re: [Freedreno] [PATCH 1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()

2023-05-01 Thread Abhinav Kumar
On 5/1/2023 1:45 PM, Dmitry Baryshkov wrote: On 01/05/2023 22:58, Abhinav Kumar wrote: On 4/30/2023 4:57 PM, Dmitry Baryshkov wrote: There is no reason to split the dpu_encoder interface into separate _init() and _setup() phases. Merge them into a single function. I think the reason

Re: [Freedreno] [PATCH] drm/msm: Set max segment size earlier

2023-05-01 Thread Rob Clark
On Mon, May 1, 2023 at 1:56 PM Dmitry Baryshkov wrote: > > On 01/05/2023 23:44, Rob Clark wrote: > > From: Rob Clark > > > > Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), > > a6xx gen1 has smaller GMU allocations so they fit under the default > > 64K max segment size. > >

Re: [Freedreno] [PATCH 1/4] drm/msm/dpu: replace IS_ERR_OR_NULL with IS_ERR during DSC init

2023-05-01 Thread Marijn Suijten
On 2023-04-30 23:35:53, Dmitry Baryshkov wrote: > Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If > the value is NULL, then the function will return 0 instead of a proper > return code. Moreover dpu_hw_dsc_init() can not return NULL. More specifically, it allows the init

Re: [Freedreno] [PATCH 3/4] drm/msm/dpu: use PINGPONG_NONE for LMs with no PP attached

2023-05-01 Thread Dmitry Baryshkov
On 02/05/2023 01:17, Marijn Suijten wrote: On 2023-04-30 23:35:55, Dmitry Baryshkov wrote: On msm8998/sdm845 some LM blocks do not have corresponding PINGPONG block. Currently the driver uses PINGPONG_MAX for such cases. Switch that to use PINGPONG_NONE instead, which is more logical.

Re: [Freedreno] [PATCH 2/4] drm/msm/dpu: remove futile checks from dpu_rm_init()

2023-05-01 Thread Marijn Suijten
On 2023-05-02 01:15:24, Dmitry Baryshkov wrote: > On 02/05/2023 01:13, Marijn Suijten wrote: > > On 2023-04-30 23:35:54, Dmitry Baryshkov wrote: > >> dpu_rm_init() contains checks for block->id values. These were logical > >> in the vendor driver, when one can not be sure which values were passed

Re: [Freedreno] [PATCH v2 1/7] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-01 Thread Kuogee Hsieh
On 4/28/2023 5:30 PM, Dmitry Baryshkov wrote: On 29/04/2023 02:45, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Reported-by: kernel test robot What exactly was reported? Signed-off-by: Kuogee Hsieh ---  

[Freedreno] [PATCH] drm/msm: Set max segment size earlier

2023-05-01 Thread Rob Clark
From: Rob Clark Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), a6xx gen1 has smaller GMU allocations so they fit under the default 64K max segment size. [ cut here ] DMA-API: msm_dpu ae01000.display-controller: mapping sg segment longer than

Re: [Freedreno] [PATCH v2 1/7] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-01 Thread Kuogee Hsieh
On 5/1/2023 1:50 PM, Dmitry Baryshkov wrote: On 01/05/2023 23:40, Kuogee Hsieh wrote: On 4/28/2023 5:30 PM, Dmitry Baryshkov wrote: On 29/04/2023 02:45, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Reported-by: kernel

Re: [Freedreno] [PATCH 3/9] drm/msm/dpu: fix the condition for (not) applying QoS to CURSOR SSPP

2023-05-01 Thread Jeykumar Sankaran
On 4/30/2023 1:57 PM, Dmitry Baryshkov wrote: The function dpu_plane_sspp_update_pipe() contains code to skip enabling the QoS and OT limitis for CURSOR pipes. However all DPU since sdm845 repurpose DMA SSPP for the cursor planes because they lack the real CURSOR SSPP. Fix the condition to

Re: [Freedreno] [PATCH v2 1/7] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-01 Thread Dmitry Baryshkov
On 01/05/2023 23:40, Kuogee Hsieh wrote: On 4/28/2023 5:30 PM, Dmitry Baryshkov wrote: On 29/04/2023 02:45, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Reported-by: kernel test robot What exactly was reported?

Re: [Freedreno] [PATCH 3/4] drm/msm/dpu: use PINGPONG_NONE for LMs with no PP attached

2023-05-01 Thread Marijn Suijten
On 2023-04-30 23:35:55, Dmitry Baryshkov wrote: > On msm8998/sdm845 some LM blocks do not have corresponding PINGPONG > block. Currently the driver uses PINGPONG_MAX for such cases. Switch > that to use PINGPONG_NONE instead, which is more logical. dpu_lm_cfg::pingpong still has a doc-comment

Re: [Freedreno] [PATCH 1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()

2023-05-01 Thread Dmitry Baryshkov
On 01/05/2023 22:58, Abhinav Kumar wrote: On 4/30/2023 4:57 PM, Dmitry Baryshkov wrote: There is no reason to split the dpu_encoder interface into separate _init() and _setup() phases. Merge them into a single function. I think the reason for having this split was to pass a valid encoder

Re: [Freedreno] [PATCH] drm/msm: Set max segment size earlier

2023-05-01 Thread Dmitry Baryshkov
On 01/05/2023 23:44, Rob Clark wrote: From: Rob Clark Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), a6xx gen1 has smaller GMU allocations so they fit under the default 64K max segment size. [ cut here ] DMA-API: msm_dpu

Re: [Freedreno] [PATCH v5 06/15] drm/msm/a6xx: Introduce GMU wrapper support

2023-05-01 Thread Konrad Dybcio
On 1.05.2023 21:40, Akhil P Oommen wrote: > On Fri, Mar 31, 2023 at 01:25:20AM +0200, Konrad Dybcio wrote: >> 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,

Re: [Freedreno] [PATCH 2/4] drm/msm/dpu: remove futile checks from dpu_rm_init()

2023-05-01 Thread Marijn Suijten
On 2023-04-30 23:35:54, Dmitry Baryshkov wrote: > dpu_rm_init() contains checks for block->id values. These were logical > in the vendor driver, when one can not be sure which values were passed > from DT. In the upstream driver this is not necessary: the catalog is a > part of the driver, we

Re: [Freedreno] [PATCH 4/4] drm/msm/dpu: move PINGPONG_NONE check to dpu_lm_init()

2023-05-01 Thread Marijn Suijten
On 2023-04-30 23:35:56, Dmitry Baryshkov wrote: > Move the check for lm->pingpong being not NONE from dpu_rm_init() to > dpu_lm_init(), following the change to dpu_hw_intf_init(). > > Signed-off-by: Dmitry Baryshkov In some way I also suggested this change in [1], but did not receive a (N)ACK.

Re: [Freedreno] [PATCH 2/9] drm/msm/dpu: simplify CDP programming

2023-05-01 Thread Jeykumar Sankaran
On 4/30/2023 1:57 PM, Dmitry Baryshkov wrote: Get rid of intermediatory configuration structure and defines. Pass the format and the enablement bit directly to the new helper. The WB_CDP_CNTL register ignores BIT(2), so we can write it for both SSPP and WB CDP settings. Signed-off-by: Dmitry

Re: [Freedreno] [PATCH v5 06/15] drm/msm/a6xx: Introduce GMU wrapper support

2023-05-01 Thread Akhil P Oommen
On Fri, Mar 31, 2023 at 01:25:20AM +0200, Konrad Dybcio wrote: > 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 &

Re: [Freedreno] [PATCH 1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()

2023-05-01 Thread Abhinav Kumar
On 4/30/2023 4:57 PM, Dmitry Baryshkov wrote: There is no reason to split the dpu_encoder interface into separate _init() and _setup() phases. Merge them into a single function. I think the reason for having this split was to pass a valid encoder to the interface_modeset_init() and then

Re: [Freedreno] [PATCH 1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()

2023-05-01 Thread Dmitry Baryshkov
On 02/05/2023 00:22, Abhinav Kumar wrote: On 5/1/2023 1:45 PM, Dmitry Baryshkov wrote: On 01/05/2023 22:58, Abhinav Kumar wrote: On 4/30/2023 4:57 PM, Dmitry Baryshkov wrote: There is no reason to split the dpu_encoder interface into separate _init() and _setup() phases. Merge them into a

Re: [Freedreno] [PATCH 2/4] drm/msm/dpu: remove futile checks from dpu_rm_init()

2023-05-01 Thread Dmitry Baryshkov
On 02/05/2023 01:13, Marijn Suijten wrote: On 2023-04-30 23:35:54, Dmitry Baryshkov wrote: dpu_rm_init() contains checks for block->id values. These were logical in the vendor driver, when one can not be sure which values were passed from DT. In the upstream driver this is not necessary: the

Re: [Freedreno] [PATCH 4/4] drm/msm/dpu: move PINGPONG_NONE check to dpu_lm_init()

2023-05-01 Thread Dmitry Baryshkov
On 02/05/2023 01:23, Marijn Suijten wrote: On 2023-04-30 23:35:56, Dmitry Baryshkov wrote: Move the check for lm->pingpong being not NONE from dpu_rm_init() to dpu_lm_init(), following the change to dpu_hw_intf_init(). Signed-off-by: Dmitry Baryshkov In some way I also suggested this change