@@ -1257,10 +1257,10 @@ static void anx7625_power_on(struct anx7625_data *ctx)
1257
1257
usleep_range (11000 , 12000 );
1258
1258
1259
1259
/* Power on pin enable */
1260
- gpiod_set_value (ctx -> pdata .gpio_p_on , 1 );
1260
+ gpiod_set_value_cansleep (ctx -> pdata .gpio_p_on , 1 );
1261
1261
usleep_range (10000 , 11000 );
1262
1262
/* Power reset pin enable */
1263
- gpiod_set_value (ctx -> pdata .gpio_reset , 1 );
1263
+ gpiod_set_value_cansleep (ctx -> pdata .gpio_reset , 1 );
1264
1264
usleep_range (10000 , 11000 );
1265
1265
1266
1266
DRM_DEV_DEBUG_DRIVER (dev , "power on !\n" );
@@ -1280,9 +1280,9 @@ static void anx7625_power_standby(struct anx7625_data *ctx)
1280
1280
return ;
1281
1281
}
1282
1282
1283
- gpiod_set_value (ctx -> pdata .gpio_reset , 0 );
1283
+ gpiod_set_value_cansleep (ctx -> pdata .gpio_reset , 0 );
1284
1284
usleep_range (1000 , 1100 );
1285
- gpiod_set_value (ctx -> pdata .gpio_p_on , 0 );
1285
+ gpiod_set_value_cansleep (ctx -> pdata .gpio_p_on , 0 );
1286
1286
usleep_range (1000 , 1100 );
1287
1287
1288
1288
ret = regulator_bulk_disable (ARRAY_SIZE (ctx -> pdata .supplies ),
@@ -1814,9 +1814,6 @@ static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
1814
1814
1815
1815
DRM_DEV_DEBUG_DRIVER (dev , "sink detect\n" );
1816
1816
1817
- if (ctx -> pdata .panel_bridge )
1818
- return connector_status_connected ;
1819
-
1820
1817
return ctx -> hpd_status ? connector_status_connected :
1821
1818
connector_status_disconnected ;
1822
1819
}
@@ -2475,6 +2472,22 @@ static const struct drm_edid *anx7625_bridge_edid_read(struct drm_bridge *bridge
2475
2472
return anx7625_edid_read (ctx );
2476
2473
}
2477
2474
2475
+ static void anx7625_bridge_hpd_enable (struct drm_bridge * bridge )
2476
+ {
2477
+ struct anx7625_data * ctx = bridge_to_anx7625 (bridge );
2478
+ struct device * dev = ctx -> dev ;
2479
+
2480
+ pm_runtime_get_sync (dev );
2481
+ }
2482
+
2483
+ static void anx7625_bridge_hpd_disable (struct drm_bridge * bridge )
2484
+ {
2485
+ struct anx7625_data * ctx = bridge_to_anx7625 (bridge );
2486
+ struct device * dev = ctx -> dev ;
2487
+
2488
+ pm_runtime_put_sync (dev );
2489
+ }
2490
+
2478
2491
static const struct drm_bridge_funcs anx7625_bridge_funcs = {
2479
2492
.attach = anx7625_bridge_attach ,
2480
2493
.detach = anx7625_bridge_detach ,
@@ -2488,6 +2501,8 @@ static const struct drm_bridge_funcs anx7625_bridge_funcs = {
2488
2501
.atomic_reset = drm_atomic_helper_bridge_reset ,
2489
2502
.detect = anx7625_bridge_detect ,
2490
2503
.edid_read = anx7625_bridge_edid_read ,
2504
+ .hpd_enable = anx7625_bridge_hpd_enable ,
2505
+ .hpd_disable = anx7625_bridge_hpd_disable ,
2491
2506
};
2492
2507
2493
2508
static int anx7625_register_i2c_dummy_clients (struct anx7625_data * ctx ,
@@ -2585,9 +2600,8 @@ static int anx7625_link_bridge(struct drm_dp_aux *aux)
2585
2600
platform -> bridge .of_node = dev -> of_node ;
2586
2601
if (!anx7625_of_panel_on_aux_bus (dev ))
2587
2602
platform -> bridge .ops |= DRM_BRIDGE_OP_EDID ;
2588
- if (!platform -> pdata .panel_bridge )
2589
- platform -> bridge .ops |= DRM_BRIDGE_OP_HPD |
2590
- DRM_BRIDGE_OP_DETECT ;
2603
+ if (!platform -> pdata .panel_bridge || !anx7625_of_panel_on_aux_bus (dev ))
2604
+ platform -> bridge .ops |= DRM_BRIDGE_OP_HPD | DRM_BRIDGE_OP_DETECT ;
2591
2605
platform -> bridge .type = platform -> pdata .panel_bridge ?
2592
2606
DRM_MODE_CONNECTOR_eDP :
2593
2607
DRM_MODE_CONNECTOR_DisplayPort ;
0 commit comments