Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Abhinav Kumar
Hi Stephen On 12/14/2022 4:29 PM, Stephen Boyd wrote: Quoting Doug Anderson (2022-12-14 16:14:42) Hi, On Wed, Dec 14, 2022 at 3:46 PM Abhinav Kumar wrote: Hi Doug On 12/14/2022 2:29 PM, Doug Anderson wrote: Hi, On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh wrote: There are 3 possible i

Re: [Freedreno] [RFC PATCH 3/6] drm/msm/dpu1: Wire up DSC mask for active CTL configuration

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 21:30, Marijn Suijten wrote: On 2022-12-14 20:43:29, Dmitry Baryshkov wrote: On 14/12/2022 01:22, Marijn Suijten wrote: Active CTLs have to configure what DSC block(s) have to be enabled, and what DSC block(s) have to be flushed; this value was initialized to zero resulting in the

Re: [Freedreno] [RFC PATCH 0/6] drm/msm: DSC Electric Boogaloo for sm8[12]50

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 21:23, Marijn Suijten wrote: On 2022-12-14 20:40:06, Dmitry Baryshkov wrote: On 14/12/2022 01:22, Marijn Suijten wrote: This preliminary Display Stream Compression support package for (initially tested on) sm8[12]50 is based on comparing DSC behaviour between downstream and mainli

Re: [Freedreno] [PATCH v12 2/5] dt-bindings: msm/dp: add data-lanes and link-frequencies property

2022-12-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-12-14 14:56:23) > > On 12/13/2022 3:06 PM, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2022-12-13 13:44:05) > >> Add both data-lanes and link-frequencies property into endpoint > > Why do we care? Please tell us why it's important. Any response? > >> @@ -193,6 +217,8

Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Abhinav Kumar
Hi Doug On 12/14/2022 4:14 PM, Doug Anderson wrote: Hi, On Wed, Dec 14, 2022 at 3:46 PM Abhinav Kumar wrote: Hi Doug On 12/14/2022 2:29 PM, Doug Anderson wrote: Hi, On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh wrote: There are 3 possible interrupt sources are handled by DP controller,

Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Stephen Boyd
Quoting Doug Anderson (2022-12-14 16:14:42) > Hi, > > On Wed, Dec 14, 2022 at 3:46 PM Abhinav Kumar > wrote: > > > > Hi Doug > > > > On 12/14/2022 2:29 PM, Doug Anderson wrote: > > > Hi, > > > > > > On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh > > > wrote: > > >> > > >> There are 3 possible int

Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Doug Anderson
Hi, On Wed, Dec 14, 2022 at 3:46 PM Abhinav Kumar wrote: > > Hi Doug > > On 12/14/2022 2:29 PM, Doug Anderson wrote: > > Hi, > > > > On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh > > wrote: > >> > >> There are 3 possible interrupt sources are handled by DP controller, > >> HPDstatus, Controller

Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Abhinav Kumar
Hi Doug On 12/14/2022 2:29 PM, Doug Anderson wrote: Hi, On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh wrote: There are 3 possible interrupt sources are handled by DP controller, HPDstatus, Controller state changes and Aux read/write transaction. At every irq, DP controller have to check isr s

Re: [Freedreno] [PATCH v12 2/5] dt-bindings: msm/dp: add data-lanes and link-frequencies property

2022-12-14 Thread Kuogee Hsieh
On 12/13/2022 3:06 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-12-13 13:44:05) Add both data-lanes and link-frequencies property into endpoint Why do we care? Please tell us why it's important. Changes in v7: -- split yaml out of dtsi patch -- link-frequencies from link rate to symbo

Re: [Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Doug Anderson
Hi, On Wed, Dec 14, 2022 at 1:21 PM Kuogee Hsieh wrote: > > There are 3 possible interrupt sources are handled by DP controller, > HPDstatus, Controller state changes and Aux read/write transaction. > At every irq, DP controller have to check isr status of every interrupt > sources and service th

[Freedreno] [PATCH] drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer

2022-12-14 Thread Kuogee Hsieh
There are 3 possible interrupt sources are handled by DP controller, HPDstatus, Controller state changes and Aux read/write transaction. At every irq, DP controller have to check isr status of every interrupt sources and service the interrupt if its isr status bits shows interrupts are pending. The

Re: [Freedreno] [v10] drm/msm/disp/dpu1: add support for dspp sub block flush in sc7280

2022-12-14 Thread Marijn Suijten
On 2022-12-12 11:35:15, Kalyan Thota wrote: > [..] > >> + if (ctx->pending_dspp_flush_mask[dspp - DSPP_0]) > >> + DPU_REG_WRITE(&ctx->hw, CTL_DSPP_n_FLUSH(dspp - > >> DSPP_0), > >> + ctx->pending_dspp_flush_mask[dspp - > >> + DSPP_0]); >

Re: [Freedreno] [RFC PATCH 6/6] drm/msm/dpu: Disallow unallocated (DSC) resources to be returned

2022-12-14 Thread Marijn Suijten
On 2022-12-14 20:56:30, Dmitry Baryshkov wrote: > On 14/12/2022 01:22, Marijn Suijten wrote: > > In the event that the topology requests resources that have not been > > created by the system (because they are typically not represented in > > dpu_mdss_cfg ^1), the resource(s) in global_state (in th

Re: [Freedreno] [RFC PATCH 3/6] drm/msm/dpu1: Wire up DSC mask for active CTL configuration

2022-12-14 Thread Marijn Suijten
On 2022-12-14 20:43:29, Dmitry Baryshkov wrote: > On 14/12/2022 01:22, Marijn Suijten wrote: > > Active CTLs have to configure what DSC block(s) have to be enabled, and > > what DSC block(s) have to be flushed; this value was initialized to zero > > resulting in the necessary register writes to nev

Re: [Freedreno] [RFC PATCH 0/6] drm/msm: DSC Electric Boogaloo for sm8[12]50

2022-12-14 Thread Marijn Suijten
On 2022-12-14 20:40:06, Dmitry Baryshkov wrote: > On 14/12/2022 01:22, Marijn Suijten wrote: > > This preliminary Display Stream Compression support package for > > (initially tested on) sm8[12]50 is based on comparing DSC behaviour > > between downstream and mainline. Some new callbacks are added

Re: [Freedreno] [RFC PATCH 6/6] drm/msm/dpu: Disallow unallocated (DSC) resources to be returned

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: In the event that the topology requests resources that have not been created by the system (because they are typically not represented in dpu_mdss_cfg ^1), the resource(s) in global_state (in this case DSC blocks) remain NULL but will still be returned o

Re: [Freedreno] [RFC PATCH 5/6] drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: According to downstream /and the comment copied from it/ this comparison should be the other way around. In other words, when the panel driver requests to use more slices per packet than what could be sent over this interface, it is bumped down to only

Re: [Freedreno] [RFC PATCH 4/6] drm/msm/dsi: Use DSC slice(s) packet size to compute word count

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: According to downstream the value to use for WORD_COUNT is bytes_per_pkt, which denotes the number of bytes in a packet based on how many slices have been configured by the panel driver times the width of a slice times the number of bytes per pixel. The

Re: [Freedreno] [RFC PATCH 3/6] drm/msm/dpu1: Wire up DSC mask for active CTL configuration

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: Active CTLs have to configure what DSC block(s) have to be enabled, and what DSC block(s) have to be flushed; this value was initialized to zero resulting in the necessary register writes to never happen (or would write zero otherwise). This seems to ha

Re: [Freedreno] [RFC PATCH 2/6] drm/msm/dpu1: Add DSC config for sm8150 and sm8250

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: These blocks on CTL V1 support setting a PINGPONG idx to send pixel output to. Signed-off-by: Marijn Suijten --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 23 ++- 1 file changed, 17 insertions(+), 6 deletions(-) Reviewed-by:

Re: [Freedreno] [RFC PATCH 1/6] drm/msm/dpu1: Implement DSC binding to PP block for CTL V1

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: All V1 CTL blocks (active CTLs) explicitly bind the pixel output from a DSC block to a PINGPONG block by setting the PINGPONG idx in a DSC hardware register. Signed-off-by: Marijn Suijten --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +++ .

Re: [Freedreno] [RFC PATCH 0/6] drm/msm: DSC Electric Boogaloo for sm8[12]50

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 01:22, Marijn Suijten wrote: This preliminary Display Stream Compression support package for (initially tested on) sm8[12]50 is based on comparing DSC behaviour between downstream and mainline. Some new callbacks are added (for binding blocks on active CTLs), logic bugs are correct

Re: [Freedreno] [PATCH v13 2/5] dt-bindings: msm/dp: add data-lanes and link-frequencies property

2022-12-14 Thread Rob Herring
On Tue, Dec 13, 2022 at 02:56:18PM -0800, Kuogee Hsieh wrote: > Add both data-lanes and link-frequencies property into endpoint > > Changes in v7: > -- split yaml out of dtsi patch > -- link-frequencies from link rate to symbol rate > -- deprecation of old data-lanes property > > Changes in v8: >

Re: [Freedreno] [PATCH v9 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc

2022-12-14 Thread Dmitry Baryshkov
On 14/12/2022 12:05, Vinod Polimera wrote: Update crtc retrieval from dpu_enc to dpu_enc connector state, since new links get set as part of the dpu enc virt mode set. The dpu_enc->crtc cache is no more needed, hence cleaning it as part of this change. This patch is dependent on the series: http

[Freedreno] [PATCH v9 15/15] drm/msm/disp/dpu: clear active interface in the datapath cleanup

2022-12-14 Thread Vinod Polimera
Clear interface active register from the datapath for a clean shutdown of the datapath. Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu

[Freedreno] [PATCH v9 14/15] drm/msm/disp/dpu: reset the datapath after timing engine disable

2022-12-14 Thread Vinod Polimera
Reset the datapath after disabling the timing gen, such that it can start on a clean slate when the intf is enabled back. This was a recommended sequence from the DPU HW programming guide. Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 1 + 1 file change

[Freedreno] [PATCH v9 13/15] drm/msm/disp/dpu: wait for extra vsync till timing engine status is disabled

2022-12-14 Thread Vinod Polimera
There can be a race between timing gen disable and vblank irq. The wait post timing gen disable may return early but intf disable sequence might not be completed. Ensure that, intf status is disabled before we retire the function. Signed-off-by: Vinod Polimera --- .../gpu/drm/msm/disp/dpu1/dpu_e

[Freedreno] [PATCH v9 12/15] drm/msm/disp/dpu: get timing engine status from intf status register

2022-12-14 Thread Vinod Polimera
Recommended way of reading the interface timing gen status is via status register. Timing gen status register will give a reliable status of the interface especially during ON/OFF transitions. This support was added from DPU version 5.0.0. Signed-off-by: Vinod Polimera --- drivers/gpu/drm/msm/di

[Freedreno] [PATCH v9 11/15] drm/msm/disp/dpu: add PSR support for eDP interface in dpu driver

2022-12-14 Thread Vinod Polimera
Enable PSR on eDP interface using drm self-refresh librabry. This patch uses a trigger from self-refresh library to enter/exit into PSR, when there are no updates from framework. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dis

[Freedreno] [PATCH v9 10/15] drm/msm/disp/dpu: check for crtc enable rather than crtc active to release shared resources

2022-12-14 Thread Vinod Polimera
According to KMS documentation, The driver must not release any shared resources if active is set to false but enable still true. Fixes: ccc862b957c6 ("drm/msm/dpu: Fix reservation failures in modeset") Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu

[Freedreno] [PATCH v9 08/15] drm/bridge: add psr support for panel bridge callbacks

2022-12-14 Thread Vinod Polimera
This change will handle the psr entry exit cases in the panel bridge atomic callback functions. For example, the panel power should not turn off if the panel is entering psr. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera --- drivers/gpu/drm/bridge/panel.c | 48 ++

[Freedreno] [PATCH v9 09/15] drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions

2022-12-14 Thread Vinod Polimera
Use atomic variants for encoder callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++-

[Freedreno] [PATCH v9 07/15] drm/bridge: use atomic enable/disable callbacks for panel bridge

2022-12-14 Thread Vinod Polimera
Use atomic variants for panel bridge callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/panel.c | 20 +++

[Freedreno] [PATCH v9 06/15] drm/msm/dp: disable self_refresh_aware after entering psr

2022-12-14 Thread Vinod Polimera
From: Sankeerth Billakanti Updated frames get queued if self_refresh_aware is set when the sink is in psr. To support bridge enable and avoid queuing of update frames, reset the self_refresh_aware state after entering psr. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera ---

[Freedreno] [PATCH v9 05/15] drm/msm/dp: use the eDP bridge ops to validate eDP modes

2022-12-14 Thread Vinod Polimera
The eDP and DP interfaces shared the bridge operations and the eDP specific changes were implemented under is_edp check. To add psr support for eDP, we started using a new set of eDP bridge ops. We are moving the eDP specific code in the dp_bridge_mode_valid function to a new eDP function, edp_brid

[Freedreno] [PATCH v9 04/15] drm/msm/dp: Add basic PSR support for eDP

2022-12-14 Thread Vinod Polimera
Add support for basic panel self refresh (PSR) feature for eDP. Add a new interface to set PSR state in the sink from DPU. Program the eDP controller to issue PSR enter and exit SDP to the sink. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov ---

[Freedreno] [PATCH v9 03/15] drm/msm/dp: use atomic callbacks for DP bridge ops

2022-12-14 Thread Vinod Polimera
Use atomic variants for DP bridge callback functions so that the atomic state can be accessed in the interface drivers. The atomic state will help the driver find out if the display is in self refresh state. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Ba

[Freedreno] [PATCH v9 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc

2022-12-14 Thread Vinod Polimera
Update crtc retrieval from dpu_enc to dpu_enc connector state, since new links get set as part of the dpu enc virt mode set. The dpu_enc->crtc cache is no more needed, hence cleaning it as part of this change. This patch is dependent on the series: https://patchwork.freedesktop.org/series/110969/

[Freedreno] [PATCH v9 02/15] drm: add helper functions to retrieve old and new crtc

2022-12-14 Thread Vinod Polimera
Add new helper functions, drm_atomic_get_old_crtc_for_encoder and drm_atomic_get_new_crtc_for_encoder to retrieve the corresponding crtc for the encoder. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Douglas Anderson --- drivers/gpu/drm/drm_atomic.c | 60 ++

[Freedreno] [PATCH v9 00/15] Add PSR support for eDP

2022-12-14 Thread Vinod Polimera
Changes in v2: - Use dp bridge to set psr entry/exit instead of dpu_enocder. - Don't modify whitespaces. - Set self refresh aware from atomic_check. - Set self refresh aware only if psr is supported. - Provide a stub for msm_dp_display_set_psr. - Move dp functions to bridge code. Chang

Re: [Freedreno] [PATCH v2 01/12] dt-bindings: display: msm: Rename mdss node name in example

2022-12-14 Thread Dmitry Baryshkov
14 декабря 2022 г. 00:11:58 GMT+02:00, Dmitry Baryshkov пишет: > > >On 13 December 2022 23:53:48 EET, Abhinav Kumar >wrote: >> >> >>On 12/1/2022 11:54 AM, Dmitry Baryshkov wrote: >>> On 30/11/2022 22:09, Adam Skladowski wrote: >> >>> >>> We will pick this into msm-fixes during the next cycle.

Re: [Freedreno] [RFC PATCH 5/6] drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf

2022-12-14 Thread Marijn Suijten
On 2022-12-14 01:02:14, Konrad Dybcio wrote: > > > On 14.12.2022 00:22, Marijn Suijten wrote: > > According to downstream /and the comment copied from it/ this comparison > > should be the other way around. In other words, when the panel driver > > requests to use more slices per packet than wha