Skip to content

Commit

Permalink
drm: Drop FreeBSD-specific checks of oops_in_progress
Browse files Browse the repository at this point in the history
[Why]
With vt_drmfb, I believe they are not needed anymore.
  • Loading branch information
dumbbell authored and wulf7 committed Nov 26, 2023
1 parent ccda250 commit 0c5621b
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions drivers/gpu/drm/drm_modeset_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ void drm_modeset_lock_all(struct drm_device *dev)
struct drm_modeset_acquire_ctx *ctx;
int ret;

#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

ctx = kzalloc(sizeof(*ctx), GFP_KERNEL | __GFP_NOFAIL);
if (WARN_ON(!ctx))
return;
Expand Down Expand Up @@ -196,11 +191,6 @@ void drm_modeset_unlock_all(struct drm_device *dev)
struct drm_mode_config *config = &dev->mode_config;
struct drm_modeset_acquire_ctx *ctx = config->acquire_ctx;

#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

if (WARN_ON(!ctx))
return;

Expand All @@ -225,10 +215,8 @@ void drm_warn_on_modeset_not_all_locked(struct drm_device *dev)
struct drm_crtc *crtc;

/* Locking is currently fubar in the panic handler. */
#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

drm_for_each_crtc(crtc, dev)
WARN_ON(!drm_modeset_is_locked(&crtc->mutex));
Expand All @@ -250,11 +238,6 @@ EXPORT_SYMBOL(drm_warn_on_modeset_not_all_locked);
void drm_modeset_acquire_init(struct drm_modeset_acquire_ctx *ctx,
uint32_t flags)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

memset(ctx, 0, sizeof(*ctx));
ww_acquire_init(&ctx->ww_ctx, &crtc_ww_class);
INIT_LIST_HEAD(&ctx->locked);
Expand All @@ -270,11 +253,6 @@ EXPORT_SYMBOL(drm_modeset_acquire_init);
*/
void drm_modeset_acquire_fini(struct drm_modeset_acquire_ctx *ctx)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

ww_acquire_fini(&ctx->ww_ctx);
}
EXPORT_SYMBOL(drm_modeset_acquire_fini);
Expand All @@ -287,11 +265,6 @@ EXPORT_SYMBOL(drm_modeset_acquire_fini);
*/
void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

if (WARN_ON(ctx->contended))
__drm_stack_depot_print(ctx->stack_depot);

Expand All @@ -312,11 +285,6 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
{
int ret;

#ifdef __FreeBSD__
if (oops_in_progress)
return 0;
#endif

if (WARN_ON(ctx->contended))
__drm_stack_depot_print(ctx->stack_depot);

Expand Down Expand Up @@ -371,11 +339,6 @@ int drm_modeset_backoff(struct drm_modeset_acquire_ctx *ctx)
{
struct drm_modeset_lock *contended = ctx->contended;

#ifdef __FreeBSD__
if (oops_in_progress)
return 0;
#endif

ctx->contended = NULL;
ctx->stack_depot = 0;

Expand Down Expand Up @@ -420,11 +383,6 @@ EXPORT_SYMBOL(drm_modeset_lock_init);
int drm_modeset_lock(struct drm_modeset_lock *lock,
struct drm_modeset_acquire_ctx *ctx)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return 0;
#endif

if (ctx)
return modeset_lock(lock, ctx, ctx->interruptible, false);

Expand All @@ -444,10 +402,6 @@ EXPORT_SYMBOL(drm_modeset_lock);
*/
int drm_modeset_lock_single_interruptible(struct drm_modeset_lock *lock)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return 0;
#endif
return ww_mutex_lock_interruptible(&lock->mutex, NULL);
}
EXPORT_SYMBOL(drm_modeset_lock_single_interruptible);
Expand All @@ -458,11 +412,6 @@ EXPORT_SYMBOL(drm_modeset_lock_single_interruptible);
*/
void drm_modeset_unlock(struct drm_modeset_lock *lock)
{
#ifdef __FreeBSD__
if (oops_in_progress)
return;
#endif

list_del_init(&lock->head);
ww_mutex_unlock(&lock->mutex);
}
Expand Down Expand Up @@ -496,11 +445,6 @@ int drm_modeset_lock_all_ctx(struct drm_device *dev,
struct drm_plane *plane;
int ret;

#ifdef __FreeBSD__
if (oops_in_progress)
return 0;
#endif

ret = drm_modeset_lock(&dev->mode_config.connection_mutex, ctx);
if (ret)
return ret;
Expand Down

0 comments on commit 0c5621b

Please sign in to comment.