drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
Subsystems (3)
PATCH v12 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.
v6:
Rebase (manasi)
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
@@ -519,6 +519,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
@@ -11794,6 +11808,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 intel_atomic_state *state,struct intel_crtc *crtc) {
@@ -12292,6 +12391,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));
@@ -12385,6 +12491,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.
@@ -12900,6 +13015,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
@@ -462,6 +463,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 v12 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.
v7:
* Rebase on Maarten's patches
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
@@ -4405,6 +4405,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_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
@@ -6429,6 +6459,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
Manasi Navare
AppliedRe: [CI v12 2/6] drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports
Pushed to dinq, thanks for reviews
Manasi
Quoted 87 lines · Manasi Navare
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.v7:
* Rebase on Maarten's patches
v6:
* Usemaster_trans+1 and address missingtrans_edpcase (Ville) v5:
* AddTRANSCODER_Dcase andMISSING_CASE(Maarten)
v4:
Rebase
v3:
* Check ofDP_MSTmoved toatomic_check(Maarten)
v2:
* Do not use RMW, just write to the register in commit (Jani N)Cc Daniel Vetter <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+)drivers/gpu/drm/i915/display/intel_display.c +33
-0@@ -4405,6 +4405,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_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -6429,6 +6459,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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v12 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.
v11:
* Move master trans init to get pipe_Config hooks (Ville) v10:
* Initialize master_tarnscoder readout for all platforms (Ville) 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 | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+)
drivers/gpu/drm/i915/display/intel_display.c +61 -0
@@ -8798,6 +8798,7 @@ static bool i9xx_get_pipe_config(struct intel_crtc *crtc, pipe_config->output_format =INTEL_OUTPUT_FORMAT_RGB ; pipe_config->cpu_transcoder = (enum transcoder ) crtc->pipe; pipe_config->shared_dpll =NULL ; + pipe_config->master_transcoder =INVALID_TRANSCODER ; ret = false;
@@ -9987,6 +9988,7 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc, pipe_config->cpu_transcoder = (enum transcoder ) crtc->pipe; pipe_config->shared_dpll =NULL ; + pipe_config->master_transcoder =INVALID_TRANSCODER ; ret = false; tmp =I915_READ (PIPECONF (crtc->pipe));
@@ -10437,6 +10439,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) {
@@ -10448,6 +10503,8 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,intel_crtc_init_scalers (crtc, pipe_config); + pipe_config->master_transcoder =INVALID_TRANSCODER ; + power_domain =POWER_DOMAIN_PIPE (crtc->pipe); wf =intel_display_power_get_if_enabled (dev_priv, power_domain);if (!wf)
@@ -10556,6 +10613,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
Manasi Navare
AppliedRe: [CI v12 3/6] drm/i915/display/icl: HW state readout for transcoder port sync config
Pushed to dinq, thanks for reviews
Manasi
Quoted 144 lines · Manasi Navare
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 addmaster_transcoderand the salves bitmask to thecrtc_state, hence we need to read those during the HW state readout to avoid pipe state mismatch.v11:
* Move master trans init to getpipe_Confighooks (Ville) v10:
* Initializemaster_tarnscoderreadout for all platforms (Ville) v9:
* Initializemaster_transcoder= INVALID at get config (Ville) v8:
* Usemaster_select-1, addressTRANS_EDPcase (Ville)
* Renamemaster_transcoderto_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 forget_config(Ville) v3:
* AddTRANSCODER_D(Maarten)
* v3 Reviewed-by: Maarten Lankhorst <[email protected]> v2:
* AddTranscoder_DandMISSING_CASE(Maarten)Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+)drivers/gpu/drm/i915/display/intel_display.c +61
-0@@ -8798,6 +8798,7 @@ static bool i9xx_get_pipe_config(struct intel_crtc *crtc, pipe_config->output_format =INTEL_OUTPUT_FORMAT_RGB ; pipe_config->cpu_transcoder = (enum transcoder ) crtc->pipe; pipe_config->shared_dpll =NULL ; + pipe_config->master_transcoder =INVALID_TRANSCODER ; ret = false;@@ -9987,6 +9988,7 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc, pipe_config->cpu_transcoder = (enum transcoder ) crtc->pipe; pipe_config->shared_dpll =NULL ; + pipe_config->master_transcoder =INVALID_TRANSCODER ; ret = false; tmp =I915_READ (PIPECONF (crtc->pipe));@@ -10437,6 +10439,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) {@@ -10448,6 +10503,8 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,intel_crtc_init_scalers (crtc, pipe_config); + pipe_config->master_transcoder =INVALID_TRANSCODER ; + power_domain =POWER_DOMAIN_PIPE (crtc->pipe); wf =intel_display_power_get_if_enabled (dev_priv, power_domain);if (!wf)@@ -10556,6 +10613,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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v12 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.
v11:
* Rebase (Manasi)
v10:
* in trans sync mode, dont stop link train for tgl (Manasi) v9:
Remove update_scanline_offset to rebase on Maarten's patch (Manasi) v8:
* Rebase on Maarten's patches (Manasi)
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 | 6 +- drivers/gpu/drm/i915/display/intel_display.c | 136 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_display.h | 2 + 3 files changed, 139 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +4 -2
@@ -3500,7 +3500,8 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_start_link_train (intel_dp);/* 7.k */ -intel_dp_stop_link_train (intel_dp); +if (!is_trans_port_sync_mode (crtc_state)) +intel_dp_stop_link_train (intel_dp);/* * TODO: enable clock gating
@@ -3574,7 +3575,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 +133 -3
163 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
Manasi Navare
AppliedRe: [CI v12 4/6] drm/i915/display/icl: Enable master-slaves in trans port sync
Pushed to dinq, thanks for the reviews
manasi
Quoted 261 lines · Manasi Navare
As per the display enable sequence, we need to follow the enable sequence for slaves first with
DP_TP_CTLset to Idle and configure the transcoder port sync register to select the corersponding master, then follow the enable sequence for master leavingDP_TP_CTLto idle.
At this point the transcoder port sync mode is configured and enabled and the Vblanks of both ports are synchronized so then setDP_TP_CTLfor the slave and master to Normal and do post crtc enable updates.v11:
* Rebase (Manasi)
v10:
* in trans sync mode, dont stop link train for tgl (Manasi) v9:
Removeupdate_scanline_offsetto rebase on Maarten's patch (Manasi) v8:
* Rebase on Maarten's patches (Manasi)
v7:
* Use ffs(slaves) to get slave crtc (Ville)
v6:
* Modeset impliesactive_changed, remove one condition (Maarten) v5:
* Fix checkpatch warning (Manasi)
v4:
* Reuseskl_commit_modeset_enables()hook (Maarten)
* Obtain slave crtc and states from master (Maarten)
v3:
* Rebase on drm-tip (Manasi)
v2:
* Create aicl_update_crtcshook (Maarten, Danvet)
* This sequence only for CRTCs in trans port sync mode (Maarten)Cc Daniel Vetter <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 6 +- drivers/gpu/drm/i915/display/intel_display.c | 136 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_display.h | 2 + 3 files changed, 139 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +4
-2@@ -3500,7 +3500,8 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,intel_dp_start_link_train (intel_dp);/* 7.k */ -intel_dp_stop_link_train (intel_dp); +if (!is_trans_port_sync_mode (crtc_state)) +intel_dp_stop_link_train (intel_dp);/* * TODO: enable clock gating @@ -3574,7 +3575,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 +133
-3@@ -14061,6 +14061,18 @@ static void intel_update_crtc(struct intel_crtc *crtc,intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } +static struct intel_crtc *intel_get_slave_crtc (const struct intel_crtc_state *new_crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (new_crtc_state->base.crtc->dev); +enum transcoder slave_transcoder; + +WARN_ON (!is_power_of_2 (new_crtc_state->sync_mode_slaves_mask)); + + slave_transcoder =ffs (new_crtc_state->sync_mode_slaves_mask) -1 ; +return intel_get_crtc_for_pipe (dev_priv, + (enum pipe )slave_transcoder); +} + static void intel_old_crtc_state_disables(struct intel_atomic_state *state, struct intel_crtc_state *old_crtc_state, struct intel_crtc_state *new_crtc_state,@@ -14139,6 +14151,113 @@ static void intel_commit_modeset_enables(struct intel_atomic_state *state) } } +static void intel_crtc_enable_trans_port_sync (struct intel_crtc *crtc, +struct intel_atomic_state *state, +struct intel_crtc_state *new_crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); + +intel_crtc_update_active_timings (new_crtc_state); + dev_priv->display.crtc_enable (new_crtc_state, state); +intel_crtc_enable_pipe_crc (crtc); +} + +static void intel_set_dp_tp_ctl_normal (struct intel_crtc *crtc, +struct intel_atomic_state *state) +{ +struct drm_connector_state *conn_state; +struct drm_connector *conn; +struct intel_dp *intel_dp; +int i; + +for_each_new_connector_in_state (&state->base, conn, conn_state, i) { +if (conn_state->crtc == &crtc->base) +break ; + } + intel_dp =enc_to_intel_dp (&intel_attached_encoder (conn)->base); +intel_dp_stop_link_train (intel_dp); +} + +static void intel_post_crtc_enable_updates (struct intel_crtc *crtc, +struct intel_atomic_state *state) +{ +struct intel_crtc_state *new_crtc_state = +intel_atomic_get_new_crtc_state (state, crtc); +struct intel_crtc_state *old_crtc_state = +intel_atomic_get_old_crtc_state (state, crtc); +struct intel_plane_state *new_plane_state = +intel_atomic_get_new_plane_state (state, +to_intel_plane (crtc->base.primary)); +bool modeset =needs_modeset (new_crtc_state); + +if (new_crtc_state->update_pipe && !new_crtc_state->enable_fbc) +intel_fbc_disable (crtc); +else if (new_plane_state) +intel_fbc_enable (crtc, new_crtc_state, new_plane_state); + +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); +commit_pipe_config (state, old_crtc_state, new_crtc_state); +skl_update_planes_on_crtc (state, crtc); +intel_pipe_update_end (new_crtc_state); + +/* +* We usually enable FIFO underrun interrupts as part of the +* CRTC enable sequence during modesets. But when we inherit a +* valid pipe configuration from the BIOS we need to take care +* of enabling them on the CRTC's first fastset. +*/ +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->base.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); +} + +static void intel_update_trans_port_sync_crtcs (struct intel_crtc *crtc, +struct intel_atomic_state *state, +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); + +DRM_DEBUG_KMS ("Updating Transcoder Port Sync Master CRTC = %d %s and Slave CRTC %d %s\n" , + crtc->base.base.id, crtc->base.name, slave_crtc->base.base.id, + slave_crtc->base.name); + +/* Enable seq for slave with with DP_TP_CTL left Idle until the +* master is ready +*/ +intel_crtc_enable_trans_port_sync (slave_crtc, + state, + new_slave_crtc_state); + +/* Enable seq for master with with DP_TP_CTL left Idle */ +intel_crtc_enable_trans_port_sync (crtc, + state, + new_crtc_state); + +/* Set Slave's DP_TP_CTL to Normal */ +intel_set_dp_tp_ctl_normal (slave_crtc, + state); + +/* Set Master's DP_TP_CTL To Normal */ +usleep_range (200 ,400 ); +intel_set_dp_tp_ctl_normal (crtc, + state); + +/* Now do the post crtc enable for all master and slaves */ +intel_post_crtc_enable_updates (slave_crtc, + state); +intel_post_crtc_enable_updates (crtc, + state); +} +static void skl_commit_modeset_enables (struct intel_atomic_state *state) {struct drm_i915_private *dev_priv =to_i915 (state->base.dev);@@ -14172,6 +14291,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) {enum pipe pipe = crtc->pipe;bool vbl_wait = false; +bool modeset =needs_modeset (new_crtc_state);if (updated &BIT (crtc->pipe) || !new_crtc_state->base.active)continue ;@@ -14192,12 +14312,22 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)*/ if (!skl_ddb_entry_equal (&new_crtc_state->wm.skl.ddb, &old_crtc_state->wm.skl.ddb) && - !new_crtc_state->base.active_changed && + !modeset && state->wm_results.dirty_pipes != updated) vbl_wait = true; -intel_update_crtc (crtc, state, old_crtc_state, - new_crtc_state); +if (modeset &&is_trans_port_sync_mode (new_crtc_state)) { +if (is_trans_port_sync_master (new_crtc_state)) +intel_update_trans_port_sync_crtcs (crtc, + state, + old_crtc_state, + new_crtc_state); +else +continue ; + }else { +intel_update_crtc (crtc, state, old_crtc_state, + new_crtc_state); + }if (vbl_wait)intel_wait_for_vblank (dev_priv, pipe);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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v12 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().
v3:
* Rebase on maarten's patches
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
@@ -4435,6 +4435,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_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
@@ -6639,6 +6658,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
Manasi Navare
AppliedRe: [CI v12 5/6] drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence
Pushed to dinq thanks for the reviews
Manasi
Quoted 61 lines · Manasi Navare
This clears the transcoder port sync bits of the
TRANS_DDI_FUNC_CTL2register duringcrtc_disable().v3:
* Rebase on maarten's patches
v2:
* Directly write thetrans_port_syncreg value (Maarten)Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/gpu/drm/i915/display/intel_display.c +22
-0@@ -4435,6 +4435,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_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -6639,6 +6658,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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v12 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
@@ -14130,6 +14130,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;
@@ -14148,13 +14179,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
Manasi Navare
AppliedRe: [CI v12 6/6] drm/i915/display/icl: In port sync mode disable slaves first then master
Pushed to dinq, thanks for reviews
manasi
Quoted 103 lines · Manasi Navare
In 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 toget_slave_crtc(Ville)
v4:
* Obtain slave state from master (Maarten)
v3:
* Rebase
v2:
* Use theintel_old_crtc_state_disables()helperCc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- 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@@ -14130,6 +14130,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;@@ -14148,13 +14179,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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [CI,v12,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 [CI,v12,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
URL : https://patchwork.freedesktop.org/series/68218/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7130 -> Patchwork_14888
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/index.html
Known issues
------------
Here are the changes found in Patchwork_14888 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_mmap_gtt@basic-small-bo-tiledx:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-icl-u3/igt@[email protected]
* igt@i915_selftest@live_execlists:
- fi-icl-u2: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-icl-u2/igt@i915_selftest@live_execlists.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-icl-u2/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8109u: [PASS][5] -> [DMESG-FAIL][6] ([fdo#112050 ])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-cfl-8109u/igt@i915_selftest@live_gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-cfl-8109u/igt@i915_selftest@live_gem_contexts.html
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#109483] / [fdo#109635 ])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-kbl-7500u/igt@[email protected]
* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: [PASS][9] -> [WARN][10] ([fdo#109483])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-kbl-7500u/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][11] -> [DMESG-WARN][12] ([fdo#102614])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-hsw-peppy/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-hsw-peppy/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_create@basic-files:
- {fi-tgl-u2}: [INCOMPLETE][13] ([fdo#111735]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-tgl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-tgl-u2/igt@[email protected]
- {fi-icl-dsi}: [INCOMPLETE][15] ([fdo#107713] / [fdo#109100]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-icl-dsi/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-icl-dsi/igt@[email protected]
* igt@gem_mmap_gtt@basic-write-cpu-read-gtt:
- fi-icl-u3: [DMESG-WARN][17] ([fdo#107724]) -> [PASS][18] +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-icl-u3/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-icl-u3/igt@[email protected]
* igt@gem_sync@basic-many-each:
- {fi-tgl-u}: [INCOMPLETE][19] ([fdo#111880]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-tgl-u/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-tgl-u/igt@[email protected]
* igt@i915_selftest@live_execlists:
- fi-kbl-soraka: [INCOMPLETE][21] -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-kbl-soraka/igt@i915_selftest@live_execlists.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-kbl-soraka/igt@i915_selftest@live_execlists.html
- fi-skl-6260u: [INCOMPLETE][23] ([fdo#111934]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-skl-6260u/igt@i915_selftest@live_execlists.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-skl-6260u/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_hangcheck:
- fi-cfl-guc: [INCOMPLETE][25] -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/fi-cfl-guc/igt@i915_selftest@live_hangcheck.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/fi-cfl-guc/igt@i915_selftest@live_hangcheck.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735
[fdo#111880]: https://bugs.freedesktop.org/show_bug.cgi?id=111880
[fdo#111934]: https://bugs.freedesktop.org/show_bug.cgi?id=111934
[fdo#112050 ]: https://bugs.freedesktop.org/show_bug.cgi?id=112050
Participating hosts (50 -> 44)
------------------------------
Additional (1): fi-bwr-2160
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-blb-e6850 fi-byt-clapper
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7130 -> Patchwork_14888
CI-20190529: 20190529
CI_DRM_7130: 7d1700ba6820a82809a8dfc8d9cd9f82dbf421c7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5233: 19d40524c102aa086ae536dfb3e81f9b8456099f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14888: fbae976387640920b7463d0f1258576770c50bca @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
fbae97638764 drm/i915/display/icl: In port sync mode disable slaves first then master 0a4f3e691c8a drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence 2407cfa8a9ab drm/i915/display/icl: Enable master-slaves in trans port syncbdaf0e9b5b3e drm/i915/display/icl: HW state readout for transcoder port sync config dd6aa99fba0a drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports bf4ad2a5b5b4 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_14888/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [CI,v12,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 [CI,v12,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync
URL : https://patchwork.freedesktop.org/series/68218/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7130_full -> Patchwork_14888_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
New tests
---------
New tests have been introduced between CI_DRM_7130_full and Patchwork_14888_full:
### New Piglit tests (7) ###
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-0-unorm-2darray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-0-unorm-2darray-const:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-1-unorm-2darray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-1-unorm-2darray-const:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-2-unorm-2darray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-2-unorm-2darray-const:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
* spec@arb_gpu_shader5@texturegatheroffset@fs-rgba-3-unorm-2darray:
- Statuses : 1 incomplete(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_14888_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_schedule@deep-render:
- shard-apl: [PASS][1] -> [INCOMPLETE][2] ([fdo#103927]) +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl1/igt@[email protected]
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +6 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb1/igt@[email protected]
* igt@gem_exec_schedule@promotion-bsd1:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276]) +19 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb5/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-snb: [PASS][7] -> [DMESG-WARN][8] ([fdo#111870]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-snb1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-snb2/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup:
- shard-hsw: [PASS][9] -> [DMESG-WARN][10] ([fdo#111870])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-hsw2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-hsw2/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +6 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl8/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl8/igt@[email protected]
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([fdo#108566])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-kbl2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-kbl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-128x128-sliding:
- shard-apl: [PASS][15] -> [FAIL][16] ([fdo#103232])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl1/igt@[email protected]
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-untiled:
- shard-iclb: [PASS][17] -> [INCOMPLETE][18] ([fdo#107713])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb7/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: [PASS][19] -> [FAIL][20] ([fdo#103167])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite.html
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103166])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb4/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb4/igt@[email protected]
* igt@kms_psr@no_drrs:
- shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#108341])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb6/igt@kms_psr@no_drrs.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb1/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb5/igt@kms_psr@psr2_no_drrs.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][27] -> [FAIL][28] ([fdo#99912])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl7/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@vcs1-none:
- shard-iclb: [SKIP][29] ([fdo#109276]) -> [PASS][30] +13 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb1/igt@[email protected]
* igt@gem_eio@wait-10ms:
- {shard-tglb}: [INCOMPLETE][31] ([fdo#111998]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-tglb6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-tglb4/igt@[email protected]
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][33] ([fdo#110854]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@wide-bsd:
- shard-iclb: [SKIP][35] ([fdo#111325]) -> [PASS][36] +3 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb3/igt@[email protected]
* igt@gem_linear_blits@normal:
- shard-apl: [INCOMPLETE][37] ([fdo#103927]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl8/igt@[email protected]
* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-hsw: [FAIL][39] ([fdo#112037]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-hsw8/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-hsw2/igt@[email protected]
* igt@gem_userptr_blits@dmabuf-unsync:
- shard-hsw: [DMESG-WARN][41] ([fdo#111870]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-hsw5/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-hsw1/igt@[email protected]
* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [DMESG-WARN][43] ([fdo#111870]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-snb6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-snb7/igt@[email protected]
* igt@kms_flip@2x-flip-vs-suspend:
- shard-hsw: [INCOMPLETE][45] ([fdo#103540]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-hsw5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-hsw1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-skl: [INCOMPLETE][47] ([fdo#109507]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-skl7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-skl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-gtt:
- {shard-tglb}: [INCOMPLETE][49] ([fdo#111884]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-tglb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-gtt.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-iclb: [FAIL][51] ([fdo#103167]) -> [PASS][52] +3 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- {shard-tglb}: [INCOMPLETE][53] ([fdo#111832] / [fdo#111850] / [fdo#111884]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-tglb1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-tglb7/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-pwrite:
- {shard-tglb}: [FAIL][55] ([fdo#103167]) -> [PASS][56] +2 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-tglb2/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-tglb8/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [INCOMPLETE][57] ([fdo#104108] / [fdo#106978]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-skl2/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-skl9/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [DMESG-WARN][59] ([fdo#108566]) -> [PASS][60] +3 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-apl4/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-apl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][61] ([fdo#108145]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-skl5/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-skl10/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][63] ([fdo#108145] / [fdo#110403]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-skl9/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][65] ([fdo#109441]) -> [PASS][66] +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb7/igt@kms_psr@psr2_cursor_render.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- {shard-tglb}: [INCOMPLETE][67] ([fdo#111832] / [fdo#111850]) -> [PASS][68] +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-tglb2/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-tglb8/igt@[email protected]
* igt@tools_test@tools_test:
- shard-glk: [SKIP][69] ([fdo#109271]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-glk2/igt@tools_test@tools_test.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-glk5/igt@tools_test@tools_test.html
#### Warnings ####
* igt@gem_mocs_settings@mocs-reset-bsd2:
- shard-iclb: [FAIL][71] ([fdo#111330]) -> [SKIP][72] ([fdo#109276])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7130/shard-iclb1/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/shard-iclb8/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# 111852 ]: https://bugs.freedesktop.org/show_bug.cgi?id= 111852 [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111646]: https://bugs.freedesktop.org/show_bug.cgi?id=111646
[fdo#111671]: https://bugs.freedesktop.org/show_bug.cgi?id=111671
[fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
[fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747
[fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832
[fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#111884]: https://bugs.freedesktop.org/show_bug.cgi?id=111884
[fdo#111998]: https://bugs.freedesktop.org/show_bug.cgi?id=111998
[fdo#112037]: https://bugs.freedesktop.org/show_bug.cgi?id=112037
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7130 -> Patchwork_14888
CI-20190529: 20190529
CI_DRM_7130: 7d1700ba6820a82809a8dfc8d9cd9f82dbf421c7 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5233: 19d40524c102aa086ae536dfb3e81f9b8456099f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14888: fbae976387640920b7463d0f1258576770c50bca @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14888/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Manasi Navare
AppliedPushed to dinq, thank you all for reviews!
Manasi
Quoted 233 lines · Manasi Navare
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.v6:
Rebase (manasi)
v5:
* Address Ville's comments
* Just passcrtc_state, no need to check GEN (Ville)
v4:
* Rebase
v3:
* Usemaster_tramscoderinstead ofmaster_crtcfor valid
HW state readouts (Ville)
v2:
* Move this tointel_mode_set_pipe_config(Jani N, Ville)
* Useslave_bitmaskto save associated slaves in master crtc state (Ville)Cc Daniel Vetter <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Manasi Navare <[email protected]>Reviewed-by Maarten Lankhorst <[email protected]>--- 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@@ -519,6 +519,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 @@ -11794,6 +11808,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 intel_atomic_state *state,struct intel_crtc *crtc) {@@ -12292,6 +12391,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));@@ -12385,6 +12491,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. @@ -12900,6 +13015,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_BOOLdrivers/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 @@ -462,6 +463,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 · 1 line
2.19.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx