Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371473
b: refs/heads/master
c: f30da18
h: refs/heads/master
i:
  371471: 8b8f929
v: v3
  • Loading branch information
Daniel Vetter committed Apr 18, 2013
1 parent 6189ab1 commit 5b56d02
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42b5aeabe9286cdaabfc9b0ce5fa869bbe04dcd9
refs/heads/master: f30da187cdcd0939288038e11fb3bfbd1b655564
30 changes: 24 additions & 6 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -7916,9 +7916,9 @@ intel_modeset_check_state(struct drm_device *dev)
}
}

int intel_set_mode(struct drm_crtc *crtc,
struct drm_display_mode *mode,
int x, int y, struct drm_framebuffer *fb)
static int __intel_set_mode(struct drm_crtc *crtc,
struct drm_display_mode *mode,
int x, int y, struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
Expand Down Expand Up @@ -8012,8 +8012,6 @@ int intel_set_mode(struct drm_crtc *crtc,
if (ret && crtc->enabled) {
crtc->hwmode = *saved_hwmode;
crtc->mode = *saved_mode;
} else {
intel_modeset_check_state(dev);
}

out:
Expand All @@ -8022,6 +8020,20 @@ int intel_set_mode(struct drm_crtc *crtc,
return ret;
}

int intel_set_mode(struct drm_crtc *crtc,
struct drm_display_mode *mode,
int x, int y, struct drm_framebuffer *fb)
{
int ret;

ret = __intel_set_mode(crtc, mode, x, y, fb);

if (ret == 0)
intel_modeset_check_state(crtc->dev);

return ret;
}

void intel_crtc_restore_mode(struct drm_crtc *crtc)
{
intel_set_mode(crtc, &crtc->mode, crtc->x, crtc->y, crtc->fb);
Expand Down Expand Up @@ -9333,10 +9345,16 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
}

if (force_restore) {
/*
* We need to use raw interfaces for restoring state to avoid
* checking (bogus) intermediate states.
*/
for_each_pipe(pipe) {
struct drm_crtc *crtc =
dev_priv->pipe_to_crtc_mapping[pipe];
intel_crtc_restore_mode(crtc);

__intel_set_mode(crtc, &crtc->mode, crtc->x, crtc->y,
crtc->fb);
}
list_for_each_entry(plane, &dev->mode_config.plane_list, head)
intel_plane_restore(plane);
Expand Down

0 comments on commit 5b56d02

Please sign in to comment.