drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
Subsystems (3)
PATCH v7 1/6 drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
In case of tiled displays when the two tiles are sent across two CRTCs over two separate DP SST connectors, we need a mechanism to synchronize the two CRTCs and their corresponding transcoders.
So use the master-slave mode where there is one master corresponding to last horizontal and vertical tile that needs to be genlocked with all other slave tiles.
This patch identifies saves the master transcoder in all the slave CRTC states. This is needed to select the master CRTC/transcoder while configuring transcoder port sync for the corresponding slaves.
v5:
* Address Ville's comments
* Just pass crtc_state, no need to check GEN (Ville)
v4:
* Rebase
v3:
* Use master_tramscoder instead of master_crtc for valid
HW state readouts (Ville)
v2:
* Move this to intel_mode_set_pipe_config(Jani N, Ville)
* Use slave_bitmask to save associated slaves in master crtc state (Ville)
--- drivers/gpu/drm/i915/display/intel_display.c | 118 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_display.h | 2 + .../drm/i915/display/intel_display_types.h | 6 + 3 files changed, 126 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +118 -0
@@ -521,6 +521,20 @@ needs_modeset(const struct intel_crtc_state *state)return drm_atomic_crtc_needs_modeset (&state->base); } +bool +is_trans_port_sync_mode (const struct intel_crtc_state *crtc_state) +{ +return (crtc_state->master_transcoder !=INVALID_TRANSCODER || + crtc_state->sync_mode_slaves_mask); +} + +static bool +is_trans_port_sync_master (const struct intel_crtc_state *crtc_state) +{ +return (crtc_state->master_transcoder ==INVALID_TRANSCODER && + crtc_state->sync_mode_slaves_mask); +} +/* * Platform specific helpers to calculate the port PLL loopback- (clock.m), * and post-divider (clock.p) values, pre- (clock.vco) and post-divided fast
@@ -11816,6 +11830,91 @@ static bool c8_planes_changed(const struct intel_crtc_state *new_crtc_state)return !old_crtc_state->c8_planes != !new_crtc_state->c8_planes; } +static int icl_add_sync_mode_crtcs (struct intel_crtc_state *crtc_state) +{ +struct drm_crtc *crtc = crtc_state->base.crtc; +struct intel_atomic_state *state =to_intel_atomic_state (crtc_state->base.state); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_connector *master_connector, *connector; +struct drm_connector_state *connector_state; +struct drm_connector_list_iter conn_iter; +struct drm_crtc *master_crtc =NULL ; +struct drm_crtc_state *master_crtc_state; +struct intel_crtc_state *master_pipe_config; +int i, tile_group_id; + +if (INTEL_GEN (dev_priv) <11 ) +return 0 ; + +/* +* In case of tiled displays there could be one or more slaves but there is +* only one master. Lets make the CRTC used by the connector corresponding +* to the last horizonal and last vertical tile a master/genlock CRTC. +* All the other CRTCs corresponding to other tiles of the same Tile group +* are the slave CRTCs and hold a pointer to their genlock CRTC. +*/ +for_each_new_connector_in_state (&state->base, connector, connector_state, i) { +if (connector_state->crtc != crtc) +continue ; +if (!connector->has_tile) +continue ; +if (crtc_state->base.mode.hdisplay != connector->tile_h_size || + crtc_state->base.mode.vdisplay != connector->tile_v_size) +return 0 ; +if (connector->tile_h_loc == connector->num_h_tile -1 && + connector->tile_v_loc == connector->num_v_tile -1 ) +continue ; + crtc_state->sync_mode_slaves_mask =0 ; + tile_group_id = connector->tile_group->id; +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter); +drm_for_each_connector_iter (master_connector, &conn_iter) { +struct drm_connector_state *master_conn_state =NULL ; + +if (!master_connector->has_tile) +continue ; +if (master_connector->tile_h_loc != master_connector->num_h_tile -1 || + master_connector->tile_v_loc != master_connector->num_v_tile -1 ) +continue ; +if (master_connector->tile_group->id != tile_group_id) +continue ; + + master_conn_state =drm_atomic_get_connector_state (&state->base, + master_connector); +if (IS_ERR (master_conn_state)) { +drm_connector_list_iter_end (&conn_iter); +return PTR_ERR (master_conn_state); + } +if (master_conn_state->crtc) { + master_crtc = master_conn_state->crtc; +break ; + } + } +drm_connector_list_iter_end (&conn_iter); + +if (!master_crtc) { +DRM_DEBUG_KMS ("Could not find Master CRTC for Slave CRTC %d\n" , + connector_state->crtc->base.id); +return -EINVAL ; + } + + master_crtc_state =drm_atomic_get_crtc_state (&state->base, + master_crtc); +if (IS_ERR (master_crtc_state)) +return PTR_ERR (master_crtc_state); + + master_pipe_config =to_intel_crtc_state (master_crtc_state); + crtc_state->master_transcoder = master_pipe_config->cpu_transcoder; + master_pipe_config->sync_mode_slaves_mask |= +BIT (crtc_state->cpu_transcoder); +DRM_DEBUG_KMS ("Master Transcoder = %s added for Slave CRTC = %d, slave transcoder bitmask = %d\n" , +transcoder_name (crtc_state->master_transcoder), + crtc_state->base.crtc->base.id, + master_pipe_config->sync_mode_slaves_mask); + } + +return 0 ; +} +static int intel_crtc_atomic_check (struct drm_crtc *_crtc,struct drm_crtc_state *_crtc_state) {
@@ -12319,6 +12418,13 @@ clear_intel_crtc_state(struct intel_crtc_state *crtc_state)if (IS_G4X (dev_priv) ||IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) saved_state->wm = crtc_state->wm; +/* +* Save the slave bitmask which gets filled for master crtc state during +* slave atomic check call. +*/ +if (is_trans_port_sync_master (crtc_state)) + saved_state->sync_mode_slaves_mask = + crtc_state->sync_mode_slaves_mask;/* Keep base drm_crtc_state intact, only clear our extended struct */ BUILD_BUG_ON (offsetof(struct intel_crtc_state , base));
@@ -12412,6 +12518,15 @@ intel_modeset_pipe_config(struct intel_crtc_state *pipe_config)drm_mode_set_crtcinfo (&pipe_config->base.adjusted_mode,CRTC_STEREO_DOUBLE ); +/* Set the crtc_state defaults for trans_port_sync */ + pipe_config->master_transcoder =INVALID_TRANSCODER ; + ret =icl_add_sync_mode_crtcs (pipe_config); +if (ret) { +DRM_DEBUG_KMS ("Cannot assign Sync Mode CRTCs: %d\n" , + ret); +return ret; + } +/* Pass our mode to the connectors and the CRTC to give them a chance to * adjust it according to limitations or connector properties, and also * a chance to reject the mode entirely.
@@ -12927,6 +13042,9 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,PIPE_CONF_CHECK_INFOFRAME (hdmi);PIPE_CONF_CHECK_INFOFRAME (drm); +PIPE_CONF_CHECK_I (sync_mode_slaves_mask); +PIPE_CONF_CHECK_I (master_transcoder); +#undef PIPE_CONF_CHECK_X#undef PIPE_CONF_CHECK_I#undef PIPE_CONF_CHECK_BOOL
drivers/gpu/drm/i915/display/intel_display.h +2 -0
@@ -93,6 +93,7 @@ enum pipe {#define pipe_name (p) ((p) + 'A')enum transcoder { +INVALID_TRANSCODER =-1 ,/* * The following transcoders have a 1:1 transcoder -> pipe mapping, * keep their values fixed: the code assumes that TRANSCODER_A=0, the
@@ -453,6 +454,7 @@ enum drm_mode_status intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv, const struct drm_display_mode *mode);enum phy intel_port_to_phy (struct drm_i915_private *i915,enum port port); +bool is_trans_port_sync_mode (const struct intel_crtc_state *state);void intel_plane_destroy (struct drm_plane *plane);void i830_enable_pipe (struct drm_i915_private *dev_priv,enum pipe pipe);
drivers/gpu/drm/i915/display/intel_display_types.h +6 -0
@@ -991,6 +991,12 @@ struct intel_crtc_state {/* Forward Error correction State */ bool fec_enable; + +/* Pointer to master transcoder in case of tiled displays */ +enum transcoder master_transcoder; + +/* Bitmask to indicate slaves attached */ +u8 sync_mode_slaves_mask; };struct intel_crtc {
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 2/6 drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports
In case of tiled displays where different tiles are displayed across different ports, we need to synchronize the transcoders involved. This patch implements the transcoder port sync feature for synchronizing one master transcoder with one or more slave transcoders. This is only enbaled in slave transcoder
and the master transcoder is unaware that it is operating in this mode.
This has been tested with tiled display connected to ICL.
v6:
* Use master_trans +1 and address missing trans_edp case (Ville) v5:
* Add TRANSCODER_D case and MISSING_CASE (Maarten)
v4:
Rebase
v3:
* Check of DP_MST moved to atomic_check (Maarten)
v2:
* Do not use RMW, just write to the register in commit (Jani N)
--- drivers/gpu/drm/i915/display/intel_display.c | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +33 -0
@@ -4415,6 +4415,36 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } +static void icl_enable_trans_port_sync (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); +u32 trans_ddi_func_ctl2_val; +u8 master_select; + +/* +* Configure the master select and enable Transcoder Port Sync for +* Slave CRTCs transcoder. +*/ +if (crtc_state->master_transcoder ==INVALID_TRANSCODER ) +return ; + +if (crtc_state->master_transcoder ==TRANSCODER_EDP ) + master_select =0 ; +else + master_select = crtc_state->master_transcoder +1 ; + +/* Set the master select bits for Tranascoder Port Sync */ + trans_ddi_func_ctl2_val = (PORT_SYNC_MODE_MASTER_SELECT (master_select) & +PORT_SYNC_MODE_MASTER_SELECT_MASK ) << +PORT_SYNC_MODE_MASTER_SELECT_SHIFT ; +/* Enable Transcoder Port Sync */ + trans_ddi_func_ctl2_val |=PORT_SYNC_MODE_ENABLE ; + +I915_WRITE (TRANS_DDI_FUNC_CTL2 (crtc_state->cpu_transcoder), + trans_ddi_func_ctl2_val); +} +static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state,const struct intel_crtc_state *new_crtc_state) {
@@ -6478,6 +6508,9 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,if (!transcoder_is_dsi (cpu_transcoder))intel_set_pipe_timings (pipe_config); +if (INTEL_GEN (dev_priv) >=11 ) +icl_enable_trans_port_sync (pipe_config); +intel_set_pipe_src_size (pipe_config); if (cpu_transcoder != TRANSCODER_EDP &&
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 3/6 drm/i915/display/icl: HW state readout for transcoder port sync config
In reply to Manasi NavareAfter the state is committed, we readout the HW registers and compare the HW state with the SW state that we just committed.
For Transcdoer port sync, we add master_transcoder and the salves bitmask to the crtc_state, hence we need to read those during the HW state readout to avoid pipe state mismatch.
v8:
* Use master_select -1, address TRANS_EDP case (Ville)
* Rename master_transcoder to _readout (Lucas)
v7:
* NDont read HW state for DSI
v6:
* Go through both parts of HW readout (Maarten)
* Add a WARN if the same trans configured as
master and slave (Ville, Maarten)
v5:
* Add return INVALID in defaut case (Maarten)
v4:
* Get power domains in master loop for get_config (Ville) v3:
* Add TRANSCODER_D (Maarten)
* v3 Reviewed-by: Maarten Lankhorst <[email protected]> v2:
* Add Transcoder_D and MISSING_CASE (Maarten)
--- drivers/gpu/drm/i915/display/intel_display.c | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +57 -0
@@ -10481,6 +10481,59 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc, } } +static enum transcoder transcoder_master_readout (struct drm_i915_private *dev_priv, +enum transcoder cpu_transcoder) +{ +u32 trans_port_sync, master_select; + + trans_port_sync =I915_READ (TRANS_DDI_FUNC_CTL2 (cpu_transcoder)); + +if ((trans_port_sync &PORT_SYNC_MODE_ENABLE ) ==0 ) +return INVALID_TRANSCODER ; + + master_select = trans_port_sync & +PORT_SYNC_MODE_MASTER_SELECT_MASK ; +if (master_select ==0 ) +return TRANSCODER_EDP ; +else +return master_select -1 ; +} + +static void icelake_get_trans_port_sync_config (struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +u32 transcoders; +enum transcoder cpu_transcoder; + + crtc_state->master_transcoder =transcoder_master_readout (dev_priv, + crtc_state->cpu_transcoder); + + transcoders =BIT (TRANSCODER_A ) | +BIT (TRANSCODER_B ) | +BIT (TRANSCODER_C ) | +BIT (TRANSCODER_D ); +for_each_cpu_transcoder_masked (dev_priv, cpu_transcoder, transcoders) { +enum intel_display_power_domain power_domain; +intel_wakeref_t trans_wakeref; + + power_domain =POWER_DOMAIN_TRANSCODER (cpu_transcoder); + trans_wakeref =intel_display_power_get_if_enabled (dev_priv, + power_domain); + +if (!trans_wakeref) +continue ; + +if (transcoder_master_readout (dev_priv, cpu_transcoder) == + crtc_state->cpu_transcoder) + crtc_state->sync_mode_slaves_mask |=BIT (cpu_transcoder); + +intel_display_power_put (dev_priv, power_domain, trans_wakeref); + } + +WARN_ON (crtc_state->master_transcoder !=INVALID_TRANSCODER && + crtc_state->sync_mode_slaves_mask); +} +static bool haswell_get_pipe_config (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config) {
@@ -10600,6 +10653,10 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, pipe_config->pixel_multiplier =1 ; } +if (INTEL_GEN (dev_priv) >=11 && + !transcoder_is_dsi (pipe_config->cpu_transcoder)) +icelake_get_trans_port_sync_config (pipe_config); + out:for_each_power_domain (power_domain, power_domain_mask) intel_display_power_put(dev_priv,
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 3/6 drm/i915/display/icl: HW state readout for transcoder port sync config
After the state is committed, we readout the HW registers and compare the HW state with the SW state that we just committed.
For Transcdoer port sync, we add master_transcoder and the salves bitmask to the crtc_state, hence we need to read those during the HW state readout to avoid pipe state mismatch.
v9:
* Initialize master_transcoder = INVALID at get config (Ville) v8:
* Use master_select -1, address TRANS_EDP case (Ville)
* Rename master_transcoder to _readout (Lucas)
v7:
* NDont read HW state for DSI
v6:
* Go through both parts of HW readout (Maarten)
* Add a WARN if the same trans configured as
master and slave (Ville, Maarten)
v5:
* Add return INVALID in defaut case (Maarten)
v4:
* Get power domains in master loop for get_config (Ville) v3:
* Add TRANSCODER_D (Maarten)
* v3 Reviewed-by: Maarten Lankhorst <[email protected]> v2:
* Add Transcoder_D and MISSING_CASE (Maarten)
--- drivers/gpu/drm/i915/display/intel_display.c | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +59 -0
@@ -10481,6 +10481,59 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc, } } +static enum transcoder transcoder_master_readout (struct drm_i915_private *dev_priv, +enum transcoder cpu_transcoder) +{ +u32 trans_port_sync, master_select; + + trans_port_sync =I915_READ (TRANS_DDI_FUNC_CTL2 (cpu_transcoder)); + +if ((trans_port_sync &PORT_SYNC_MODE_ENABLE ) ==0 ) +return INVALID_TRANSCODER ; + + master_select = trans_port_sync & +PORT_SYNC_MODE_MASTER_SELECT_MASK ; +if (master_select ==0 ) +return TRANSCODER_EDP ; +else +return master_select -1 ; +} + +static void icelake_get_trans_port_sync_config (struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +u32 transcoders; +enum transcoder cpu_transcoder; + + crtc_state->master_transcoder =transcoder_master_readout (dev_priv, + crtc_state->cpu_transcoder); + + transcoders =BIT (TRANSCODER_A ) | +BIT (TRANSCODER_B ) | +BIT (TRANSCODER_C ) | +BIT (TRANSCODER_D ); +for_each_cpu_transcoder_masked (dev_priv, cpu_transcoder, transcoders) { +enum intel_display_power_domain power_domain; +intel_wakeref_t trans_wakeref; + + power_domain =POWER_DOMAIN_TRANSCODER (cpu_transcoder); + trans_wakeref =intel_display_power_get_if_enabled (dev_priv, + power_domain); + +if (!trans_wakeref) +continue ; + +if (transcoder_master_readout (dev_priv, cpu_transcoder) == + crtc_state->cpu_transcoder) + crtc_state->sync_mode_slaves_mask |=BIT (cpu_transcoder); + +intel_display_power_put (dev_priv, power_domain, trans_wakeref); + } + +WARN_ON (crtc_state->master_transcoder !=INVALID_TRANSCODER && + crtc_state->sync_mode_slaves_mask); +} +static bool haswell_get_pipe_config (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config) {
@@ -10490,6 +10543,8 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,u64 power_domain_mask;bool active; + pipe_config->master_transcoder =INVALID_TRANSCODER ; +intel_crtc_init_scalers (crtc, pipe_config); power_domain =POWER_DOMAIN_PIPE (crtc->pipe);
@@ -10600,6 +10655,10 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, pipe_config->pixel_multiplier =1 ; } +if (INTEL_GEN (dev_priv) >=11 && + !transcoder_is_dsi (pipe_config->cpu_transcoder)) +icelake_get_trans_port_sync_config (pipe_config); + out:for_each_power_domain (power_domain, power_domain_mask) intel_display_power_put(dev_priv,
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 4/6 drm/i915/display/icl: Enable master-slaves in trans port sync
In reply to Manasi NavareAs per the display enable sequence, we need to follow the enable sequence for slaves first with DP_TP_CTL set to Idle and configure the transcoder port sync register to select the corersponding master, then follow the enable sequence for master leaving DP_TP_CTL to idle.
At this point the transcoder port sync mode is configured and enabled and the Vblanks of both ports are synchronized so then set DP_TP_CTL for the slave and master to Normal and do post crtc enable updates.
v7:
* Use ffs(slaves) to get slave crtc (Ville)
v6:
* Modeset implies active_changed, remove one condition (Maarten) v5:
* Fix checkpatch warning (Manasi)
v4:
* Reuse skl_commit_modeset_enables() hook (Maarten)
* Obtain slave crtc and states from master (Maarten) v3:
* Rebase on drm-tip (Manasi)
v2:
* Create a icl_update_crtcs hook (Maarten, Danvet)
* This sequence only for CRTCs in trans port sync mode (Maarten)
--- drivers/gpu/drm/i915/display/intel_ddi.c | 3 +- drivers/gpu/drm/i915/display/intel_display.c | 125 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_display.h | 2 + 3 files changed, 126 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +2 -1
@@ -3571,7 +3571,8 @@ static void hsw_ddi_pre_enable_dp(struct intel_encoder *encoder, true);intel_dp_sink_set_fec_ready (intel_dp, crtc_state);intel_dp_start_link_train (intel_dp); -if (port !=PORT_A ||INTEL_GEN (dev_priv) >=9 ) +if ((port !=PORT_A ||INTEL_GEN (dev_priv) >=9 ) && + !is_trans_port_sync_mode (crtc_state))intel_dp_stop_link_train (intel_dp);intel_ddi_enable_fec (encoder, crtc_state);
drivers/gpu/drm/i915/display/intel_display.c +122 -3
152 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_display.h +2 -0
@@ -27,6 +27,7 @@#include <drm/drm_util.h> #include <drm/i915_drm.h> +#include "intel_dp_link_training.h" enum link_m_n_set ;struct dpll ;
@@ -54,6 +55,7 @@ struct intel_plane;struct intel_plane_state ;struct intel_remapped_info ;struct intel_rotation_info ; +struct intel_crtc_state ;enum i915_gpio {GPIOA ,
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 5/6 drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence
In reply to Manasi NavareThis clears the transcoder port sync bits of the TRANS_DDI_FUNC_CTL2 register during crtc_disable().
v2:
* Directly write the trans_port_sync reg value (Maarten)
--- drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +22 -0
@@ -4445,6 +4445,25 @@ static void icl_enable_trans_port_sync(const struct intel_crtc_state *crtc_state trans_ddi_func_ctl2_val); } +static void icl_disable_transcoder_port_sync (const struct intel_crtc_state *old_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->base.crtc); +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); +i915_reg_t reg; +u32 trans_ddi_func_ctl2_val; + +if (old_crtc_state->master_transcoder ==INVALID_TRANSCODER ) +return ; + +DRM_DEBUG_KMS ("Disabling Transcoder Port Sync on Slave Transcoder %s\n" , +transcoder_name (old_crtc_state->cpu_transcoder)); + + reg =TRANS_DDI_FUNC_CTL2 (old_crtc_state->cpu_transcoder); + trans_ddi_func_ctl2_val = ~(PORT_SYNC_MODE_ENABLE | +PORT_SYNC_MODE_MASTER_SELECT_MASK ); +I915_WRITE (reg, trans_ddi_func_ctl2_val); +} +static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state,const struct intel_crtc_state *new_crtc_state) {
@@ -6689,6 +6708,9 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,if (intel_crtc_has_type (old_crtc_state,INTEL_OUTPUT_DP_MST ))intel_ddi_set_vc_payload_alloc (old_crtc_state, false); +if (INTEL_GEN (dev_priv) >=11 ) +icl_disable_transcoder_port_sync (old_crtc_state); +if (!transcoder_is_dsi (cpu_transcoder))intel_ddi_disable_transcoder_func (old_crtc_state);
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v7 6/6 drm/i915/display/icl: In port sync mode disable slaves first then master
In reply to Manasi NavareIn the transcoder port sync mode, the slave transcoders mask their vblanks until master transcoder's vblank so while disabling them, make sure slaves are disabled first and then the masters.
v5:
* Dont pass dev priv to get_slave_crtc (Ville)
v4:
* Obtain slave state from master (Maarten)
v3:
* Rebase
v2:
* Use the intel_old_crtc_state_disables() helper
--- drivers/gpu/drm/i915/display/intel_display.c | 58 ++++++++++++++++++-- 1 file changed, 52 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +52 -6
@@ -14012,6 +14012,37 @@ static void intel_old_crtc_state_disables(struct intel_atomic_state *state, new_crtc_state); } +static void intel_trans_port_sync_modeset_disables (struct intel_atomic_state *state, +struct intel_crtc *crtc, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *slave_crtc =intel_get_slave_crtc (new_crtc_state); +struct intel_crtc_state *new_slave_crtc_state = +intel_atomic_get_new_crtc_state (state, slave_crtc); +struct intel_crtc_state *old_slave_crtc_state = +intel_atomic_get_old_crtc_state (state, slave_crtc); + +WARN_ON (!slave_crtc || !new_slave_crtc_state || + !old_slave_crtc_state); + +/* Disable Slave first */ +intel_pre_plane_update (old_slave_crtc_state, new_slave_crtc_state); +if (old_slave_crtc_state->base.active) +intel_old_crtc_state_disables (state, + old_slave_crtc_state, + new_slave_crtc_state, + slave_crtc); + +/* Disable Master */ +intel_pre_plane_update (old_crtc_state, new_crtc_state); +if (old_crtc_state->base.active) +intel_old_crtc_state_disables (state, + old_crtc_state, + new_crtc_state, + crtc); +} +static void intel_commit_modeset_disables (struct intel_atomic_state *state) {struct intel_crtc_state *new_crtc_state, *old_crtc_state;
@@ -14030,13 +14061,28 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)if (!needs_modeset (new_crtc_state))continue ; -intel_pre_plane_update (old_crtc_state, new_crtc_state); +/* In case of Transcoder port Sync master slave CRTCs can be +* assigned in any order and we need to make sure that +* slave CRTCs are disabled first and then master CRTC since +* Slave vblanks are masked till Master Vblanks. +*/ +if (is_trans_port_sync_mode (new_crtc_state)) { +if (is_trans_port_sync_master (new_crtc_state)) +intel_trans_port_sync_modeset_disables (state, + crtc, + old_crtc_state, + new_crtc_state); +else +continue ; + }else { +intel_pre_plane_update (old_crtc_state, new_crtc_state); -if (old_crtc_state->base.active) -intel_old_crtc_state_disables (state, - old_crtc_state, - new_crtc_state, - crtc); +if (old_crtc_state->base.active) +intel_old_crtc_state_disables (state, + old_crtc_state, + new_crtc_state, + crtc); + } } }
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [v7,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
In reply to Manasi Navare== Series Details ==
== Series Details ==
Series: series starting with [v7,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
URL : https://patchwork.freedesktop.org/series/67806/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7046 -> Patchwork_14737
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_14737 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_14737, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_14737:
### IGT changes ###
#### Possible regressions ####
* igt@kms_force_connector_basic@force-connector-state:
- fi-kbl-guc: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-kbl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-kbl-guc/igt@[email protected]
* igt@runner@aborted:
- fi-ilk-650: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-ilk-650/igt@[email protected]
- fi-pnv-d510: NOTRUN -> [FAIL][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-pnv-d510/igt@[email protected]
- fi-gdg-551: NOTRUN -> [FAIL][5]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-gdg-551/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [FAIL][6]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-snb-2520m/igt@[email protected]
- fi-whl-u: NOTRUN -> [FAIL][7]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-whl-u/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [FAIL][8]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-ivb-3770/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [FAIL][9]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-bxt-dsi/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][10]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-bsw-n3050/igt@[email protected]
- fi-blb-e6850: NOTRUN -> [FAIL][11]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-blb-e6850/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [FAIL][12]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-bsw-kefka/igt@[email protected]
- fi-kbl-guc: NOTRUN -> [FAIL][13]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-kbl-guc/igt@[email protected]
- fi-elk-e7500: NOTRUN -> [FAIL][14]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-elk-e7500/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_14737 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_create@basic-files:
- fi-icl-u3: [PASS][15] -> [INCOMPLETE][16] ([fdo#107713] / [fdo#109100])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-u3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic:
- {fi-tgl-u2}: [INCOMPLETE][17] ([fdo#111850]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-tgl-u2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-tgl-u2/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- {fi-icl-guc}: [INCOMPLETE][19] ([fdo#107713] / [fdo#108840]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-guc/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/fi-icl-guc/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850
[fdo#111880]: https://bugs.freedesktop.org/show_bug.cgi?id=111880
Participating hosts (53 -> 45)
------------------------------
Additional (1): fi-pnv-d510
Missing (9): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-apl-guc fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7046 -> Patchwork_14737
CI-20190529: 20190529
CI_DRM_7046: 136f98967ad06da28fd795aa83be314c7b641c49 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5220: 1e38e32d721210a780198c8293a6b8c8e881df68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14737: 254c2e30831bf79806790a7449747122848bc2ce @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
254c2e30831b drm/i915/display/icl: In port sync mode disable slaves first then master 631f991715bf drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence 02aa93873ef4 drm/i915/display/icl: Enable master-slaves in trans port sync4d5115161a0c drm/i915/display/icl: HW state readout for transcoder port sync config b6bf63ff9dc9 drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports b0415532469a drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14737/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BUILD: failure for series starting with [v7,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync (rev2)
In reply to Manasi Navare== Series Details ==
== Series Details ==
Series: series starting with [v7,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync (rev2)
URL : https://patchwork.freedesktop.org/series/67806/
State : failure
== Summary ==
Applying: drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
Applying: drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/display/intel_display.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx