Re: [Freedreno] [PATCH RFC v4 7/7] drm/msm/dpu: Use DRM solid_fill property

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:59 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Drop DPU_PLANE_COLOR_FILL_FLAG and check the DRM solid_fill property to determine if the plane is solid fill. In addition drop the DPU plane color_fill field as we can now use drm_plane_state.solid_fill in

Re: [Freedreno] [PATCH RFC v4 6/7] drm/msm/dpu: Allow NULL FBs in atomic commit

2023-06-30 Thread Jessica Zhang
On 6/30/2023 1:21 AM, Pekka Paalanen wrote: On Fri, 30 Jun 2023 03:52:37 +0300 Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Since solid fill planes allow for a NULL framebuffer in a valid commit, add NULL framebuffer checks to atomic commit calls within DPU. Signed-of

Re: [Freedreno] [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-06-30 Thread Dmitry Baryshkov
On Sat, 1 Jul 2023 at 02:12, Konrad Dybcio wrote: > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > adreno_is_aXYZ is called. This however doesn't work very well when revn is > 0 by design (such as for A635). Fill it in as a stopgap solution for > -fixes. > > Fixes: c

Re: [Freedreno] [PATCH RFC v4 5/7] drm/msm/dpu: Add solid fill and pixel source properties

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:49 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Add solid_fill and pixel_source properties to DPU plane Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 ++   1 file changed, 2 insertions(+) This should be the last com

Re: [Freedreno] [PATCH RFC v4 4/7] drm/atomic: Loosen FB atomic checks

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:48 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Loosen the requirements for atomic and legacy commit so that, in cases where solid fill planes is enabled but no FB is set, the commit can still go through. This includes adding framebuffer NULL checks in

Re: [Freedreno] [PATCH 0/6] Add support to print sub block registers in dpu hw catalog

2023-06-30 Thread Jessica Zhang
On 6/23/2023 12:10 AM, Marijn Suijten wrote: It is nice if cover letters also include the subsystem: drm/msm: Add support to print DPU sub-block registers On 2023-06-22 16:48:52, Ryan McCann wrote: The purpose of this patch series is to add support to print the registers of sub blocks in th

[Freedreno] [PATCH v2] drm/msm/adreno: Assign revn to A635

2023-06-30 Thread Konrad Dybcio
Recently, a WARN_ON() was introduced to ensure that revn is filled before adreno_is_aXYZ is called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes. Fixes: cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified befo

Re: [Freedreno] [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Jessica Zhang
On 6/30/2023 7:43 AM, Sebastian Wick wrote: On Fri, Jun 30, 2023 at 2:26 AM Jessica Zhang wrote: Add support for pixel_source property to drm_plane and related documentation. This enum property will allow user to specify a pixel source for the plane. Possible pixel sources will be defined

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

2023-06-30 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(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) dif

[Freedreno] [PATCH 14/15] drm/msm/hdmi: ensure that HDMI is one if HPD is requested

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 1 + drivers/gpu/drm/msm/hdmi/hdmi.h| 2 ++ drivers/gpu/drm/msm

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

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/

[Freedreno] [PATCH 12/15] drm/msm/hdmi: expand the HDMI_CFG macro

2023-06-30 Thread Dmitry Baryshkov
Expand the HDMI_CFG() macro in HDMI config description. It has no added value other than hiding some boilerplate declarations. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 16 drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- 2 files changed, 9 insertions(+), 9 d

[Freedreno] [PATCH 04/15] drm/msm/hdmi: switch to atomic_pre_enable/post_disable

2023-06-30 Thread Dmitry Baryshkov
In preparation of reworking the HDMI mode setting, switch pre_enable and post_disable callbacks to their atomic variants. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/dr

[Freedreno] [PATCH 11/15] drm/msm/hdmi: rename hpd_clks to pwr_clks

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 26 +- drivers/gpu/drm/

[Freedreno] [PATCH 05/15] drm/msm/hdmi: set infoframes on all pre_enable calls

2023-06-30 Thread Dmitry Baryshkov
In consequent modeset calls, the atomic_pre_enable() will be called several times without calling atomic_post_disable() inbetween. Thus iframes will not be updated for the next mode. Fix this by setting the iframe outside of the !power_on check. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/dr

[Freedreno] [PATCH 07/15] drm/msm/hdmi: switch to clk_bulk API

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 15 --- drivers/

[Freedreno] [PATCH 13/15] drm/msm/hdmi: drop hpd-gpios support

2023-06-30 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

[Freedreno] [PATCH 10/15] drm/msm/hdmi: implement proper runtime PM handling

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi

[Freedreno] [PATCH 06/15] drm/msm/hdmi: drop clock frequency assignment

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hd

[Freedreno] [PATCH 08/15] drm/msm/hdmi: switch to pm_runtime_resume_and_get()

2023-06-30 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_

[Freedreno] [PATCH 02/15] drm/msm/hdmi: simplify extp clock handling

2023-06-30 Thread Dmitry Baryshkov
With the extp being the only "power" clock left, remove the surrounding loops and handle the extp clock directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c| 24 --- drivers/gpu/drm/msm/hdmi/hdmi.h| 6 + drivers/gpu/drm/msm/hdmi/hdmi_

[Freedreno] [PATCH 03/15] drm/msm/hdmi: correct indentation of HDMI bridge functions

2023-06-30 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index 62ce1455f974..fbcf4dd91cd9 100644 --- a/drivers/gpu/dr

[Freedreno] [PATCH 01/15] drm/msm/hdmi: move the alt_iface clock to the hpd list

2023-06-30 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 Signed-off-by: Dmitry Baryshkov --- drivers/gpu

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

2023-06-30 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: [Freedreno] [PATCH] drm/msm/adreno: Assign revn to A635

2023-06-30 Thread Rob Clark
On Wed, Jun 28, 2023 at 12:54 PM Dmitry Baryshkov wrote: > > On 28/06/2023 22:05, Konrad Dybcio wrote: > > Recently, a WARN_ON() was introduced to ensure that revn is filled before > > adreno_is_aXYZ is called. This however doesn't work very well when revn is > > 0 by design (such as for A635). Fi

Re: [Freedreno] [PATCH RFC v4 3/7] drm/atomic: Move framebuffer checks to helper

2023-06-30 Thread Jessica Zhang
On 6/29/2023 5:43 PM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Currently framebuffer checks happen directly in drm_atomic_plane_check(). Move these checks into their own helper method. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/drm_atomic.c | 130 ++

Re: [Freedreno] [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Jessica Zhang
On 6/30/2023 3:33 AM, Dmitry Baryshkov wrote: On 30/06/2023 03:25, Jessica Zhang wrote: Document and add support for solid_fill property to drm_plane. In addition, add support for setting and getting the values for solid_fill. To enable solid fill planes, userspace must assign a property blo

Re: [Freedreno] [PATCH v2 2/4] regulator: Introduce Qualcomm REFGEN regulator driver

2023-06-30 Thread Mark Brown
On Thu, Jun 29, 2023 at 10:44:34PM +0200, Konrad Dybcio wrote: > On 29.06.2023 22:35, Konrad Dybcio wrote: > > Modern Qualcomm SoCs have a REFGEN (reference voltage generator) > > regulator, providing reference voltage to on-chip IP, like PHYs. > > > > Add a driver to support toggling that regulat

Re: [Freedreno] [PATCH v2 1/4] dt-bindings: regulator: Describe Qualcomm REFGEN regulator

2023-06-30 Thread Rob Herring
On Thu, 29 Jun 2023 22:35:41 +0200, Konrad Dybcio wrote: > Modern Qualcomm SoCs have a REFGEN (reference voltage generator) > regulator, providing reference voltage to on-chip IP, like PHYs. > It's controlled through MMIO and we can toggle it or read its state back. > > Describe it. > > Signed-

[Freedreno] [PATCH] drm/msm/a6xx: Fix misleading comment

2023-06-30 Thread Rob Clark
From: Rob Clark The range is actually len+1. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.h b/drivers/gpu/drm/msm/adreno/a6xx_gpu.h index eea2e60ce3b7..edf76a4b16b

Re: [Freedreno] [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Sebastian Wick
On Fri, Jun 30, 2023 at 2:26 AM Jessica Zhang wrote: > > Add support for pixel_source property to drm_plane and related > documentation. > > This enum property will allow user to specify a pixel source for the > plane. Possible pixel sources will be defined in the > drm_plane_pixel_source enum. >

Re: [Freedreno] [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Dmitry Baryshkov
On 30/06/2023 03:25, Jessica Zhang wrote: Document and add support for solid_fill property to drm_plane. In addition, add support for setting and getting the values for solid_fill. To enable solid fill planes, userspace must assign a property blob to the "solid_fill" plane property containing th

Re: [Freedreno] [PATCH RFC v4 2/7] drm: Introduce pixel_source DRM plane property

2023-06-30 Thread Pekka Paalanen
On Fri, 30 Jun 2023 03:42:28 +0300 Dmitry Baryshkov wrote: > On 30/06/2023 03:25, Jessica Zhang wrote: > > Add support for pixel_source property to drm_plane and related > > documentation. > > > > This enum property will allow user to specify a pixel source for the > > plane. Possible pixel sour

Re: [Freedreno] [PATCH RFC v4 1/7] drm: Introduce solid fill DRM plane property

2023-06-30 Thread Pekka Paalanen
On Thu, 29 Jun 2023 17:25:00 -0700 Jessica Zhang wrote: > Document and add support for solid_fill property to drm_plane. In > addition, add support for setting and getting the values for solid_fill. > > To enable solid fill planes, userspace must assign a property blob to > the "solid_fill" plan

Re: [Freedreno] [PATCH RFC v4 7/7] drm/msm/dpu: Use DRM solid_fill property

2023-06-30 Thread Pekka Paalanen
On Thu, 29 Jun 2023 17:25:06 -0700 Jessica Zhang wrote: > Drop DPU_PLANE_COLOR_FILL_FLAG and check the DRM solid_fill property to > determine if the plane is solid fill. In addition drop the DPU plane > color_fill field as we can now use drm_plane_state.solid_fill instead, > and pass in drm_plane

Re: [Freedreno] [PATCH RFC v4 6/7] drm/msm/dpu: Allow NULL FBs in atomic commit

2023-06-30 Thread Pekka Paalanen
On Fri, 30 Jun 2023 03:52:37 +0300 Dmitry Baryshkov wrote: > On 30/06/2023 03:25, Jessica Zhang wrote: > > Since solid fill planes allow for a NULL framebuffer in a valid commit, > > add NULL framebuffer checks to atomic commit calls within DPU. > > > > Signed-off-by: Jessica Zhang > > --- > >