Re: [Freedreno] (subset) [PATCH v3 00/12] RB1/QCM2290 features

2023-12-02 Thread Bjorn Andersson
On Wed, 29 Nov 2023 15:43:57 +0100, Konrad Dybcio wrote: > This series brings: > - interconnect plumbing > - display setup > > for QCM2290/QRB2210 and > > - CAN bus controller > - HDMI display > - wifi fw variant name > > [...] Applied, thanks! [06/12] arm64: dts: qcom: sc7180: Add the

[Freedreno] [RFT PATCH v2 2/4] drm/msm/dpu: enable writeback on SC8108X

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h| 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h

[Freedreno] [RFT PATCH v2 4/4] drm/msm/dpu: enable writeback on SM6350

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h

[Freedreno] [RFT PATCH v2 3/4] drm/msm/dpu: enable writeback on SM6125

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h

[Freedreno] [RFT PATCH v2 1/4] drm/msm/dpu: enable writeback on SM8150

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h

[Freedreno] [RFT PATCH v2 0/4] drm/msm/dpu: enable writeback on the other platforms

2023-12-02 Thread Dmitry Baryshkov
I was not able to test it on my own, this is a call for testing for the owners of these platforms. The git version of modetest now fully supports writeback. Use libdrm >= 2.4.117, run modetest -ac to determine the writeback connector, cat /sys/kernel/debug/dri/0/state to determine spare CRTC and

[Freedreno] [PATCH v2 0/3] drm/msm/dpu: enable writeback on several platforms

2023-12-02 Thread Dmitry Baryshkov
This enables writeback on several platforms where I could actually test it. Changes since v1: - Fixed the CLK_CTRL for SDM845 platform. Dmitry Baryshkov (3): drm/msm/dpu: enable writeback on SDM845 drm/msm/dpu: enable writeback on SM8350 drm/msm/dpu: enable writeback on SM8450

[Freedreno] [PATCH v2 1/3] drm/msm/dpu: enable writeback on SDM845

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 18 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 -- 2 files changed, 22 insertions(+), 2 deletions(-) diff

[Freedreno] [PATCH v2 2/3] drm/msm/dpu: enable writeback on SM8350

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h

[Freedreno] [PATCH v2 3/3] drm/msm/dpu: enable writeback on SM8450

2023-12-02 Thread Dmitry Baryshkov
Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h

[Freedreno] [PATCH v2] drm/msm/dpu: correct clk bit for WB2 block

2023-12-02 Thread Dmitry Baryshkov
On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one. Correct that to ensure proper programming sequence for WB2 on these

Re: [Freedreno] [RFC] drm/msm/rd: Check PT_PTRACED for cmdstream dumping

2023-12-02 Thread Dmitry Baryshkov
On 14/09/2023 20:24, Rob Clark wrote: From: Rob Clark So, when you want to get a cmdstream trace of some deqp or piglit test, but you happen to be running it on the same laptop with full desktop env, the current dump-everything firehose of `cat $debugfs/dri/n/rd` is quite a bit too much.

[Freedreno] [PATCH RESEND 5/5] drm/msm/mdp5: drop global_state_lock

2023-12-02 Thread Dmitry Baryshkov
Since the commit b962a12050a3 ("drm/atomic: integrate modeset lock with private objects") the DRM framework no longer requires the external lock for private objects. Drop the lock, letting the DRM to manage private object locking. Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH RESEND 1/5] drm/atomic: add private obj state to state dump

2023-12-02 Thread Dmitry Baryshkov
The drm_atomic_print_new_state() already prints private object state via drm_atomic_private_obj_print_state(). Add private object state dumping to __drm_state_dump(), so that it is also included into drm_state_dump() output and into debugfs/dri/N/state file. Reviewed-by: Rob Clark Signed-off-by:

[Freedreno] [PATCH RESEND 0/5] drm/msm: cleanup private obj handling

2023-12-02 Thread Dmitry Baryshkov
Note: I'm resending this patch series as I haven't got any feedback from the drm core maintainers to the first patch. While debugging one of the features in DRM/MSM I noticed that MSM subdrivers still wrap private object access with manual modeset locking. Since commit b962a12050a3 ("drm/atomic:

[Freedreno] [PATCH RESEND 4/5] drm/msm/mdp5: migrate SMP dumping to using atomic_print_state

2023-12-02 Thread Dmitry Baryshkov
The Shared Memory Pool (SMP) state is a part of the MDP5's private object state. Use existing infrastructure, atomic_print_state() callback, to dump SMP state (which also makes it included into debugfs/dri/N/state). This allows us to drop the custom debugfs file too. Signed-off-by: Dmitry

[Freedreno] [PATCH RESEND 2/5] drm/msm/dpu: finalise global state object

2023-12-02 Thread Dmitry Baryshkov
Add calls to finalise global state object and corresponding lock. Fixes: de3916c70a24 ("drm/msm/dpu: Track resources in global state") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 8 1 file changed, 8 insertions(+) diff --git

[Freedreno] [PATCH RESEND 3/5] drm/msm/dpu: drop global_state_lock

2023-12-02 Thread Dmitry Baryshkov
Since the commit b962a12050a3 ("drm/atomic: integrate modeset lock with private objects") the DRM framework no longer requires the external lock for private objects. Drop the lock, letting the DRM to manage private object locking. Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v3] drm/msm/dsi: Document DSC related pclk_rate and hdisplay calculations

2023-12-02 Thread Dmitry Baryshkov
Provide actual documentation for the pclk and hdisplay calculations in the case of DSC compression being used. Signed-off-by: Dmitry Baryshkov --- Changes since v2: - Followed suggestion by Abhinav and Marijn to improve documentatry comments. Changes since v1: - Converted

[Freedreno] [PATCH RESEND] drm/drv: propagate errors from drm_modeset_register_all()

2023-12-02 Thread Dmitry Baryshkov
In case the drm_modeset_register_all() function fails, its error code will be ignored. Instead make the drm_dev_register() bail out in case of such an error. Fixes: 79190ea2658a ("drm: Add callbacks for late registering") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v4 3/4] drm/msm/mdss: inline msm_mdss_icc_request_bw()

2023-12-02 Thread Dmitry Baryshkov
There are just two places where we set the bandwidth: in the resume and in the suspend paths. Drop the wrapping function msm_mdss_icc_request_bw() and call icc_set_bw() directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 19 --- 1 file changed, 8

[Freedreno] [PATCH v4 4/4] drm/msm/mdss: Handle the reg bus ICC path

2023-12-02 Thread Dmitry Baryshkov
Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of effects, from none to otherwise inexplicable DSI timeouts.

[Freedreno] [PATCH v4 2/4] drm/msm/mdss: Rename path references to mdp_path

2023-12-02 Thread Dmitry Baryshkov
From: Konrad Dybcio The DPU1 driver needs to handle all MDPn<->DDR paths, as well as CPU<->SLAVE_DISPLAY_CFG. The former ones share how their values are calculated, but the latter one has static predefines spanning all SoCs. In preparation for supporting the CPU<->SLAVE_DISPLAY_CFG path, rename

[Freedreno] [PATCH v4 0/4] MDSS reg bus interconnect

2023-12-02 Thread Dmitry Baryshkov
Per agreement with Konrad, picked up this patch series. Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of

[Freedreno] [PATCH v4 1/4] drm/msm/mdss: switch mdss to use devm_of_icc_get()

2023-12-02 Thread Dmitry Baryshkov
Stop using hand-written reset function for ICC release, use devm_of_icc_get() instead. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_mdss.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c

Re: [Freedreno] [PATCH v2 4/6] drm/msm/dsi: add a comment to explain pkt_per_line encoding

2023-12-02 Thread Dmitry Baryshkov
On 16/11/2023 20:45, Jonathan Marek wrote: On 11/15/23 2:38 AM, Dmitry Baryshkov wrote: On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: Make it clear why the pkt_per_line value is being "divided by 2". Signed-off-by: Jonathan Marek ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 2 ++   1

Re: [Freedreno] [PATCH v2 1/6] drm/msm/dpu: fix video mode DSC for DSI

2023-12-02 Thread Dmitry Baryshkov
On 16/11/2023 20:30, Jonathan Marek wrote: On 11/15/23 3:53 AM, Dmitry Baryshkov wrote: On Wed, 15 Nov 2023 at 01:00, Jonathan Marek wrote: Add necessary DPU changes for DSC to work with DSI video mode. Note this changes the logic to enable HCTL to match downstream, it will now be enabled

[Freedreno] [PATCH] drm/ci: remove rebase-merge directory

2023-12-02 Thread Dmitry Baryshkov
Gitlab runner can cache git repository, including the unfinished rebase merge status. New CI job will come as a fresh checkout, however this will not destroy the unfinished rebase, failing our build script. Destroy the unfinished rebase state. Suggested-by: David Heidelberg Signed-off-by: Dmitry

Re: [Freedreno] [PATCH] drm/msm/gpu: Fix null-pointer dereference in zap_shader_load_mdt

2023-12-02 Thread Dmitry Baryshkov
On 23/11/2023 05:33, Kunwu Chan wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Fixes: a9e2559c931d ("drm/msm/gpu: Move zap shader loading to adreno") Signed-off-by: Kunwu

Re: [Freedreno] [PATCH] drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog

2023-12-02 Thread Dmitry Baryshkov
On 01/12/2023 02:35, Bjorn Andersson wrote: Similar to SC8280XP, the misconfigured SAFE logic causes rather significant delays in __arm_smmu_tlb_sync(), resulting in poor performance for things such as USB. Introduce appropriate SAFE values for SC8180X to correct this. Fixes: f3af2d6ee9ab

[Freedreno] [PATCH 11/12] drm/msm: merge dpu format database to MDP formats

2023-12-02 Thread Dmitry Baryshkov
Finally remove duplication between DPU and generic MDP code by merging DPU format lists to the MDP format database. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +- .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 4 +-

[Freedreno] [PATCH 04/12] drm/msm: add arrays listing formats supported by MDP4/MDP5 hardware

2023-12-02 Thread Dmitry Baryshkov
MDP4 and MDP5 drivers enumerate supported formats each time the plane is created. In preparation to merger of MDP DPU format databases, define precise formats list, so that changes to the database do not cause the driver to add unsupported format to the list. Signed-off-by: Dmitry Baryshkov ---

[Freedreno] [PATCH 00/12] drm/msm: fold dpu_format into mdp_formats database

2023-12-02 Thread Dmitry Baryshkov
During the review of [1] Abhinav pointed out that mdp_rgb_formats and mdp_rgb_yuv_formats arrays from patch 1 are directly based on the struct mdp_format formats array. This was true, because MDP4 / MDP5 drivers used their own (small) list of supported formats. The DPU driver, supporting more

Re: [Freedreno] (subset) [PATCH RFC v7 00/10] Support for Solid Fill Planes

2023-12-02 Thread Dmitry Baryshkov
On Fri, 27 Oct 2023 15:32:50 -0700, Jessica Zhang wrote: > Some drivers support hardware that have optimizations for solid fill > planes. This series aims to expose these capabilities to userspace as > some compositors have a solid fill flag (ex. SOLID_COLOR in the Android > hardware composer

[Freedreno] [PATCH 01/12] drm/msm: fix BPC1 -> BPC4

2023-12-02 Thread Dmitry Baryshkov
Fix enum mdp_bpc::BPC1 value to be BPC4 instead (as shown in the DPU driver). This commit should be replaced with the registers sync with Mesa instead. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp_common.xml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Freedreno] [PATCH 06/12] drm/msm/dpu: pull format flag definitions to msm_drv.h

2023-12-02 Thread Dmitry Baryshkov
In preparation to merger of formats databases, pull format flag definitions to msm_drv.h header, so that they are visibile to both dpu and mdp drivers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 98 ++---

[Freedreno] [PATCH 03/12] drm/msm/dpu: use format-related definitions from mdp_common.xml.h

2023-12-02 Thread Dmitry Baryshkov
Instead of having DPU-specific defines, switch to the definitions from the mdp_common.xml.h file. This is the preparation for merged of DPU and MDP format tables. Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 2 +-

[Freedreno] [PATCH 02/12] drm/msm/disp: add mdp_fetch_mode enum

2023-12-02 Thread Dmitry Baryshkov
Pull in new enum from the mesa registers. This commit should be replaced with the registers sync with Mesa instead. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp_common.xml.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/mdp_common.xml.h

[Freedreno] [PATCH 09/12] drm/msm: convert msm_format::unpack_align_msb to the flag

2023-12-02 Thread Dmitry Baryshkov
Instead of having a u8 or bool field unpack_align_msb, convert it to the flag, this save space in the tables and allows us to handle all booleans in the same way. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 12 ++--

[Freedreno] [PATCH 07/12] drm/msm: merge dpu_format and mdp_format in struct msm_format

2023-12-02 Thread Dmitry Baryshkov
Structures dpu_format and mdp_format are largely the same structures. In order to remove duplication between format databases, merge these two stucture definitions into the global struct msm_format. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 12 +-

[Freedreno] [PATCH 12/12] drm/msm: drop msm_kms_funcs::get_format() callback

2023-12-02 Thread Dmitry Baryshkov
Now as all subdrivers were converted to use common database of formats, drop the get_format() callback and use mdp_get_format() directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 2 +-

[Freedreno] [PATCH 08/12] drm/msm: convert msm_format::unpack_tight to the flag

2023-12-02 Thread Dmitry Baryshkov
Instead of having a u8 or bool field unpack_tight, convert it to the flag, this save space in the tables and allows us to handle all booleans in the same way. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 22 +++--

[Freedreno] [PATCH 10/12] drm/msm: convert msm_format::alpha_enable to the flag

2023-12-02 Thread Dmitry Baryshkov
Instead of having a bool field alpha_enable, convert it to the flag, this save space in the tables and allows us to handle all booleans in the same way. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c| 12 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c

[Freedreno] [PATCH 05/12] drm/msm/dpu: in dpu_format replace bitmap with unsigned long field

2023-12-02 Thread Dmitry Baryshkov
Using bitmap for the flags results in a clumsy syntax on test_bit, replace it with unsigned long type and simple binary ops. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 18 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 16 +++-

Re: [Freedreno] [PATCH 2/2] drm/msm/dpu: Set input_sel bit for INTF

2023-12-02 Thread Dmitry Baryshkov
On 01/12/2023 23:29, Abhinav Kumar wrote: On 11/30/2023 11:36 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 03:31, Jessica Zhang wrote: Set the input_sel bit for encoders as it was missed in the initial implementation. Reported-by: Rob Clark Fixes: 91143873a05d ("drm/msm/dpu: Add

Re: [Freedreno] [PATCH 01/17] drm/msm: add arrays listing formats supported by MDP4/MDP5 hardware

2023-12-02 Thread Dmitry Baryshkov
On 02/12/2023 03:36, Abhinav Kumar wrote: On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: MDP4 and MDP5 drivers enumerate supported formats each time the plane is created. As the list of supported image formats is constant, create corresponding data arrays to be used by MDP4 and MDP5 drivers.