Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "drm/radeon: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()"

This reverts commit 26723c3d6b930775f9a85521d09655c533a839e6.

This patchset breaks on intel platforms and was previously NACK'd by
Ville.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Fernando Ramos <greenfoo@u92.eu>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211002154542.15800-9-sean@poorly.run

+10 -21
+6 -15
drivers/gpu/drm/radeon/radeon_device.c
··· 37 37 #include <drm/drm_cache.h> 38 38 #include <drm/drm_crtc_helper.h> 39 39 #include <drm/drm_device.h> 40 - #include <drm/drm_drv.h> 41 40 #include <drm/drm_file.h> 42 41 #include <drm/drm_probe_helper.h> 43 42 #include <drm/radeon_drm.h> ··· 1559 1560 struct pci_dev *pdev; 1560 1561 struct drm_crtc *crtc; 1561 1562 struct drm_connector *connector; 1562 - struct drm_modeset_acquire_ctx ctx; 1563 - int i, r, ret; 1563 + int i, r; 1564 1564 1565 1565 if (dev == NULL || dev->dev_private == NULL) { 1566 1566 return -ENODEV; ··· 1573 1575 1574 1576 drm_kms_helper_poll_disable(dev); 1575 1577 1576 - DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); 1578 + drm_modeset_lock_all(dev); 1577 1579 /* turn off display hw */ 1578 1580 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 1579 1581 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); 1580 1582 } 1581 - DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); 1582 - 1583 - if (ret) 1584 - return ret; 1583 + drm_modeset_unlock_all(dev); 1585 1584 1586 1585 /* unpin the front buffers and cursors */ 1587 1586 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { ··· 1663 1668 struct radeon_device *rdev = dev->dev_private; 1664 1669 struct pci_dev *pdev = to_pci_dev(dev->dev); 1665 1670 struct drm_crtc *crtc; 1666 - struct drm_modeset_acquire_ctx ctx; 1667 - int r, ret; 1671 + int r; 1668 1672 1669 1673 if (dev->switch_power_state == DRM_SWITCH_POWER_OFF) 1670 1674 return 0; ··· 1741 1747 if (fbcon) { 1742 1748 drm_helper_resume_force_mode(dev); 1743 1749 /* turn on display hw */ 1744 - DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); 1750 + drm_modeset_lock_all(dev); 1745 1751 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 1746 1752 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); 1747 1753 } 1748 - DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); 1749 - 1750 - if (ret) 1751 - return ret; 1754 + drm_modeset_unlock_all(dev); 1752 1755 } 1753 1756 1754 1757 drm_kms_helper_poll_enable(dev);
+4 -6
drivers/gpu/drm/radeon/radeon_dp_mst.c
··· 4 4 #include <drm/drm_fb_helper.h> 5 5 #include <drm/drm_file.h> 6 6 #include <drm/drm_probe_helper.h> 7 - #include <drm/drm_drv.h> 8 7 9 8 #include "atom.h" 10 9 #include "ni_reg.h" ··· 737 738 struct radeon_device *rdev = (struct radeon_device *)m->private; 738 739 struct drm_device *dev = rdev->ddev; 739 740 struct drm_connector *connector; 740 - struct drm_modeset_acquire_ctx ctx; 741 741 struct radeon_connector *radeon_connector; 742 742 struct radeon_connector_atom_dig *dig_connector; 743 - int i, ret; 743 + int i; 744 744 745 - DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); 745 + drm_modeset_lock_all(dev); 746 746 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 747 747 if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) 748 748 continue; ··· 759 761 radeon_connector->cur_stream_attribs[i].fe, 760 762 radeon_connector->cur_stream_attribs[i].slots); 761 763 } 762 - DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); 763 - return ret; 764 + drm_modeset_unlock_all(dev); 765 + return 0; 764 766 } 765 767 766 768 DEFINE_SHOW_ATTRIBUTE(radeon_debugfs_mst_info);