[PATCH v4 16/16] ARM: dts: qcom: apq8064-ifc6410: drop HDMI HPD GPIO

2025-02-08 Thread Dmitry Baryshkov
There is no need to specify separate HPD gpio for the HDMI block. Use built-in HPD in order to detect if the monitor is plugged or not. Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom/qc

[PATCH v4 13/16] drm/msm/hdmi: drop hpd-gpios support

2025-02-08 Thread Dmitry Baryshkov
Supporting simultaneous check of native HPD and the external GPIO proved to be less stable than just native HPD. Drop the hpd-gpios support, leaving just the native HPD support. In case the native HPD doesn't work the user is urged to switch to specifying the HPD property to the hdmi-connector devi

[PATCH v4 15/16] drm/msm/hdmi: wire in hpd_enable/hpd_disable bridge ops

2025-02-08 Thread Dmitry Baryshkov
The HDMI driver already has msm_hdmi_hpd_enable() and msm_hdmi_hpd_disable() functions. Wire them into the msm_hdmi_bridge_funcs, so that HPD can be enabled and disabled dynamically rather than always having HPD events generation enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshko

[PATCH v4 14/16] drm/msm/hdmi: ensure that HDMI is up if HPD is requested

2025-02-08 Thread Dmitry Baryshkov
The HDMI block needs to be enabled to properly generate HPD events. Make sure it is not turned off in the disable paths if HPD delivery is enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 1 + drivers/gpu/drm/msm/hdmi/hdmi.h

[PATCH v4 09/16] drm/msm/hdmi: add runtime PM calls to DDC transfer function

2025-02-08 Thread Dmitry Baryshkov
We must be sure that the HDMI controller is powered on, while performing the DDC transfer. Add corresponding runtime PM calls to msm_hdmi_i2c_xfer(). Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 -- 1 file changed, 12 insert

[PATCH v4 12/16] drm/msm/hdmi: expand the HDMI_CFG macro

2025-02-08 Thread Dmitry Baryshkov
Expand the HDMI_CFG() macro in HDMI config description. It has no added value other than hiding some boilerplate declarations. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 16 drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- 2 files c

[PATCH v4 11/16] drm/msm/hdmi: rename hpd_clks to pwr_clks

2025-02-08 Thread Dmitry Baryshkov
As these clocks are now used in the runtime PM callbacks, they have no connection to 'HPD'. Rename corresponding fields to follow clocks purpose, to power up the HDMI controller. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 26 +---

[PATCH v4 10/16] drm/msm/hdmi: implement proper runtime PM handling

2025-02-08 Thread Dmitry Baryshkov
It is completely not obvious, but the so-called 'hpd' clocks and regulators are required for the HDMI host to function properly. Merge pwr and hpd regulators. Use regulators, clocks and pinctrl to implement proper runtime PM callbacks. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov -

[PATCH v4 08/16] drm/msm/hdmi: switch to pm_runtime_resume_and_get()

2025-02-08 Thread Dmitry Baryshkov
The pm_runtime_get_sync() function is a bad choise for runtime power management. Switch HDMI driver to pm_runtime_resume_and_get() and add proper error handling, while we are at it. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +- dr

[PATCH v4 07/16] drm/msm/hdmi: switch to clk_bulk API

2025-02-08 Thread Dmitry Baryshkov
The last platform using legacy clock names for HDMI block (APQ8064) switched to new clock names in 5.16. It's time to stop caring about old DT, drop hand-coded helpers and switch to clk_bulk_* API. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c

[PATCH v4 06/16] drm/msm/hdmi: drop clock frequency assignment

2025-02-08 Thread Dmitry Baryshkov
The only clock which has frequency being set through hpd_freqs is the "core" aka MDSS_HDMI_CLK clock. It always has the specified frequency, so we can drop corresponding clk_set_rate() call together with the hpd_freq infrastructure. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov ---

[PATCH v4 05/16] drm/msm/hdmi: simplify extp clock handling

2025-02-08 Thread Dmitry Baryshkov
With the extp being the only "power" clock left, remove the surrounding loops and handle the extp clock directly. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 24 drivers/gpu/drm/msm/hdmi/hdmi.h| 6 +---

[PATCH v4 04/16] drm/msm/hdmi: move the alt_iface clock to the hpd list

2025-02-08 Thread Dmitry Baryshkov
According to the vendor kernel [1] , the alt_iface clock should be enabled together with the rest of HPD clocks, to make HPD to work properly. [1] https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/e07a5487e521e57f76083c0a6e2f995414ac6d03 Reviewed-by: Jessica Zhang Reviewed-by: Konrad D

[PATCH v4 03/16] drm/msm/hdmi: convert clock and regulator arrays to const arrays

2025-02-08 Thread Dmitry Baryshkov
As a preparation to the next patches convert 'static const char *' arrays to 'static const char * const', as required by the checkpatch.pl Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 10 +- drivers/gpu/drm/msm/hdmi/hdmi.h | 8 2 files changed, 9 insert

[PATCH v4 02/16] dt-bindings: display/msm: hdmi: drop hpd-gpios

2025-02-08 Thread Dmitry Baryshkov
Supporting simultaneous check of native HPD and the external GPIO proved to be less stable than just native HPD. Drop the hpd-gpios from the bindings. This is not a breaking change, since the HDMI block has been using both GPIO _and_ internal HPD anyway. In case the native HPD doesn't work users ar

[PATCH v4 01/16] dt-bindings: display/msm/hdmi: drop obsolete GPIOs from schema

2025-02-08 Thread Dmitry Baryshkov
The commit 68e674b13b17 ("drm/msm/hdmi: drop unused GPIO support") dropped support for obsolete qcom,hdmi-tx-mux-* gpios. They were not used by any of the upstream platforms. Drop them from the bindings too. Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/msm/hdmi.y

[PATCH v4 00/16] drm/msm/hdmi: rework and fix the HPD even generation

2025-02-08 Thread Dmitry Baryshkov
The MSM HDMI driver is plagued with the long-standing bug. If HDMI cable is disconnected, in most of the cases cable reconnection will not be detected properly. We have been carrying the patch from [1] in our integration tree for ages. The time has come to fix the long-standing bug and implement pr

Re: [PATCH RFC 0/7] drm/display: dp: add new DPCD access functions

2025-02-08 Thread Dmitry Baryshkov
On Thu, Jan 23, 2025 at 12:12:43PM +0200, Jani Nikula wrote: > On Thu, 23 Jan 2025, Dmitry Baryshkov wrote: > > On Fri, Jan 17, 2025 at 10:56:35AM +0200, Dmitry Baryshkov wrote: > >> Existing DPCD access functions return an error code or the number of > >> bytes being read / write in case of parti

[PATCH v5 6/8] drm/msm/dpu: rename average bandwidth-related debugfs files

2025-02-08 Thread Dmitry Baryshkov
Rename the debugfs files to match their purpose and the patter provided by other bandwidth and clock-related files: threshold_high -> max_core_ab threshold_low -> low_core_ab Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 ++--

[PATCH v5 8/8] drm/msm/dpu: handle perf mode in _dpu_core_perf_crtc_update_bus()

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

[PATCH v5 5/8] drm/msm/dpu: also use KBps for bw_ctl output

2025-02-08 Thread Dmitry Baryshkov
Change debugfs and log entries to use KBps / u32 for bw_ctl and similar data. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 5 +++-- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++- 2 files changed, 5 insertions(+), 3 deleti

[PATCH v5 7/8] drm/msm/dpu: drop core_clk_rate overrides from _dpu_core_perf_calc_crtc

2025-02-08 Thread Dmitry Baryshkov
core_clk_rate override is handled in _dpu_core_perf_get_core_clk_rate(). Drop imperfect duplicating code from _dpu_core_perf_calc_crtc(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drive

[PATCH v5 2/8] drm/msm/dpu: remove duplicate code calculating sum of bandwidths

2025-02-08 Thread Dmitry Baryshkov
The code in dpu_core_perf_crtc_check() mostly duplicates code in dpu_core_perf_aggregate(). Remove the duplication by reusing the latter function. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 94 +++ 1 fil

[PATCH v5 4/8] drm/msm/dpu: make fix_core_ab_vote consistent with fix_core_ib_vote

2025-02-08 Thread Dmitry Baryshkov
The fix_core_ab_vote is an average bandwidth value, used for bandwidth overrides in several cases. However there is an internal inconsistency: fix_core_ib_vote is defined in KBps, while fix_core_ab_vote is defined in Bps. Fix that by changing the type of the variable to u32 and using * 1000ULL mul

[PATCH v5 3/8] drm/msm/dpu: change ib values to u32

2025-02-08 Thread Dmitry Baryshkov
The IB values in core_perf calculations (max_per_pipe_ib, fix_core_ib_vote) are expressed in KBps and are passed to icc_set_bw without additional division. Change type of those values to u32. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_p

[PATCH v5 1/8] drm/msm/dpu: extract bandwidth aggregation function

2025-02-08 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(). Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 45 +++ 1 f

[PATCH v5 0/8] drm/msm/dpu: rework debugfs interface of dpu_core_perf

2025-02-08 Thread Dmitry Baryshkov
Bring back a set of patches extracted from [1] per Abhinav's suggestion. Rework debugging overrides for the bandwidth and clock settings. Instead of specifying the 'mode' and some values, allow one to set the affected value directly. [1] https://patchwork.freedesktop.org/series/119552/#rev2 Sign

Re: [PATCH 3/4] drm/msm/dsi: Allow all bpc values

2025-02-08 Thread Dmitry Baryshkov
On Sat, Feb 08, 2025 at 11:09:56PM +0100, Marijn Suijten wrote: > On 2025-02-03 21:14:26, Danila Tikhonov wrote: > > From: Eugene Lepshy > > > > DRM DSC helper has parameters for various bpc values ​​other than 8: > > Weird zero-width \u200b spaces here between "values" and "other", please > de

Re: [PATCH 3/4] drm/msm/dsi: Allow all bpc values

2025-02-08 Thread Marijn Suijten
On 2025-02-03 21:14:26, Danila Tikhonov wrote: > From: Eugene Lepshy > > DRM DSC helper has parameters for various bpc values ​​other than 8: Weird zero-width \u200b spaces here between "values" and "other", please delete those. > (8/10/12/14/16). > > Remove this guard. > > Signed-off-by: Eug