Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275260
b: refs/heads/master
c: c5006cf
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Barnes authored and Dave Airlie committed Nov 11, 2011
1 parent 5c5a3aa commit 800985e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 091264f0bc12419560ac64fcef4567809d611658
refs/heads/master: c5006cfe2f5fc3cc03ebe2342aaca83d051d99e0
13 changes: 13 additions & 0 deletions trunk/drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
struct drm_connector *save_connectors, *connector;
int count = 0, ro, fail = 0;
struct drm_crtc_helper_funcs *crtc_funcs;
struct drm_mode_set save_set;
int ret = 0;
int i;

Expand Down Expand Up @@ -556,6 +557,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
save_connectors[count++] = *connector;
}

save_set.crtc = set->crtc;
save_set.mode = &set->crtc->mode;
save_set.x = set->crtc->x;
save_set.y = set->crtc->y;
save_set.fb = set->crtc->fb;

/* We should be able to check here if the fb has the same properties
* and then just flip_or_move it */
if (set->crtc->fb != set->fb) {
Expand Down Expand Up @@ -721,6 +728,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
*connector = save_connectors[count++];
}

/* Try to restore the config */
if (mode_changed &&
!drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, save_set.x,
save_set.y, save_set.fb))
DRM_ERROR("failed to restore config after modeset failure\n");

kfree(save_connectors);
kfree(save_encoders);
kfree(save_crtcs);
Expand Down

0 comments on commit 800985e

Please sign in to comment.