[PATCH 9/9] drm/msm/dpu: sync mode_config limits to the FB limits in dpu_plane.c

2024-03-19 Thread Dmitry Baryshkov
Lift mode_config limits set by the DPU driver to the actual FB limits as handled by the dpu_plane.c. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

[PATCH 7/9] drm/msm/dpu: check for overflow in _dpu_crtc_setup_lm_bounds()

2024-03-19 Thread Dmitry Baryshkov
Check in _dpu_crtc_setup_lm_bounds() that CRTC width is not overflowing LM requirements. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b

[PATCH 2/9] drm/msm/dpu: drop dpu_format_populate_layout from dpu_plane_sspp_atomic_update

2024-03-19 Thread Dmitry Baryshkov
The dpu_plane_prepare_fb() already calls dpu_format_populate_layout(). Store the generated layour in the plane state and drop this call from dpu_plane_sspp_update(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 19 --- drivers/gpu/drm/msm/disp

[PATCH 6/9] drm/msm/dpu: drop call to _dpu_crtc_setup_lm_bounds from atomic_begin

2024-03-19 Thread Dmitry Baryshkov
The dpu_crtc_atomic_check() already calls _dpu_crtc_setup_lm_bounds(). There is no need to call it from dpu_crtc_atomic_begin(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1

[PATCH 1/9] drm/msm/dpu: drop dpu_format_check_modified_format

2024-03-19 Thread Dmitry Baryshkov
The msm_kms_funcs::check_modified_format() callback is not used by the driver. Drop it completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 45 - drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h | 15 -- drivers/gpu/drm/msm

[PATCH 0/9] drm/msm/dpu: be more friendly to X.org

2024-03-19 Thread Dmitry Baryshkov
-off-by: Dmitry Baryshkov --- Dmitry Baryshkov (9): drm/msm/dpu: drop dpu_format_check_modified_format drm/msm/dpu: drop dpu_format_populate_layout from dpu_plane_sspp_atomic_update drm/msm/dpu: split dpu_format_populate_layout drm/msm/dpu: move

Re: [PATCH v2 3/4] drm/msm/dp: Delete the old 500 ms wait for eDP HPD in aux transfer

2024-03-18 Thread Dmitry Baryshkov
On Tue, 19 Mar 2024 at 02:19, Abhinav Kumar wrote: > > +bjorn, johan as fyi for sc8280xp > > On 3/15/2024 2:36 PM, Douglas Anderson wrote: > > Before the introduction of the wait_hpd_asserted() callback in commit > > 841d742f094e ("drm/dp: Add wait_hpd_asserted() callback to struct > > drm_dp_aux"

Re: [PATCH RFC v3 00/12] drm/msm: generate register header files

2024-03-15 Thread Dmitry Baryshkov
On Fri, 15 Mar 2024 at 22:02, Rob Clark wrote: > > On Fri, Mar 15, 2024 at 4:46 AM Dmitry Baryshkov > wrote: > > > > Currently display-related register headers are generated from XML files > > shipped withing Mesa source tree. This is not fully optimal: it requires >

[PATCH RFC v3 08/12] drm/msm: import gen_header.py script from Mesa

2024-03-15 Thread Dmitry Baryshkov
Import the gen_headers.py script from Mesa, commit FIXME. This script will be used to generate MSM register files on the fly during compilation. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/gen_header.py | 958 1 file changed, 958 insertions

[PATCH RFC v3 09/12] drm/msm: generate headers on the fly

2024-03-15 Thread Dmitry Baryshkov
Generate DRM/MSM headers on the fly during kernel build. This removes a need to push register changes to Mesa with the following manual synchronization step. Existing headers will be removed in the following commits (split away to ease reviews). Signed-off-by: Dmitry Baryshkov --- drivers/gpu

[PATCH RFC v3 04/12] drm/msm: move msm_gpummu.c to adreno/a2xx_gpummu.c

2024-03-15 Thread Dmitry Baryshkov
The msm_gpummu.c implementation is used only on A2xx and it is tied to the A2xx registers. Rename the source file accordingly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 2 +- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 +- drivers/gpu

[PATCH RFC v3 03/12] drm/msm/dsi: drop mmss_cc.xml.h

2024-03-15 Thread Dmitry Baryshkov
The mmss_cc.xml.h file describes bits of the MMSS clock controller on APQ8064 / MSM8960 platforms. They are not used by the driver and do not belong to the DRM MSM driver. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 131

[PATCH RFC v3 02/12] drm/msm/hdmi: drop qfprom.xml.h

2024-03-15 Thread Dmitry Baryshkov
The qfprom.xml.h contains definitions for the nvmem code. They are not used in the existing code. Also if we were to use them later, we should have used nvmem cell API instead of using these defs. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 61

[PATCH RFC v3 01/12] drm/msm/mdp5: add writeback block bases

2024-03-15 Thread Dmitry Baryshkov
In order to stop patching the mdp5 headers, import definitions for the writeback blocks. This part is extracted from the old Rob's patch. Co-developed-by: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++ 1

[PATCH RFC v3 00/12] drm/msm: generate register header files

2024-03-15 Thread Dmitry Baryshkov
with gen_headers.py - Simplify Makefile rules, making all Adreno objects depend on Adreno headers and all displau objects depend on all display headers - Also handle Adreno registers - Link to v1: https://lore.kernel.org/r/20240226-fd-xml-shipped-v1-0-86bb6c334...@linaro.org --- Dmitry Baryshkov

[PATCH RFC v2 4/7] drm/msm: move msm_gpummu.c to adreno/a2xx_gpummu.c

2024-03-14 Thread Dmitry Baryshkov
The msm_gpummu.c implementation is used only on A2xx and it is tied to the A2xx registers. Rename the source file accordingly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 2 +- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 +- drivers/gpu

[PATCH RFC v2 2/7] drm/msm/hdmi: drop qfprom.xml.h

2024-03-14 Thread Dmitry Baryshkov
The qfprom.xml.h contains definitions for the nvmem code. They are not used in the existing code. Also if we were to use them later, we should have used nvmem cell API instead of using these defs. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 61

[PATCH RFC v2 0/7] drm/msm: generate register header files

2024-03-14 Thread Dmitry Baryshkov
registers - Link to v1: https://lore.kernel.org/r/20240226-fd-xml-shipped-v1-0-86bb6c334...@linaro.org --- Dmitry Baryshkov (7): drm/msm/mdp5: add writeback block bases drm/msm/hdmi: drop qfprom.xml.h drm/msm/dsi: drop mmss_cc.xml.h drm/msm: move msm_gpummu.c to adreno

[PATCH RFC v2 3/7] drm/msm/dsi: drop mmss_cc.xml.h

2024-03-14 Thread Dmitry Baryshkov
The mmss_cc.xml.h file describes bits of the MMSS clock controller on APQ8064 / MSM8960 platforms. They are not used by the driver and do not belong to the DRM MSM driver. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 131

[PATCH RFC v2 6/7] drm/msm: import gen_header.py script from Mesa

2024-03-14 Thread Dmitry Baryshkov
Import the gen_headers.py script from Mesa, commit FIXME. This script will be used to generate MSM register files on the fly during compilation. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/gen_header.py | 958 1 file changed, 958 insertions

[PATCH RFC v2 1/7] drm/msm/mdp5: add writeback block bases

2024-03-14 Thread Dmitry Baryshkov
In order to stop patching the mdp5 headers, import definitions for the writeback blocks. This part is extracted from the old Rob's patch. Co-developed-by: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++ 1

[PATCH v3 5/5] drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib

2024-03-13 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

[PATCH v3 4/5] drm/msm/dpu: rework core_perf debugfs overrides

2024-03-13 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/dr

[PATCH v3 3/5] drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus()

2024-03-13 Thread Dmitry Baryshkov
voting. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 39 +-- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 87b892069526

[PATCH v3 2/5] drm/msm/dpu: core_perf: extract bandwidth aggregation function

2024-03-13 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 | 45 +++ 1 file changed, 25 insertions

[PATCH v3 0/5] drm/msm/dpu: rework debugfs interface of dpu_core_perf

2024-03-13 Thread Dmitry Baryshkov
es/119552/#rev2 Signed-off-by: Dmitry Baryshkov --- Dmitry Baryshkov (5): drm/msm/dpu: don't allow overriding data from catalog drm/msm/dpu: core_perf: extract bandwidth aggregation function drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus() drm/msm/dpu: rewo

[PATCH v3 1/5] drm/msm/dpu: don't allow overriding data from catalog

2024-03-13 Thread Dmitry Baryshkov
Mark various data tables as const") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_pe

Re: [PATCH v4 00/13] drm/msm/dpu: support virtual wide planes

2024-03-13 Thread Dmitry Baryshkov
On Thu, 14 Mar 2024 at 02:02, Dmitry Baryshkov wrote: > > As promised in the basic wide planes support ([1]) here comes a series > supporting 2*max_linewidth for all the planes. > > Note: Unlike v1 and v2 this series finally includes support for > additional planes - having mo

[PATCH v4 08/13] drm/msm/dpu: add support for virtual planes

2024-03-13 Thread Dmitry Baryshkov
on the resolution. Note #2: By default support for virtual planes is turned off and the driver still uses old code path with preallocated SSPP block for each plane. To enable virtual planes, pass 'msm.dpu_use_virtual_planes=1' kernel parameter. Signed-off-by: Dmitry Baryshkov --- d

[PATCH v4 11/13] drm/msm/dpu: create additional virtual planes

2024-03-13 Thread Dmitry Baryshkov
Since we have enabled sharing of SSPP blocks between two planes, it is now possible to use twice as much planes as there are hardware SSPP blocks. Create additional overlay planes. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 12 1 file changed, 12

[PATCH v4 13/13] drm/msm/dpu: include SSPP allocation state into the dumped state

2024-03-13 Thread Dmitry Baryshkov
Make dpu_rm_print_state() also output the SSPP allocation state. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index

[PATCH v4 04/13] drm/msm/dpu: drop virt_formats from SSPP subblock configuration

2024-03-13 Thread Dmitry Baryshkov
The virt_formats / virt_num_formats are not used by the current driver and are not going to be used in future since formats for virtual planes are handled in a different way, by forbidding unsupported combinations during atomic_check. Drop those fields now. Signed-off-by: Dmitry Baryshkov

[PATCH v4 12/13] drm/msm/dpu: allow sharing of blending stages

2024-03-13 Thread Dmitry Baryshkov
It is possible to slightly bend the limitations of the HW blender. If two rectangles are contiguous (like two rectangles of a single plane) they can be blended using a single LM blending stage, allowing one to blend more planes via a single LM. Signed-off-by: Dmitry Baryshkov --- drivers/gpu

[PATCH v4 10/13] drm/msm/dpu: allow sharing SSPP between planes

2024-03-13 Thread Dmitry Baryshkov
and only consequetive planes are considered. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 128 +++--- 1 file changed, 112 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1

[PATCH v4 03/13] drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check

2024-03-13 Thread Dmitry Baryshkov
In preparation for virtualized planes support, move pstate->pipe initialization from dpu_plane_reset() to dpu_plane_atomic_check(). In case of virtual planes the plane's pipe will not be known up to the point of atomic_check() callback. Signed-off-by: Dmitry Baryshkov --- drivers/gpu

[PATCH v4 07/13] drm/msm/dpu: move rot90 checking to dpu_plane_atomic_check_pipe()

2024-03-13 Thread Dmitry Baryshkov
Move a call to dpu_plane_check_inline_rotation() to the dpu_plane_atomic_check_pipe() function, so that the rot90 constraints are checked for both pipes. Also move rotation field from struct dpu_plane_state to struct dpu_sw_pipe_cfg. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp

[PATCH v4 09/13] drm/msm/dpu: allow using two SSPP blocks for a single plane

2024-03-13 Thread Dmitry Baryshkov
cases and allows all planes to go up to 2*max_linewidth (at the cost of making some of the planes unavailable to the user). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 172 -- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 8 + 2 files

[PATCH v4 06/13] drm/msm/dpu: split dpu_plane_atomic_check()

2024-03-13 Thread Dmitry Baryshkov
Split dpu_plane_atomic_check() function into two pieces: dpu_plane_atomic_check_nopipe() performing generic checks on the pstate, without touching the associated pipe, and dpu_plane_atomic_check_pipes(), which takes into account used pipes. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm

[PATCH v4 05/13] drm/msm/dpu: move scaling limitations out of the hw_catalog

2024-03-13 Thread Dmitry Baryshkov
, this will have to be handled separately, after the plane refactoring. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 12 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 4 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 16

[PATCH v4 01/13] drm/msm/dpu: take plane rotation into account for wide planes

2024-03-13 Thread Dmitry Baryshkov
is supported for tiled formats. However it's better to fix this now rather than stumbling upon it later. Fixes: 80e8ae3b38ab ("drm/msm/dpu: add support for wide planes") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 1 file changed

[PATCH v4 00/13] drm/msm/dpu: support virtual wide planes

2024-03-13 Thread Dmitry Baryshkov
) - Significantly reworked the SSPP allocation code - Added debugging code to dump RM state in dri/N/state Changes since v1: - Fixed build error due to me missing one of fixups, it was left uncommitted. - Implementated proper handling of wide plane rotation & reflection. Dmitry Baryshkov (13):

[PATCH v4 02/13] drm/msm/dpu: use drm_rect_fp_to_int()

2024-03-13 Thread Dmitry Baryshkov
Use the drm_rect_fp_to_int() helper instead of using the hand-written code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm

Re: [PATCH RFC v2 5/5] drm/msm/hdmi: make use of the drm_connector_hdmi framework

2024-03-11 Thread Dmitry Baryshkov
On Mon, 11 Mar 2024 at 19:06, Maxime Ripard wrote: > > On Mon, Mar 11, 2024 at 05:55:36PM +0200, Dmitry Baryshkov wrote: > > On Mon, 11 Mar 2024 at 17:46, Maxime Ripard wrote: > > > > > > Hi, > > > > > > On Sat, Mar 09, 2024 at 12:31:32PM +0200

Re: [PATCH RFC v2 5/5] drm/msm/hdmi: make use of the drm_connector_hdmi framework

2024-03-11 Thread Dmitry Baryshkov
On Mon, 11 Mar 2024 at 17:46, Maxime Ripard wrote: > > Hi, > > On Sat, Mar 09, 2024 at 12:31:32PM +0200, Dmitry Baryshkov wrote: > > Setup the HDMI connector on the MSM HDMI outputs. Make use of > > atomic_check hook and of the provided Infoframe infrastructure. > &

[PATCH 2/3] drm/msm/dsi: move next bridge acquisition to dsi_bind

2024-03-09 Thread Dmitry Baryshkov
probe deferral is returned as early as possible. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 16 drivers/gpu/drm/msm/dsi/dsi.h | 2 ++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 8 +--- 3 files changed, 19 insertions(+), 7 deletions

[PATCH 3/3] drm/msm/dsi: simplify connector creation

2024-03-09 Thread Dmitry Baryshkov
Instead of having two functions, msm_dsi_manager_bridge_init() and msm_dsi_manager_ext_bridge_init(), merge them into msm_dsi_manager_connector_init(), moving drm_bridge_attach() to be called from the bridge's attach callback (as most other bridges do). Signed-off-by: Dmitry Bary

[PATCH 0/3] drm/msm/dsi: rework drm_connector instantiation

2024-03-09 Thread Dmitry Baryshkov
- Drop attempts to call drm_bridge_attach with 0 flags, require that downstream bridges support DRM_BRIDGE_ATTACH_NO_CONNECTOR - Acquire next bridge during dsi_bind, making sure that it doesn't cause -EPROBE_DEFER later during modeset_init. Signed-off-by: Dmitry Baryshkov --- D

[PATCH 1/3] drm/msm/dsi: remove the drm_bridge_attach fallback

2024-03-09 Thread Dmitry Baryshkov
All the bridges that are being used with the MSM DSI hosts have been converted to support DRM_BRIDGE_ATTACH_NO_CONNECTOR. Drop the fallback code and require DRM_BRIDGE_ATTACH_NO_CONNECTOR to be supported by the downstream bridges. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi

Re: [PATCH RFC v2 3/5] drm/bridge-connector: implement glue code for HDMI connector

2024-03-09 Thread Dmitry Baryshkov
On Sat, 9 Mar 2024 at 12:31, Dmitry Baryshkov wrote: > > In order to let bridge chains implement HDMI connector infrastructure, > add necessary glue code to the drm_bridge_connector. In case there is a > bridge that sets DRM_BRIDGE_OP_HDMI, drm_bridge_connector will register > i

[PATCH RFC v2 3/5] drm/bridge-connector: implement glue code for HDMI connector

2024-03-09 Thread Dmitry Baryshkov
implementation. Note, to simplify implementation, there can be only one bridge in a chain that sets DRM_BRIDGE_OP_HDMI. Setting more than one is considered an error. This limitation can be lifted later, if the need arises. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 118

[PATCH RFC v2 5/5] drm/msm/hdmi: make use of the drm_connector_hdmi framework

2024-03-09 Thread Dmitry Baryshkov
Setup the HDMI connector on the MSM HDMI outputs. Make use of atomic_check hook and of the provided Infoframe infrastructure. Note: for now only AVI Infoframes are enabled. Audio Infoframes are currenly handled separately. This will be fixed for the final version. Signed-off-by: Dmitry Baryshkov

[PATCH RFC v2 2/5] drm/connector: hdmi: add drm_connector_hdmi_init

2024-03-09 Thread Dmitry Baryshkov
To support connectors which do all the management on their own (like drm_bridge_connector), add drm_connector_hdmi_init() in addition to drmm_connector_hdmi_init(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_connector.c | 143 ++-- include/drm

[PATCH RFC v2 4/5] drm/msm/hdmi: switch to atomic bridge callbacks

2024-03-09 Thread Dmitry Baryshkov
Change MSM HDMI bridge to use atomic_* callbacks in preparation to enablign the HDMI connector support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi

[PATCH RFC v2 1/5] drm/connector: hdmi: fix Infoframes generation

2024-03-09 Thread Dmitry Baryshkov
Gate only HDMI Vendor Infoframe generation on the info->has_hdmi_infoframe. All other infoframes were defined in earlier HDMI specs and should be generated by default. Fixes: ("drm/connector: hdmi: Add Infoframes generation") Signed-off-by: Dmitry Baryshkov --- dr

[PATCH RFC v2 0/5] drm/msm: make use of the HDMI connector infrastructure

2024-03-09 Thread Dmitry Baryshkov
table, I'll finish MSM HDMI bridge conversion (reworking the Audio Infoframe code). Other bridges can follow the same approach (we have lt9611 / lt9611uxc / adv7511 on Qualcomm hardware). [1] https://patchwork.freedesktop.org/series/122421/ Signed-off-by: Dmitry Baryshkov --- Changes in v2:

Re: [PATCH RFC 3/6] drm/connector: hdmi: split setup code of the HDMI connector

2024-03-08 Thread Dmitry Baryshkov
On Fri, 8 Mar 2024 at 13:53, Maxime Ripard wrote: > > On Fri, Mar 08, 2024 at 12:52:04PM +0200, Dmitry Baryshkov wrote: > > On Fri, 8 Mar 2024 at 11:44, Maxime Ripard wrote: > > > > > > Hi Dmitry, > > > > > > Thanks a lot for working on that, it&

Re: [PATCH RFC 3/6] drm/connector: hdmi: split setup code of the HDMI connector

2024-03-08 Thread Dmitry Baryshkov
On Fri, 8 Mar 2024 at 11:44, Maxime Ripard wrote: > > Hi Dmitry, > > Thanks a lot for working on that, it's greatly appreciated :) > > On Fri, Mar 08, 2024 at 01:57:02AM +0200, Dmitry Baryshkov wrote: > > In order to use HDMI connector extensions from the brid

[PATCH RFC 2/6] drm/connector: hdmi: fix Infoframes generation

2024-03-07 Thread Dmitry Baryshkov
Gate only HDMI Vendor Infoframe generation on the info->has_hdmi_infoframe. All other infoframes were defined in earlier HDMI specs and should be generated by default. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_atomic_state_helper.c | 25 ++--- 1 file chan

[PATCH RFC 6/6] drm/msm/hdmi: make use of the drm_connector_hdmi framework

2024-03-07 Thread Dmitry Baryshkov
Setup the HDMI connector on the MSM HDMI outputs. Make use of atomic_check hook and of the provided Infoframe infrastructure. Note: for now only AVI Infoframes are enabled. Audio Infoframes are currenly handled separately. This will be fixed for the final version. Signed-off-by: Dmitry Baryshkov

[PATCH RFC 5/6] drm/msm/hdmi: switch to atomic bridge callbacks

2024-03-07 Thread Dmitry Baryshkov
Change MSM HDMI bridge to use atomic_* callbacks in preparation to enablign the HDMI connector support. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi

[PATCH RFC 4/6] drm/connector: hdmi: add opaque data type

2024-03-07 Thread Dmitry Baryshkov
HDMI bridge drivers need to store private data pointer to be used from drm_connector_hdmi_funcs::write_infoframes() and clear_infoframes() callbacks. Add it to the drm_connector.hdmi structure. Signed-off-by: Dmitry Baryshkov --- include/drm/drm_connector.h | 5 + 1 file changed, 5

[PATCH RFC 3/6] drm/connector: hdmi: split setup code of the HDMI connector

2024-03-07 Thread Dmitry Baryshkov
In order to use HDMI connector extensions from the bridge drivers, carve out the drm_connector_hdmi_setup() from drmm_connector_hdmi_init(). This way the drm_bridge drivers can call new function from their setup_connector callbacks. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm

[PATCH RFC 1/6] drm/bridge: add setup_connector callback

2024-03-07 Thread Dmitry Baryshkov
Add a callback to be called by the drivers when the drm_connector is created at the end of the drm_bridge chain. This allows bridges to perform additional setup, like setting up the HDMI connector properties. Note, for now only drm_bridge_connector uses this callback. Signed-off-by: Dmitry

[PATCH RFC 0/6] drm/msm: make use of the HDMI connector infrastructure

2024-03-07 Thread Dmitry Baryshkov
table, I'll finish MSM HDMI bridge conversion (reworking the Audio Infoframe code). Other bridges can follow the same approach (we have lt9611 / lt9611uxc / adv7511 on Qualcomm hardware). [1] https://patchwork.freedesktop.org/series/122421/ Signed-off-by: Dmitry Baryshkov --- Dmitry Ba

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Dmitry Baryshkov
On Wed, 6 Mar 2024 at 21:59, Abhinav Kumar wrote: > > > > On 3/6/2024 11:52 AM, Dmitry Baryshkov wrote: > > On Wed, 6 Mar 2024 at 21:50, Abhinav Kumar > > wrote: > >> > >> There are cases where the userspace might still send another > >> fra

Re: [RFC PATCH] drm/msm/dp: move link_ready out of HPD event thread

2024-03-06 Thread Dmitry Baryshkov
On Wed, 6 Mar 2024 at 21:50, Abhinav Kumar wrote: > > There are cases where the userspace might still send another > frame after the HPD disconnect causing a modeset cycle after > a disconnect. This messes the internal state machine of MSM DP driver > and can lead to a crash as there can be an imb

Re: [PATCH] drm/msm/dp: fix typo in dp_display_handle_port_status_changed()

2024-03-06 Thread Dmitry Baryshkov
On Wed, 6 Mar 2024 at 21:35, Abhinav Kumar wrote: > > Fix the typo in the name of dp_display_handle_port_status_changed(). > > Fixes: c58eb1b54fee ("drm/msm/dp: fix connect/disconnect handled at irq_hpd") > Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshko

Re: [PATCH v5 00/19] Add support for CDM over DP

2024-03-04 Thread Dmitry Baryshkov
when CDM available https://gitlab.freedesktop.org/lumag/msm/-/commit/ee2fcc0f514b Best regards, -- Dmitry Baryshkov

Re: [PATCH v4 0/3] drm/msm/dpu: debug commit_done timeouts

2024-03-04 Thread Dmitry Baryshkov
On Mon, 26 Feb 2024 04:27:58 +0200, Dmitry Baryshkov wrote: > In order to debug commit_done timeouts ([1]) display the sticky bits of > the CTL_FLUSH register and capture the devcore dump when the first such > timeout occurs. > > [1] https://gitlab.freedesktop.org/drm/

Re: [PATCH v1 1/1] drm/msm/hdmi: Replace of_gpio.h by proper one

2024-03-04 Thread Dmitry Baryshkov
On Mon, 4 Mar 2024 at 19:51, Andy Shevchenko wrote: > > of_gpio.h is deprecated and subject to remove. > The driver doesn't use it directly, replace it > with what is really being used. > > Signed-off-by: Andy Shevchenko Reviewed-by: Dmitry Baryshkov > --- > dr

Re: [PATCH 1/2] drm/msm/dpu: drop unused dpu_kms from interface initialization

2024-03-04 Thread Dmitry Baryshkov
On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar wrote: > > dpu_kms seems unused while initializing DSI, HDMI and DP through > their respective _dpu_kms_initialize_* functions. > > Hence lets drop the parameter altogether. > > Signed-off-by: Abhinav Kumar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms

Re: [PATCH 2/2] drm/msm/dpu: drop dpu_kms from _dpu_kms_initialize_writeback

2024-03-04 Thread Dmitry Baryshkov
On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar wrote: > > Following the pattern of other interfaces, lets align writeback > as well by dropping the dpu_kms parameter in its _dpu_kms_initialize_* > function. > > Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov > -

Re: [PATCH 1/2] drm/msm/dpu: drop unused dpu_kms from interface initialization

2024-03-04 Thread Dmitry Baryshkov
On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar wrote: > > dpu_kms seems unused while initializing DSI, HDMI and DP through > their respective _dpu_kms_initialize_* functions. > > Hence lets drop the parameter altogether. > > Signed-off-by: Abhinav Kumar Reviewed

Re: [PATCH v2 1/3] dt-bindings: display: msm: dp-controller: document X1E80100 compatible

2024-03-03 Thread Dmitry Baryshkov
On Fri, 1 Mar 2024 at 19:52, Rob Herring wrote: > > On Tue, Feb 27, 2024 at 04:45:25PM +0100, Krzysztof Kozlowski wrote: > > On 22/02/2024 16:55, Abel Vesa wrote: > > > Add the X1E80100 to the list of compatibles and document the is-edp > > > flag. The controllers are expected to operate in DP mod

Re: [PATCH] Revert "drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes"

2024-02-28 Thread Dmitry Baryshkov
On Wed, 28 Feb 2024 at 11:50, Johan Hovold wrote: > > On Tue, Feb 27, 2024 at 02:11:56PM -0800, Abhinav Kumar wrote: > > On 2/27/2024 2:08 PM, Dmitry Baryshkov wrote: > > > This reverts commit e467e0bde881 ("drm/msm/dp: use > > > drm_bridge_hpd_no

DisplayPort: handling of HPD events / link training

2024-02-27 Thread Dmitry Baryshkov
Hello, We are currently looking at checking and/or possibly redesigning the way the MSM DRM driver handles the HPD events and link training. After a quick glance at the drivers implementing DP support, I noticed following main approaches: - Perform link training at the atomic_enable time, don't r

[PATCH] Revert "drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes"

2024-02-27 Thread Dmitry Baryshkov
itlab.freedesktop.org/drm/msm/-/issues/50 Reported-by: Johan Hovold Link: https://lore.kernel.org/r/zd3ypgmrprxv-...@hovoldconsulting.com/ Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/msm/dp: fix runtime_pm handling in dp_wait_hpd_asserted

2024-02-26 Thread Dmitry Baryshkov
fails. Fixes: e2969ee30252 ("drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_aux.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_aux.c b/drivers/gpu/drm/msm/dp

Re: [PATCH RFC 01/12] kbuild: create destination directory for _shipped handling

2024-02-26 Thread Dmitry Baryshkov
On Mon, 26 Feb 2024 at 08:33, Masahiro Yamada wrote: > > On Mon, Feb 26, 2024 at 11:11 AM Dmitry Baryshkov > wrote: > > > > The driver might decide to put the _shipped files to the subdir. > > > > Please stop this sentence. > > This sounds like we are no

Re: [PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers

2024-02-26 Thread Dmitry Baryshkov
On Mon, 26 Feb 2024 at 08:24, Masahiro Yamada wrote: > > On Mon, Feb 26, 2024 at 11:11 AM Dmitry Baryshkov > wrote: > > > > Currently display-related register headers are generated from XML files > > shipped withing Mesa source tree. This is not fully optimal: it requi

[PATCH v4 3/3] drm/msm/dpu: capture snapshot on the first commit_done timeout

2024-02-25 Thread Dmitry Baryshkov
In order to debug commit_done timeouts, capture the devcoredump state when the first timeout occurs after the encoder has been enabled. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9 + 1 file changed, 9 insertions

[PATCH v4 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 70

[PATCH v4 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Dmitry Baryshkov
: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 2aa72b578764..6058706f03e4 100644 --- a

[PATCH v4 0/3] drm/msm/dpu: debug commit_done timeouts

2024-02-25 Thread Dmitry Baryshkov
In order to debug commit_done timeouts ([1]) display the sticky bits of the CTL_FLUSH register and capture the devcore dump when the first such timeout occurs. [1] https://gitlab.freedesktop.org/drm/msm/-/issues/33 Signed-off-by: Dmitry Baryshkov --- Changes in v4: - Reworded documentation for

[PATCH RFC 12/12] drm/msm: sync shipped headers database

2024-02-25 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/registers/dsi.xml.h_shipped| 38 --- .../drm/msm/registers/dsi_phy_10nm.xml.h_shipped | 37 --- .../drm/msm/registers/dsi_phy_14nm.xml.h_shipped | 37 --- .../drm/msm/registers/dsi_phy_20nm.xml.h_shipped | 37

[PATCH RFC 11/12] drm/msm: tie regeneration of shipped headers

2024-02-25 Thread Dmitry Baryshkov
Finally add support for regeneration of the shipped autogenerated register headers. Pass DRM_MSM_GENERATE_HEADERS=1 to make to force regeneration. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 27 +++ drivers/gpu/drm/msm/registers

[PATCH RFC 06/12] drm/msm/headergen: import source files from freedreno/envytools

2024-02-25 Thread Dmitry Baryshkov
ges to the Mesa3D project, then manually generating and synchronizing resulting files. Instead import the hg2 tool to be later included into the build process. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/aprintf.c | 38 + drivers/gpu/drm/msm/headergen2/colors.c

[PATCH RFC 08/12] drm/msm/headergen: don't output full file paths

2024-02-25 Thread Dmitry Baryshkov
In order to reduce noise, include just the file name into the generated file headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/headergen2/headergen2.c b/drivers

[PATCH RFC 09/12] drm/msm/headergen: generate _shipped files

2024-02-25 Thread Dmitry Baryshkov
Change headergen semantics to generate the .xml.h_shipped files instead of just generating headers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/headergen2.c | 33 +++-- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH RFC 07/12] drm/msm/headergen: use asprintf instead of custom aprintf

2024-02-25 Thread Dmitry Baryshkov
Replace custom aprintf() function with the standard asprintf(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/headergen2/aprintf.c | 38 drivers/gpu/drm/msm/headergen2/rnn.c | 5 - drivers/gpu/drm/msm/headergen2/util.h| 2 -- 3 files

[PATCH RFC 04/12] drm/msm/dsi: drop mmss_cc.xml.h

2024-02-25 Thread Dmitry Baryshkov
The mmss_cc.xml.h file describes bits of the MMSS clock controller on APQ8064 / MSM8960 platforms. They are not used by the driver and do not belong to the DRM MSM driver. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 131

[PATCH RFC 05/12] drm/msm: use _shipped suffix for all xml.h files

2024-02-25 Thread Dmitry Baryshkov
Move non-GPU xml.h files into the ./registers subdir and add the _shipped suffix. The GPU files are left intact for now, since they require processing via a gen_headers.py, while display headers are regenerated using headergen2 Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile

[PATCH RFC 02/12] drm/msm/mdp5: add writeback block bases

2024-02-25 Thread Dmitry Baryshkov
In order to stop patching the mdp5 headers, import definitions for the writeback blocks. This part is extracted from the old Rob's patch. Co-developed-by: Rob Clark Signed-off-by: Rob Clark Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++ 1

[PATCH RFC 01/12] kbuild: create destination directory for _shipped handling

2024-02-25 Thread Dmitry Baryshkov
The driver might decide to put the _shipped files to the subdir. In such case the cmd_copy might fail because the destination directory is not present. Call mkdir -p to make sure that the destination directory is present. Signed-off-by: Dmitry Baryshkov --- scripts/Makefile.lib | 2 +- 1 file

[PATCH RFC 03/12] drm/msm/hdmi: drop qfprom.xml.h

2024-02-25 Thread Dmitry Baryshkov
The qfprom.xml.h contains definitions for the nvmem code. They are not used in the existing code. Also if we were to use them later, we should have used nvmem cell API instead of using these defs. Drop the file. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 61

[PATCH RFC 00/12] drm/msm: add support for regenerating shipped xml.h headers

2024-02-25 Thread Dmitry Baryshkov
generate header files if required. Signed-off-by: Dmitry Baryshkov --- Dmitry Baryshkov (12): kbuild: create destination directory for _shipped handling drm/msm/mdp5: add writeback block bases drm/msm/hdmi: drop qfprom.xml.h drm/msm/dsi: drop mmss_cc.xml.h drm/msm: use

Re: [PATCH v3 1/3] drm/msm/dpu: make "vblank timeout" more useful

2024-02-25 Thread Dmitry Baryshkov
On Sun, 25 Feb 2024 at 21:44, Abhinav Kumar wrote: > > > > On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: > > We have several reports of vblank timeout messages. However after some > > debugging it was found that there might be different causes to that. > > To allo

Re: [PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
On Sun, 25 Feb 2024 at 21:49, Abhinav Kumar wrote: > > > > On 2/25/2024 6:12 AM, Dmitry Baryshkov wrote: > > Stop multiplexing several events via the dpu_encoder_wait_for_event() > > function. Split it into two distinct functions two allow separate > > handl

Re: [PATCH v7 00/36] drm/connector: Create HDMI Connector infrastructure

2024-02-25 Thread Dmitry Baryshkov
Hi Maxime, On Thu, 22 Feb 2024 at 20:14, Maxime Ripard wrote: > > Hi, > > Here's a series that creates some extra infrastructure specifically > targeted at HDMI controllers. > > The idea behind this series came from a recent discussion on IRC during > which we discussed infoframes generation of i

[PATCH v3 2/3] drm/msm/dpu: split dpu_encoder_wait_for_event into two functions

2024-02-25 Thread Dmitry Baryshkov
Stop multiplexing several events via the dpu_encoder_wait_for_event() function. Split it into two distinct functions two allow separate handling of those events. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 74 + drivers/gpu/drm

<    5   6   7   8   9   10   11   12   13   14   >