drm/i915: Eliminate DDI encoder->type frobbery redux
Subsystems (2)
cover drm/i915: Eliminate DDI encoder->type frobbery redux
From: Ville Syrjälä <[email protected]>
This series aims to eliminate the DDI encoder->type shenanigans. Afterwards encoder->type will permanently be "DDI" for DDI DP/HDMI ports, and "EDP" for DDI eDP ports. To figure out in which mode we want to drive the port we use the output_types bitmask, which for DDI will be computed by the new .compute_output_type() encoder hook.
Originally (some years ago?) I simply planned to avoid this role switching for the DDI encoders by splitting each encoders into two two separate instances (which is how the pre-DDI platforms work). I even posted a patch series achieving this. But the series didn't land before LSPCON happened and at that point I figured that we actually might want to switch the encoder mode as needed. So I came up with this alternative apporach (and introduced the output_types bitmask). Unfortunately I never managed to land the remaining bits.
Having a single encoder per DDI port does have the benefit of giving userspace a hint that there's no way to enable both the DP and HDMI connectors handing off it at the same time. With pre-DDI platforms userspace has no idea which connectors are tied to the same port. So one might argue that this is indeed the better approach.
Since I last posted this stuff a lot has changed in the DDI code (BXT and CNL at least, can't recall if SKL was a thing when I originally posted this stuff). So this series actually turned out into a rather massive "clean up DDI" series. I regret it ending up this big, but I don't think I want to start spliting it up at this point. So I'll just offer my apologies and post the series as is. The patches shouldn't be too tricky to read since it's basically just refactoring all over.
Entire series is available here:git://github.com/vsyrjala/linux.git ddi_output_types
Ville Syrjälä (29):
drm/i915: Replace some spaces with tabs
drm/i915: Shrink bxt_ddi_buf_trans
drm/i915: Shrink cnl_ddi_buf_trans
drm/i915: Dump 'output_types' in crtc state dump drm/i915: Extract intel_ddi_clk_disable()
drm/i915: Extract intel_disable_ddi_buf()
drm/i915: Inline the required bits of intel_ddi_post_disable() into
intel_ddi_fdi_post_disable()
drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp() drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants drm/i915: Plump crtc_state etc. directly to
intel_ddi_pre_enable_{dp,hdmi}()
drm/i915: Split intel_enable_ddi() into DP and HDMI variants
drm/i915: Relocate intel_ddi_get_buf_trans_*() functions
drm/i915: Extract intel_ddi_get_buf_trans_hdmi()
drm/i915: Pass the encoder type explicitly to skl_set_iboost()
drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()
drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()
drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly
drm/i915: Kill off the BXT buf_trans default_index
drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings()
drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()
drm/i915: Start using output_types for DPLL selection
drm/i915: Stop using encoder->type in
intel_ddi_enable_transcoder_func()
drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling
drm/i915: Stop frobbing with DDI encoder->type
drm/i915: Unify error handling for missing DDI buf trans tables
drm/i915: Clear up the types we use for DDI buf trans level/n_entries
drm/i915: Replace most intel_ddi_get_encoder_port() alls with
encoder->port drm/i915: Pass a crtc state to ddi post_disable from MST code
drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 973 ++++++++++++++++++---------------- drivers/gpu/drm/i915/intel_display.c | 59 ++- drivers/gpu/drm/i915/intel_dp.c | 19 +- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/intel_dpll_mgr.c | 36 +- drivers/gpu/drm/i915/intel_drv.h | 7 +- drivers/gpu/drm/i915/intel_hdmi.c | 10 +- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 9 files changed, 603 insertions(+), 507 deletions(-)
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/29 drm/i915: Replace some spaces with tabs
From: Ville Syrjälä <[email protected]>
Some comments in intel_ddi.c are indented with spaces instead of tabs. Fix that up.
--- drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -3
@@ -1939,7 +1939,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv, val |=RCOMP_SCALAR (0x98 );I915_WRITE (CNL_PORT_TX_DW2_GRP (port), val); -/* Program PORT_TX_DW4 */ +/* Program PORT_TX_DW4 */ /* We cannot write to GRP. It would overrite individual loadgen */ for (ln =0 ; ln <4 ; ln++) { val =I915_READ (CNL_PORT_TX_DW4_LN (port, ln));
@@ -1951,7 +1951,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv,I915_WRITE (CNL_PORT_TX_DW4_LN (port, ln), val); } -/* Program PORT_TX_DW5 */ +/* Program PORT_TX_DW5 */ /* All DW5 values are fixed for every table entry */ val =I915_READ (CNL_PORT_TX_DW5_LN0 (port)); val &= ~RTERM_SELECT_MASK ;
@@ -1959,7 +1959,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv, val |=TAP3_DISABLE ;I915_WRITE (CNL_PORT_TX_DW5_GRP (port), val); -/* Program PORT_TX_DW7 */ +/* Program PORT_TX_DW7 */ val =I915_READ (CNL_PORT_TX_DW7_LN0 (port)); val &= ~N_SCALAR_MASK ; val |=N_SCALAR (ddi_translations[level].dw7_n_scalar);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 01/29] drm/i915: Replace some spaces with tabs
Quoting Ville Syrjala (2017-09-18 19:25:36)
Quoted 6 lines
From: Ville Syrjälä <[email protected]>
Some comments in
intel_ddi.care indented with spaces instead of tabs. Fix that up.Signed-off-by Ville Syrjälä <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 01/29] drm/i915: Replace some spaces with tabs
In reply to Ville SyrjalaQuoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Some comments in
intel_ddi.care indented with spaces instead of tabs. Fix that up.Signed-off-by Ville Syrjälä <[email protected]>
Quoted 35 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +3
-3@@ -1939,7 +1939,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv, val |=RCOMP_SCALAR (0x98 );I915_WRITE (CNL_PORT_TX_DW2_GRP (port), val); -/* Program PORT_TX_DW4 */ +/* Program PORT_TX_DW4 */ /* We cannot write to GRP. It would overrite individual loadgen */ for (ln =0 ; ln <4 ; ln++) { val =I915_READ (CNL_PORT_TX_DW4_LN (port, ln));@@ -1951,7 +1951,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv,I915_WRITE (CNL_PORT_TX_DW4_LN (port, ln), val); } -/* Program PORT_TX_DW5 */ +/* Program PORT_TX_DW5 */ /* All DW5 values are fixed for every table entry */ val =I915_READ (CNL_PORT_TX_DW5_LN0 (port)); val &= ~RTERM_SELECT_MASK ;@@ -1959,7 +1959,7 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv, val |=TAP3_DISABLE ;I915_WRITE (CNL_PORT_TX_DW5_GRP (port), val); -/* Program PORT_TX_DW7 */ +/* Program PORT_TX_DW7 */ val =I915_READ (CNL_PORT_TX_DW7_LN0 (port)); val &= ~N_SCALAR_MASK ; val |=N_SCALAR (ddi_translations[level].dw7_n_scalar);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/29 drm/i915: Shrink bxt_ddi_buf_trans
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
All the values we put into the BXT buf_trans tables fit into 8 bits. So switch over to u8 from the u32 we use currently.
--- drivers/gpu/drm/i915/intel_ddi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +4 -4
@@ -301,10 +301,10 @@ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { };struct bxt_ddi_buf_trans { -u32 margin;/* swing value */ -u32 scale;/* scale value */ -u32 enable;/* scale enable */ -u32 deemphasis; +u8 margin;/* swing value */ +u8 scale;/* scale value */ +u8 enable;/* scale enable */ +u8 deemphasis;bool default_index;/* true if the entry represents default value */ };
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 02/29] drm/i915: Shrink bxt_ddi_buf_trans
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
All the values we put into the BXT
buf_transtables fit into 8 bits. So switch over to u8 from the u32 we use currently.Signed-off-by Ville Syrjälä <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +4
-4@@ -301,10 +301,10 @@ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { };struct bxt_ddi_buf_trans { -u32 margin;/* swing value */ -u32 scale;/* scale value */ -u32 enable;/* scale enable */ -u32 deemphasis; +u8 margin;/* swing value */ +u8 scale;/* scale value */ +u8 enable;/* scale enable */ +u8 deemphasis;bool default_index;/* true if the entry represents default value */ };
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/29 drm/i915: Shrink cnl_ddi_buf_trans
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
All the values we put into the CNL buf_trans tables fit into 8 bits. So switch over to u8 from the u32 we use currently.
--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +5 -5
@@ -354,11 +354,11 @@ static const struct bxt_ddi_buf_trans bxt_ddi_translations_hdmi[] = { };struct cnl_ddi_buf_trans { -u32 dw2_swing_sel; -u32 dw7_n_scalar; -u32 dw4_cursor_coeff; -u32 dw4_post_cursor_2; -u32 dw4_post_cursor_1; +u8 dw2_swing_sel; +u8 dw7_n_scalar; +u8 dw4_cursor_coeff; +u8 dw4_post_cursor_2; +u8 dw4_post_cursor_1; };/* Voltage Swing Programming for VccIO 0.85V for DP */
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/29] drm/i915: Shrink cnl_ddi_buf_trans
Quoting Ville Syrjala (2017-09-18 19:25:38)
Quoted 6 lines
From: Ville Syrjälä <[email protected]>
All the values we put into the CNL
buf_transtables fit into 8 bits. So switch over to u8 from the u32 we use currently.Signed-off-by Ville Syrjälä <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/29] drm/i915: Shrink cnl_ddi_buf_trans
In reply to Ville SyrjalaQuoting Ville Syrjala (2017-09-18 19:25:38)
Quoted 6 lines
From: Ville Syrjälä <[email protected]>
All the values we put into the CNL
buf_transtables fit into 8 bits. So switch over to u8 from the u32 we use currently.Signed-off-by Ville Syrjälä <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/29] drm/i915: Shrink cnl_ddi_buf_trans
Quoting Chris Wilson (2017-09-18 19:40:45)
Quoted 8 lines
Quoting Ville Syrjala (2017-09-18 19:25:38)
Quoted 6 lines
From: Ville Syrjälä <[email protected]>
All the values we put into the CNL
buf_transtables fit into 8 bits. So switch over to u8 from the u32 we use currently.Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Chris Wilson <[email protected]>
One of these r-b was meant for the previous u32 -> u8 patch. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/29 drm/i915: Dump 'output_types' in crtc state dump
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well.
--- drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
drivers/gpu/drm/i915/intel_display.c +50 -0
@@ -10683,6 +10683,53 @@ intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, m_n->link_m, m_n->link_n, m_n->tu); } +#define OUTPUT_TYPE (x) [INTEL_OUTPUT_ ## x] = #x + +static const char *const output_type_str[] = { +OUTPUT_TYPE (UNUSED ), +OUTPUT_TYPE (ANALOG ), +OUTPUT_TYPE (DVO ), +OUTPUT_TYPE (SDVO ), +OUTPUT_TYPE (LVDS ), +OUTPUT_TYPE (TVOUT ), +OUTPUT_TYPE (HDMI ), +OUTPUT_TYPE (DP ), +OUTPUT_TYPE (EDP ), +OUTPUT_TYPE (DSI ), +OUTPUT_TYPE (UNKNOWN ), +OUTPUT_TYPE (DP_MST ), +}; + +static const char *output_types_str (unsigned int output_types) +{ +static char buf[64 ]; +size_t len =sizeof (buf); +char *str = buf; +int i; + + str[0 ] ='\0' ; + +for (i =0 ; i <ARRAY_SIZE (output_type_str); i++) { +int r; + +if ((output_types &BIT (i)) ==0 ) +continue ; + + r =snprintf (str, len,"%s%s" , + str != buf ?"," :"" , output_type_str[i]); +if (r >= len) +break ; + str += r; + len -= r; + + output_types &= ~BIT (i); + } + +WARN_ON_ONCE (output_types !=0 ); + +return buf; +} +static void intel_dump_pipe_config (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config,const char *context)
@@ -10696,6 +10743,9 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,DRM_DEBUG_KMS ("[CRTC:%d:%s]%s\n" , crtc->base.base.id, crtc->base.name, context); +DRM_DEBUG_KMS ("output_types: %s (0x%x)\n" , +output_types_str (pipe_config->output_types), + pipe_config->output_types); DRM_DEBUG_KMS("cpu_transcoder: %s, pipe bpp: %i, dithering: %i\n", transcoder_name(pipe_config->cpu_transcoder),
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/29] drm/i915: Dump 'output_types' in crtc state dump
Quoting Ville Syrjala (2017-09-18 19:25:39)
Quoted 29 lines
From: Ville Syrjälä <[email protected]>
To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)drivers/gpu/drm/i915/intel_display.c +10
-0@@ -10683,6 +10683,53 @@ intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, m_n->link_m, m_n->link_n, m_n->tu); } +#define OUTPUT_TYPE (x) [INTEL_OUTPUT_ ## x] = #x + +static const char *const output_type_str[] = { +OUTPUT_TYPE (UNUSED ), +OUTPUT_TYPE (ANALOG ), +OUTPUT_TYPE (DVO ), +OUTPUT_TYPE (SDVO ), +OUTPUT_TYPE (LVDS ), +OUTPUT_TYPE (TVOUT ), +OUTPUT_TYPE (HDMI ),
drivers/gpu/drm/i915/intel_display.c intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, · line 10705
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+OUTPUT_TYPE (DP ), +OUTPUT_TYPE (EDP ), +OUTPUT_TYPE (DSI ), +OUTPUT_TYPE (UNKNOWN ), + OUTPUT_TYPE(DP_MST), +}; + +static const char *output_types_str (unsigned int output_types) +{ +static char buf[64 ];
Bleh. Push to caller?
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +4
-0+size_t len =sizeof (buf); +char *str = buf; +int i; +
drivers/gpu/drm/i915/intel_display.c intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, · line 10719
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+ str[0 ] ='\0' ; + +for (i =0 ; i <ARRAY_SIZE (output_type_str); i++) { +int r; + +if ((output_types &BIT (i)) ==0 ) +continue ; + + r =snprintf (str, len,"%s%s" , + str != buf ?"," :"" , output_type_str[i]);
No space after the comma? Heathen.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/29] drm/i915: Dump 'output_types' in crtc state dump
Quoted 34 lines · Chris Wilson
Quoting Ville Syrjala (2017-09-18 19:25:39)
Quoted 33 lines
From: Ville Syrjälä <[email protected]>
To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)drivers/gpu/drm/i915/intel_display.c +14
-0@@ -10683,6 +10683,53 @@ intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, m_n->link_m, m_n->link_n, m_n->tu); } +#define OUTPUT_TYPE (x) [INTEL_OUTPUT_ ## x] = #x + +static const char *const output_type_str[] = { +OUTPUT_TYPE (UNUSED ), +OUTPUT_TYPE (ANALOG ), +OUTPUT_TYPE (DVO ), +OUTPUT_TYPE (SDVO ), +OUTPUT_TYPE (LVDS ), +OUTPUT_TYPE (TVOUT ), +OUTPUT_TYPE (HDMI ), +OUTPUT_TYPE (DP ), +OUTPUT_TYPE (EDP ), +OUTPUT_TYPE (DSI ), +OUTPUT_TYPE (UNKNOWN ),
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, · line 10705
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +6
-0+ OUTPUT_TYPE(DP_MST), +}; + +static const char *output_types_str (unsigned int output_types) +{ +static char buf[64 ];Bleh. Push to caller?
It's a debug thing so I wasn't too worried about making it entirely robust. But I guess these things tend to come back and bite us later, so with that in mind I can respin this to use a caller provided buffer.
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +8
-0+size_t len =sizeof (buf); +char *str = buf; +int i; + + str[0 ] ='\0' ; + +for (i =0 ; i <ARRAY_SIZE (output_type_str); i++) { +int r;
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, · line 10719
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +6
-0+ +if ((output_types &BIT (i)) ==0 ) +continue ; + + r =snprintf (str, len,"%s%s" , + str != buf ?"," :"" , output_type_str[i]);No space after the comma? Heathen.
I had it there originally, but it looked a bit weird to me when I had more than one bit set. I think the problem is that we alrady use a comma for separating different pieces of state when we print them on the same line. And so not having a space in there makes it more clear that these things are in fact part of the same piece of state.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 04/29] drm/i915: Dump 'output_types' in crtc state dump
In reply to Ville SyrjalaQuoted 26 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)drivers/gpu/drm/i915/intel_display.c +7
-0@@ -10683,6 +10683,53 @@ intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, m_n->link_m, m_n->link_n, m_n->tu); } +#define OUTPUT_TYPE (x) [INTEL_OUTPUT_ ## x] = #x + +static const char *const output_type_str[] = { +OUTPUT_TYPE (UNUSED ), +OUTPUT_TYPE (ANALOG ), +OUTPUT_TYPE (DVO ), +OUTPUT_TYPE (SDVO ),
drivers/gpu/drm/i915/intel_display.c intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, · line 10702
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+OUTPUT_TYPE (LVDS ), +OUTPUT_TYPE (TVOUT ), +OUTPUT_TYPE (HDMI ), +OUTPUT_TYPE (DP ), +OUTPUT_TYPE (EDP ), +OUTPUT_TYPE (DSI ), +OUTPUT_TYPE (UNKNOWN ), + OUTPUT_TYPE(DP_MST), +}; +
#undef OUTPUT_TYPE
Quoted 43 lines
drivers/gpu/drm/i915/intel_display.c +33
-0+static const char *output_types_str (unsigned int output_types) +{ +static char buf[64 ]; +size_t len =sizeof (buf); +char *str = buf; +int i; + + str[0 ] ='\0' ; + +for (i =0 ; i <ARRAY_SIZE (output_type_str); i++) { +int r; + +if ((output_types &BIT (i)) ==0 ) +continue ; + + r =snprintf (str, len,"%s%s" , + str != buf ?"," :"" , output_type_str[i]); +if (r >= len) +break ; + str += r; + len -= r; + + output_types &= ~BIT (i); + } + +WARN_ON_ONCE (output_types !=0 ); + +return buf; +} +static void intel_dump_pipe_config (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config,const char *context)@@ -10696,6 +10743,9 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,DRM_DEBUG_KMS ("[CRTC:%d:%s]%s\n" , crtc->base.base.id, crtc->base.name, context); +DRM_DEBUG_KMS ("output_types: %s (0x%x)\n" , +output_types_str (pipe_config->output_types), + pipe_config->output_types); DRM_DEBUG_KMS("cpu_transcoder: %s, pipe bpp: %i, dithering: %i\n", transcoder_name(pipe_config->cpu_transcoder),
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 4/29 drm/i915: Dump 'output_types' in crtc state dump
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well.
v2: Have the caller pass in the buffer (Chris)
#undef OUTPUT_TYPE (Jani)
--- drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
drivers/gpu/drm/i915/intel_display.c +51 -0
@@ -10683,6 +10683,52 @@ intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, m_n->link_m, m_n->link_n, m_n->tu); } +#define OUTPUT_TYPE (x) [INTEL_OUTPUT_ ## x] = #x + +static const char *const output_type_str[] = { +OUTPUT_TYPE (UNUSED ), +OUTPUT_TYPE (ANALOG ), +OUTPUT_TYPE (DVO ), +OUTPUT_TYPE (SDVO ), +OUTPUT_TYPE (LVDS ), +OUTPUT_TYPE (TVOUT ), +OUTPUT_TYPE (HDMI ), +OUTPUT_TYPE (DP ), +OUTPUT_TYPE (EDP ), +OUTPUT_TYPE (DSI ), +OUTPUT_TYPE (UNKNOWN ), +OUTPUT_TYPE (DP_MST ), +}; + +#undef OUTPUT_TYPE + +static void snprintf_output_types (char *buf,size_t len, +unsigned int output_types) +{ +char *str = buf; +int i; + + str[0 ] ='\0' ; + +for (i =0 ; i <ARRAY_SIZE (output_type_str); i++) { +int r; + +if ((output_types &BIT (i)) ==0 ) +continue ; + + r =snprintf (str, len,"%s%s" , + str != buf ?"," :"" , output_type_str[i]); +if (r >= len) +break ; + str += r; + len -= r; + + output_types &= ~BIT (i); + } + +WARN_ON_ONCE (output_types !=0 ); +} +static void intel_dump_pipe_config (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config,const char *context)
@@ -10693,10 +10739,15 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,struct intel_plane *intel_plane;struct intel_plane_state *state;struct drm_framebuffer *fb; +char buf[64 ];DRM_DEBUG_KMS ("[CRTC:%d:%s]%s\n" , crtc->base.base.id, crtc->base.name, context); +snprintf_output_types (buf,sizeof (buf), pipe_config->output_types); +DRM_DEBUG_KMS ("output_types: %s (0x%x)\n" , + buf, pipe_config->output_types); +DRM_DEBUG_KMS ("cpu_transcoder: %s, pipe bpp: %i, dithering: %i\n" ,transcoder_name (pipe_config->cpu_transcoder), pipe_config->pipe_bpp, pipe_config->dither);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/29 drm/i915: Extract intel_ddi_clk_disable()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Pull the code to disable the port clock into a function. We already have the intel_ddi_clk_select() counterpart.
--- drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +16 -8
@@ -2131,6 +2131,21 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder, } } +static void intel_ddi_clk_disable (struct intel_encoder *encoder) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port; + +if (IS_CANNONLAKE (dev_priv)) +I915_WRITE (DPCLKA_CFGCR0 ,I915_READ (DPCLKA_CFGCR0 ) | +DPCLKA_CFGCR0_DDI_CLK_OFF (port)); +else if (IS_GEN9_BC (dev_priv)) +I915_WRITE (DPLL_CTRL2 ,I915_READ (DPLL_CTRL2 ) | +DPLL_CTRL2_DDI_CLK_OFF (port)); +else if (INTEL_GEN (dev_priv) <9 ) +I915_WRITE (PORT_CLK_SEL (port),PORT_CLK_SEL_NONE ); +} + static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, int link_rate, uint32_t lane_count, struct intel_shared_dpll *pll,
@@ -2273,14 +2288,7 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder,if (dig_port)intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); -if (IS_CANNONLAKE (dev_priv)) -I915_WRITE (DPCLKA_CFGCR0 ,I915_READ (DPCLKA_CFGCR0 ) | -DPCLKA_CFGCR0_DDI_CLK_OFF (port)); -else if (IS_GEN9_BC (dev_priv)) -I915_WRITE (DPLL_CTRL2 , (I915_READ (DPLL_CTRL2 ) | -DPLL_CTRL2_DDI_CLK_OFF (port))); -else if (INTEL_GEN (dev_priv) <9 ) -I915_WRITE (PORT_CLK_SEL (port),PORT_CLK_SEL_NONE ); +intel_ddi_clk_disable (intel_encoder);if (type ==INTEL_OUTPUT_HDMI ) {struct intel_hdmi *intel_hdmi =enc_to_intel_hdmi (encoder);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 05/29] drm/i915: Extract intel_ddi_clk_disable()
Quoting Ville Syrjala (2017-09-18 19:25:40)
Quoted 15 lines
From: Ville Syrjälä <[email protected]>
Pull the code to disable the port clock into a function. We already have the
intel_ddi_clk_select()counterpart.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_clk_select(struct intel_encoder *encoder, · line 2137
Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-0@@ -2131,6 +2131,21 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder, } } +static void intel_ddi_clk_disable (struct intel_encoder *encoder) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port;
port was previously intel_ddi_get_encoder_port(encoder).
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_clk_select(struct intel_encoder *encoder, · line 2147
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+ +if (IS_CANNONLAKE (dev_priv)) +I915_WRITE (DPCLKA_CFGCR0 ,I915_READ (DPCLKA_CFGCR0 ) | +DPCLKA_CFGCR0_DDI_CLK_OFF (port)); +else if (IS_GEN9_BC (dev_priv)) +I915_WRITE (DPLL_CTRL2 ,I915_READ (DPLL_CTRL2 ) | +DPLL_CTRL2_DDI_CLK_OFF (port)); +else if (INTEL_GEN (dev_priv) <9 ) +I915_WRITE (PORT_CLK_SEL (port),PORT_CLK_SEL_NONE ); +}
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 05/29] drm/i915: Extract intel_ddi_clk_disable()
Quoted 19 lines · Chris Wilson
Quoting Ville Syrjala (2017-09-18 19:25:40)
Quoted 18 lines
From: Ville Syrjälä <[email protected]>
Pull the code to disable the port clock into a function. We already have the
intel_ddi_clk_select()counterpart.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -2131,6 +2131,21 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder, } }
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_clk_select(struct intel_encoder *encoder, · line 2137
Quoted 4 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-0+static void intel_ddi_clk_disable (struct intel_encoder *encoder) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port;port was previously
intel_ddi_get_encoder_port(encoder).
encoder->port is fine in this case. The main two reasons for the existence of intel_ddi_get_encoder_port() were FDI and MST.
The FDI problem disappeared as soon as we got encoder->port. Previously we only had dig_port->port, and FDI doesn't have a dig_port. In fact we should try to eliminate dig_port->port since it's redundant now.
Hmm. And we even populate encoder->port for the fake MST encoders so even that shouldn't pose a problem anymore. But in this case we actually get passed the "real" DP encoder (ie. mst->primary) so even if encoder->port wasn't populated for the fake MST encoders this would still work.
I have another patch in the series to convert a lot more intel_ddi_get_encoder_port()s into encoder->port. But that patch is near the end, and apparently I already converted some of them along the way.
I guess I should at leaast add some notes to the commit messages whenever I'm doing this.
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+ +if (IS_CANNONLAKE (dev_priv)) +I915_WRITE (DPCLKA_CFGCR0 ,I915_READ (DPCLKA_CFGCR0 ) | +DPCLKA_CFGCR0_DDI_CLK_OFF (port)); +else if (IS_GEN9_BC (dev_priv)) +I915_WRITE (DPLL_CTRL2 ,I915_READ (DPLL_CTRL2 ) | +DPLL_CTRL2_DDI_CLK_OFF (port)); +else if (INTEL_GEN (dev_priv) <9 ) +I915_WRITE (PORT_CLK_SEL (port),PORT_CLK_SEL_NONE ); +}
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/29 drm/i915: Extract intel_disable_ddi_buf()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Extract the code to disable the DDI_BUF_CTL into small helper. This will allows us to detangle the encoder type mess in intel_ddi_post_disable().
--- drivers/gpu/drm/i915/intel_ddi.c | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +24 -17
@@ -2238,25 +2238,12 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder, } } -static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) +static void intel_disable_ddi_buf (struct intel_encoder *encoder) { -struct drm_encoder *encoder = &intel_encoder->base; -struct drm_i915_private *dev_priv =to_i915 (encoder->dev); -enum port port =intel_ddi_get_encoder_port (intel_encoder); -struct intel_digital_port *dig_port =enc_to_dig_port (encoder); -int type = intel_encoder->type; -uint32_t val; +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port;bool wait = false; - -/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ - -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); - -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); - } +u32 val; val =I915_READ (DDI_BUF_CTL (port));if (val &DDI_BUF_CTL_ENABLE ) {
@@ -2272,6 +2259,26 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder,if (wait)intel_wait_ddi_buf_idle (dev_priv, port); +} + +static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +struct drm_encoder *encoder = &intel_encoder->base; +struct drm_i915_private *dev_priv =to_i915 (encoder->dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +int type = intel_encoder->type; + +/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ + +if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); + +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); + } + +intel_disable_ddi_buf (intel_encoder);if (type ==INTEL_OUTPUT_HDMI ) { dig_port->set_infoframes(encoder, false,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 06/29] drm/i915: Extract intel_disable_ddi_buf()
Quoted 7 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Extract the code to disable the
DDI_BUF_CTLinto small helper. This will allows us to detangle the encoder type mess inintel_ddi_post_disable().Signed-off-by Ville Syrjälä <[email protected]>
Quoted 65 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +24
-17@@ -2238,25 +2238,12 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder, } } -static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) +static void intel_disable_ddi_buf (struct intel_encoder *encoder) { -struct drm_encoder *encoder = &intel_encoder->base; -struct drm_i915_private *dev_priv =to_i915 (encoder->dev); -enum port port =intel_ddi_get_encoder_port (intel_encoder); -struct intel_digital_port *dig_port =enc_to_dig_port (encoder); -int type = intel_encoder->type; -uint32_t val; +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port;bool wait = false; - -/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ - -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); - -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); - } +u32 val; val =I915_READ (DDI_BUF_CTL (port));if (val &DDI_BUF_CTL_ENABLE ) {@@ -2272,6 +2259,26 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder,if (wait)intel_wait_ddi_buf_idle (dev_priv, port); +} + +static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +struct drm_encoder *encoder = &intel_encoder->base; +struct drm_i915_private *dev_priv =to_i915 (encoder->dev); +struct intel_digital_port *dig_port =enc_to_dig_port (encoder); +int type = intel_encoder->type; + +/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ + +if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { +struct intel_dp *intel_dp =enc_to_intel_dp (encoder); + +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); + } + +intel_disable_ddi_buf (intel_encoder);if (type ==INTEL_OUTPUT_HDMI ) { dig_port->set_infoframes(encoder, false,
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/29 drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
To untangle the mess that is intel_ddi_post_disable() move the the bits needed by FDI into intel_ddi_fdi_post_disable(). This way we can stop worrying about FDI in intel_ddi_post_disable().
--- drivers/gpu/drm/i915/intel_ddi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ddi.c +2 -1
@@ -2321,7 +2321,8 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder, val &= ~FDI_RX_ENABLE ;I915_WRITE (FDI_RX_CTL (PIPE_A ), val); -intel_ddi_post_disable (encoder, old_crtc_state, old_conn_state); +intel_disable_ddi_buf (encoder); +intel_ddi_clk_disable (encoder); val =I915_READ (FDI_RX_MISC (PIPE_A )); val &= ~(FDI_RX_PWRDN_LANE1_MASK |FDI_RX_PWRDN_LANE0_MASK );
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/29] drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable()
Quoted 7 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
To untangle the mess that is
intel_ddi_post_disable()move the the bits needed by FDI intointel_ddi_fdi_post_disable(). This way we can stop worrying about FDI inintel_ddi_post_disable().Signed-off-by Ville Syrjälä <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_ddi.c +2
-1@@ -2321,7 +2321,8 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder, val &= ~FDI_RX_ENABLE ;I915_WRITE (FDI_RX_CTL (PIPE_A ), val); -intel_ddi_post_disable (encoder, old_crtc_state, old_conn_state); +intel_disable_ddi_buf (encoder); +intel_ddi_clk_disable (encoder); val =I915_READ (FDI_RX_MISC (PIPE_A )); val &= ~(FDI_RX_PWRDN_LANE1_MASK |FDI_RX_PWRDN_LANE0_MASK );
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/29 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
To clean up the mess in intel_ddi_post_disable() split it into two clean variants for HDMI and DP.
--- drivers/gpu/drm/i915/intel_ddi.c | 69 +++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +40 -29
@@ -2261,47 +2261,58 @@ static void intel_disable_ddi_buf(struct intel_encoder *encoder)intel_wait_ddi_buf_idle (dev_priv, port); } -static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) +static void intel_ddi_post_disable_dp (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) { -struct drm_encoder *encoder = &intel_encoder->base; -struct drm_i915_private *dev_priv =to_i915 (encoder->dev); -struct intel_digital_port *dig_port =enc_to_dig_port (encoder); -int type = intel_encoder->type; +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +struct intel_dp *intel_dp = &dig_port->dp; -/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +intel_disable_ddi_buf (encoder); -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); - } +intel_edp_panel_vdd_on (intel_dp); +intel_edp_panel_off (intel_dp); -intel_disable_ddi_buf (intel_encoder); +intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); -if (type ==INTEL_OUTPUT_HDMI ) { - dig_port->set_infoframes (encoder, false, - old_crtc_state, old_conn_state); - } +intel_ddi_clk_disable (encoder); +} -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +static void intel_ddi_post_disable_hdmi (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +struct intel_hdmi *intel_hdmi = &dig_port->hdmi; -intel_edp_panel_vdd_on (intel_dp); -intel_edp_panel_off (intel_dp); - } +intel_disable_ddi_buf (encoder); -if (dig_port) -intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); + dig_port->set_infoframes (&encoder->base, false, + old_crtc_state, old_conn_state); -intel_ddi_clk_disable (intel_encoder); +intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); -if (type ==INTEL_OUTPUT_HDMI ) { -struct intel_hdmi *intel_hdmi =enc_to_intel_hdmi (encoder); +intel_ddi_clk_disable (encoder); -intel_dp_dual_mode_set_tmds_output (intel_hdmi, false); - } +intel_dp_dual_mode_set_tmds_output (intel_hdmi, false); +} + +static void intel_ddi_post_disable (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ +if (old_crtc_state && +intel_crtc_has_type (old_crtc_state,INTEL_OUTPUT_HDMI )) +intel_ddi_post_disable_hdmi (encoder, + old_crtc_state, old_conn_state); +else +intel_ddi_post_disable_dp (encoder, + old_crtc_state, old_conn_state); } void intel_ddi_fdi_post_disable(struct intel_encoder *encoder,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 08/29] drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants
Quoted 6 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
To clean up the mess in
intel_ddi_post_disable()split it into two clean variants for HDMI and DP.Signed-off-by Ville Syrjälä <[email protected]>
Quoted 96 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 69 +++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 29 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +40
-29@@ -2261,47 +2261,58 @@ static void intel_disable_ddi_buf(struct intel_encoder *encoder)intel_wait_ddi_buf_idle (dev_priv, port); } -static void intel_ddi_post_disable (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) +static void intel_ddi_post_disable_dp (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) { -struct drm_encoder *encoder = &intel_encoder->base; -struct drm_i915_private *dev_priv =to_i915 (encoder->dev); -struct intel_digital_port *dig_port =enc_to_dig_port (encoder); -int type = intel_encoder->type; +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +struct intel_dp *intel_dp = &dig_port->dp; -/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ +intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +intel_disable_ddi_buf (encoder); -intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); - } +intel_edp_panel_vdd_on (intel_dp); +intel_edp_panel_off (intel_dp); -intel_disable_ddi_buf (intel_encoder); +intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); -if (type ==INTEL_OUTPUT_HDMI ) { - dig_port->set_infoframes (encoder, false, - old_crtc_state, old_conn_state); - } +intel_ddi_clk_disable (encoder); +} -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +static void intel_ddi_post_disable_hdmi (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +struct intel_hdmi *intel_hdmi = &dig_port->hdmi; -intel_edp_panel_vdd_on (intel_dp); -intel_edp_panel_off (intel_dp); - } +intel_disable_ddi_buf (encoder); -if (dig_port) -intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); + dig_port->set_infoframes (&encoder->base, false, + old_crtc_state, old_conn_state); -intel_ddi_clk_disable (intel_encoder); +intel_display_power_put (dev_priv, dig_port->ddi_io_power_domain); -if (type ==INTEL_OUTPUT_HDMI ) { -struct intel_hdmi *intel_hdmi =enc_to_intel_hdmi (encoder); +intel_ddi_clk_disable (encoder); -intel_dp_dual_mode_set_tmds_output (intel_hdmi, false); - } +intel_dp_dual_mode_set_tmds_output (intel_hdmi, false); +} + +static void intel_ddi_post_disable (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +/* old_crtc_state and old_conn_state are NULL when called from DP_MST */ +if (old_crtc_state && +intel_crtc_has_type (old_crtc_state,INTEL_OUTPUT_HDMI )) +intel_ddi_post_disable_hdmi (encoder, + old_crtc_state, old_conn_state); +else +intel_ddi_post_disable_dp (encoder, + old_crtc_state, old_conn_state); } void intel_ddi_fdi_post_disable(struct intel_encoder *encoder,
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/29 drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
intel_edp_panel_on() will itself do the is_edp() check, so the caller doesn't have to bother. Pre-DDI code doesn't bother, so let's follow the same approach for DDI.
--- drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +2 -2
@@ -2161,8 +2161,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_set_link_params (intel_dp, link_rate, lane_count, link_mst); -if (encoder->type ==INTEL_OUTPUT_EDP ) -intel_edp_panel_on (intel_dp); + +intel_edp_panel_on (intel_dp);intel_ddi_clk_select (encoder, pll);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 09/29] drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()
Quoted 7 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
intel_edp_panel_on()will itself do theis_edp()check, so the caller doesn't have to bother. Pre-DDI code doesn't bother, so let's follow the same approach for DDI.Signed-off-by Ville Syrjälä <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +2
-2@@ -2161,8 +2161,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_set_link_params (intel_dp, link_rate, lane_count, link_mst); -if (encoder->type ==INTEL_OUTPUT_EDP ) -intel_edp_panel_on (intel_dp); + +intel_edp_panel_on (intel_dp);intel_ddi_clk_select (encoder, pll);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/29 drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Untangle intel_disable_ddi() by splitting it into DP and HDMI specific variants.
--- drivers/gpu/drm/i915/intel_ddi.c | 45 +++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +28 -17
@@ -2390,29 +2390,40 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder,intel_audio_codec_enable (intel_encoder, pipe_config, conn_state); } -static void intel_disable_ddi (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *old_crtc_state, -const struct drm_connector_state *old_conn_state) +static void intel_disable_ddi_dp (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) { -struct drm_encoder *encoder = &intel_encoder->base; -int type = intel_encoder->type; +struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);if (old_crtc_state->has_audio) -intel_audio_codec_disable (intel_encoder); +intel_audio_codec_disable (encoder); -if (type ==INTEL_OUTPUT_HDMI ) { -intel_hdmi_handle_sink_scrambling (intel_encoder, - old_conn_state->connector, - false, false); - } +intel_edp_drrs_disable (intel_dp, old_crtc_state); +intel_psr_disable (intel_dp, old_crtc_state); +intel_edp_backlight_off (old_conn_state); +} -if (type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +static void intel_disable_ddi_hdmi (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +if (old_crtc_state->has_audio) +intel_audio_codec_disable (encoder); -intel_edp_drrs_disable (intel_dp, old_crtc_state); -intel_psr_disable (intel_dp, old_crtc_state); -intel_edp_backlight_off (old_conn_state); - } +intel_hdmi_handle_sink_scrambling (encoder, + old_conn_state->connector, + false, false); +} + +static void intel_disable_ddi (struct intel_encoder *encoder, +const struct intel_crtc_state *old_crtc_state, +const struct drm_connector_state *old_conn_state) +{ +if (intel_crtc_has_type (old_crtc_state,INTEL_OUTPUT_HDMI )) +intel_disable_ddi_hdmi (encoder, old_crtc_state, old_conn_state); +else +intel_disable_ddi_dp (encoder, old_crtc_state, old_conn_state); } static void bxt_ddi_pre_pll_enable(struct intel_encoder *encoder,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/29 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Rather that plump the link parameters separately to intel_ddi_pre_enable_dp() let's just pass the entire crtc state.
intel_ddi_pre_enable_hdmi() already took the crtc state, but for some reason intel_ddi_pre_enable() still wanted to extract has_infoframe from therein and pass it in separately. Let's not do that since it's pointless.
--- drivers/gpu/drm/i915/intel_ddi.c | 44 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 29 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +15 -29
@@ -2147,24 +2147,24 @@ static void intel_ddi_clk_disable(struct intel_encoder *encoder) }static void intel_ddi_pre_enable_dp (struct intel_encoder *encoder, -int link_rate,uint32_t lane_count, -struct intel_shared_dpll *pll, -bool link_mst) +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state) {struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);enum port port =intel_ddi_get_encoder_port (encoder);struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +bool is_mst =intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DP_MST );uint32_t level =intel_ddi_dp_level (intel_dp); -WARN_ON (link_mst && (port ==PORT_A || port ==PORT_E )); +WARN_ON (is_mst && (port ==PORT_A || port ==PORT_E )); -intel_dp_set_link_params (intel_dp, link_rate, lane_count, - link_mst); +intel_dp_set_link_params (intel_dp, crtc_state->port_clock, + crtc_state->lane_count, is_mst);intel_edp_panel_on (intel_dp); -intel_ddi_clk_select (encoder, pll); +intel_ddi_clk_select (encoder, crtc_state->shared_dpll);intel_display_power_get (dev_priv, dig_port->ddi_io_power_domain);
@@ -2183,10 +2183,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, }static void intel_ddi_pre_enable_hdmi (struct intel_encoder *encoder, -bool has_infoframe,const struct intel_crtc_state *crtc_state, -const struct drm_connector_state *conn_state, -const struct intel_shared_dpll *pll) +const struct drm_connector_state *conn_state) {struct intel_digital_port *intel_dig_port =enc_to_dig_port (&encoder->base);struct intel_hdmi *intel_hdmi = &intel_dig_port->hdmi;
@@ -2196,7 +2194,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);intel_dp_dual_mode_set_tmds_output (intel_hdmi, true); -intel_ddi_clk_select (encoder, pll); +intel_ddi_clk_select (encoder, crtc_state->shared_dpll);intel_display_power_get (dev_priv, dig_port->ddi_io_power_domain);
@@ -2212,30 +2210,18 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,skl_ddi_set_iboost (encoder, level); intel_dig_port->set_infoframes (&encoder->base, - has_infoframe, + crtc_state->has_infoframe, crtc_state, conn_state); }static void intel_ddi_pre_enable (struct intel_encoder *encoder, -const struct intel_crtc_state *pipe_config, +const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state) { -int type = encoder->type; - -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP ) { -intel_ddi_pre_enable_dp (encoder, - pipe_config->port_clock, - pipe_config->lane_count, - pipe_config->shared_dpll, -intel_crtc_has_type (pipe_config, -INTEL_OUTPUT_DP_MST )); - } -if (type ==INTEL_OUTPUT_HDMI ) { -intel_ddi_pre_enable_hdmi (encoder, - pipe_config->has_infoframe, - pipe_config, conn_state, - pipe_config->shared_dpll); - } +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) +intel_ddi_pre_enable_hdmi (encoder, crtc_state, conn_state); +else +intel_ddi_pre_enable_dp (encoder, crtc_state, conn_state); }static void intel_disable_ddi_buf (struct intel_encoder *encoder)
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 12/29 drm/i915: Split intel_enable_ddi() into DP and HDMI variants
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Untangle intel_enable_ddi() by splitting it into DP and HDMI specific variants.
--- drivers/gpu/drm/i915/intel_ddi.c | 80 +++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +46 -34
@@ -2335,45 +2335,57 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder,I915_WRITE (FDI_RX_CTL (PIPE_A ), val); } -static void intel_enable_ddi (struct intel_encoder *intel_encoder, -const struct intel_crtc_state *pipe_config, -const struct drm_connector_state *conn_state) +static void intel_enable_ddi_dp (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state) { -struct drm_encoder *encoder = &intel_encoder->base; -struct drm_i915_private *dev_priv =to_i915 (encoder->dev); -enum port port =intel_ddi_get_encoder_port (intel_encoder); -int type = intel_encoder->type; +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base); +enum port port = encoder->port; -if (type ==INTEL_OUTPUT_HDMI ) { -struct intel_digital_port *intel_dig_port = -enc_to_dig_port (encoder); -bool clock_ratio = pipe_config->hdmi_high_tmds_clock_ratio; -bool scrambling = pipe_config->hdmi_scrambling; - -intel_hdmi_handle_sink_scrambling (intel_encoder, - conn_state->connector, - clock_ratio, scrambling); - -/* In HDMI/DVI mode, the port width, and swing/emphasis values -* are ignored so nothing special needs to be done besides -* enabling the port. -*/ -I915_WRITE (DDI_BUF_CTL (port), - intel_dig_port->saved_port_bits | -DDI_BUF_CTL_ENABLE ); - }else if (type ==INTEL_OUTPUT_EDP ) { -struct intel_dp *intel_dp =enc_to_intel_dp (encoder); +if (port ==PORT_A &&INTEL_GEN (dev_priv) <9 ) +intel_dp_stop_link_train (intel_dp); -if (port ==PORT_A &&INTEL_GEN (dev_priv) <9 ) -intel_dp_stop_link_train (intel_dp); +intel_edp_backlight_on (crtc_state, conn_state); +intel_psr_enable (intel_dp, crtc_state); +intel_edp_drrs_enable (intel_dp, crtc_state); -intel_edp_backlight_on (pipe_config, conn_state); -intel_psr_enable (intel_dp, pipe_config); -intel_edp_drrs_enable (intel_dp, pipe_config); - } +if (crtc_state->has_audio) +intel_audio_codec_enable (encoder, crtc_state, conn_state); +} -if (pipe_config->has_audio) -intel_audio_codec_enable (intel_encoder, pipe_config, conn_state); +static void intel_enable_ddi_hdmi (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state) +{ +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base); +enum port port = encoder->port; + +intel_hdmi_handle_sink_scrambling (encoder, + conn_state->connector, + crtc_state->hdmi_high_tmds_clock_ratio, + crtc_state->hdmi_scrambling); + +/* In HDMI/DVI mode, the port width, and swing/emphasis values +* are ignored so nothing special needs to be done besides +* enabling the port. +*/ +I915_WRITE (DDI_BUF_CTL (port), + dig_port->saved_port_bits |DDI_BUF_CTL_ENABLE ); + +if (crtc_state->has_audio) +intel_audio_codec_enable (encoder, crtc_state, conn_state); +} + +static void intel_enable_ddi (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state) +{ +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) +intel_enable_ddi_hdmi (encoder, crtc_state, conn_state); +else +intel_enable_ddi_dp (encoder, crtc_state, conn_state); } static void intel_disable_ddi_dp(struct intel_encoder *encoder,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 13/29 drm/i915: Relocate intel_ddi_get_buf_trans_*() functions
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
We'll want to use the intel_ddi_get_buf_trans_*() functions a bit earlier in the file, so move them up. While at it start using them in the iboost setup to get rid of the platform checks there.
--- drivers/gpu/drm/i915/intel_ddi.c | 115 +++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 60 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +55 -60
@@ -588,6 +588,59 @@ skl_get_buf_trans_hdmi(struct drm_i915_private *dev_priv, int *n_entries) } } +static const struct ddi_buf_trans * +intel_ddi_get_buf_trans_dp (struct drm_i915_private *dev_priv, +int *n_entries) +{ +if (IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv)) { +return kbl_get_buf_trans_dp (dev_priv, n_entries); + }else if (IS_SKYLAKE (dev_priv)) { +return skl_get_buf_trans_dp (dev_priv, n_entries); + }else if (IS_BROADWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (bdw_ddi_translations_dp); +return bdw_ddi_translations_dp; + }else if (IS_HASWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (hsw_ddi_translations_dp); +return hsw_ddi_translations_dp; + } + + *n_entries =0 ; +return NULL ; +} + +static const struct ddi_buf_trans * +intel_ddi_get_buf_trans_edp (struct drm_i915_private *dev_priv, +int *n_entries) +{ +if (IS_GEN9_BC (dev_priv)) { +return skl_get_buf_trans_edp (dev_priv, n_entries); + }else if (IS_BROADWELL (dev_priv)) { +return bdw_get_buf_trans_edp (dev_priv, n_entries); + }else if (IS_HASWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (hsw_ddi_translations_dp); +return hsw_ddi_translations_dp; + } + + *n_entries =0 ; +return NULL ; +} + +static const struct ddi_buf_trans * +intel_ddi_get_buf_trans_fdi (struct drm_i915_private *dev_priv, +int *n_entries) +{ +if (IS_BROADWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (hsw_ddi_translations_fdi); +return hsw_ddi_translations_fdi; + }else if (IS_HASWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (hsw_ddi_translations_fdi); +return hsw_ddi_translations_fdi; + } + + *n_entries =0 ; +return NULL ; +} +static const struct cnl_ddi_buf_trans *cnl_get_buf_trans_hdmi (struct drm_i915_private *dev_priv,int *n_entries) {
@@ -686,59 +739,6 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port porreturn hdmi_level; } -static const struct ddi_buf_trans * -intel_ddi_get_buf_trans_dp (struct drm_i915_private *dev_priv, -int *n_entries) -{ -if (IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv)) { -return kbl_get_buf_trans_dp (dev_priv, n_entries); - }else if (IS_SKYLAKE (dev_priv)) { -return skl_get_buf_trans_dp (dev_priv, n_entries); - }else if (IS_BROADWELL (dev_priv)) { - *n_entries =ARRAY_SIZE (bdw_ddi_translations_dp); -return bdw_ddi_translations_dp; - }else if (IS_HASWELL (dev_priv)) { - *n_entries =ARRAY_SIZE (hsw_ddi_translations_dp); -return hsw_ddi_translations_dp; - } - - *n_entries =0 ; -return NULL ; -} - -static const struct ddi_buf_trans * -intel_ddi_get_buf_trans_edp (struct drm_i915_private *dev_priv, -int *n_entries) -{ -if (IS_GEN9_BC (dev_priv)) { -return skl_get_buf_trans_edp (dev_priv, n_entries); - }else if (IS_BROADWELL (dev_priv)) { -return bdw_get_buf_trans_edp (dev_priv, n_entries); - }else if (IS_HASWELL (dev_priv)) { - *n_entries =ARRAY_SIZE (hsw_ddi_translations_dp); -return hsw_ddi_translations_dp; - } - - *n_entries =0 ; -return NULL ; -} - -static const struct ddi_buf_trans * -intel_ddi_get_buf_trans_fdi (struct drm_i915_private *dev_priv, -int *n_entries) -{ -if (IS_BROADWELL (dev_priv)) { - *n_entries =ARRAY_SIZE (hsw_ddi_translations_fdi); -return hsw_ddi_translations_fdi; - }else if (IS_HASWELL (dev_priv)) { - *n_entries =ARRAY_SIZE (hsw_ddi_translations_fdi); -return hsw_ddi_translations_fdi; - } - - *n_entries =0 ; -return NULL ; -} -/* * Starting with Haswell, DDI port buffers must be programmed with correct * values in advance. This function programs the correct values for
@@ -1791,19 +1791,14 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { -if (IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv)) - ddi_translations =kbl_get_buf_trans_dp (dev_priv, - &n_entries); -else - ddi_translations =skl_get_buf_trans_dp (dev_priv, - &n_entries); + ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_edp (dev_priv, &n_entries); + ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, &n_entries);if (WARN_ON (port !=PORT_A && port !=PORT_E && n_entries >9 ))
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 14/29 drm/i915: Extract intel_ddi_get_buf_trans_hdmi()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Introduce intel_ddi_get_buf_trans_hdmi() and start using it where we can.
--- drivers/gpu/drm/i915/intel_ddi.c | 50 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +28 -22
@@ -641,6 +641,24 @@ intel_ddi_get_buf_trans_fdi(struct drm_i915_private *dev_priv,return NULL ; } +static const struct ddi_buf_trans * +intel_ddi_get_buf_trans_hdmi (struct drm_i915_private *dev_priv, +int *n_entries) +{ +if (IS_GEN9_BC (dev_priv)) { +return skl_get_buf_trans_hdmi (dev_priv, n_entries); + }else if (IS_BROADWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); +return bdw_ddi_translations_hdmi; + }else if (IS_HASWELL (dev_priv)) { + *n_entries =ARRAY_SIZE (hsw_ddi_translations_hdmi); +return hsw_ddi_translations_hdmi; + } + + *n_entries =0 ; +return NULL ; +} +static const struct cnl_ddi_buf_trans *cnl_get_buf_trans_hdmi (struct drm_i915_private *dev_priv,int *n_entries) {
@@ -717,18 +735,17 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port porcnl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry = n_hdmi_entries -1 ; }else if (IS_GEN9_BC (dev_priv)) { -skl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry =8 ; }else if (IS_BROADWELL (dev_priv)) { - n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry =7 ; }else if (IS_HASWELL (dev_priv)) { - n_hdmi_entries =ARRAY_SIZE (hsw_ddi_translations_hdmi); +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry =6 ; }else {WARN (1 ,"ddi translation table missing\n" ); - n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); - hdmi_default_entry =7 ; +return 0 ; }/* Choose a good default if VBT is badly populated */
@@ -804,23 +821,12 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder) hdmi_level =intel_ddi_hdmi_level (dev_priv, port); -if (IS_GEN9_BC (dev_priv)) { - ddi_translations_hdmi =skl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); + ddi_translations_hdmi =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); -/* If we're boosting the current, set bit 31 of trans1 */ -if (dev_priv->vbt.ddi_port_info[port].hdmi_boost_level) - iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; - }else if (IS_BROADWELL (dev_priv)) { - ddi_translations_hdmi = bdw_ddi_translations_hdmi; - n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); - }else if (IS_HASWELL (dev_priv)) { - ddi_translations_hdmi = hsw_ddi_translations_hdmi; - n_hdmi_entries =ARRAY_SIZE (hsw_ddi_translations_hdmi); - }else { -WARN (1 ,"ddi translation table missing\n" ); - ddi_translations_hdmi = bdw_ddi_translations_hdmi; - n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); - } +/* If we're boosting the current, set bit 31 of trans1 */ +if (IS_GEN9_BC (dev_priv) && + dev_priv->vbt.ddi_port_info[port].hdmi_boost_level) + iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ;/* Entry 9 is for HDMI: */ I915_WRITE(DDI_BUF_TRANS_LO(port, 9),
@@ -1810,7 +1816,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (hdmi_iboost) { iboost = hdmi_iboost; }else { - ddi_translations =skl_get_buf_trans_hdmi (dev_priv, &n_entries); + ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); iboost = ddi_translations[level].i_boost; } }else {
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 15/29 drm/i915: Pass the encoder type explicitly to skl_set_iboost()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
encoder->type isn't reliable for DP/HDMI encoders, so pass the type explicity to skl_set_iboost(). Also take the opportunity to streamline the code.
--- drivers/gpu/drm/i915/intel_ddi.c | 57 ++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 35 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +22 -35
@@ -1778,49 +1778,36 @@ static void _skl_ddi_set_iboost(struct drm_i915_private *dev_priv,I915_WRITE (DISPIO_CR_TX_BMU_CR0 , tmp); } -static void skl_ddi_set_iboost (struct intel_encoder *encoder,u32 level) +static void skl_ddi_set_iboost (struct intel_encoder *encoder, +u32 level,int type) {struct intel_digital_port *intel_dig_port =enc_to_dig_port (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (intel_dig_port->base.base.dev);enum port port = intel_dig_port->port; -int type = encoder->type; -const struct ddi_buf_trans *ddi_translations;uint8_t iboost; -uint8_t dp_iboost, hdmi_iboost; -int n_entries; -/* VBT may override standard boost values */ - dp_iboost = dev_priv->vbt.ddi_port_info[port].dp_boost_level; - hdmi_iboost = dev_priv->vbt.ddi_port_info[port].hdmi_boost_level; +if (type ==INTEL_OUTPUT_HDMI ) + iboost = dev_priv->vbt.ddi_port_info[port].hdmi_boost_level; +else + iboost = dev_priv->vbt.ddi_port_info[port].dp_boost_level; -if (type ==INTEL_OUTPUT_DP ) { -if (dp_iboost) { - iboost = dp_iboost; - }else { - ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); - iboost = ddi_translations[level].i_boost; - } - }else if (type ==INTEL_OUTPUT_EDP ) { -if (dp_iboost) { - iboost = dp_iboost; - }else { +if (iboost ==0 ) { +const struct ddi_buf_trans *ddi_translations; +int n_entries; + +if (type ==INTEL_OUTPUT_HDMI ) + ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); +else if (type ==INTEL_OUTPUT_EDP ) ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, &n_entries); +else + ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); -if (WARN_ON (port !=PORT_A && - port !=PORT_E && n_entries >9 )) - n_entries =9 ; +if (WARN_ON (type !=INTEL_OUTPUT_HDMI && + port !=PORT_A && + port !=PORT_E && n_entries >9 )) + n_entries =9 ; - iboost = ddi_translations[level].i_boost; - } - }else if (type ==INTEL_OUTPUT_HDMI ) { -if (hdmi_iboost) { - iboost = hdmi_iboost; - }else { - ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); - iboost = ddi_translations[level].i_boost; - } - }else { -return ; + iboost = ddi_translations[level].i_boost; }/* Make sure that the requested I_boost is valid */
@@ -2086,7 +2073,7 @@ uint32_t ddi_signal_levels(struct intel_dp *intel_dp)uint32_t level =intel_ddi_dp_level (intel_dp);if (IS_GEN9_BC (dev_priv)) -skl_ddi_set_iboost (encoder, level); +skl_ddi_set_iboost (encoder, level, encoder->type);return DDI_BUF_TRANS_SELECT (level); }
@@ -2208,7 +2195,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,intel_prepare_hdmi_ddi_buffers (encoder);if (IS_GEN9_BC (dev_priv)) -skl_ddi_set_iboost (encoder, level); +skl_ddi_set_iboost (encoder, level,INTEL_OUTPUT_HDMI ); intel_dig_port->set_infoframes(&encoder->base, crtc_state->has_infoframe,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 16/29 drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
The caller of intel_prepare_hdmi_ddi_buffers() alreday figured out the level, so let's just pass it in instead if figuring it out again.
--- drivers/gpu/drm/i915/intel_ddi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +4 -5
@@ -811,16 +811,15 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)* values in advance. This function programs the correct values for * HDMI/DVI use cases. */ -static void intel_prepare_hdmi_ddi_buffers (struct intel_encoder *encoder) +static void intel_prepare_hdmi_ddi_buffers (struct intel_encoder *encoder, +int hdmi_level) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ; -int n_hdmi_entries, hdmi_level; +int n_hdmi_entries;enum port port =intel_ddi_get_encoder_port (encoder);const struct ddi_buf_trans *ddi_translations_hdmi; - hdmi_level =intel_ddi_hdmi_level (dev_priv, port); - ddi_translations_hdmi =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries);/* If we're boosting the current, set bit 31 of trans1 */
@@ -2192,7 +2191,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,bxt_ddi_vswing_sequence (dev_priv, level, port,INTEL_OUTPUT_HDMI ); else -intel_prepare_hdmi_ddi_buffers (encoder ); +intel_prepare_hdmi_ddi_buffers (encoder ,level );if (IS_GEN9_BC (dev_priv))skl_ddi_set_iboost (encoder, level,INTEL_OUTPUT_HDMI );
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 17/29 drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Make BXT less special by following the CNL approach and handling it in intel_ddi_dp_voltage_max() alognside every other DDI platform.
--- drivers/gpu/drm/i915/intel_ddi.c | 69 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_dp.c | 4 +-- 2 files changed, 46 insertions(+), 27 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +45 -24
@@ -659,6 +659,31 @@ intel_ddi_get_buf_trans_hdmi(struct drm_i915_private *dev_priv,return NULL ; } +static const struct bxt_ddi_buf_trans * +bxt_get_buf_trans_dp (struct drm_i915_private *dev_priv,int *n_entries) +{ + *n_entries =ARRAY_SIZE (bxt_ddi_translations_dp); +return bxt_ddi_translations_dp; +} + +static const struct bxt_ddi_buf_trans * +bxt_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) +{ +if (dev_priv->vbt.edp.low_vswing) { + *n_entries =ARRAY_SIZE (bxt_ddi_translations_edp); +return bxt_ddi_translations_edp; + } + +return bxt_get_buf_trans_dp (dev_priv, n_entries); +} + +static const struct bxt_ddi_buf_trans * +bxt_get_buf_trans_hdmi (struct drm_i915_private *dev_priv,int *n_entries) +{ + *n_entries =ARRAY_SIZE (bxt_ddi_translations_hdmi); +return bxt_ddi_translations_hdmi; +} +static const struct cnl_ddi_buf_trans *cnl_get_buf_trans_hdmi (struct drm_i915_private *dev_priv,int *n_entries) {
@@ -1821,27 +1846,20 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder,_skl_ddi_set_iboost (dev_priv,PORT_E , iboost); } -static void bxt_ddi_vswing_sequence (struct drm_i915_private *dev_priv, -u32 level,enum port port,int type) +static void bxt_ddi_vswing_sequence (struct intel_encoder *encoder, +int level,int type) { +struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);const struct bxt_ddi_buf_trans *ddi_translations; -u32 n_entries, i; - -if (type ==INTEL_OUTPUT_EDP && dev_priv->vbt.edp.low_vswing) { - n_entries =ARRAY_SIZE (bxt_ddi_translations_edp); - ddi_translations = bxt_ddi_translations_edp; - }else if (type ==INTEL_OUTPUT_DP - || type ==INTEL_OUTPUT_EDP ) { - n_entries =ARRAY_SIZE (bxt_ddi_translations_dp); - ddi_translations = bxt_ddi_translations_dp; - }else if (type ==INTEL_OUTPUT_HDMI ) { - n_entries =ARRAY_SIZE (bxt_ddi_translations_hdmi); - ddi_translations = bxt_ddi_translations_hdmi; - }else { -DRM_DEBUG_KMS ("Vswing programming not done for encoder %d\n" , - type); -return ; - } +enum port port = encoder->port; +int n_entries, i; + +if (type ==INTEL_OUTPUT_HDMI ) + ddi_translations =bxt_get_buf_trans_hdmi (dev_priv, &n_entries); +else if (type ==INTEL_OUTPUT_EDP ) + ddi_translations =bxt_get_buf_trans_edp (dev_priv, &n_entries); +else + ddi_translations =bxt_get_buf_trans_dp (dev_priv, &n_entries);/* Check if default value has to be used */ if (level >= n_entries ||
@@ -1871,6 +1889,11 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder)cnl_get_buf_trans_edp (dev_priv, &n_entries); else cnl_get_buf_trans_dp(dev_priv, &n_entries); + }else if (IS_GEN9_LP (dev_priv)) { +if (encoder->type ==INTEL_OUTPUT_EDP ) +bxt_get_buf_trans_edp (dev_priv, &n_entries); +else +bxt_get_buf_trans_dp (dev_priv, &n_entries); }else {if (encoder->type ==INTEL_OUTPUT_EDP )intel_ddi_get_buf_trans_edp (dev_priv, &n_entries);
@@ -2053,13 +2076,12 @@ u32 bxt_signal_levels(struct intel_dp *intel_dp)struct intel_digital_port *dport =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev);struct intel_encoder *encoder = &dport->base; -enum port port = dport->port;u32 level =intel_ddi_dp_level (intel_dp);if (IS_CANNONLAKE (dev_priv))cnl_ddi_vswing_sequence (encoder, level);else -bxt_ddi_vswing_sequence (dev_priv, level, port, encoder->type); +bxt_ddi_vswing_sequence (encoder, level, encoder->type);return 0 ; }
@@ -2158,7 +2180,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,if (IS_CANNONLAKE (dev_priv))cnl_ddi_vswing_sequence (encoder, level);else if (IS_GEN9_LP (dev_priv)) -bxt_ddi_vswing_sequence (dev_priv, level, port, encoder->type); +bxt_ddi_vswing_sequence (encoder, level, encoder->type);else intel_prepare_dp_ddi_buffers (encoder);
@@ -2188,8 +2210,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,if (IS_CANNONLAKE (dev_priv))cnl_ddi_vswing_sequence (encoder, level);else if (IS_GEN9_LP (dev_priv)) -bxt_ddi_vswing_sequence (dev_priv, level, port, -INTEL_OUTPUT_HDMI ); +bxt_ddi_vswing_sequence (encoder, level,INTEL_OUTPUT_HDMI );else intel_prepare_hdmi_ddi_buffers (encoder, level);
drivers/gpu/drm/i915/intel_dp.c +1 -3
@@ -3147,9 +3147,7 @@ intel_dp_voltage_max(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv =to_i915 (intel_dp_to_dev (intel_dp));enum port port =dp_to_dig_port (intel_dp)->port; -if (IS_GEN9_LP (dev_priv)) -return DP_TRAIN_VOLTAGE_SWING_LEVEL_3 ; -else if (INTEL_GEN (dev_priv) >=9 ) { +if (INTEL_GEN (dev_priv) >=9 ) {struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;return intel_ddi_dp_voltage_max (encoder); }else if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv))
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 18/29 drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
encoder->type is unreliable for DP/HDMI, so pass it in explicity into cnl_ddi_vswing_sequence(). This matches what we do for BXT.
--- drivers/gpu/drm/i915/intel_ddi.c | 43 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +19 -24
@@ -1914,16 +1914,15 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv, u32 level, enum port port, int type) { const struct cnl_ddi_buf_trans *ddi_translations = NULL; -u32 n_entries, val; -int ln; +int n_entries, ln; +u32 val; -if (type ==INTEL_OUTPUT_HDMI ) { +if (type ==INTEL_OUTPUT_HDMI ) ddi_translations =cnl_get_buf_trans_hdmi (dev_priv, &n_entries); - }else if (type ==INTEL_OUTPUT_DP ) { - ddi_translations =cnl_get_buf_trans_dp (dev_priv, &n_entries); - }else if (type ==INTEL_OUTPUT_EDP ) { +else if (type ==INTEL_OUTPUT_EDP ) ddi_translations =cnl_get_buf_trans_edp (dev_priv, &n_entries); - } +else + ddi_translations =cnl_get_buf_trans_dp (dev_priv, &n_entries);if (WARN_ON (ddi_translations ==NULL ))return ;
@@ -1976,26 +1975,22 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv,I915_WRITE (CNL_PORT_TX_DW7_GRP (port), val); } -static void cnl_ddi_vswing_sequence (struct intel_encoder *encoder,u32 level) +static void cnl_ddi_vswing_sequence (struct intel_encoder *encoder, +int level,int type) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =intel_ddi_get_encoder_port (encoder); -int type = encoder->type; -int width =0 ; -int rate =0 ; +int width, rate, ln;u32 val; -int ln =0 ; -if ((intel_dp) && (type ==INTEL_OUTPUT_EDP || type ==INTEL_OUTPUT_DP )) { - width = intel_dp->lane_count; - rate = intel_dp->link_rate; - }else if (type ==INTEL_OUTPUT_HDMI ) { +if (type ==INTEL_OUTPUT_HDMI ) { width =4 ; -/* Rate is always < than 6GHz for HDMI */ + rate =0 ;/* Rate is always < than 6GHz for HDMI */ }else { -MISSING_CASE (type); -return ; +struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base); + + width = intel_dp->lane_count; + rate = intel_dp->link_rate; }/*
@@ -2004,7 +1999,7 @@ static void cnl_ddi_vswing_sequence(struct intel_encoder *encoder, u32 level)* else clear to 0b. */ val =I915_READ (CNL_PORT_PCS_DW1_LN0 (port)); -if (type ==INTEL_OUTPUT_EDP || type ==INTEL_OUTPUT_DP ) +if (type !=INTEL_OUTPUT_HDMI ) val |=COMMON_KEEPER_EN ;else val &= ~COMMON_KEEPER_EN ;
@@ -2079,7 +2074,7 @@ u32 bxt_signal_levels(struct intel_dp *intel_dp)u32 level =intel_ddi_dp_level (intel_dp);if (IS_CANNONLAKE (dev_priv)) -cnl_ddi_vswing_sequence (encoder, level); +cnl_ddi_vswing_sequence (encoder, level, encoder->type);else bxt_ddi_vswing_sequence (encoder, level, encoder->type);
@@ -2178,7 +2173,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_display_power_get (dev_priv, dig_port->ddi_io_power_domain);if (IS_CANNONLAKE (dev_priv)) -cnl_ddi_vswing_sequence (encoder, level); +cnl_ddi_vswing_sequence (encoder, level, encoder->type);else if (IS_GEN9_LP (dev_priv))bxt_ddi_vswing_sequence (encoder, level, encoder->type);else
@@ -2208,7 +2203,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,intel_display_power_get (dev_priv, dig_port->ddi_io_power_domain);if (IS_CANNONLAKE (dev_priv)) -cnl_ddi_vswing_sequence (encoder, level); +cnl_ddi_vswing_sequence (encoder, level,INTEL_OUTPUT_HDMI );else if (IS_GEN9_LP (dev_priv))bxt_ddi_vswing_sequence (encoder, level,INTEL_OUTPUT_HDMI );else
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 19/29 drm/i915: Kill off the BXT buf_trans default_index
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
default_index contained in the BXT buf_trans tables is actually useless. For DP we should always have a valid level selected (otherwise the link training logic would be buggy), and for HDMI we can just do what the other platforms do and pick the correct entry in intel_ddi_hdmi_level().
--- drivers/gpu/drm/i915/intel_ddi.c | 80 +++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 46 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +34 -46
@@ -305,35 +305,34 @@ struct bxt_ddi_buf_trans {u8 scale;/* scale value */ u8 enable;/* scale enable */ u8 deemphasis; -bool default_index;/* true if the entry represents default value */ };static const struct bxt_ddi_buf_trans bxt_ddi_translations_dp[] = {/* Idx NT mV diff db */ - {52 ,0x9A ,0 ,128 , true },/* 0: 400 0 */ - {78 ,0x9A ,0 ,85 , false },/* 1: 400 3.5 */ - {104 ,0x9A ,0 ,64 , false },/* 2: 400 6 */ - {154 ,0x9A ,0 ,43 , false },/* 3: 400 9.5 */ - {77 ,0x9A ,0 ,128 , false },/* 4: 600 0 */ - {116 ,0x9A ,0 ,85 , false },/* 5: 600 3.5 */ - {154 ,0x9A ,0 ,64 , false },/* 6: 600 6 */ - {102 ,0x9A ,0 ,128 , false },/* 7: 800 0 */ - {154 ,0x9A ,0 ,85 , false },/* 8: 800 3.5 */ - {154 ,0x9A ,1 ,128 , false },/* 9: 1200 0 */ + {52 ,0x9A ,0 ,128 , },/* 0: 400 0 */ + {78 ,0x9A ,0 ,85 , },/* 1: 400 3.5 */ + {104 ,0x9A ,0 ,64 , },/* 2: 400 6 */ + {154 ,0x9A ,0 ,43 , },/* 3: 400 9.5 */ + {77 ,0x9A ,0 ,128 , },/* 4: 600 0 */ + {116 ,0x9A ,0 ,85 , },/* 5: 600 3.5 */ + {154 ,0x9A ,0 ,64 , },/* 6: 600 6 */ + {102 ,0x9A ,0 ,128 , },/* 7: 800 0 */ + {154 ,0x9A ,0 ,85 , },/* 8: 800 3.5 */ + {154 ,0x9A ,1 ,128 , },/* 9: 1200 0 */ };static const struct bxt_ddi_buf_trans bxt_ddi_translations_edp[] = {/* Idx NT mV diff db */ - {26 ,0 ,0 ,128 , false },/* 0: 200 0 */ - {38 ,0 ,0 ,112 , false },/* 1: 200 1.5 */ - {48 ,0 ,0 ,96 , false },/* 2: 200 4 */ - {54 ,0 ,0 ,69 , false },/* 3: 200 6 */ - {32 ,0 ,0 ,128 , false },/* 4: 250 0 */ - {48 ,0 ,0 ,104 , false },/* 5: 250 1.5 */ - {54 ,0 ,0 ,85 , false },/* 6: 250 4 */ - {43 ,0 ,0 ,128 , false },/* 7: 300 0 */ - {54 ,0 ,0 ,101 , false },/* 8: 300 1.5 */ - {48 ,0 ,0 ,128 , false },/* 9: 300 0 */ + {26 ,0 ,0 ,128 , },/* 0: 200 0 */ + {38 ,0 ,0 ,112 , },/* 1: 200 1.5 */ + {48 ,0 ,0 ,96 , },/* 2: 200 4 */ + {54 ,0 ,0 ,69 , },/* 3: 200 6 */ + {32 ,0 ,0 ,128 , },/* 4: 250 0 */ + {48 ,0 ,0 ,104 , },/* 5: 250 1.5 */ + {54 ,0 ,0 ,85 , },/* 6: 250 4 */ + {43 ,0 ,0 ,128 , },/* 7: 300 0 */ + {54 ,0 ,0 ,101 , },/* 8: 300 1.5 */ + {48 ,0 ,0 ,128 , },/* 9: 300 0 */ };/* BSpec has 2 recommended values - entries 0 and 8.
@@ -341,16 +340,16 @@ static const struct bxt_ddi_buf_trans bxt_ddi_translations_edp[] = {*/ static const struct bxt_ddi_buf_trans bxt_ddi_translations_hdmi[] = {/* Idx NT mV diff db */ - {52 ,0x9A ,0 ,128 , false },/* 0: 400 0 */ - {52 ,0x9A ,0 ,85 , false },/* 1: 400 3.5 */ - {52 ,0x9A ,0 ,64 , false },/* 2: 400 6 */ - {42 ,0x9A ,0 ,43 , false },/* 3: 400 9.5 */ - {77 ,0x9A ,0 ,128 , false },/* 4: 600 0 */ - {77 ,0x9A ,0 ,85 , false },/* 5: 600 3.5 */ - {77 ,0x9A ,0 ,64 , false },/* 6: 600 6 */ - {102 ,0x9A ,0 ,128 , false },/* 7: 800 0 */ - {102 ,0x9A ,0 ,85 , false },/* 8: 800 3.5 */ - {154 ,0x9A ,1 ,128 , true },/* 9: 1200 0 */ + {52 ,0x9A ,0 ,128 , },/* 0: 400 0 */ + {52 ,0x9A ,0 ,85 , },/* 1: 400 3.5 */ + {52 ,0x9A ,0 ,64 , },/* 2: 400 6 */ + {42 ,0x9A ,0 ,43 , },/* 3: 400 9.5 */ + {77 ,0x9A ,0 ,128 , },/* 4: 600 0 */ + {77 ,0x9A ,0 ,85 , },/* 5: 600 3.5 */ + {77 ,0x9A ,0 ,64 , },/* 6: 600 6 */ + {102 ,0x9A ,0 ,128 , },/* 7: 800 0 */ + {102 ,0x9A ,0 ,85 , },/* 8: 800 3.5 */ + {154 ,0x9A ,1 ,128 , },/* 9: 1200 0 */ };struct cnl_ddi_buf_trans {
@@ -753,12 +752,12 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por hdmi_level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift; -if (IS_GEN9_LP (dev_priv)) -return hdmi_level; -if (IS_CANNONLAKE (dev_priv)) {cnl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry = n_hdmi_entries -1 ; + }else if (IS_GEN9_LP (dev_priv)) { +bxt_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); + hdmi_default_entry = n_hdmi_entries -1 ; }else if (IS_GEN9_BC (dev_priv)) {intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); hdmi_default_entry =8 ;
@@ -1852,7 +1851,7 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);const struct bxt_ddi_buf_trans *ddi_translations;enum port port = encoder->port; -int n_entries, i; +int n_entries;if (type ==INTEL_OUTPUT_HDMI ) ddi_translations =bxt_get_buf_trans_hdmi (dev_priv, &n_entries);
@@ -1861,17 +1860,6 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder,else ddi_translations =bxt_get_buf_trans_dp (dev_priv, &n_entries); -/* Check if default value has to be used */ -if (level >= n_entries || - (type ==INTEL_OUTPUT_HDMI && level ==HDMI_LEVEL_SHIFT_UNKNOWN )) { -for (i =0 ; i < n_entries; i++) { -if (ddi_translations[i].default_index) { - level = i; -break ; - } - } - } - bxt_ddi_phy_set_signal_level(dev_priv, port, ddi_translations[level].margin, ddi_translations[level].scale,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 20/29 drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
encoder->type isn't reliable for DP/HDMI so instead extract the correct type from the crtc state in intel_ddi_set_pipe_settings().
--- drivers/gpu/drm/i915/intel_ddi.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +24 -23
@@ -1474,33 +1474,34 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state) {struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_encoder *encoder =intel_ddi_get_crtc_encoder (crtc);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; -int type = encoder->type; -uint32_t temp; +u32 temp; -if (type ==INTEL_OUTPUT_DP || type ==INTEL_OUTPUT_EDP || type ==INTEL_OUTPUT_DP_MST ) { -WARN_ON (transcoder_is_dsi (cpu_transcoder)); +if (!intel_crtc_has_dp_encoder (crtc_state)) +return ; - temp =TRANS_MSA_SYNC_CLK ; -switch (crtc_state->pipe_bpp) { -case 18 : - temp |=TRANS_MSA_6_BPC ; -break ; -case 24 : - temp |=TRANS_MSA_8_BPC ; -break ; -case 30 : - temp |=TRANS_MSA_10_BPC ; -break ; -case 36 : - temp |=TRANS_MSA_12_BPC ; -break ; -default : -BUG (); - } -I915_WRITE (TRANS_MSA_MISC (cpu_transcoder), temp); +WARN_ON (transcoder_is_dsi (cpu_transcoder)); + + temp =TRANS_MSA_SYNC_CLK ; +switch (crtc_state->pipe_bpp) { +case 18 : + temp |=TRANS_MSA_6_BPC ; +break ; +case 24 : + temp |=TRANS_MSA_8_BPC ; +break ; +case 30 : + temp |=TRANS_MSA_10_BPC ; +break ; +case 36 : + temp |=TRANS_MSA_12_BPC ; +break ; +default : +MISSING_CASE (crtc_state->pipe_bpp); +break ; } + +I915_WRITE (TRANS_MSA_MISC (cpu_transcoder), temp); } void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 21/29 drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Eliminate intel_prepare_dp_ddi_buffers()'s reliance on the encoder->type by passing in the crtc state.
--- drivers/gpu/drm/i915/intel_ddi.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -16
@@ -785,7 +785,8 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por* values in advance. This function programs the correct values for * DP/eDP/FDI use cases. */ -static void intel_prepare_dp_ddi_buffers (struct intel_encoder *encoder) +static void intel_prepare_dp_ddi_buffers (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ;
@@ -793,23 +794,15 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)enum port port =intel_ddi_get_encoder_port (encoder);const struct ddi_buf_trans *ddi_translations; -switch (encoder->type) { -case INTEL_OUTPUT_EDP : +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_ANALOG )) + ddi_translations =intel_ddi_get_buf_trans_fdi (dev_priv, + &n_entries); +else if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_EDP )) ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, &n_entries); -break ; -case INTEL_OUTPUT_DP : +else ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); -break ; -case INTEL_OUTPUT_ANALOG : - ddi_translations =intel_ddi_get_buf_trans_fdi (dev_priv, - &n_entries); -break ; -default : -MISSING_CASE (encoder->type); -return ; - }if (IS_GEN9_BC (dev_priv)) {/* If we're boosting the current, set bit 31 of trans1 */
@@ -912,7 +905,7 @@ void hsw_fdi_link_train(struct intel_crtc *crtc,for_each_encoder_on_crtc (dev, &crtc->base, encoder) {WARN_ON (encoder->type !=INTEL_OUTPUT_ANALOG ); -intel_prepare_dp_ddi_buffers (encoder); +intel_prepare_dp_ddi_buffers (encoder, crtc_state); }/* Set the FDI_RX_MISC pwrdn lanes and the 2 workarounds listed at the
@@ -2166,7 +2159,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,else if (IS_GEN9_LP (dev_priv))bxt_ddi_vswing_sequence (encoder, level, encoder->type);else -intel_prepare_dp_ddi_buffers (encoder); +intel_prepare_dp_ddi_buffers (encoder, crtc_state);intel_ddi_init_dp_buf_reg (encoder);intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_ON );
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 22/29 drm/i915: Start using output_types for DPLL selection
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
encoder->type is not realiable for DP/HDMI so let's switch the DPLL selection over to using output_types.
--- drivers/gpu/drm/i915/intel_dpll_mgr.c | 36 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/intel_dpll_mgr.c +13 -23
@@ -813,15 +813,11 @@ hsw_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,memset (&crtc_state->dpll_hw_state,0 ,sizeof (crtc_state->dpll_hw_state)); -if (encoder->type ==INTEL_OUTPUT_HDMI ) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) { pll =hsw_ddi_hdmi_get_dpll (clock, crtc, crtc_state); - - }else if (encoder->type ==INTEL_OUTPUT_DP || - encoder->type ==INTEL_OUTPUT_DP_MST || - encoder->type ==INTEL_OUTPUT_EDP ) { + }else if (intel_crtc_has_dp_encoder (crtc_state)) { pll =hsw_ddi_dp_get_dpll (encoder, clock); - - }else if (encoder->type ==INTEL_OUTPUT_ANALOG ) { + }else if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_ANALOG )) {if (WARN_ON (crtc_state->port_clock /2 !=135000 ))return NULL ;
@@ -1369,15 +1365,13 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,memset (&dpll_hw_state,0 ,sizeof (dpll_hw_state)); -if (encoder->type ==INTEL_OUTPUT_HDMI ) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) { bret =skl_ddi_hdmi_pll_dividers (crtc, crtc_state, clock);if (!bret) {DRM_DEBUG_KMS ("Could not get HDMI pll dividers.\n" );return NULL ; } - }else if (encoder->type ==INTEL_OUTPUT_DP || - encoder->type ==INTEL_OUTPUT_DP_MST || - encoder->type ==INTEL_OUTPUT_EDP ) { + }else if (intel_crtc_has_dp_encoder (crtc_state)) { bret =skl_ddi_dp_set_dpll_hw_state (clock, &dpll_hw_state);if (!bret) {DRM_DEBUG_KMS ("Could not set DP dpll HW state.\n" );
@@ -1388,7 +1382,7 @@ skl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,return NULL ; } -if (encoder->type ==INTEL_OUTPUT_EDP ) +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_EDP )) pll =intel_find_shared_dpll (crtc, crtc_state,DPLL_ID_SKL_DPLL0 ,DPLL_ID_SKL_DPLL0 );
@@ -1812,14 +1806,12 @@ bxt_get_dpll(struct intel_crtc *crtc,struct intel_shared_dpll *pll;int i, clock = crtc_state->port_clock; -if (encoder->type ==INTEL_OUTPUT_HDMI && +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI ) && !bxt_ddi_hdmi_set_dpll_hw_state (crtc, crtc_state, clock, &dpll_hw_state))return NULL ; -if ((encoder->type ==INTEL_OUTPUT_DP || - encoder->type ==INTEL_OUTPUT_EDP || - encoder->type ==INTEL_OUTPUT_DP_MST ) && +if (intel_crtc_has_dp_encoder (crtc_state) && !bxt_ddi_dp_set_dpll_hw_state (clock, &dpll_hw_state))return NULL ;
@@ -1828,7 +1820,7 @@ bxt_get_dpll(struct intel_crtc *crtc, crtc_state->dpll_hw_state = dpll_hw_state; -if (encoder->type ==INTEL_OUTPUT_DP_MST ) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DP_MST )) {struct intel_dp_mst_encoder *intel_mst =enc_to_mst (&encoder->base); intel_dig_port = intel_mst->primary;
@@ -2345,15 +2337,13 @@ cnl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,memset (&dpll_hw_state,0 ,sizeof (dpll_hw_state)); -if (encoder->type ==INTEL_OUTPUT_HDMI ) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) { bret =cnl_ddi_hdmi_pll_dividers (crtc, crtc_state, clock);if (!bret) {DRM_DEBUG_KMS ("Could not get HDMI pll dividers.\n" );return NULL ; } - }else if (encoder->type ==INTEL_OUTPUT_DP || - encoder->type ==INTEL_OUTPUT_DP_MST || - encoder->type ==INTEL_OUTPUT_EDP ) { + }else if (intel_crtc_has_dp_encoder (crtc_state)) { bret =cnl_ddi_dp_set_dpll_hw_state (clock, &dpll_hw_state);if (!bret) {DRM_DEBUG_KMS ("Could not set DP dpll HW state.\n" );
@@ -2361,8 +2351,8 @@ cnl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state, } crtc_state->dpll_hw_state = dpll_hw_state; }else { -DRM_DEBUG_KMS ("Skip DPLL setup for encoder %d\n" , - encoder->type); +DRM_DEBUG_KMS ("Skip DPLL setup for output_types 0x%x\n" , + crtc_state->output_types);return NULL ; }
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 23/29 drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func()
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
intel_ddi_enable_transcoder_func() already has the crtc state so we can use that instead of the untrustworthy encoder->type.
--- drivers/gpu/drm/i915/intel_ddi.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +5 -10
@@ -1520,7 +1520,6 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)enum pipe pipe = crtc->pipe;enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;enum port port =intel_ddi_get_encoder_port (encoder); -int type = encoder->type;uint32_t temp;/* Enable TRANS_DDI_FUNC_CTL for the pipe to work in HDMI mode */
@@ -1575,7 +1574,7 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state) } } -if (type ==INTEL_OUTPUT_HDMI ) { +if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) {if (crtc_state->has_hdmi_sink) temp |=TRANS_DDI_MODE_SELECT_HDMI ;else
@@ -1585,19 +1584,15 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state) temp |=TRANS_DDI_HDMI_SCRAMBLING_MASK ;if (crtc_state->hdmi_high_tmds_clock_ratio) temp |=TRANS_DDI_HIGH_TMDS_CHAR_RATE ; - }else if (type ==INTEL_OUTPUT_ANALOG ) { + }else if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_ANALOG )) { temp |=TRANS_DDI_MODE_SELECT_FDI ; temp |= (crtc_state->fdi_lanes -1 ) <<1 ; - }else if (type ==INTEL_OUTPUT_DP || - type ==INTEL_OUTPUT_EDP ) { - temp |=TRANS_DDI_MODE_SELECT_DP_SST ; - temp |=DDI_PORT_WIDTH (crtc_state->lane_count); - }else if (type ==INTEL_OUTPUT_DP_MST ) { + }else if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DP_MST )) { temp |=TRANS_DDI_MODE_SELECT_DP_MST ; temp |=DDI_PORT_WIDTH (crtc_state->lane_count); }else { -WARN (1 ,"Invalid encoder type %d for pipe %c\n" , - encoder->type,pipe_name (pipe)); + temp |=TRANS_DDI_MODE_SELECT_DP_SST ; + temp |=DDI_PORT_WIDTH (crtc_state->lane_count); }I915_WRITE (TRANS_DDI_FUNC_CTL (cpu_transcoder), temp);
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 24/29 drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
SKL DDI B/C/D only have 9 usable buf trans registers for DP/eDP. That matches the normal DP buf trans tables, but the low vswing eDP tables have 10 entries. Thus the eDP tables can only be used safely with DDI A and E.
We try to catch cases where DDI B/C/D gets used with the wrong number of entires in some parts of the code, but not everywhere. Let's move the code to deal with that deeper into intel_ddi_get_buf_trans_edp(). And for sake of symmetry do the same in intel_ddi_get_buf_trans_dp(). That would also avoid explosions in the rather unlikely case that the DP tables would get revised to 10 entries as well.
--- drivers/gpu/drm/i915/intel_ddi.c | 60 +++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 26 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +34 -26
@@ -587,14 +587,29 @@ skl_get_buf_trans_hdmi(struct drm_i915_private *dev_priv, int *n_entries) } } +static int skl_buf_trans_num_entries (enum port port,int n_entries) +{ +/* Only DDIA and DDIE can select the 10th register with DP */ +if (port ==PORT_A || port ==PORT_E ) +return min (n_entries,10 ); +else +return min (n_entries,9 ); +} +static const struct ddi_buf_trans *intel_ddi_get_buf_trans_dp (struct drm_i915_private *dev_priv, -int *n_entries) +enum port port,int *n_entries) {if (IS_KABYLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv)) { -return kbl_get_buf_trans_dp (dev_priv, n_entries); +const struct ddi_buf_trans *ddi_translations = +kbl_get_buf_trans_dp (dev_priv, n_entries); + *n_entries =skl_buf_trans_num_entries (port, *n_entries); +return ddi_translations; }else if (IS_SKYLAKE (dev_priv)) { -return skl_get_buf_trans_dp (dev_priv, n_entries); +const struct ddi_buf_trans *ddi_translations = +skl_get_buf_trans_dp (dev_priv, n_entries); + *n_entries =skl_buf_trans_num_entries (port, *n_entries); +return ddi_translations; }else if (IS_BROADWELL (dev_priv)) { *n_entries =ARRAY_SIZE (bdw_ddi_translations_dp);return bdw_ddi_translations_dp;
@@ -609,10 +624,13 @@ intel_ddi_get_buf_trans_dp(struct drm_i915_private *dev_priv,static const struct ddi_buf_trans *intel_ddi_get_buf_trans_edp (struct drm_i915_private *dev_priv, -int *n_entries) +enum port port,int *n_entries) {if (IS_GEN9_BC (dev_priv)) { -return skl_get_buf_trans_edp (dev_priv, n_entries); +const struct ddi_buf_trans *ddi_translations = +skl_get_buf_trans_edp (dev_priv, n_entries); + *n_entries =skl_buf_trans_num_entries (port, *n_entries); +return ddi_translations; }else if (IS_BROADWELL (dev_priv)) {return bdw_get_buf_trans_edp (dev_priv, n_entries); }else if (IS_HASWELL (dev_priv)) {
@@ -798,22 +816,16 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder, ddi_translations =intel_ddi_get_buf_trans_fdi (dev_priv, &n_entries); else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP)) - ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, + ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, port, &n_entries); else - ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, + ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, port, &n_entries); -if (IS_GEN9_BC (dev_priv)) { -/* If we're boosting the current, set bit 31 of trans1 */ -if (dev_priv->vbt.ddi_port_info[port].dp_boost_level) - iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; - -if (WARN_ON (encoder->type ==INTEL_OUTPUT_EDP && - port !=PORT_A && port !=PORT_E && - n_entries >9 )) - n_entries =9 ; - } +/* If we're boosting the current, set bit 31 of trans1 */ +if (IS_GEN9_BC (dev_priv) && + dev_priv->vbt.ddi_port_info[port].dp_boost_level) + iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ;for (i =0 ; i < n_entries; i++) { I915_WRITE(DDI_BUF_TRANS_LO(port, i),
@@ -1810,14 +1822,9 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder,if (type ==INTEL_OUTPUT_HDMI ) ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries);else if (type ==INTEL_OUTPUT_EDP ) - ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, &n_entries); + ddi_translations =intel_ddi_get_buf_trans_edp (dev_priv, port, &n_entries);else - ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); - -if (WARN_ON (type !=INTEL_OUTPUT_HDMI && - port !=PORT_A && - port !=PORT_E && n_entries >9 )) - n_entries =9 ; + ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, port, &n_entries); iboost = ddi_translations[level].i_boost; }
@@ -1859,6 +1866,7 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder,u8 intel_ddi_dp_voltage_max (struct intel_encoder *encoder) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); +enum port port = encoder->port;int n_entries;if (IS_CANNONLAKE (dev_priv)) {
@@ -1873,9 +1881,9 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder)bxt_get_buf_trans_dp (dev_priv, &n_entries); }else {if (encoder->type ==INTEL_OUTPUT_EDP ) -intel_ddi_get_buf_trans_edp (dev_priv, &n_entries); +intel_ddi_get_buf_trans_edp (dev_priv, port, &n_entries);else -intel_ddi_get_buf_trans_dp (dev_priv, &n_entries); +intel_ddi_get_buf_trans_dp (dev_priv, port, &n_entries); }if (WARN_ON (n_entries <1 ))
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 25/29 drm/i915: Stop frobbing with DDI encoder->type
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Currently the DDI encoder->type will change at runtime depending on what kind of hotplugs we've processed. That's quite bad since we can't really trust that that current value of encoder->type actually matches the type of signal we're trying to drive through it.
Let's eliminate that problem by declaring that non-eDP DDI port will always have the encoder type as INTEL_OUTPUT_DDI. This means the code can no longer try to distinguish DP vs. HDMI based on encoder->type. We'll eDP as INTEL_OUTPUT_EDP, since it'll never change and there's a bunch of code that relies on that value to identofy eDP.
We'll introduce a new encoder .compute_output_type() hook. This allows us to compute the full output_types before any encoder .compute_config() hooks get called, thus those hooks can rely on output_types being correct, which is useful for cloning on oldr platforms. For now we'll just look at the connector type and pick the correct mode based on that. In the future the new hook could be used to implement dynamic switching between LS and PCON modes for LSPCON.
TODO: maybe make .get_config() populate output_types rather than doing the default encoder->type thing in caller and then undoing it for DDI in .get_config().
--- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 49 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_display.c | 11 +++++--- drivers/gpu/drm/i915/intel_dp.c | 15 ++--------- drivers/gpu/drm/i915/intel_drv.h | 7 +++-- drivers/gpu/drm/i915/intel_hdmi.c | 10 ++----- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 7 files changed, 60 insertions(+), 36 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3053,7 +3053,7 @@ static void intel_connector_info(struct seq_file *m,break ;case DRM_MODE_CONNECTOR_HDMIA :if (intel_encoder->type ==INTEL_OUTPUT_HDMI || - intel_encoder->type ==INTEL_OUTPUT_UNKNOWN ) + intel_encoder->type ==INTEL_OUTPUT_DDI )intel_hdmi_info (m, intel_connector);break ;default :
drivers/gpu/drm/i915/intel_ddi.c +41 -8
109 lines not on this page · raw message
drivers/gpu/drm/i915/intel_display.c +8 -3
@@ -10696,7 +10696,7 @@ static const char * const output_type_str[] = {OUTPUT_TYPE (DP ),OUTPUT_TYPE (EDP ),OUTPUT_TYPE (DSI ), -OUTPUT_TYPE (UNKNOWN ), +OUTPUT_TYPE (DDI ), OUTPUT_TYPE(DP_MST), };
@@ -10866,7 +10866,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)switch (encoder->type) {unsigned int port_mask; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;case INTEL_OUTPUT_DP :
@@ -10999,7 +10999,12 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,* Determine output_types before calling the .compute_config() * hooks so that the hooks can use this information safely. */ - pipe_config->output_types |=1 << encoder->type; +if (encoder->compute_output_type) + pipe_config->output_types |= +BIT (encoder->compute_output_type (encoder, pipe_config, + connector_state)); +else + pipe_config->output_types |=BIT (encoder->type); } encoder_retry:
drivers/gpu/drm/i915/intel_dp.c +2 -13
@@ -768,7 +768,8 @@ void intel_power_sequencer_reset(struct drm_i915_private *dev_priv)for_each_intel_encoder (dev, encoder) {struct intel_dp *intel_dp; -if (encoder->type !=INTEL_OUTPUT_DP && +if (!IS_GEN9_LP (dev_priv) && + encoder->type !=INTEL_OUTPUT_DP && encoder->type !=INTEL_OUTPUT_EDP )continue ;
@@ -4697,8 +4698,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) {struct drm_connector *connector = &intel_connector->base;struct intel_dp *intel_dp =intel_attached_dp (connector); -struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp); -struct intel_encoder *intel_encoder = &intel_dig_port->base;struct drm_device *dev = connector->dev;enum drm_connector_status status;u8 sink_irq_vector =0 ;
@@ -4731,9 +4730,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) goto out; } -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; -DRM_DEBUG_KMS ("Display Port TPS3 support: source %s, sink %s\n" ,yesno (intel_dp_source_supports_hbr2 (intel_dp)),yesno (drm_dp_tps3_supported (intel_dp->dpcd)));
@@ -4854,9 +4850,6 @@ intel_dp_force(struct drm_connector *connector)intel_dp_set_edid (intel_dp);intel_display_power_put (dev_priv, intel_dp->aux_power_domain); - -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; }static int intel_dp_get_modes (struct drm_connector *connector)
@@ -5075,10 +5068,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)struct drm_i915_private *dev_priv =to_i915 (dev);enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && - intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) - intel_dig_port->base.type =INTEL_OUTPUT_DP ; -if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {/* * vdd off can generate a long pulse on eDP which
drivers/gpu/drm/i915/intel_drv.h +5 -2
@@ -173,7 +173,7 @@ enum intel_output_type {INTEL_OUTPUT_DP =7 ,INTEL_OUTPUT_EDP =8 ,INTEL_OUTPUT_DSI =9 , -INTEL_OUTPUT_UNKNOWN =10 , +INTEL_OUTPUT_DDI =10 , INTEL_OUTPUT_DP_MST = 11, };
@@ -216,6 +216,9 @@ struct intel_encoder {enum port port;unsigned int cloneable;void (*hot_plug)(struct intel_encoder *); +enum intel_output_type (*compute_output_type)(struct intel_encoder *, +struct intel_crtc_state *, +struct drm_connector_state *);bool (*compute_config)(struct intel_encoder *,struct intel_crtc_state *,struct drm_connector_state *);
@@ -1151,7 +1154,7 @@ enc_to_dig_port(struct drm_encoder *encoder)struct intel_encoder *intel_encoder =to_intel_encoder (encoder);switch (intel_encoder->type) { -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :WARN_ON (!HAS_DDI (to_i915 (encoder->dev)));case INTEL_OUTPUT_DP :case INTEL_OUTPUT_EDP :
drivers/gpu/drm/i915/intel_hdmi.c +2 -8
@@ -1604,12 +1604,9 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)intel_hdmi_unset_edid (connector); -if (intel_hdmi_set_edid (connector)) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); - -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; +if (intel_hdmi_set_edid (connector)) status = connector_status_connected; - }else +else status = connector_status_disconnected;intel_display_power_put (dev_priv,POWER_DOMAIN_GMBUS );
@@ -1620,8 +1617,6 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)static void intel_hdmi_force (struct drm_connector *connector) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name);
@@ -1631,7 +1626,6 @@ intel_hdmi_force(struct drm_connector *connector)return ;intel_hdmi_set_edid (connector); -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; }static int intel_hdmi_get_modes (struct drm_connector *connector)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -383,7 +383,7 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,case INTEL_OUTPUT_ANALOG : type =DISPLAY_TYPE_CRT ;break ; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :case INTEL_OUTPUT_DP_MST :
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 25/29 drm/i915: Stop frobbing with DDI encoder->type
From: Ville Syrjälä <[email protected]>
Currently the DDI encoder->type will change at runtime depending on what kind of hotplugs we've processed. That's quite bad since we can't really trust that that current value of encoder->type actually matches the type of signal we're trying to drive through it.
Let's eliminate that problem by declaring that non-eDP DDI port will always have the encoder type as INTEL_OUTPUT_DDI. This means the code can no longer try to distinguish DP vs. HDMI based on encoder->type. We'll eDP as INTEL_OUTPUT_EDP, since it'll never change and there's a bunch of code that relies on that value to identofy eDP.
We'll introduce a new encoder .compute_output_type() hook. This allows us to compute the full output_types before any encoder .compute_config() hooks get called, thus those hooks can rely on output_types being correct, which is useful for cloning on oldr platforms. For now we'll just look at the connector type and pick the correct mode based on that. In the future the new hook could be used to implement dynamic switching between LS and PCON modes for LSPCON.
TODO: maybe make .get_config() populate output_types rather than doing the default encoder->type thing in caller and then undoing it for DDI in .get_config().
v2: Fix BXT/GLK PPS explosion with DSI/MST encoders
--- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 49 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_display.c | 11 +++++--- drivers/gpu/drm/i915/intel_dp.c | 15 ++--------- drivers/gpu/drm/i915/intel_drv.h | 7 +++-- drivers/gpu/drm/i915/intel_hdmi.c | 10 ++----- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 7 files changed, 60 insertions(+), 36 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3053,7 +3053,7 @@ static void intel_connector_info(struct seq_file *m,break ;case DRM_MODE_CONNECTOR_HDMIA :if (intel_encoder->type ==INTEL_OUTPUT_HDMI || - intel_encoder->type ==INTEL_OUTPUT_UNKNOWN ) + intel_encoder->type ==INTEL_OUTPUT_DDI )intel_hdmi_info (m, intel_connector);break ;default :
drivers/gpu/drm/i915/intel_ddi.c +41 -8
109 lines not on this page · raw message
drivers/gpu/drm/i915/intel_display.c +8 -3
@@ -10696,7 +10696,7 @@ static const char * const output_type_str[] = {OUTPUT_TYPE (DP ),OUTPUT_TYPE (EDP ),OUTPUT_TYPE (DSI ), -OUTPUT_TYPE (UNKNOWN ), +OUTPUT_TYPE (DDI ), OUTPUT_TYPE(DP_MST), };
@@ -10867,7 +10867,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)switch (encoder->type) {unsigned int port_mask; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;case INTEL_OUTPUT_DP :
@@ -11000,7 +11000,12 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,* Determine output_types before calling the .compute_config() * hooks so that the hooks can use this information safely. */ - pipe_config->output_types |=1 << encoder->type; +if (encoder->compute_output_type) + pipe_config->output_types |= +BIT (encoder->compute_output_type (encoder, pipe_config, + connector_state)); +else + pipe_config->output_types |=BIT (encoder->type); } encoder_retry:
drivers/gpu/drm/i915/intel_dp.c +2 -13
@@ -769,7 +769,8 @@ void intel_power_sequencer_reset(struct drm_i915_private *dev_priv)struct intel_dp *intel_dp;if (encoder->type !=INTEL_OUTPUT_DP && - encoder->type !=INTEL_OUTPUT_EDP ) + encoder->type !=INTEL_OUTPUT_EDP && + encoder->type !=INTEL_OUTPUT_DDI )continue ; intel_dp =enc_to_intel_dp (&encoder->base);
@@ -4719,8 +4720,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) {struct drm_connector *connector = &intel_connector->base;struct intel_dp *intel_dp =intel_attached_dp (connector); -struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp); -struct intel_encoder *intel_encoder = &intel_dig_port->base;struct drm_device *dev = connector->dev;enum drm_connector_status status;u8 sink_irq_vector =0 ;
@@ -4753,9 +4752,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) goto out; } -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; -DRM_DEBUG_KMS ("Display Port TPS3 support: source %s, sink %s\n" ,yesno (intel_dp_source_supports_hbr2 (intel_dp)),yesno (drm_dp_tps3_supported (intel_dp->dpcd)));
@@ -4876,9 +4872,6 @@ intel_dp_force(struct drm_connector *connector)intel_dp_set_edid (intel_dp);intel_display_power_put (dev_priv, intel_dp->aux_power_domain); - -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; }static int intel_dp_get_modes (struct drm_connector *connector)
@@ -5097,10 +5090,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)struct drm_i915_private *dev_priv =to_i915 (dev);enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && - intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) - intel_dig_port->base.type =INTEL_OUTPUT_DP ; -if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {/* * vdd off can generate a long pulse on eDP which
drivers/gpu/drm/i915/intel_drv.h +5 -2
@@ -173,7 +173,7 @@ enum intel_output_type {INTEL_OUTPUT_DP =7 ,INTEL_OUTPUT_EDP =8 ,INTEL_OUTPUT_DSI =9 , -INTEL_OUTPUT_UNKNOWN =10 , +INTEL_OUTPUT_DDI =10 , INTEL_OUTPUT_DP_MST = 11, };
@@ -216,6 +216,9 @@ struct intel_encoder {enum port port;unsigned int cloneable;void (*hot_plug)(struct intel_encoder *); +enum intel_output_type (*compute_output_type)(struct intel_encoder *, +struct intel_crtc_state *, +struct drm_connector_state *);bool (*compute_config)(struct intel_encoder *,struct intel_crtc_state *,struct drm_connector_state *);
@@ -1151,7 +1154,7 @@ enc_to_dig_port(struct drm_encoder *encoder)struct intel_encoder *intel_encoder =to_intel_encoder (encoder);switch (intel_encoder->type) { -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :WARN_ON (!HAS_DDI (to_i915 (encoder->dev)));case INTEL_OUTPUT_DP :case INTEL_OUTPUT_EDP :
drivers/gpu/drm/i915/intel_hdmi.c +2 -8
@@ -1604,12 +1604,9 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)intel_hdmi_unset_edid (connector); -if (intel_hdmi_set_edid (connector)) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); - -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; +if (intel_hdmi_set_edid (connector)) status = connector_status_connected; - }else +else status = connector_status_disconnected;intel_display_power_put (dev_priv,POWER_DOMAIN_GMBUS );
@@ -1620,8 +1617,6 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)static void intel_hdmi_force (struct drm_connector *connector) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name);
@@ -1631,7 +1626,6 @@ intel_hdmi_force(struct drm_connector *connector)return ;intel_hdmi_set_edid (connector); -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; }static int intel_hdmi_get_modes (struct drm_connector *connector)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -383,7 +383,7 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,case INTEL_OUTPUT_ANALOG : type =DISPLAY_TYPE_CRT ;break ; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :case INTEL_OUTPUT_DP_MST :
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 25/29 drm/i915: Stop frobbing with DDI encoder->type
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Currently the DDI encoder->type will change at runtime depending on what kind of hotplugs we've processed. That's quite bad since we can't really trust that that current value of encoder->type actually matches the type of signal we're trying to drive through it.
Let's eliminate that problem by declaring that non-eDP DDI port will always have the encoder type as INTEL_OUTPUT_DDI. This means the code can no longer try to distinguish DP vs. HDMI based on encoder->type. We'll eDP as INTEL_OUTPUT_EDP, since it'll never change and there's a bunch of code that relies on that value to identofy eDP.
We'll introduce a new encoder .compute_output_type() hook. This allows us to compute the full output_types before any encoder .compute_config() hooks get called, thus those hooks can rely on output_types being correct, which is useful for cloning on oldr platforms. For now we'll just look at the connector type and pick the correct mode based on that. In the future the new hook could be used to implement dynamic switching between LS and PCON modes for LSPCON.
TODO: maybe make .get_config() populate output_types rather than doing the default encoder->type thing in caller and then undoing it for DDI in .get_config().
v2: Fix BXT/GLK PPS explosion with DSI/MST encoders
v3: Avoid the PPS warn on pure HDMI/DVI DDI encoders by checking dp.output_reg
--- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 50 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_display.c | 11 +++++--- drivers/gpu/drm/i915/intel_dp.c | 19 +++++-------- drivers/gpu/drm/i915/intel_drv.h | 7 +++-- drivers/gpu/drm/i915/intel_hdmi.c | 10 ++----- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 7 files changed, 65 insertions(+), 36 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3053,7 +3053,7 @@ static void intel_connector_info(struct seq_file *m,break ;case DRM_MODE_CONNECTOR_HDMIA :if (intel_encoder->type ==INTEL_OUTPUT_HDMI || - intel_encoder->type ==INTEL_OUTPUT_UNKNOWN ) + intel_encoder->type ==INTEL_OUTPUT_DDI )intel_hdmi_info (m, intel_connector);break ;default :
drivers/gpu/drm/i915/intel_ddi.c +42 -8
112 lines not on this page · raw message
drivers/gpu/drm/i915/intel_display.c +8 -3
@@ -10696,7 +10696,7 @@ static const char * const output_type_str[] = {OUTPUT_TYPE (DP ),OUTPUT_TYPE (EDP ),OUTPUT_TYPE (DSI ), -OUTPUT_TYPE (UNKNOWN ), +OUTPUT_TYPE (DDI ), OUTPUT_TYPE(DP_MST), };
@@ -10867,7 +10867,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)switch (encoder->type) {unsigned int port_mask; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :if (WARN_ON (!HAS_DDI (to_i915 (dev))))break ;case INTEL_OUTPUT_DP :
@@ -11000,7 +11000,12 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,* Determine output_types before calling the .compute_config() * hooks so that the hooks can use this information safely. */ - pipe_config->output_types |=1 << encoder->type; +if (encoder->compute_output_type) + pipe_config->output_types |= +BIT (encoder->compute_output_type (encoder, pipe_config, + connector_state)); +else + pipe_config->output_types |=BIT (encoder->type); } encoder_retry:
drivers/gpu/drm/i915/intel_dp.c +6 -13
@@ -769,11 +769,16 @@ void intel_power_sequencer_reset(struct drm_i915_private *dev_priv)struct intel_dp *intel_dp;if (encoder->type !=INTEL_OUTPUT_DP && - encoder->type !=INTEL_OUTPUT_EDP ) + encoder->type !=INTEL_OUTPUT_EDP && + encoder->type !=INTEL_OUTPUT_DDI )continue ; intel_dp =enc_to_intel_dp (&encoder->base); +/* Skip pure DVI/HDMI DDI encoders */ +if (!i915_mmio_reg_valid (intel_dp->output_reg)) +continue ; +WARN_ON (intel_dp->active_pipe !=INVALID_PIPE );if (encoder->type !=INTEL_OUTPUT_EDP )
@@ -4719,8 +4724,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) {struct drm_connector *connector = &intel_connector->base;struct intel_dp *intel_dp =intel_attached_dp (connector); -struct intel_digital_port *intel_dig_port =dp_to_dig_port (intel_dp); -struct intel_encoder *intel_encoder = &intel_dig_port->base;struct drm_device *dev = connector->dev;enum drm_connector_status status;u8 sink_irq_vector =0 ;
@@ -4753,9 +4756,6 @@ intel_dp_long_pulse(struct intel_connector *intel_connector) goto out; } -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; -DRM_DEBUG_KMS ("Display Port TPS3 support: source %s, sink %s\n" ,yesno (intel_dp_source_supports_hbr2 (intel_dp)),yesno (drm_dp_tps3_supported (intel_dp->dpcd)));
@@ -4876,9 +4876,6 @@ intel_dp_force(struct drm_connector *connector)intel_dp_set_edid (intel_dp);intel_display_power_put (dev_priv, intel_dp->aux_power_domain); - -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) - intel_encoder->type =INTEL_OUTPUT_DP ; }static int intel_dp_get_modes (struct drm_connector *connector)
@@ -5097,10 +5094,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)struct drm_i915_private *dev_priv =to_i915 (dev);enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && - intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) - intel_dig_port->base.type =INTEL_OUTPUT_DP ; -if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {/* * vdd off can generate a long pulse on eDP which
drivers/gpu/drm/i915/intel_drv.h +5 -2
@@ -173,7 +173,7 @@ enum intel_output_type {INTEL_OUTPUT_DP =7 ,INTEL_OUTPUT_EDP =8 ,INTEL_OUTPUT_DSI =9 , -INTEL_OUTPUT_UNKNOWN =10 , +INTEL_OUTPUT_DDI =10 , INTEL_OUTPUT_DP_MST = 11, };
@@ -216,6 +216,9 @@ struct intel_encoder {enum port port;unsigned int cloneable;void (*hot_plug)(struct intel_encoder *); +enum intel_output_type (*compute_output_type)(struct intel_encoder *, +struct intel_crtc_state *, +struct drm_connector_state *);bool (*compute_config)(struct intel_encoder *,struct intel_crtc_state *,struct drm_connector_state *);
@@ -1151,7 +1154,7 @@ enc_to_dig_port(struct drm_encoder *encoder)struct intel_encoder *intel_encoder =to_intel_encoder (encoder);switch (intel_encoder->type) { -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :WARN_ON (!HAS_DDI (to_i915 (encoder->dev)));case INTEL_OUTPUT_DP :case INTEL_OUTPUT_EDP :
drivers/gpu/drm/i915/intel_hdmi.c +2 -8
@@ -1604,12 +1604,9 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)intel_hdmi_unset_edid (connector); -if (intel_hdmi_set_edid (connector)) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); - -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; +if (intel_hdmi_set_edid (connector)) status = connector_status_connected; - }else +else status = connector_status_disconnected;intel_display_power_put (dev_priv,POWER_DOMAIN_GMBUS );
@@ -1620,8 +1617,6 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)static void intel_hdmi_force (struct drm_connector *connector) { -struct intel_hdmi *intel_hdmi =intel_attached_hdmi (connector); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name);
@@ -1631,7 +1626,6 @@ intel_hdmi_force(struct drm_connector *connector)return ;intel_hdmi_set_edid (connector); -hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; }static int intel_hdmi_get_modes (struct drm_connector *connector)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -383,7 +383,7 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,case INTEL_OUTPUT_ANALOG : type =DISPLAY_TYPE_CRT ;break ; -case INTEL_OUTPUT_UNKNOWN : +case INTEL_OUTPUT_DDI :case INTEL_OUTPUT_DP :case INTEL_OUTPUT_HDMI :case INTEL_OUTPUT_DP_MST :
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 26/29 drm/i915: Unify error handling for missing DDI buf trans tables
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Handle missing buf trans tables, or out of bounds buf trans levels the same way everywhere. These should never be hit under normal conditions, but let's play it safe for now.
--- drivers/gpu/drm/i915/intel_ddi.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +20 -5
@@ -793,6 +793,9 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por hdmi_level >= n_hdmi_entries) hdmi_level = hdmi_default_entry; +if (WARN_ON_ONCE (hdmi_level >= n_hdmi_entries)) + hdmi_level = n_hdmi_entries -1 ; +return hdmi_level; }
@@ -849,6 +852,11 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, ddi_translations_hdmi =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); +if (WARN_ON_ONCE (!ddi_translations_hdmi)) +return ; +if (WARN_ON_ONCE (hdmi_level >= n_hdmi_entries)) + hdmi_level = n_hdmi_entries -1 ; +/* If we're boosting the current, set bit 31 of trans1 */ if (IS_GEN9_BC (dev_priv) && dev_priv->vbt.ddi_port_info[port].hdmi_boost_level)
@@ -1825,6 +1833,11 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder,else ddi_translations =intel_ddi_get_buf_trans_dp (dev_priv, port, &n_entries); +if (WARN_ON_ONCE (!ddi_translations)) +return ; +if (WARN_ON_ONCE (level >= n_entries)) + level = n_entries -1 ; + iboost = ddi_translations[level].i_boost; }
@@ -1855,6 +1868,11 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder,else ddi_translations =bxt_get_buf_trans_dp (dev_priv, &n_entries); +if (WARN_ON_ONCE (!ddi_translations)) +return ; +if (WARN_ON_ONCE (level >= n_entries)) + level = n_entries -1 ; + bxt_ddi_phy_set_signal_level(dev_priv, port, ddi_translations[level].margin, ddi_translations[level].scale,
@@ -1908,13 +1926,10 @@ static void cnl_ddi_vswing_program(struct drm_i915_private *dev_priv,else ddi_translations =cnl_get_buf_trans_dp (dev_priv, &n_entries); -if (WARN_ON (ddi_translations ==NULL )) +if (WARN_ON_ONCE (!ddi_translations))return ; - -if (level >= n_entries) { -DRM_DEBUG_KMS ("DDI translation not found for level %d. Using %d instead." , level, n_entries -1 ); +if (WARN_ON_ONCE (level >= n_entries)) level = n_entries -1 ; - }/* Set PORT_TX_DW5 Scaling Mode Sel to 010b. */ val =I915_READ (CNL_PORT_TX_DW5_LN0 (port));
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 27/29 drm/i915: Clear up the types we use for DDI buf trans level/n_entries
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Use plain int for the DDI buf trans levels and number of entries. While at it drop the redundant "hdmi" from some of the variable names.
--- drivers/gpu/drm/i915/intel_ddi.c | 65 +++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +31 -34
@@ -762,41 +762,38 @@ cnl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)static int intel_ddi_hdmi_level (struct drm_i915_private *dev_priv,enum port port) { -int n_hdmi_entries; -int hdmi_level; -int hdmi_default_entry; +int n_entries, level, default_entry; - hdmi_level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift; + level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift;if (IS_CANNONLAKE (dev_priv)) { -cnl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry = n_hdmi_entries -1 ; +cnl_get_buf_trans_hdmi (dev_priv, &n_entries); + default_entry = n_entries -1 ; }else if (IS_GEN9_LP (dev_priv)) { -bxt_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry = n_hdmi_entries -1 ; +bxt_get_buf_trans_hdmi (dev_priv, &n_entries); + default_entry = n_entries -1 ; }else if (IS_GEN9_BC (dev_priv)) { -intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry =8 ; +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); + default_entry =8 ; }else if (IS_BROADWELL (dev_priv)) { -intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry =7 ; +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); + default_entry =7 ; }else if (IS_HASWELL (dev_priv)) { -intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry =6 ; +intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); + default_entry =6 ; }else {WARN (1 ,"ddi translation table missing\n" );return 0 ; }/* Choose a good default if VBT is badly populated */ -if (hdmi_level ==HDMI_LEVEL_SHIFT_UNKNOWN || - hdmi_level >= n_hdmi_entries) - hdmi_level = hdmi_default_entry; +if (level ==HDMI_LEVEL_SHIFT_UNKNOWN || level >= n_entries) + level = default_entry; -if (WARN_ON_ONCE (hdmi_level >= n_hdmi_entries)) - hdmi_level = n_hdmi_entries -1 ; +if (WARN_ON_ONCE (level >= n_entries)) + level = n_entries -1 ; -return hdmi_level; +return level; }/*
@@ -842,20 +839,20 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder,* HDMI/DVI use cases. */ static void intel_prepare_hdmi_ddi_buffers (struct intel_encoder *encoder, -int hdmi_level) +int level) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ; -int n_hdmi_entries; +int n_entries;enum port port =intel_ddi_get_encoder_port (encoder); -const struct ddi_buf_trans *ddi_translations_hdmi; +const struct ddi_buf_trans *ddi_translations; - ddi_translations_hdmi =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); + ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries); -if (WARN_ON_ONCE (!ddi_translations_hdmi)) +if (WARN_ON_ONCE (!ddi_translations))return ; -if (WARN_ON_ONCE (hdmi_level >= n_hdmi_entries)) - hdmi_level = n_hdmi_entries -1 ; +if (WARN_ON_ONCE (level >= n_entries)) + level = n_entries -1 ;/* If we're boosting the current, set bit 31 of trans1 */ if (IS_GEN9_BC(dev_priv) &&
@@ -864,9 +861,9 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder,/* Entry 9 is for HDMI: */ I915_WRITE (DDI_BUF_TRANS_LO (port,9 ), - ddi_translations_hdmi[hdmi_level].trans1 | iboost_bit); + ddi_translations[level].trans1 | iboost_bit);I915_WRITE (DDI_BUF_TRANS_HI (port,9 ), - ddi_translations_hdmi[hdmi_level].trans2); + ddi_translations[level].trans2); } static void intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv,
@@ -1810,7 +1807,7 @@ static void _skl_ddi_set_iboost(struct drm_i915_private *dev_priv, }static void skl_ddi_set_iboost (struct intel_encoder *encoder, -u32 level,int type) +int level,int type) {struct intel_digital_port *intel_dig_port =enc_to_dig_port (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (intel_dig_port->base.base.dev);
@@ -1913,7 +1910,7 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder) }static void cnl_ddi_vswing_program (struct drm_i915_private *dev_priv, -u32 level,enum port port,int type) +int level,enum port port,int type) {const struct cnl_ddi_buf_trans *ddi_translations =NULL ;int n_entries, ln;
@@ -2070,7 +2067,7 @@ u32 bxt_signal_levels(struct intel_dp *intel_dp)struct intel_digital_port *dport =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev);struct intel_encoder *encoder = &dport->base; -u32 level =intel_ddi_dp_level (intel_dp); +int level =intel_ddi_dp_level (intel_dp);if (IS_CANNONLAKE (dev_priv))cnl_ddi_vswing_sequence (encoder, level, encoder->type);
@@ -2085,7 +2082,7 @@ uint32_t ddi_signal_levels(struct intel_dp *intel_dp)struct intel_digital_port *dport =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (dport->base.base.dev);struct intel_encoder *encoder = &dport->base; -uint32_t level =intel_ddi_dp_level (intel_dp); +int level =intel_ddi_dp_level (intel_dp);if (IS_GEN9_BC (dev_priv))skl_ddi_set_iboost (encoder, level, encoder->type);
@@ -2158,7 +2155,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,enum port port =intel_ddi_get_encoder_port (encoder);struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);bool is_mst =intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DP_MST ); -uint32_t level =intel_ddi_dp_level (intel_dp); +int level =intel_ddi_dp_level (intel_dp);WARN_ON (is_mst && (port ==PORT_A || port ==PORT_E ));
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 28/29 drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Most of the callers of intel_ddi_get_encoder_port() can just use encoder->port directly instead of going through all these gynmastics.
--- drivers/gpu/drm/i915/intel_ddi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +10 -10
@@ -807,7 +807,7 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ;int i, n_entries; -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;const struct ddi_buf_trans *ddi_translations;if (intel_crtc_has_type (crtc_state,INTEL_OUTPUT_ANALOG ))
@@ -844,7 +844,7 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ;int n_entries; -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;const struct ddi_buf_trans *ddi_translations; ddi_translations =intel_ddi_get_buf_trans_hdmi (dev_priv, &n_entries);
@@ -1455,7 +1455,7 @@ static void bxt_ddi_clock_get(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;uint32_t dpll = port; pipe_config->port_clock =bxt_calc_pll_link (dev_priv, dpll);
@@ -1631,7 +1631,7 @@ bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector)struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_encoder *encoder = intel_connector->encoder;int type = intel_connector->base.connector_type; -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;enum pipe pipe =0 ;enum transcoder cpu_transcoder;uint32_t tmp;
@@ -1690,7 +1690,7 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder, {struct drm_device *dev = encoder->base.dev;struct drm_i915_private *dev_priv =to_i915 (dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;u32 tmp;int i;bool ret;
@@ -1975,7 +1975,7 @@ static void cnl_ddi_vswing_sequence(struct intel_encoder *encoder, int level, int type) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;int width, rate, ln;u32 val;
@@ -2094,7 +2094,7 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder, const struct intel_shared_dpll *pll) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;uint32_t val;if (WARN_ON (!pll))
@@ -2152,7 +2152,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, {struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);bool is_mst =intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DP_MST );int level =intel_ddi_dp_level (intel_dp);
@@ -2189,7 +2189,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,struct intel_digital_port *intel_dig_port =enc_to_dig_port (&encoder->base);struct intel_hdmi *intel_hdmi = &intel_dig_port->hdmi;struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum port port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;int level =intel_ddi_hdmi_level (dev_priv, port);struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);
@@ -2633,7 +2633,7 @@ static bool intel_ddi_compute_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -int port =intel_ddi_get_encoder_port (encoder); +enum port port = encoder->port;int ret;if (port ==PORT_A )
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 29/29 drm/i915: Pass a crtc state to ddi post_disable from MST code
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Pass an old crtc state to intel_ddi_post_disable() from the MST code.
Note that this crtc state won't necessaitly match the one that was passed to intel_ddi_pre_enable() if the first stream to be enabled isn't the last stream to be disabled. But this is fine since the states should be identical in every important way. This does mean people frobbing the DDI pre_enable/post_disable hooks have to pay attention in what parts of the state they consult.
The alternative would be to inline the relevant code into the MST code. That is actually what we used to do for pre_enable before commit e081c8463ac9 ("drm/i915: Remove duplicate DDI enabling logic from MST path"). For post_disable we've always called the DDI hook.
--- drivers/gpu/drm/i915/intel_ddi.c | 4 +--- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +1 -3
@@ -2290,9 +2290,7 @@ static void intel_ddi_post_disable(struct intel_encoder *encoder, const struct intel_crtc_state *old_crtc_state, const struct drm_connector_state *old_conn_state) { - /* old_crtc_state and old_conn_state are NULL when called from DP_MST */ - if (old_crtc_state && - intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI)) + if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI)) intel_ddi_post_disable_hdmi(encoder, old_crtc_state, old_conn_state); else
drivers/gpu/drm/i915/intel_dp_mst.c +1 -1
@@ -169,7 +169,7 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, intel_mst->connector =NULL ;if (intel_dp->active_mst_links ==0 ) { intel_dig_port->base.post_disable (&intel_dig_port->base, -NULL ,NULL ); + old_crtc_state,NULL );intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); }
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 29/29] drm/i915: Pass a crtc state to ddi post_disable from MST code
Quoted 10 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Pass an old crtc state to
intel_ddi_post_disable()from the MST code.Note that this crtc state won't necessaitly match the one that was passed to
intel_ddi_pre_enable()if the first stream to be enabled isn't the last stream to be disabled. But this is fine since the states should be identical in every important way. This does mean people frobbing the DDI pre_enable/post_disable hooks have to pay attention in what parts of the state they consult.
I wouldn't mind having some comments about this sprinkled here and there, independent of this patch...
BR,
Jani.
Quoted 40 lines
The alternative would be to inline the relevant code into the MST code. That is actually what we used to do for
pre_enablebefore commite081c8463ac9("drm/i915: Remove duplicate DDI enabling logic from MST path"). Forpost_disablewe've always called the DDI hook.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 4 +--- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +1
-3@@ -2290,9 +2290,7 @@ static void intel_ddi_post_disable(struct intel_encoder *encoder, const struct intel_crtc_state *old_crtc_state, const struct drm_connector_state *old_conn_state) { - /* old_crtc_state and old_conn_state are NULL when called from DP_MST */ - if (old_crtc_state && - intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI)) + if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI)) intel_ddi_post_disable_hdmi(encoder, old_crtc_state, old_conn_state); elsedrivers/gpu/drm/i915/intel_dp_mst.c +1
-1@@ -169,7 +169,7 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, intel_mst->connector =NULL ;if (intel_dp->active_mst_links ==0 ) { intel_dig_port->base.post_disable (&intel_dig_port->base, -NULL ,NULL ); + old_crtc_state,NULL );intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF ); }
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 26 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
This series aims to eliminate the DDI
encoder->typeshenanigans. Afterwardsencoder->typewill permanently be "DDI" for DDI DP/HDMI ports, and "EDP" for DDI eDP ports. To figure out in which mode we want to drive the port we use theoutput_typesbitmask, which for DDI will be computed by the new .compute_output_type() encoder hook.Originally (some years ago?) I simply planned to avoid this role switching for the DDI encoders by splitting each encoders into two two separate instances (which is how the pre-DDI platforms work). I even posted a patch series achieving this. But the series didn't land before LSPCON happened and at that point I figured that we actually might want to switch the encoder mode as needed. So I came up with this alternative apporach (and introduced the
output_typesbitmask). Unfortunately I never managed to land the remaining bits.Having a single encoder per DDI port does have the benefit of giving userspace a hint that there's no way to enable both the DP and HDMI connectors handing off it at the same time. With pre-DDI platforms userspace has no idea which connectors are tied to the same port. So one might argue that this is indeed the better approach.
Quoted 8 lines
Since I last posted this stuff a lot has changed in the DDI code (BXT and CNL at least, can't recall if SKL was a thing when I originally posted this stuff). So this series actually turned out into a rather massive "clean up DDI" series. I regret it ending up this big, but I don't think I want to start spliting it up at this point. So I'll just offer my apologies and post the series as is. The patches shouldn't be too tricky to read since it's basically just refactoring all over.
I reviewed the ones I replied to, maybe I'll continue when I'm less X_x.
But I glanced over the rest, and, FWIW, the series is
Quoted 49 lines
Entire series is available here:
git://github.com/vsyrjala/linux.gitddi_output_typesVille Syrjälä (29):
drm/i915: Replace some spaces with tabs
drm/i915: Shrinkbxt_ddi_buf_trans
drm/i915: Shrinkcnl_ddi_buf_trans
drm/i915: Dump 'output_types' in crtc state dump drm/i915: Extractintel_ddi_clk_disable()
drm/i915: Extractintel_disable_ddi_buf()
drm/i915: Inline the required bits ofintel_ddi_post_disable()into
intel_ddi_fdi_post_disable()
drm/i915: Splitintel_ddi_post_disable()into DP vs. HDMI variants drm/i915: Remove useless eDP check fromintel_ddi_pre_enable_dp()drm/i915: Splitintel_disable_ddi()into DP vs. HDMI variants drm/i915: Plumpcrtc_stateetc. directly tointel_ddi_pre_enable_{dp,hdmi}() drm/i915: Split intel_enable_ddi() into DP and HDMI variants drm/i915: Relocate intel_ddi_get_buf_trans_*() functions drm/i915: Extract intel_ddi_get_buf_trans_hdmi() drm/i915: Pass the encoder type explicitly to skl_set_iboost() drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers() drm/i915: Integrate BXT into intel_ddi_dp_voltage_max() drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly drm/i915: Kill off the BXT buf_trans default_index drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers() drm/i915: Start using output_types for DPLL selection drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling drm/i915: Stop frobbing with DDI encoder->type drm/i915: Unify error handling for missing DDI buf trans tables drm/i915: Clear up the types we use for DDI buf trans level/n_entries drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->portdrm/i915: Pass a crtc state to ddi
post_disablefrom MST codedrivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 973 ++++++++++++++++++---------------- drivers/gpu/drm/i915/intel_display.c | 59 ++- drivers/gpu/drm/i915/intel_dp.c | 19 +- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/intel_dpll_mgr.c | 36 +- drivers/gpu/drm/i915/intel_drv.h | 7 +- drivers/gpu/drm/i915/intel_hdmi.c | 10 +- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 9 files changed, 603 insertions(+), 507 deletions(-)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux
URL : https://patchwork.freedesktop.org/series/30548/
State : failure
== Summary ==
Series 30548v1 drm/i915: Eliminate DDI encoder->type frobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> INCOMPLETE (fi-bxt-j4205)
pass -> INCOMPLETE (fi-glk-2a) fdo#102456
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-snb-2600) fdo#100215 +1
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> DMESG-WARN (fi-bdw-5557u) fdo#102473
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
dmesg-warn -> INCOMPLETE (fi-cfl-s) fdo#102294fdo#102456 https://bugs.freedesktop.org/show_bug.cgi?id=102456
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#102473 https://bugs.freedesktop.org/show_bug.cgi?id=102473
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fi-bdw-5557u total:289 pass:267 dwarn:1 dfail:0 fail:0 skip:21 time:448s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:479s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:425s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:514s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:279s fi-bxt-j4205 total:118 pass:97 dwarn:0 dfail:0 fail:0 skip:20 fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:500s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:494s fi-cfl-s total:230 pass:188 dwarn:16 dfail:0 fail:0 skip:25 fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:422s fi-glk-2a total:118 pass:96 dwarn:0 dfail:0 fail:0 skip:21 fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:439s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:406s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:430s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:492s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:464s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:472s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:585s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:594s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:547s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:754s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:494s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:480s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:571s fi-snb-2600 total:289 pass:248 dwarn:0 dfail:0 fail:2 skip:39 time:415s
8df48428bfcc51ccef4090d492be55456aaa9550 drm-tip: 2017y-09m-18d-18h-50m-09s UTC integration manifest e50c40089e3a drm/i915: Pass a crtc state to ddi post_disable from MST codee279afc23903 drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port eabfc5adc061 drm/i915: Clear up the types we use for DDI buf trans level/n_entries 127b08ca7d8d drm/i915: Unify error handling for missing DDI buf trans tablesa71dab9be96d drm/i915: Stop frobbing with DDI encoder->typec149f08629da drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handlingd5650c006e55 drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() 898298f086c0 drm/i915: Start using output_types for DPLL selectiona8af5fe2b6ca drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()f0df0ff84d08 drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() 49792d580f97 drm/i915: Kill off the BXT buf_trans default_index23b57b623392 drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly 9b8ce7171f8d drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()16d8b06c277e drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()f5372a3b5300 drm/i915: Pass the encoder type explicitly to skl_set_iboost()396c9c156652 drm/i915: Extract intel_ddi_get_buf_trans_hdmi()2a144725b34a drm/i915: Relocate intel_ddi_get_buf_trans_*() functionsf80c3f6fe116 drm/i915: Split intel_enable_ddi() into DP and HDMI variantsb98f298aa0c4 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() 4cc762ddd4ec drm/i915: Split intel_disable_ddi() into DP vs. HDMI variantsd63c46e7fd94 drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()e0d0a67712d3 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants 773310ba18fe drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() a6748bdf5fd6 drm/i915: Extract intel_disable_ddi_buf()cb79df55727f drm/i915: Extract intel_ddi_clk_disable()b5c00b114c6d drm/i915: Dump 'output_types' in crtc state dumpd75366c31f10 drm/i915: Shrink cnl_ddi_buf_transfd81258187e6 drm/i915: Shrink bxt_ddi_buf_trans28402a1e6661 drm/i915: Replace some spaces with tabs
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5740/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
URL : https://patchwork.freedesktop.org/series/30548/
State : failure
== Summary ==
Series 30548v2 drm/i915: Eliminate DDI encoder->type frobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/2/mbox/
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> INCOMPLETE (fi-bxt-j4205)
incomplete -> PASS (fi-kbl-7500u) fdo#102850
pass -> INCOMPLETE (fi-glk-1)
Test kms_force_connector_basic:
Subgroup force-connector-state:
skip -> PASS (fi-ivb-3520m)
Subgroup force-edid:
skip -> PASS (fi-ivb-3520m)
Subgroup force-load-detect:
skip -> PASS (fi-ivb-3520m)
Subgroup prune-stale-modes:
skip -> PASS (fi-ivb-3520m)
Test pm_rpm:
Subgroup basic-rte:
dmesg-warn -> PASS (fi-cfl-s) fdo#102294fdo#102850 https://bugs.freedesktop.org/show_bug.cgi?id=102850
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:450s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:467s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:422s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:517s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:280s fi-bxt-j4205 total:118 pass:97 dwarn:0 dfail:0 fail:0 skip:20 fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:500s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:494s fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:540s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:418s fi-glk-1 total:118 pass:96 dwarn:0 dfail:0 fail:0 skip:21 fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:428s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:406s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:434s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:492s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:462s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:476s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:541s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:757s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:495s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:474s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:581s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:422s
ed7a99bf23cea2276e77ba26d219e58e069d1e32 drm-tip: 2017y-09m-20d-11h-03m-37s UTC integration manifest 1a3cc94fd8a2 drm/i915: Pass a crtc state to ddi post_disable from MST codefe29fba4c99a drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port 16cf6a4a256f drm/i915: Clear up the types we use for DDI buf trans level/n_entries 4879849898e3 drm/i915: Unify error handling for missing DDI buf trans tablesa268529d63e0 drm/i915: Stop frobbing with DDI encoder->type08833641db2d drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling2eac6ef17b52 drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() 50dfaa9fe719 drm/i915: Start using output_types for DPLL selection22a4439a1fc3 drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()225af3872bee drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() 57076a4e4999 drm/i915: Kill off the BXT buf_trans default_indexc54c4ebe5188 drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly 2da510f28eea drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()732f6537f3c7 drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()64ddfd7839a0 drm/i915: Pass the encoder type explicitly to skl_set_iboost()7ec30a4df53d drm/i915: Extract intel_ddi_get_buf_trans_hdmi()0414a981af1d drm/i915: Relocate intel_ddi_get_buf_trans_*() functions9dc0432deb03 drm/i915: Split intel_enable_ddi() into DP and HDMI variants0273999dbbc4 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() f0128eeec610 drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants1deea5bbfcb6 drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()e7d37699f8d8 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants 42da9cda7afe drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() fe28dbeddd65 drm/i915: Extract intel_disable_ddi_buf()98a742399fda drm/i915: Extract intel_ddi_clk_disable()6da3b4b7cfd9 drm/i915: Dump 'output_types' in crtc state dump
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5764/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
URL : https://patchwork.freedesktop.org/series/30548/
State : failure
== Summary ==
Series 30548v2 drm/i915: Eliminate DDI encoder->type frobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/2/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> INCOMPLETE (fi-bxt-j4205)
incomplete -> PASS (fi-kbl-7500u) fdo#102850
pass -> INCOMPLETE (fi-glk-1)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-snb-2600) fdo#100215 +1
Test kms_force_connector_basic:
Subgroup force-connector-state:
skip -> PASS (fi-ivb-3520m)
Subgroup force-edid:
skip -> PASS (fi-ivb-3520m)
Subgroup force-load-detect:
skip -> PASS (fi-ivb-3520m)
Subgroup prune-stale-modes:
skip -> PASS (fi-ivb-3520m)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
pass -> INCOMPLETE (fi-kbl-r)
Test pm_rpm:
Subgroup basic-rte:
dmesg-warn -> PASS (fi-cfl-s) fdo#102294fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#102850 https://bugs.freedesktop.org/show_bug.cgi?id=102850
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:440s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:470s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:421s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:508s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:277s fi-bxt-j4205 total:118 pass:97 dwarn:0 dfail:0 fail:0 skip:20 fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:489s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:491s fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:544s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:416s fi-glk-1 total:118 pass:96 dwarn:0 dfail:0 fail:0 skip:21 fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:425s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:407s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:429s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:498s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:465s fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:1 skip:24 time:456s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s fi-kbl-r total:247 pass:222 dwarn:0 dfail:0 fail:0 skip:24 fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:552s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:454s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:752s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:485s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:475s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:562s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:419s
ed7a99bf23cea2276e77ba26d219e58e069d1e32 drm-tip: 2017y-09m-20d-11h-03m-37s UTC integration manifest 890d6dc6b2aa drm/i915: Pass a crtc state to ddi post_disable from MST code7b7455924657 drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port 978b911cca2d drm/i915: Clear up the types we use for DDI buf trans level/n_entries fb971aa20d2a drm/i915: Unify error handling for missing DDI buf trans tables694adc37f601 drm/i915: Stop frobbing with DDI encoder->typeeb1e0a33a9cf drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handlinge381f6681ece drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() b55f585b033b drm/i915: Start using output_types for DPLL selectionb22c723225d8 drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()e6166993c1a5 drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() fb0aac2a617e drm/i915: Kill off the BXT buf_trans default_indexc5c8d13588ba drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly 80c0dd1f3c9a drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()0710cd26cc3e drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()76737af9ab89 drm/i915: Pass the encoder type explicitly to skl_set_iboost()d9417ff3e3c2 drm/i915: Extract intel_ddi_get_buf_trans_hdmi()1c4530c335a9 drm/i915: Relocate intel_ddi_get_buf_trans_*() functions49ab57d7a0e4 drm/i915: Split intel_enable_ddi() into DP and HDMI variants019b8ee5fe96 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() fb7f9bb1b8cf drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants2762aa278a8f drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()7f2ce0ba9564 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants c3ca3bcf5f9f drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() f1e5c7891191 drm/i915: Extract intel_disable_ddi_buf()aa887ee4b31f drm/i915: Extract intel_ddi_clk_disable()a50c14868185 drm/i915: Dump 'output_types' in crtc state dump
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5767/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
Quoted 11 lines · Patchwork
== Series Details ==
Series: drm/i915: Eliminate DDI
encoder->typefrobbery redux (rev2)
URL : https://patchwork.freedesktop.org/series/30548/
State : failure== Summary ==
Series 30548v2 drm/i915: Eliminate DDI
encoder->typefrobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/2/mbox/
Quoted 7 lines
Test chamelium:
Subgroup dp-crc-fast: pass -> FAIL (fi-kbl-7500u) fdo#102514 Test gem_exec_suspend: Subgroup basic-s3: pass -> INCOMPLETE (fi-bxt-j4205) pass -> INCOMPLETE (fi-glk-1)
3 out of 3. I guess I'll have to believe that there's a real problem somewhere :(
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: ✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev2)
Quoted 2 lines · Ville Syrjälä
3 out of 3. I guess I'll have to believe that there's a real problem somewhere :(
I don't think it's unreasonable to send the obviously good and reviewed prep patches first in a separate thread and have them tested and merged.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev3)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux (rev3)
URL : https://patchwork.freedesktop.org/series/30548/
State : failure
== Summary ==
Series 30548v3 drm/i915: Eliminate DDI encoder->type frobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/3/mbox/
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Test gem_ringfill:
Subgroup basic-default-hang:
pass -> DMESG-WARN (fi-pnv-d510) fdo#101600
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215 +1
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-b-frame-sequence:
dmesg-warn -> DMESG-FAIL (fi-cfl-s) fdo#102294
Subgroup nonblocking-crc-pipe-c:
skip -> INCOMPLETE (fi-cfl-s)
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Test pm_rpm:
Subgroup basic-pci-d3-state:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Subgroup basic-rte:
pass -> DMESG-WARN (fi-bxt-j4205)
pass -> DMESG-WARN (fi-glk-1)
Test prime_vgem:
Subgroup basic-fence-flip:
pass -> DMESG-WARN (fi-bxt-j4205)
Test drv_module_reload:
Subgroup basic-no-display:
pass -> DMESG-WARN (fi-glk-1) fdo#102777 +1fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:437s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:475s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:427s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:518s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:278s fi-bxt-j4205 total:289 pass:253 dwarn:7 dfail:0 fail:0 skip:29 time:499s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:491s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:492s fi-cfl-s total:237 pass:188 dwarn:21 dfail:1 fail:0 skip:26 fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-glk-1 total:289 pass:252 dwarn:8 dfail:0 fail:0 skip:29 time:565s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:427s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:403s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:435s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:491s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:465s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:472s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:539s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:446s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:755s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:483s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:466s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:566s fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:415s
bed15796ff696a0a77324b69cfad9e61b50a70a4 drm-tip: 2017y-09m-20d-20h-05m-31s UTC integration manifest e27cac9ba960 drm/i915: Pass a crtc state to ddi post_disable from MST code0de78b80d54d drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port 512bce39587a drm/i915: Clear up the types we use for DDI buf trans level/n_entries 0bfc26bcb85a drm/i915: Unify error handling for missing DDI buf trans tablesacd739878a0d drm/i915: Stop frobbing with DDI encoder->typefe543e6e9956 drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling53dc033bc713 drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() bf43d01f9b85 drm/i915: Start using output_types for DPLL selection82110cd8fcdc drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()d6e133e0c390 drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() e4dddbd46d4a drm/i915: Kill off the BXT buf_trans default_index1727a8a0d78f drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly 6fc3b1ac84ac drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()77f8db0d5f2a drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()f413603092a8 drm/i915: Pass the encoder type explicitly to skl_set_iboost()27ce6fab642a drm/i915: Extract intel_ddi_get_buf_trans_hdmi()647d8866ce4d drm/i915: Relocate intel_ddi_get_buf_trans_*() functionsc5be6cf39218 drm/i915: Split intel_enable_ddi() into DP and HDMI variantscfd67d118732 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() 5135c85b0717 drm/i915: Split intel_disable_ddi() into DP vs. HDMI variantsf81e433332dd drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()b24ce6e13762 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants e7ecb9c0cf68 drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() 8e68ed089e02 drm/i915: Extract intel_disable_ddi_buf()2f0de2f3995a drm/i915: Extract intel_ddi_clk_disable()931ac08eaae4 drm/i915: Dump 'output_types' in crtc state dump
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5777/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Eliminate DDI encoder->type frobbery redux (rev4)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux (rev4)
URL : https://patchwork.freedesktop.org/series/30548/
State : success
== Summary ==
Series 30548v4 drm/i915: Eliminate DDI encoder->type frobbery redux
https://patchwork.freedesktop.org/api/1.0/series/30548/revisions/4/mbox/
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2600) fdo#100215
Test drv_module_reload:
Subgroup basic-reload:
pass -> DMESG-WARN (fi-glk-1) fdo#102777fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:442s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:468s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:419s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:514s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:279s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:495s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:494s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:490s fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:545s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-glk-1 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:564s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:423s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:401s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:432s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:487s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:462s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:471s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:579s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:584s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:542s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:759s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:490s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:476s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:570s fi-snb-2600 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:416s
01a2040bb790263c0d32ec30d83bd2ddf3b922c2 drm-tip: 2017y-09m-21d-13h-23m-06s UTC integration manifest 0d436ce0607c drm/i915: Pass a crtc state to ddi post_disable from MST code06ee9d5e1968 drm/i915: Replace most intel_ddi_get_encoder_port() alls with encoder->port 35f95362bef7 drm/i915: Clear up the types we use for DDI buf trans level/n_entries 75d4c084aa69 drm/i915: Unify error handling for missing DDI buf trans tablesb740892f7d5f drm/i915: Stop frobbing with DDI encoder->typeb8b0743053f6 drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handlingc9ecfc1b6dae drm/i915: Stop using encoder->type in intel_ddi_enable_transcoder_func() 9df2b07256dc drm/i915: Start using output_types for DPLL selectionc395dd510660 drm/i915: Pass crtc state to intel_prepare_dp_ddi_buffers()67099547f5c4 drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings() 934c4f1c46db drm/i915: Kill off the BXT buf_trans default_indexb4c12f00b0ab drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly 9265fe78bec2 drm/i915: Integrate BXT into intel_ddi_dp_voltage_max()bae07ed9119f drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()5e1400daa0af drm/i915: Pass the encoder type explicitly to skl_set_iboost()2d0d93dba6ac drm/i915: Extract intel_ddi_get_buf_trans_hdmi()bc6bf91f6815 drm/i915: Relocate intel_ddi_get_buf_trans_*() functions5da01d6a42c6 drm/i915: Split intel_enable_ddi() into DP and HDMI variants17f0fa8b4714 drm/i915: Plump crtc_state etc. directly to intel_ddi_pre_enable_{dp, hdmi}() 3fc8810273fc drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants578f4af09991 drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp()e43133e54173 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants 66dc29cdd552 drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() 6bca6d71144f drm/i915: Extract intel_disable_ddi_buf()a0cc3a170cf3 drm/i915: Extract intel_ddi_clk_disable()f5f173ad95f3 drm/i915: Dump 'output_types' in crtc state dump
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5782/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for drm/i915: Eliminate DDI encoder->type frobbery redux (rev4)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Eliminate DDI encoder->type frobbery redux (rev4)
URL : https://patchwork.freedesktop.org/series/30548/
State : failure
== Summary ==
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252 +1
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_flip:
Subgroup plain-flip-ts-check-interruptible:
pass -> FAIL (shard-hsw)fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
shard-hsw total:2429 pass:1330 dwarn:4 dfail:0 fail:12 skip:1083 time:9788s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5782/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx