|
@@ -8462,8 +8462,6 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
|
|
connector->base.id, connector->name,
|
|
connector->base.id, connector->name,
|
|
encoder->base.id, encoder->name);
|
|
encoder->base.id, encoder->name);
|
|
|
|
|
|
- drm_modeset_acquire_init(ctx, 0);
|
|
|
|
-
|
|
|
|
retry:
|
|
retry:
|
|
ret = drm_modeset_lock(&config->connection_mutex, ctx);
|
|
ret = drm_modeset_lock(&config->connection_mutex, ctx);
|
|
if (ret)
|
|
if (ret)
|
|
@@ -8574,15 +8572,11 @@ fail_unlock:
|
|
goto retry;
|
|
goto retry;
|
|
}
|
|
}
|
|
|
|
|
|
- drm_modeset_drop_locks(ctx);
|
|
|
|
- drm_modeset_acquire_fini(ctx);
|
|
|
|
-
|
|
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
void intel_release_load_detect_pipe(struct drm_connector *connector,
|
|
void intel_release_load_detect_pipe(struct drm_connector *connector,
|
|
- struct intel_load_detect_pipe *old,
|
|
|
|
- struct drm_modeset_acquire_ctx *ctx)
|
|
|
|
|
|
+ struct intel_load_detect_pipe *old)
|
|
{
|
|
{
|
|
struct intel_encoder *intel_encoder =
|
|
struct intel_encoder *intel_encoder =
|
|
intel_attached_encoder(connector);
|
|
intel_attached_encoder(connector);
|
|
@@ -8606,17 +8600,12 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
|
|
drm_framebuffer_unreference(old->release_fb);
|
|
drm_framebuffer_unreference(old->release_fb);
|
|
}
|
|
}
|
|
|
|
|
|
- goto unlock;
|
|
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
/* Switch crtc and encoder back off if necessary */
|
|
/* Switch crtc and encoder back off if necessary */
|
|
if (old->dpms_mode != DRM_MODE_DPMS_ON)
|
|
if (old->dpms_mode != DRM_MODE_DPMS_ON)
|
|
connector->funcs->dpms(connector, old->dpms_mode);
|
|
connector->funcs->dpms(connector, old->dpms_mode);
|
|
-
|
|
|
|
-unlock:
|
|
|
|
- drm_modeset_drop_locks(ctx);
|
|
|
|
- drm_modeset_acquire_fini(ctx);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int i9xx_pll_refclk(struct drm_device *dev,
|
|
static int i9xx_pll_refclk(struct drm_device *dev,
|
|
@@ -12659,7 +12648,7 @@ static void intel_enable_pipe_a(struct drm_device *dev)
|
|
struct intel_connector *connector;
|
|
struct intel_connector *connector;
|
|
struct drm_connector *crt = NULL;
|
|
struct drm_connector *crt = NULL;
|
|
struct intel_load_detect_pipe load_detect_temp;
|
|
struct intel_load_detect_pipe load_detect_temp;
|
|
- struct drm_modeset_acquire_ctx ctx;
|
|
|
|
|
|
+ struct drm_modeset_acquire_ctx *ctx = dev->mode_config.acquire_ctx;
|
|
|
|
|
|
/* We can't just switch on the pipe A, we need to set things up with a
|
|
/* We can't just switch on the pipe A, we need to set things up with a
|
|
* proper mode and output configuration. As a gross hack, enable pipe A
|
|
* proper mode and output configuration. As a gross hack, enable pipe A
|
|
@@ -12676,10 +12665,8 @@ static void intel_enable_pipe_a(struct drm_device *dev)
|
|
if (!crt)
|
|
if (!crt)
|
|
return;
|
|
return;
|
|
|
|
|
|
- if (intel_get_load_detect_pipe(crt, NULL, &load_detect_temp, &ctx))
|
|
|
|
- intel_release_load_detect_pipe(crt, &load_detect_temp, &ctx);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ if (intel_get_load_detect_pipe(crt, NULL, &load_detect_temp, ctx))
|
|
|
|
+ intel_release_load_detect_pipe(crt, &load_detect_temp);
|
|
}
|
|
}
|
|
|
|
|
|
static bool
|
|
static bool
|