@@ -1335,36 +1335,6 @@ static void mgag200_disable_display(struct mga_device *mdev)
1335
1335
WREG_ECRT (0x01 , crtcext1 );
1336
1336
}
1337
1337
1338
- /*
1339
- * This is called before a mode is programmed. A typical use might be to
1340
- * enable DPMS during the programming to avoid seeing intermediate stages,
1341
- * but that's not relevant to us
1342
- */
1343
- static void mga_crtc_prepare (struct drm_crtc * crtc )
1344
- {
1345
- struct drm_device * dev = crtc -> dev ;
1346
- struct mga_device * mdev = to_mga_device (dev );
1347
-
1348
- if (mdev -> type == G200_WB || mdev -> type == G200_EW3 )
1349
- mgag200_g200wb_hold_bmc (mdev );
1350
- }
1351
-
1352
- /*
1353
- * This is called after a mode is programmed. It should reverse anything done
1354
- * by the prepare function
1355
- */
1356
- static void mga_crtc_commit (struct drm_crtc * crtc )
1357
- {
1358
- struct drm_device * dev = crtc -> dev ;
1359
- struct mga_device * mdev = to_mga_device (dev );
1360
-
1361
- if (mdev -> type == G200_WB || mdev -> type == G200_EW3 )
1362
- mgag200_g200wb_release_bmc (mdev );
1363
-
1364
- mga_crtc_load_lut (crtc );
1365
- mgag200_enable_display (mdev );
1366
- }
1367
-
1368
1338
/*
1369
1339
* Connector
1370
1340
*/
@@ -1585,7 +1555,8 @@ mgag200_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
1585
1555
.y2 = fb -> height ,
1586
1556
};
1587
1557
1588
- mga_crtc_prepare (crtc );
1558
+ if (mdev -> type == G200_WB || mdev -> type == G200_EW3 )
1559
+ mgag200_g200wb_hold_bmc (mdev );
1589
1560
1590
1561
mgag200_set_format_regs (mdev , fb );
1591
1562
mgag200_set_mode_regs (mdev , adjusted_mode );
@@ -1599,7 +1570,11 @@ mgag200_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
1599
1570
else if (mdev -> type == G200_EV )
1600
1571
mgag200_g200ev_set_hiprilvl (mdev );
1601
1572
1602
- mga_crtc_commit (crtc );
1573
+ if (mdev -> type == G200_WB || mdev -> type == G200_EW3 )
1574
+ mgag200_g200wb_release_bmc (mdev );
1575
+
1576
+ mga_crtc_load_lut (crtc );
1577
+ mgag200_enable_display (mdev );
1603
1578
1604
1579
mgag200_handle_damage (mdev , fb , & fullscreen );
1605
1580
}
0 commit comments