drm/msm/dpu: clearly document INTF_DP vs INTF_EDP difference
cover drm/msm/dpu: clearly document INTF_DP vs INTF_EDP difference
Recent dicussion on the mailing list [1], [2] outlined a need to document which intf type is used for DP and which one is used for eDP interfaces.
This series implements my proposal [3]:
- Keep INTF_EDP reserved for 8x74/8x84
- Use INTF_DP for all contemporary DP and eDP ports
- Documet this in dpu_hw_mdss.h
- Remove INTF_EDP usage in dpu1 driver.
Main reasons behind this proposal:
- It's not always possible to separate eDP and DP. For example INTF_5 on sc7280 is connected to combo eDP/DP PHY.
- Using INTF_EDP would require us to split too many pieces, ending up with a singnificant amount of code duplication...
- ... for nothing. From the DPU point of view there is no difference between DP and eDP interfaces as found on current SoC generations.
[1]: https://lore.kernel.org/linux-arm-msm/[email protected]/
[2]: https://lore.kernel.org/linux-arm-msm/[email protected]/
[3]: https://lore.kernel.org/linux-arm-msm/[email protected]/
Dmitry Baryshkov (4):
drm/msm/dpu: document INTF_EDP/INTF_DP difference drm/msm/dpu: drop INTF_TYPE_MAX symbol drm/msm/dpu: drop obsolete INTF_EDP comment drm/msm/dpu: drop INTF_EDP from interface type conditions
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 +------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 9 ++++++++- 3 files changed, 10 insertions(+), 15 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/4 drm/msm/dpu: document INTF_EDP/INTF_DP difference
Based on the discussions on the mailing list, document enum dpu_intf_type and it's controversial fields: INTF_DP and INTF_EDP.
INTF_EDP is used for older eDP interface found on msm8x74/msm8x84 INTF_DP is used for both eDP and DP interfaces handled by the msm/dp driver. The DPU driver does not make a difference between them.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +8 -0
@@ -205,12 +205,20 @@ enum dpu_intf {INTF_MAX }; +/* +* Historically these values correspond to the values written to the +* DISP_INTF_SEL register, which had to programmed manually. On newer MDP +* generations this register is NOP, but we keep the values for historical +* reasons. +*/ enum dpu_intf_type {INTF_NONE =0x0 ,INTF_DSI =0x1 ,INTF_HDMI =0x3 ,INTF_LCDC =0x5 , +/* old eDP found on 8x74 and 8x84 */ INTF_EDP =0x9 , +/* both DP and eDP, handled by the new DP driver */ INTF_DP =0xa ,INTF_TYPE_MAX ,
Signature · 1 line
2.34.1
Re: [PATCH 1/4] drm/msm/dpu: document INTF_EDP/INTF_DP difference
Quoting Dmitry Baryshkov (2022-02-21 22:22:43)
Quoted 9 lines
Based on the discussions on the mailing list, document enum
dpu_intf_typeand it's controversial fields:INTF_DPandINTF_EDP.
INTF_EDPis used for older eDP interface found on msm8x74/msm8x84INTF_DPis used for both eDP and DP interfaces handled by the msm/dp driver. The DPU driver does not make a difference between them.Signed-off-by Dmitry Baryshkov <[email protected]>---
PATCH 2/4 drm/msm/dpu: drop INTF_TYPE_MAX symbol
In reply to Dmitry BaryshkovThis enum value does not correspond to any of actual interface types, it's not used by the driver, and the value of INTF_WB is greater than INTF_TYPE_MAX. Thus this symbol serves no purpose and can be removed.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +0 -1
@@ -220,7 +220,6 @@ enum dpu_intf_type {INTF_EDP =0x9 ,/* both DP and eDP, handled by the new DP driver */ INTF_DP =0xa , -INTF_TYPE_MAX ,/* virtual interfaces */ INTF_WB = 0x100,
Signature · 1 line
2.34.1
Re: [PATCH 2/4] drm/msm/dpu: drop INTF_TYPE_MAX symbol
Quoting Dmitry Baryshkov (2022-02-21 22:22:44)
Quoted 6 lines
This enum value does not correspond to any of actual interface types, it's not used by the driver, and the value of
INTF_WBis greater thanINTF_TYPE_MAX. Thus this symbol serves no purpose and can be removed.Signed-off-by Dmitry Baryshkov <[email protected]>---
PATCH 3/4 drm/msm/dpu: drop obsolete INTF_EDP comment
In reply to Dmitry BaryshkovDPU driver never supported INTF_EDP, so let's drop the obsolete comment. If at some point 8x74/8x84's INTF_EDP is ported to DPU driver, corresponding handling will have to be ported too. Until that time, the comment serves no purpose.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 11 ----------- 1 file changed, 11 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +0 -11
@@ -91,17 +91,6 @@ static void drm_mode_to_intf_timing_params( timing->vsync_polarity =0 ; } -/* -* For edp only: -* DISPLAY_V_START = (VBP * HCYCLE) + HBP -* DISPLAY_V_END = (VBP + VACTIVE) * HCYCLE - 1 - HFP -*/ -/* -* if (vid_enc->hw->cap->type == INTF_EDP) { -* display_v_start += mode->htotal - mode->hsync_start; -* display_v_end -= mode->hsync_start - mode->hdisplay; -* } -*/ /* for DP/EDP, Shift timings to align it to bottom right */ if ((phys_enc->hw_intf->cap->type ==INTF_DP ) || (phys_enc->hw_intf->cap->type ==INTF_EDP )) {
Signature · 1 line
2.34.1
Re: [PATCH 3/4] drm/msm/dpu: drop obsolete INTF_EDP comment
Quoting Dmitry Baryshkov (2022-02-21 22:22:45)
Quoted 7 lines
DPU driver never supported
INTF_EDP, so let's drop the obsolete comment. If at some point 8x74/8x84'sINTF_EDPis ported to DPU driver, corresponding handling will have to be ported too. Until that time, the comment serves no purpose.Signed-off-by Dmitry Baryshkov <[email protected]>---
PATCH 4/4 drm/msm/dpu: drop INTF_EDP from interface type conditions
In reply to Dmitry BaryshkovTo remove possible confusion between (old) INTF_EDP and newer INTF_DP, stop using INTF_EDP in DPU's code. Until the 8x74/8x84 SoCs are supported by DPU driver, there is no point in using INTF_EDP.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 3 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +1 -2
@@ -92,8 +92,7 @@ static void drm_mode_to_intf_timing_params( }/* for DP/EDP, Shift timings to align it to bottom right */ -if ((phys_enc->hw_intf->cap->type ==INTF_DP ) || - (phys_enc->hw_intf->cap->type ==INTF_EDP )) { +if (phys_enc->hw_intf->cap->type ==INTF_DP ) { timing->h_back_porch += timing->h_front_porch; timing->h_front_porch =0 ; timing->v_back_porch += timing->v_front_porch;
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +1 -1
@@ -141,7 +141,7 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx, hsync_ctl = (hsync_period <<16 ) | p->hsync_pulse_width; display_hctl = (hsync_end_x <<16 ) | hsync_start_x; -if (ctx->cap->type ==INTF_EDP || ctx->cap->type ==INTF_DP ) { +if (ctx->cap->type ==INTF_DP ) { active_h_start = hsync_start_x; active_h_end = active_h_start + p->xres -1 ; active_v_start = display_v_start;
Signature · 1 line
2.34.1
Re: [PATCH 4/4] drm/msm/dpu: drop INTF_EDP from interface type conditions
Quoting Dmitry Baryshkov (2022-02-21 22:22:46)
Quoted 6 lines
To remove possible confusion between (old)
INTF_EDPand newerINTF_DP, stop usingINTF_EDPin DPU's code. Until the 8x74/8x84 SoCs are supported by DPU driver, there is no point in usingINTF_EDP.Signed-off-by Dmitry Baryshkov <[email protected]>---
Quoted 18 lines · Dmitry Baryshkov
Recent dicussion on the mailing list [1], [2] outlined a need to document which intf type is used for DP and which one is used for eDP interfaces.
This series implements my proposal [3]:
- Keep
INTF_EDPreserved for 8x74/8x84
- UseINTF_DPfor all contemporary DP and eDP ports
- Documet this indpu_hw_mdss.h
- RemoveINTF_EDPusage in dpu1 driver.Main reasons behind this proposal:
- It's not always possible to separate eDP and DP. For exampleINTF_5on sc7280 is connected to combo eDP/DP PHY.
- UsingINTF_EDPwould require us to split too many pieces, ending up with a singnificant amount of code duplication...
- ... for nothing. From the DPU point of view there is no difference between DP and eDP interfaces as found on current SoC generations.
Quoted 4 lines
[1]: https://lore.kernel.org/linux-arm-msm/[email protected]/
[2]: https://lore.kernel.org/linux-arm-msm/[email protected]/
[3]: https://lore.kernel.org/linux-arm-msm/[email protected]/
I have notified the team about the change and we have discussed the potential implications of this with both upstream and downstream drivers in mind. Overall, even though some members wanted to retain INTF_eDP for clarity, some members were fine removing its usage.
Going with the majority and I have checked all the changes in this series,
Hence:
For the entire series.
Quoted 11 lines
Dmitry Baryshkov (4):
drm/msm/dpu: document INTF_EDP/INTF_DP difference drm/msm/dpu: dropINTF_TYPE_MAXsymbol drm/msm/dpu: drop obsoleteINTF_EDPcomment drm/msm/dpu: dropINTF_EDPfrom interface type conditions.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 +------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 9 ++++++++- 3 files changed, 10 insertions(+), 15 deletions(-)