Skip to content

Commit

Permalink
drm/i915: Pass acquire ctx also to intel_release_load_detect_pipe()
Browse files Browse the repository at this point in the history
For now this is not necessary since intel_set_mode() doesn't acquire any
new locks. However, once that function is converted to atomic, that will
change, since we'll pass an atomic state to it, and that needs to have
the right acquire context set.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ander Conselvan de Oliveira authored and Daniel Vetter committed Mar 26, 2015
1 parent 10f81c1 commit 49172fe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ intel_crt_detect(struct drm_connector *connector, bool force)
status = connector_status_connected;
else
status = intel_crt_load_detect(crt);
intel_release_load_detect_pipe(connector, &tmp);
intel_release_load_detect_pipe(connector, &tmp, &ctx);
} else
status = connector_status_unknown;

Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -9038,7 +9038,8 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
}

void intel_release_load_detect_pipe(struct drm_connector *connector,
struct intel_load_detect_pipe *old)
struct intel_load_detect_pipe *old,
struct drm_modeset_acquire_ctx *ctx)
{
struct intel_encoder *intel_encoder =
intel_attached_encoder(connector);
Expand Down Expand Up @@ -13595,7 +13596,7 @@ static void intel_enable_pipe_a(struct drm_device *dev)
return;

if (intel_get_load_detect_pipe(crt, NULL, &load_detect_temp, ctx))
intel_release_load_detect_pipe(crt, &load_detect_temp);
intel_release_load_detect_pipe(crt, &load_detect_temp, ctx);
}

static bool
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,8 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
struct intel_load_detect_pipe *old,
struct drm_modeset_acquire_ctx *ctx);
void intel_release_load_detect_pipe(struct drm_connector *connector,
struct intel_load_detect_pipe *old);
struct intel_load_detect_pipe *old,
struct drm_modeset_acquire_ctx *ctx);
int intel_pin_and_fence_fb_obj(struct drm_plane *plane,
struct drm_framebuffer *fb,
const struct drm_plane_state *plane_state,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ intel_tv_detect(struct drm_connector *connector, bool force)

if (intel_get_load_detect_pipe(connector, &mode, &tmp, &ctx)) {
type = intel_tv_detect_type(intel_tv, connector);
intel_release_load_detect_pipe(connector, &tmp);
intel_release_load_detect_pipe(connector, &tmp, &ctx);
status = type < 0 ?
connector_status_disconnected :
connector_status_connected;
Expand Down

0 comments on commit 49172fe

Please sign in to comment.