@@ -12589,126 +12589,6 @@ static bool c8_planes_changed(const struct intel_crtc_state *new_crtc_state)
12589
12589
return !old_crtc_state->c8_planes != !new_crtc_state->c8_planes;
12590
12590
}
12591
12591
12592
- static bool
12593
- intel_atomic_is_master_connector(struct intel_crtc_state *crtc_state)
12594
- {
12595
- struct drm_crtc *crtc = crtc_state->uapi.crtc;
12596
- struct drm_atomic_state *state = crtc_state->uapi.state;
12597
- struct drm_connector *connector;
12598
- struct drm_connector_state *connector_state;
12599
- int i;
12600
-
12601
- for_each_new_connector_in_state(state, connector, connector_state, i) {
12602
- if (connector_state->crtc != crtc)
12603
- continue;
12604
- if (connector->has_tile &&
12605
- connector->tile_h_loc == connector->num_h_tile - 1 &&
12606
- connector->tile_v_loc == connector->num_v_tile - 1)
12607
- return true;
12608
- }
12609
-
12610
- return false;
12611
- }
12612
-
12613
- static void reset_port_sync_mode_state(struct intel_crtc_state *crtc_state)
12614
- {
12615
- crtc_state->master_transcoder = INVALID_TRANSCODER;
12616
- crtc_state->sync_mode_slaves_mask = 0;
12617
- }
12618
-
12619
- static int icl_compute_port_sync_crtc_state(struct drm_connector *connector,
12620
- struct intel_crtc_state *crtc_state,
12621
- int num_tiled_conns)
12622
- {
12623
- struct drm_crtc *crtc = crtc_state->uapi.crtc;
12624
- struct intel_atomic_state *state = to_intel_atomic_state(crtc_state->uapi.state);
12625
- struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
12626
- struct drm_connector *master_connector;
12627
- struct drm_connector_list_iter conn_iter;
12628
- struct drm_crtc *master_crtc = NULL;
12629
- struct drm_crtc_state *master_crtc_state;
12630
- struct intel_crtc_state *master_pipe_config;
12631
-
12632
- if (INTEL_GEN(dev_priv) < 11)
12633
- return 0;
12634
-
12635
- if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP))
12636
- return 0;
12637
-
12638
- /*
12639
- * In case of tiled displays there could be one or more slaves but there is
12640
- * only one master. Lets make the CRTC used by the connector corresponding
12641
- * to the last horizonal and last vertical tile a master/genlock CRTC.
12642
- * All the other CRTCs corresponding to other tiles of the same Tile group
12643
- * are the slave CRTCs and hold a pointer to their genlock CRTC.
12644
- * If all tiles not present do not make master slave assignments.
12645
- */
12646
- if (!connector->has_tile ||
12647
- crtc_state->hw.mode.hdisplay != connector->tile_h_size ||
12648
- crtc_state->hw.mode.vdisplay != connector->tile_v_size ||
12649
- num_tiled_conns < connector->num_h_tile * connector->num_v_tile) {
12650
- reset_port_sync_mode_state(crtc_state);
12651
- return 0;
12652
- }
12653
- /* Last Horizontal and last vertical tile connector is a master
12654
- * Master's crtc state is already populated in slave for port sync
12655
- */
12656
- if (connector->tile_h_loc == connector->num_h_tile - 1 &&
12657
- connector->tile_v_loc == connector->num_v_tile - 1)
12658
- return 0;
12659
-
12660
- /* Loop through all connectors and configure the Slave crtc_state
12661
- * to point to the correct master.
12662
- */
12663
- drm_connector_list_iter_begin(&dev_priv->drm, &conn_iter);
12664
- drm_for_each_connector_iter(master_connector, &conn_iter) {
12665
- struct drm_connector_state *master_conn_state = NULL;
12666
-
12667
- if (!(master_connector->has_tile &&
12668
- master_connector->tile_group->id == connector->tile_group->id))
12669
- continue;
12670
- if (master_connector->tile_h_loc != master_connector->num_h_tile - 1 ||
12671
- master_connector->tile_v_loc != master_connector->num_v_tile - 1)
12672
- continue;
12673
-
12674
- master_conn_state = drm_atomic_get_connector_state(&state->base,
12675
- master_connector);
12676
- if (IS_ERR(master_conn_state)) {
12677
- drm_connector_list_iter_end(&conn_iter);
12678
- return PTR_ERR(master_conn_state);
12679
- }
12680
- if (master_conn_state->crtc) {
12681
- master_crtc = master_conn_state->crtc;
12682
- break;
12683
- }
12684
- }
12685
- drm_connector_list_iter_end(&conn_iter);
12686
-
12687
- if (!master_crtc) {
12688
- drm_dbg_kms(&dev_priv->drm,
12689
- "Could not find Master CRTC for Slave CRTC %d\n",
12690
- crtc->base.id);
12691
- return -EINVAL;
12692
- }
12693
-
12694
- master_crtc_state = drm_atomic_get_crtc_state(&state->base,
12695
- master_crtc);
12696
- if (IS_ERR(master_crtc_state))
12697
- return PTR_ERR(master_crtc_state);
12698
-
12699
- master_pipe_config = to_intel_crtc_state(master_crtc_state);
12700
- crtc_state->master_transcoder = master_pipe_config->cpu_transcoder;
12701
- master_pipe_config->sync_mode_slaves_mask |=
12702
- BIT(crtc_state->cpu_transcoder);
12703
- drm_dbg_kms(&dev_priv->drm,
12704
- "Master Transcoder = %s added for Slave CRTC = %d, slave transcoder bitmask = %d\n",
12705
- transcoder_name(crtc_state->master_transcoder),
12706
- crtc->base.id,
12707
- master_pipe_config->sync_mode_slaves_mask);
12708
-
12709
- return 0;
12710
- }
12711
-
12712
12592
static u16 hsw_linetime_wm(const struct intel_crtc_state *crtc_state)
12713
12593
{
12714
12594
const struct drm_display_mode *adjusted_mode =
@@ -13359,15 +13239,6 @@ intel_crtc_prepare_cleared_state(struct intel_crtc_state *crtc_state)
13359
13239
if (IS_G4X(dev_priv) ||
13360
13240
IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
13361
13241
saved_state->wm = crtc_state->wm;
13362
- /*
13363
- * Save the slave bitmask which gets filled for master crtc state during
13364
- * slave atomic check call. For all other CRTCs reset the port sync variables
13365
- * crtc_state->master_transcoder needs to be set to INVALID
13366
- */
13367
- reset_port_sync_mode_state(saved_state);
13368
- if (intel_atomic_is_master_connector(crtc_state))
13369
- saved_state->sync_mode_slaves_mask =
13370
- crtc_state->sync_mode_slaves_mask;
13371
13242
13372
13243
memcpy(crtc_state, saved_state, sizeof(*crtc_state));
13373
13244
kfree(saved_state);
@@ -13385,8 +13256,7 @@ intel_modeset_pipe_config(struct intel_crtc_state *pipe_config)
13385
13256
struct drm_i915_private *i915 = to_i915(pipe_config->uapi.crtc->dev);
13386
13257
struct drm_connector *connector;
13387
13258
struct drm_connector_state *connector_state;
13388
- int base_bpp, ret;
13389
- int i, tile_group_id = -1, num_tiled_conns = 0;
13259
+ int base_bpp, ret, i;
13390
13260
bool retry = true;
13391
13261
13392
13262
pipe_config->cpu_transcoder =
@@ -13458,24 +13328,6 @@ intel_modeset_pipe_config(struct intel_crtc_state *pipe_config)
13458
13328
drm_mode_set_crtcinfo(&pipe_config->hw.adjusted_mode,
13459
13329
CRTC_STEREO_DOUBLE);
13460
13330
13461
- /* Get tile_group_id of tiled connector */
13462
- for_each_new_connector_in_state(state, connector, connector_state, i) {
13463
- if (connector_state->crtc == crtc &&
13464
- connector->has_tile) {
13465
- tile_group_id = connector->tile_group->id;
13466
- break;
13467
- }
13468
- }
13469
-
13470
- /* Get total number of tiled connectors in state that belong to
13471
- * this tile group.
13472
- */
13473
- for_each_new_connector_in_state(state, connector, connector_state, i) {
13474
- if (connector->has_tile &&
13475
- connector->tile_group->id == tile_group_id)
13476
- num_tiled_conns++;
13477
- }
13478
-
13479
13331
/* Pass our mode to the connectors and the CRTC to give them a chance to
13480
13332
* adjust it according to limitations or connector properties, and also
13481
13333
* a chance to reject the mode entirely.
@@ -13487,15 +13339,6 @@ intel_modeset_pipe_config(struct intel_crtc_state *pipe_config)
13487
13339
if (connector_state->crtc != crtc)
13488
13340
continue;
13489
13341
13490
- ret = icl_compute_port_sync_crtc_state(connector, pipe_config,
13491
- num_tiled_conns);
13492
- if (ret) {
13493
- drm_dbg_kms(&i915->drm,
13494
- "Cannot assign Sync Mode CRTCs: %d\n",
13495
- ret);
13496
- return ret;
13497
- }
13498
-
13499
13342
ret = encoder->compute_config(encoder, pipe_config,
13500
13343
connector_state);
13501
13344
if (ret < 0) {
0 commit comments