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

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

This reverts commit a2cd9947d99b54c959fce20dc19d81af53f4674e.

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-11-sean@poorly.run

+8 -15
+2 -4
drivers/gpu/drm/tegra/dsi.c
··· 23 23 #include <drm/drm_mipi_dsi.h> 24 24 #include <drm/drm_panel.h> 25 25 #include <drm/drm_simple_kms_helper.h> 26 - #include <drm/drm_drv.h> 27 26 28 27 #include "dc.h" 29 28 #include "drm.h" ··· 202 203 struct tegra_dsi *dsi = node->info_ent->data; 203 204 struct drm_crtc *crtc = dsi->output.encoder.crtc; 204 205 struct drm_device *drm = node->minor->dev; 205 - struct drm_modeset_acquire_ctx ctx; 206 206 unsigned int i; 207 207 int err = 0; 208 208 209 - DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err); 209 + drm_modeset_lock_all(drm); 210 210 211 211 if (!crtc || !crtc->state->active) { 212 212 err = -EBUSY; ··· 220 222 } 221 223 222 224 unlock: 223 - DRM_MODESET_LOCK_ALL_END(drm, ctx, err); 225 + drm_modeset_unlock_all(drm); 224 226 return err; 225 227 } 226 228
+2 -4
drivers/gpu/drm/tegra/hdmi.c
··· 22 22 #include <drm/drm_fourcc.h> 23 23 #include <drm/drm_probe_helper.h> 24 24 #include <drm/drm_simple_kms_helper.h> 25 - #include <drm/drm_drv.h> 26 25 27 26 #include "hda.h" 28 27 #include "hdmi.h" ··· 1031 1032 struct tegra_hdmi *hdmi = node->info_ent->data; 1032 1033 struct drm_crtc *crtc = hdmi->output.encoder.crtc; 1033 1034 struct drm_device *drm = node->minor->dev; 1034 - struct drm_modeset_acquire_ctx ctx; 1035 1035 unsigned int i; 1036 1036 int err = 0; 1037 1037 1038 - DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err); 1038 + drm_modeset_lock_all(drm); 1039 1039 1040 1040 if (!crtc || !crtc->state->active) { 1041 1041 err = -EBUSY; ··· 1049 1051 } 1050 1052 1051 1053 unlock: 1052 - DRM_MODESET_LOCK_ALL_END(drm, ctx, err); 1054 + drm_modeset_unlock_all(drm); 1053 1055 return err; 1054 1056 } 1055 1057
+4 -7
drivers/gpu/drm/tegra/sor.c
··· 23 23 #include <drm/drm_panel.h> 24 24 #include <drm/drm_scdc_helper.h> 25 25 #include <drm/drm_simple_kms_helper.h> 26 - #include <drm/drm_drv.h> 27 26 28 27 #include "dc.h" 29 28 #include "dp.h" ··· 1490 1491 struct tegra_sor *sor = node->info_ent->data; 1491 1492 struct drm_crtc *crtc = sor->output.encoder.crtc; 1492 1493 struct drm_device *drm = node->minor->dev; 1493 - struct drm_modeset_acquire_ctx ctx; 1494 1494 int err = 0; 1495 1495 u32 value; 1496 1496 1497 - DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err); 1497 + drm_modeset_lock_all(drm); 1498 1498 1499 1499 if (!crtc || !crtc->state->active) { 1500 1500 err = -EBUSY; ··· 1522 1524 seq_printf(s, "%08x\n", value); 1523 1525 1524 1526 unlock: 1525 - DRM_MODESET_LOCK_ALL_END(drm, ctx, err); 1527 + drm_modeset_unlock_all(drm); 1526 1528 return err; 1527 1529 } 1528 1530 ··· 1652 1654 struct tegra_sor *sor = node->info_ent->data; 1653 1655 struct drm_crtc *crtc = sor->output.encoder.crtc; 1654 1656 struct drm_device *drm = node->minor->dev; 1655 - struct drm_modeset_acquire_ctx ctx; 1656 1657 unsigned int i; 1657 1658 int err = 0; 1658 1659 1659 - DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err); 1660 + drm_modeset_lock_all(drm); 1660 1661 1661 1662 if (!crtc || !crtc->state->active) { 1662 1663 err = -EBUSY; ··· 1670 1673 } 1671 1674 1672 1675 unlock: 1673 - DRM_MODESET_LOCK_ALL_END(drm, ctx, err); 1676 + drm_modeset_unlock_all(drm); 1674 1677 return err; 1675 1678 } 1676 1679