Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 23:34, Rob Clark wrote: On Wed, Apr 12, 2023 at 1:19 PM Dmitry Baryshkov wrote: On Wed, 12 Apr 2023 at 23:09, Rob Clark wrote: On Wed, Apr 12, 2023 at 5:47 AM Rodrigo Vivi wrote: On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: On Wed, Apr 12, 2023 at 01:36:5

Re: [Freedreno] [PATCH v6 2/7] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Dmitry Baryshkov
On 13/04/2023 02:25, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to convert to integers to fp - Style changes to impro

Re: [Freedreno] [PATCH v5 6/8] drm/msm/dsi: Add check for slice_width in dsi_timing_setup

2023-04-12 Thread Dmitry Baryshkov
On 13/04/2023 01:40, Abhinav Kumar wrote: On 4/12/2023 12:24 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: Add a check for valid dsc->slice_width value in dsi_timing_setup. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++   1 file chan

Re: [Freedreno] [PATCH v6 1/7] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Abhinav Kumar
On 4/12/2023 4:25 PM, Jessica Zhang wrote: From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang ---

[Freedreno] [PATCH v6 2/7] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to convert to integers to fp - Style changes to improve readability - Dropped unused bpp variable

[Freedreno] [PATCH v6 3/7] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-12 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu

[Freedreno] [PATCH v6 6/7] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-12 Thread Jessica Zhang
hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. Changes in v3: - Split from previous patch - Initialized hdisplay as uncompressed pclk per line at the

[Freedreno] [PATCH v6 7/7] drm/msm/dsi: Fix calculation for pkt_per_line

2023-04-12 Thread Jessica Zhang
Currently, pkt_per_line is calculated by dividing slice_per_intf by slice_count. This is incorrect, as slice_per_intf should be divided by slice_per_pkt, which is not always equivalent to slice_count as it is possible for there to be multiple soft slices per interface even though a panel only speci

[Freedreno] [PATCH v6 5/7] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-12 Thread Jessica Zhang
Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in v2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate patch - Moved pclk_per_line calculation to hdisplay adjustment in `if (dsc)` block of dsi_update

[Freedreno] [PATCH v6 0/7] Introduce MSM-specific DSC helpers

2023-04-12 Thread Jessica Zhang
There are some overlap in calculations for MSM-specific DSC variables between DP and DSI. In addition, the calculations for initial_scale_value and det_thresh_flatness that are defined within the DSC 1.2 specifications, but aren't yet included in drm_dsc_helper.c. This series moves these calculati

[Freedreno] [PATCH v6 4/7] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-12 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry

[Freedreno] [PATCH v6 1/7] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61 +-

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

2023-04-12 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_gem.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gem.c b

[Freedreno] [PATCH v4 5/6] drm: Add fdinfo memory stats

2023-04-12 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 Signed-off-by: Rob Clark Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter --- Documentation/gpu/drm-usage-stats.rst | 21 dr

[Freedreno] [PATCH v4 4/6] drm/i915: Switch to fdinfo helper

2023-04-12 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_driver.c | 3 ++- drivers/gpu/drm/i915/i915_drm_client.c | 18 +- drivers/gpu/drm/i915/i915_drm_client.h | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/i915

[Freedreno] [PATCH v4 3/6] drm/amdgpu: Switch to fdinfo helper

2023-04-12 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- 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 deletions(-) diff --git a/drivers/gpu/drm

[Freedreno] [PATCH v4 1/6] drm: Add common fdinfo helper

2023-04-12 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. v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- Documentation/gpu/drm-usage-stats.rst | 10 +

[Freedreno] [PATCH v4 2/6] drm/msm: Switch to fdinfo helper

2023-04-12 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- 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 a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 5a10d28de9dd..3d73b98d6a9c 10064

[Freedreno] [PATCH v4 0/6] drm: fdinfo memory stats

2023-04-12 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.

Re: [Freedreno] [PATCH v5 6/8] drm/msm/dsi: Add check for slice_width in dsi_timing_setup

2023-04-12 Thread Abhinav Kumar
On 4/12/2023 12:24 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: Add a check for valid dsc->slice_width value in dsi_timing_setup. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++   1 file changed, 6 insertions(+) diff --git a/drivers

Re: [Freedreno] [PATCH v3 5/7] drm/etnaviv: Switch to fdinfo helper

2023-04-12 Thread Rob Clark
On Wed, Apr 12, 2023 at 12:59 AM Daniel Vetter wrote: > > On Tue, Apr 11, 2023 at 03:56:10PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Signed-off-by: Rob Clark > > You're on an old tree, this got reverted. But I'm kinda wondering whether > another patch on top shouldn't just includ the

Re: [Freedreno] [PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Dmitry Baryshkov
On 13/04/2023 00:49, Jessica Zhang wrote: On 4/12/2023 12:16 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_co

Re: [Freedreno] [PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
On 4/12/2023 12:16 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to

Re: [Freedreno] [PATCH] drm/msm/a6xx: initialize GMU mutex earlier

2023-04-12 Thread Doug Anderson
Hi, On Mon, Apr 10, 2023 at 9:59 AM Dmitry Baryshkov wrote: > > Move GMU mutex initialization earlier to make sure that it is always > initialized. a6xx_destroy can be called from ther failure path before > GMU initialization. > > This fixes the following backtrace: > > [ cut here ]--

Re: [Freedreno] [PATCH v5 1/8] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
On 4/12/2023 12:10 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmit

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Rob Clark
On Wed, Apr 12, 2023 at 1:19 PM Dmitry Baryshkov wrote: > > On Wed, 12 Apr 2023 at 23:09, Rob Clark wrote: > > > > On Wed, Apr 12, 2023 at 5:47 AM Rodrigo Vivi wrote: > > > > > > On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > > > > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmit

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Alex Deucher
On Wed, Apr 12, 2023 at 4:10 PM Rob Clark wrote: > > On Wed, Apr 12, 2023 at 5:47 AM Rodrigo Vivi wrote: > > > > On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > > > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > > > > On 11/04/2023 21:28, Rob Clark wrote: > >

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Dmitry Baryshkov
On Wed, 12 Apr 2023 at 23:09, Rob Clark wrote: > > On Wed, Apr 12, 2023 at 5:47 AM Rodrigo Vivi wrote: > > > > On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > > > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > > > > On 11/04/2023 21:28, Rob Clark wrote: > > >

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Rob Clark
On Wed, Apr 12, 2023 at 5:47 AM Rodrigo Vivi wrote: > > On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > > > On 11/04/2023 21:28, Rob Clark wrote: > > > > On Tue, Apr 11, 2023 at 10:36 AM Dmitry Baryshkov > > > >

Re: [Freedreno] [PATCH v5 6/8] drm/msm/dsi: Add check for slice_width in dsi_timing_setup

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 22:09, Jessica Zhang wrote: Add a check for valid dsc->slice_width value in dsi_timing_setup. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Daniel Vetter
On Wed, Apr 12, 2023 at 11:42:07AM -0700, Rob Clark wrote: > On Wed, Apr 12, 2023 at 11:17 AM Daniel Vetter wrote: > > > > On Wed, Apr 12, 2023 at 10:59:54AM -0700, Rob Clark wrote: > > > On Wed, Apr 12, 2023 at 7:42 AM Tvrtko Ursulin > > > wrote: > > > > > > > > > > > > On 11/04/2023 23:56, Rob

Re: [Freedreno] [PATCH v5 5/8] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 22:09, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in v2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate patch - Moved pclk_per_line calculation to hdisplay ad

Re: [Freedreno] [PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 22:09, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to convert to integers to fp - Style changes to impro

Re: [Freedreno] [PATCH v5 1/8] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 22:09, Jessica Zhang wrote: From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Since you are resending this patch,

[Freedreno] [PATCH v5 1/8] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61 +---

[Freedreno] [PATCH v5 7/8] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-12 Thread Jessica Zhang
hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. Changes in v3: - Split from previous patch - Initialized hdisplay as uncompressed pclk per line at the

[Freedreno] [PATCH v5 8/8] drm/msm/dsi: Fix calculation for pkt_per_line

2023-04-12 Thread Jessica Zhang
Currently, pkt_per_line is calculated by dividing slice_per_intf by slice_count. This is incorrect, as slice_per_intf should be divided by slice_per_pkt, which is not always equivalent to slice_count as it is possible for there to be multiple soft slices per interface even though a panel only speci

[Freedreno] [PATCH v5 5/8] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-12 Thread Jessica Zhang
Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in v2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separate patch - Moved pclk_per_line calculation to hdisplay adjustment in `if (dsc)` block of dsi_update

[Freedreno] [PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to convert to integers to fp - Style changes to improve readability - Dropped unused bpp variable

[Freedreno] [PATCH v5 6/8] drm/msm/dsi: Add check for slice_width in dsi_timing_setup

2023-04-12 Thread Jessica Zhang
Add a check for valid dsc->slice_width value in dsi_timing_setup. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 508577c596ff..6a6218a9655

[Freedreno] [PATCH v5 4/8] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-12 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry

[Freedreno] [PATCH v5 0/8] Introduce MSM-specific DSC helpers

2023-04-12 Thread Jessica Zhang
There are some overlap in calculations for MSM-specific DSC variables between DP and DSI. In addition, the calculations for initial_scale_value and det_thresh_flatness that are defined within the DSC 1.2 specifications, but aren't yet included in drm_dsc_helper.c. This series moves these calculati

[Freedreno] [PATCH v5 3/8] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-12 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu

Re: [Freedreno] [PATCH] drm/msm/dpu: add DSC range checking during resource reservation

2023-04-12 Thread Abhinav Kumar
On 4/12/2023 11:50 AM, Marijn Suijten wrote: On 2023-04-12 10:48:18, Abhinav Kumar wrote: [..] The only way to trigger this newly introduced range check is by omitting the DSC_x constants and manually writing e.g. an out-of-range value 10 here, or setting DSC_NONE. This is only allowed for i

Re: [Freedreno] [PATCH] drm/msm/dpu: add DSC range checking during resource reservation

2023-04-12 Thread Dmitry Baryshkov
On 12/04/2023 21:50, Marijn Suijten wrote: On 2023-04-12 10:48:18, Abhinav Kumar wrote: [..] The only way to trigger this newly introduced range check is by omitting the DSC_x constants and manually writing e.g. an out-of-range value 10 here, or setting DSC_NONE. This is only allowed for interf

Re: [Freedreno] [PATCH] drm/msm/dpu: add DSC range checking during resource reservation

2023-04-12 Thread Marijn Suijten
On 2023-04-12 10:48:18, Abhinav Kumar wrote: [..] > > The only way to trigger this newly introduced range check is by omitting > > the DSC_x constants and manually writing e.g. an out-of-range value 10 > > here, or setting DSC_NONE. This is only allowed for interfaces. > > > > Correct, its just

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Rob Clark
On Wed, Apr 12, 2023 at 11:17 AM Daniel Vetter wrote: > > On Wed, Apr 12, 2023 at 10:59:54AM -0700, Rob Clark wrote: > > On Wed, Apr 12, 2023 at 7:42 AM Tvrtko Ursulin > > wrote: > > > > > > > > > On 11/04/2023 23:56, Rob Clark wrote: > > > > From: Rob Clark > > > > > > > > Add support to dump G

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Daniel Vetter
On Wed, Apr 12, 2023 at 10:59:54AM -0700, Rob Clark wrote: > On Wed, Apr 12, 2023 at 7:42 AM Tvrtko Ursulin > wrote: > > > > > > On 11/04/2023 23:56, Rob Clark wrote: > > > From: Rob Clark > > > > > > Add support to dump GEM stats to fdinfo. > > > > > > v2: Fix typos, change size units to match d

Re: [Freedreno] [PATCH v3 4/7] drm/i915: Switch to fdinfo helper

2023-04-12 Thread Daniel Vetter
On Wed, Apr 12, 2023 at 04:12:41PM +0100, Tvrtko Ursulin wrote: > > On 12/04/2023 14:51, Daniel Vetter wrote: > > On Wed, Apr 12, 2023 at 01:32:43PM +0100, Tvrtko Ursulin wrote: > > > > > > On 11/04/2023 23:56, Rob Clark wrote: > > > > From: Rob Clark > > > > > > > > Signed-off-by: Rob Clark >

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Rob Clark
On Wed, Apr 12, 2023 at 7:42 AM Tvrtko Ursulin wrote: > > > On 11/04/2023 23:56, Rob Clark wrote: > > 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 > > > > Signed-off-by: Rob Clark > > Re

Re: [Freedreno] [PATCH] drm/msm/dpu: add DSC range checking during resource reservation

2023-04-12 Thread Abhinav Kumar
On 4/12/2023 12:38 AM, Marijn Suijten wrote: On 2023-04-11 18:50:24, Abhinav Kumar wrote: On 4/11/2023 6:06 PM, Dmitry Baryshkov wrote: On 12/04/2023 01:32, Abhinav Kumar wrote: Hi Marijn On 4/11/2023 3:24 PM, Marijn Suijten wrote: Again, don't forget to include previous reviewers in cc

Re: [Freedreno] [PATCH] drm/msm/dpu: always program dsc active bits

2023-04-12 Thread Abhinav Kumar
On 4/12/2023 12:24 AM, Marijn Suijten wrote: On 2023-04-11 16:45:34, Abhinav Kumar wrote: [..] Does this flush all DSCs programmed in CTL_DSC_FLUSH as set above? That is currently still in `if (cfg->dsc)` and never overwritten if all DSCs are disabled, should it be taken out of the `if` to m

Re: [Freedreno] [PATCH] dt-bindings: display/msm: dsi-controller-main: Document qcom, master-dsi and qcom, sync-dual-dsi

2023-04-12 Thread Rob Herring
On Tue, 11 Apr 2023 22:31:49 +0800, Jianhua Lu wrote: > This fixes warning: > sm8250-xiaomi-elish-csot.dtb: dsi@ae94000: Unevaluated properties are not > allowed ('qcom,master-dsi', 'qcom,sync-dual-dsi' were unexpected) > > Signed-off-by: Jianhua Lu > --- > .../bindings/display/msm/dsi-cont

Re: [Freedreno] [PATCH v3 4/7] drm/i915: Switch to fdinfo helper

2023-04-12 Thread Tvrtko Ursulin
On 12/04/2023 14:51, Daniel Vetter wrote: On Wed, Apr 12, 2023 at 01:32:43PM +0100, Tvrtko Ursulin wrote: On 11/04/2023 23:56, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_driver.c | 3 ++- drivers/gpu/drm/i915/i915_drm_client.c | 18 ++

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Tvrtko Ursulin
On 11/04/2023 23:56, Rob Clark wrote: 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 Signed-off-by: Rob Clark Reviewed-by: Emil Velikov --- Documentation/gpu/drm-usage-stats.rst | 21 drive

Re: [Freedreno] [PATCH v3 4/7] drm/i915: Switch to fdinfo helper

2023-04-12 Thread Daniel Vetter
On Wed, Apr 12, 2023 at 01:32:43PM +0100, Tvrtko Ursulin wrote: > > On 11/04/2023 23:56, Rob Clark wrote: > > From: Rob Clark > > > > Signed-off-by: Rob Clark > > --- > > drivers/gpu/drm/i915/i915_driver.c | 3 ++- > > drivers/gpu/drm/i915/i915_drm_client.c | 18 +- > >

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Rodrigo Vivi
On Wed, Apr 12, 2023 at 10:11:32AM +0200, Daniel Vetter wrote: > On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > > On 11/04/2023 21:28, Rob Clark wrote: > > > On Tue, Apr 11, 2023 at 10:36 AM Dmitry Baryshkov > > > wrote: > > > > > > > > On Tue, 11 Apr 2023 at 20:13, Rob Clark

Re: [Freedreno] [PATCH v3 4/7] drm/i915: Switch to fdinfo helper

2023-04-12 Thread Tvrtko Ursulin
On 11/04/2023 23:56, Rob Clark wrote: From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_driver.c | 3 ++- drivers/gpu/drm/i915/i915_drm_client.c | 18 +- drivers/gpu/drm/i915/i915_drm_client.h | 2 +- 3 files changed, 8 insertions(+), 15 deleti

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

2023-04-12 Thread Christian König
Am 12.04.23 um 14:10 schrieb Tvrtko Ursulin: On 12/04/2023 10:34, Christian König wrote: Am 12.04.23 um 00:56 schrieb 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 pr

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

2023-04-12 Thread Tvrtko Ursulin
On 12/04/2023 10:34, Christian König wrote: Am 12.04.23 um 00:56 schrieb 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 wit

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

2023-04-12 Thread Christian König
Am 12.04.23 um 00:56 schrieb 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.

Re: [Freedreno] [PATCH v2 0/2] drm: fdinfo memory stats

2023-04-12 Thread Daniel Vetter
On Wed, Apr 12, 2023 at 01:36:52AM +0300, Dmitry Baryshkov wrote: > On 11/04/2023 21:28, Rob Clark wrote: > > On Tue, Apr 11, 2023 at 10:36 AM Dmitry Baryshkov > > wrote: > > > > > > On Tue, 11 Apr 2023 at 20:13, Rob Clark wrote: > > > > > > > > On Tue, Apr 11, 2023 at 9:53 AM Daniel Vetter wr

Re: [Freedreno] [PATCH v3 6/7] drm: Add fdinfo memory stats

2023-04-12 Thread Daniel Vetter
On Tue, Apr 11, 2023 at 03:56:11PM -0700, Rob Clark wrote: > 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 > > Signed-off-by: Rob Clark > Reviewed-by: Emil Velikov > --- > Documentation/gpu/drm

Re: [Freedreno] [PATCH v3 5/7] drm/etnaviv: Switch to fdinfo helper

2023-04-12 Thread Daniel Vetter
On Tue, Apr 11, 2023 at 03:56:10PM -0700, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark You're on an old tree, this got reverted. But I'm kinda wondering whether another patch on top shouldn't just includ the drm_show_fdinfo in DRM_GEM_FOPS macro ... There's really no good rea

Re: [Freedreno] [PATCH v3 3/7] drm/amdgpu: Switch to fdinfo helper

2023-04-12 Thread Daniel Vetter
On Tue, Apr 11, 2023 at 03:56:08PM -0700, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > 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 fi

Re: [Freedreno] [PATCH v3 1/7] drm: Add common fdinfo helper

2023-04-12 Thread Daniel Vetter
On Tue, Apr 11, 2023 at 03:56:06PM -0700, Rob Clark wrote: > From: Rob Clark > > Handle a bit of the boiler-plate in a single case, and make it easier to > add some core tracked stats. > > Signed-off-by: Rob Clark Thanks a lot for kicking this off. A few polish comments below, with those addre

Re: [Freedreno] [PATCH] drm/msm/dpu: add DSC range checking during resource reservation

2023-04-12 Thread Marijn Suijten
On 2023-04-11 18:50:24, Abhinav Kumar wrote: > > > On 4/11/2023 6:06 PM, Dmitry Baryshkov wrote: > > On 12/04/2023 01:32, Abhinav Kumar wrote: > >> Hi Marijn > >> > >> On 4/11/2023 3:24 PM, Marijn Suijten wrote: > >>> Again, don't forget to include previous reviewers in cc, please :) > >>> > >>>

Re: [Freedreno] [PATCH] drm/msm/dpu: always program dsc active bits

2023-04-12 Thread Marijn Suijten
On 2023-04-11 16:45:34, Abhinav Kumar wrote: [..] > > Does this flush all DSCs programmed in CTL_DSC_FLUSH as set above? That > > is currently still in `if (cfg->dsc)` and never overwritten if all DSCs > > are disabled, should it be taken out of the `if` to make sure no DSCs > > are inadvertently