Re: [PATCH 07/17] drm/msm/dpu: disallow widebus en in INTF_CONFIG2 when DP is YUV420

2024-01-26 Thread Dmitry Baryshkov
On Thu, 25 Jan 2024 at 23:26, Dmitry Baryshkov wrote: > > On 25/01/2024 21:38, Paloma Arellano wrote: > > INTF_CONFIG2 register cannot have widebus enabled when DP format is > > YUV420. Therefore, program the INTF to send 1 ppc. > > I think this is handled in the DP driver, where we disallow wide

Re: [PATCH 05/17] drm/msm/dp: add an API to indicate if sink supports VSC SDP

2024-01-26 Thread Dmitry Baryshkov
On Sat, 27 Jan 2024 at 05:57, Abhinav Kumar wrote: > > > > On 1/26/2024 6:40 PM, Dmitry Baryshkov wrote: > > On Sat, 27 Jan 2024 at 02:58, Paloma Arellano > > wrote: > >> > >> > >> On 1/25/2024 1:23 PM, Dmitry Baryshkov wrote: > >>> On 25/01/2024 21:38, Paloma Arellano wrote: > YUV420

Re: [PATCH 05/17] drm/msm/dp: add an API to indicate if sink supports VSC SDP

2024-01-26 Thread Abhinav Kumar
On 1/26/2024 6:40 PM, Dmitry Baryshkov wrote: On Sat, 27 Jan 2024 at 02:58, Paloma Arellano wrote: On 1/25/2024 1:23 PM, Dmitry Baryshkov wrote: On 25/01/2024 21:38, Paloma Arellano wrote: YUV420 format is supported only in the VSC SDP packet and not through MSA. Hence add an API which

Re: [PATCH 05/17] drm/msm/dp: add an API to indicate if sink supports VSC SDP

2024-01-26 Thread Dmitry Baryshkov
On Sat, 27 Jan 2024 at 02:58, Paloma Arellano wrote: > > > On 1/25/2024 1:23 PM, Dmitry Baryshkov wrote: > > On 25/01/2024 21:38, Paloma Arellano wrote: > >> YUV420 format is supported only in the VSC SDP packet and not through > >> MSA. Hence add an API which indicates the sink support which can

Re: [PATCH 04/17] drm/msm/dp: store mode YUV420 information to be used by rest of DP

2024-01-26 Thread Dmitry Baryshkov
On Sat, 27 Jan 2024 at 02:48, Paloma Arellano wrote: > > > On 1/25/2024 1:20 PM, Dmitry Baryshkov wrote: > > On 25/01/2024 21:38, Paloma Arellano wrote: > >> Wide bus is not supported when the mode is YUV420 in DP. In preparation > >> for changing the DPU programming to reflect this, the value

Re: [PATCH 02/17] drm/msm/dpu: move dpu_encoder_helper_phys_setup_cdm to dpu_encoder

2024-01-26 Thread Dmitry Baryshkov
On Sat, 27 Jan 2024 at 02:44, Paloma Arellano wrote: > > > On 1/25/2024 1:16 PM, Dmitry Baryshkov wrote: > > On 25/01/2024 21:38, Paloma Arellano wrote: > >> Move dpu_encoder_helper_phys_setup_cdm to dpu_encoder in preparation for > >> implementing CDM compatibility for DP. > > > > Nit: s/CDM

Re: [PATCH 05/17] drm/msm/dp: add an API to indicate if sink supports VSC SDP

2024-01-26 Thread Paloma Arellano
On 1/25/2024 1:23 PM, Dmitry Baryshkov wrote: On 25/01/2024 21:38, Paloma Arellano wrote: YUV420 format is supported only in the VSC SDP packet and not through MSA. Hence add an API which indicates the sink support which can be used by the rest of the DP programming. This API ideally should

Re: [PATCH 04/17] drm/msm/dp: store mode YUV420 information to be used by rest of DP

2024-01-26 Thread Paloma Arellano
On 1/25/2024 1:20 PM, Dmitry Baryshkov wrote: On 25/01/2024 21:38, Paloma Arellano wrote: Wide bus is not supported when the mode is YUV420 in DP. In preparation for changing the DPU programming to reflect this, the value and assignment location of wide_bus_en for the DP submodules must be

Re: [PATCH 02/17] drm/msm/dpu: move dpu_encoder_helper_phys_setup_cdm to dpu_encoder

2024-01-26 Thread Paloma Arellano
On 1/25/2024 1:16 PM, Dmitry Baryshkov wrote: On 25/01/2024 21:38, Paloma Arellano wrote: Move dpu_encoder_helper_phys_setup_cdm to dpu_encoder in preparation for implementing CDM compatibility for DP. Nit: s/CDM compatibility/YUV support/. It might make sense to spell it out that YUV over

Re: [PATCH 01/17] drm/msm/dpu: allow dpu_encoder_helper_phys_setup_cdm to work for DP

2024-01-26 Thread Paloma Arellano
On 1/25/2024 1:14 PM, Dmitry Baryshkov wrote: On 25/01/2024 21:38, Paloma Arellano wrote: Generalize dpu_encoder_helper_phys_setup_cdm to be compatible with DP. Signed-off-by: Paloma Arellano ---   .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h  |  4 +--  

Re: [PATCH RESEND v3 15/15] drm/msm/dp: drop dp_parser

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Finally drop separate "parsing" submodule. There is no need in it anymore. All submodules handle DT properties directly rather than passing them via the separate structure pointer. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh

Re: [PATCH RESEND v3 14/15] drm/msm/dp: move next_bridge handling to dp_display

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Remove two levels of indirection and fetch next bridge directly in dp_display_probe_tail(). Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_display.c | 43

Re: [PATCH RESEND v3 13/15] drm/msm/dp: move link property handling to dp_panel

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Instead of passing link properties through the separate struct, parse them directly in the dp_panel. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_display.c | 8 -

Re: [PATCH RESEND v3 12/15] drm/msm/dp: move all IO handling to dp_catalog

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Rather than parsing the I/O addresses from dp_parser and then passing them via a struct pointer to dp_catalog, handle I/O region parsing in dp_catalog and drop it from dp_parser. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh

Re: [PATCH RESEND v3 11/15] drm/msm/dp: handle PHY directly in dp_ctrl

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: There is little point in going trough dp_parser->io indirection each time the driver needs to access the PHY. Store the pointer directly in dp_ctrl_private. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh

Re: [PATCH RESEND v3 10/15] drm/msm/dp: remove PHY handling from dp_catalog.c

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Inline dp_catalog_aux_update_cfg() and call phy_calibrate() from dp_aux functions directly. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_aux.c | 9 +++--

Re: [PATCH RESEND v3 09/15] drm/msm/dp: move phy_configure_opts to dp_ctrl

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: There is little point in sharing phy configuration structure between several modules. Move it to dp_ctrl, which becomes the only submodule re-configuring the PHY. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee

Re: [PATCH RESEND v3 08/15] drm/msm/dp: split dp_ctrl_clk_enable into four functuions

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Split the dp_ctrl_clk_enable() beast into four functions, each of them doing just a single item: enabling or disabling core or link clocks. This allows us to cleanup the dss_module_power structure and makes several dp_ctrl functions return void.

Re: [PATCH RESEND v3 07/15] drm/msm/dp: stop parsing clock names from DT

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: All supported platforms use the same clocks configuration. Instead of parsing names from DT in a pretty complex manner, use the static configuration. If at some point newer (or older) platforms have different clock configuration, this clock config

Re: [PATCH RESEND v3 06/15] drm/msm/dp: simplify stream clocks handling

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: There is only a single DP_STREAM_PM clock, stream_pixel. Instead of using a separate dss_module_power instance for this single clock, handle this clock directly. This allows us to drop several wrapping functions. Signed-off-by: Dmitry Baryshkov

Re: [PATCH RESEND v3 05/15] drm/msm/dp: fold dp_power into dp_ctrl module

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: The dp_power submodule is limited to handling the clocks only following previous cleanups. Fold it into the dp_ctrl submodule, removing one unnecessary level of indirection. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by:

Re: [PATCH RESEND v3 04/15] drm/msm/dp: inline dp_power_(de)init

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: In preparation to cleanup of the dp_power module, inline dp_power_init() and dp_power_deinit() functions, which are now just turning the clocks on and off. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh

Re: [PATCH RESEND v3 03/15] drm/msm/dp: parse DT from dp_parser_get

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: It makes little sense to split the submodule get and actual DT parsing. Call dp_parser_parse() directly from dp_parser_get(), so that the parser data is fully initialised once it is returned to the caller. Reviewed-by: Konrad Dybcio

Re: [PATCH RESEND v3 02/15] drm/msm/dp: drop unused fields from dp_power_private

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Drop unused and obsolete fields from struct dp_power_private. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_power.c | 3 --- 1 file changed, 3

Re: [PATCH RESEND v3 01/15] drm/msm/dp: drop unused parser definitions

2024-01-26 Thread Kuogee Hsieh
On 1/26/2024 10:26 AM, Dmitry Baryshkov wrote: Drop several unused and obsolete definitions from the dp_parser module. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_parser.h | 46 --

Re: [PATCH RESEND v3 00/15] drm/msm/dp: clear power and parser submodules away

2024-01-26 Thread Dmitry Baryshkov
On Fri, 26 Jan 2024 at 20:26, Dmitry Baryshkov wrote: > > Reshuffle code in the DP driver, cleaning up clocks and DT parsing and > dropping the dp_power and dp_parser submodules. > > Initially I started by looking onto stream_pixel clock handling only to > find several wrapping layers around a

[PATCH RESEND v3 14/15] drm/msm/dp: move next_bridge handling to dp_display

2024-01-26 Thread Dmitry Baryshkov
Remove two levels of indirection and fetch next bridge directly in dp_display_probe_tail(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 43 - drivers/gpu/drm/msm/dp/dp_parser.c | 14

[PATCH RESEND v3 09/15] drm/msm/dp: move phy_configure_opts to dp_ctrl

2024-01-26 Thread Dmitry Baryshkov
There is little point in sharing phy configuration structure between several modules. Move it to dp_ctrl, which becomes the only submodule re-configuring the PHY. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_catalog.c | 19 - drivers/gpu/drm/msm/dp/dp_catalog.h

[PATCH RESEND v3 11/15] drm/msm/dp: handle PHY directly in dp_ctrl

2024-01-26 Thread Dmitry Baryshkov
There is little point in going trough dp_parser->io indirection each time the driver needs to access the PHY. Store the pointer directly in dp_ctrl_private. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_ctrl.c| 37 +

[PATCH RESEND v3 15/15] drm/msm/dp: drop dp_parser

2024-01-26 Thread Dmitry Baryshkov
Finally drop separate "parsing" submodule. There is no need in it anymore. All submodules handle DT properties directly rather than passing them via the separate structure pointer. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile| 1 - drivers/gpu/drm/msm/dp/dp_aux.h

[PATCH RESEND v3 12/15] drm/msm/dp: move all IO handling to dp_catalog

2024-01-26 Thread Dmitry Baryshkov
Rather than parsing the I/O addresses from dp_parser and then passing them via a struct pointer to dp_catalog, handle I/O region parsing in dp_catalog and drop it from dp_parser. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_catalog.c | 125 ++--

[PATCH RESEND v3 07/15] drm/msm/dp: stop parsing clock names from DT

2024-01-26 Thread Dmitry Baryshkov
All supported platforms use the same clocks configuration. Instead of parsing names from DT in a pretty complex manner, use the static configuration. If at some point newer (or older) platforms have different clock configuration, this clock config can be moved to the device data. Signed-off-by:

[PATCH RESEND v3 13/15] drm/msm/dp: move link property handling to dp_panel

2024-01-26 Thread Dmitry Baryshkov
Instead of passing link properties through the separate struct, parse them directly in the dp_panel. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 8 - drivers/gpu/drm/msm/dp/dp_display.h | 1 - drivers/gpu/drm/msm/dp/dp_panel.c | 66

[PATCH RESEND v3 05/15] drm/msm/dp: fold dp_power into dp_ctrl module

2024-01-26 Thread Dmitry Baryshkov
The dp_power submodule is limited to handling the clocks only following previous cleanups. Fold it into the dp_ctrl submodule, removing one unnecessary level of indirection. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile| 1 - drivers/gpu/drm/msm/dp/dp_ctrl.c|

[PATCH RESEND v3 06/15] drm/msm/dp: simplify stream clocks handling

2024-01-26 Thread Dmitry Baryshkov
There is only a single DP_STREAM_PM clock, stream_pixel. Instead of using a separate dss_module_power instance for this single clock, handle this clock directly. This allows us to drop several wrapping functions. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_ctrl.c | 91

[PATCH RESEND v3 08/15] drm/msm/dp: split dp_ctrl_clk_enable into four functuions

2024-01-26 Thread Dmitry Baryshkov
Split the dp_ctrl_clk_enable() beast into four functions, each of them doing just a single item: enabling or disabling core or link clocks. This allows us to cleanup the dss_module_power structure and makes several dp_ctrl functions return void. Signed-off-by: Dmitry Baryshkov ---

[PATCH RESEND v3 10/15] drm/msm/dp: remove PHY handling from dp_catalog.c

2024-01-26 Thread Dmitry Baryshkov
Inline dp_catalog_aux_update_cfg() and call phy_calibrate() from dp_aux functions directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_aux.c | 9 +++-- drivers/gpu/drm/msm/dp/dp_aux.h | 1 + drivers/gpu/drm/msm/dp/dp_catalog.c | 12

[PATCH RESEND v3 02/15] drm/msm/dp: drop unused fields from dp_power_private

2024-01-26 Thread Dmitry Baryshkov
Drop unused and obsolete fields from struct dp_power_private. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_power.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c index

[PATCH RESEND v3 04/15] drm/msm/dp: inline dp_power_(de)init

2024-01-26 Thread Dmitry Baryshkov
In preparation to cleanup of the dp_power module, inline dp_power_init() and dp_power_deinit() functions, which are now just turning the clocks on and off. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++--

[PATCH RESEND v3 03/15] drm/msm/dp: parse DT from dp_parser_get

2024-01-26 Thread Dmitry Baryshkov
It makes little sense to split the submodule get and actual DT parsing. Call dp_parser_parse() directly from dp_parser_get(), so that the parser data is fully initialised once it is returned to the caller. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov ---

[PATCH RESEND v3 01/15] drm/msm/dp: drop unused parser definitions

2024-01-26 Thread Dmitry Baryshkov
Drop several unused and obsolete definitions from the dp_parser module. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_parser.h | 46 -- 1 file changed, 46 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_parser.h

[PATCH RESEND v3 00/15] drm/msm/dp: clear power and parser submodules away

2024-01-26 Thread Dmitry Baryshkov
Reshuffle code in the DP driver, cleaning up clocks and DT parsing and dropping the dp_power and dp_parser submodules. Initially I started by looking onto stream_pixel clock handling only to find several wrapping layers around a single clocks. After inlining and/or dropping them (and thus