diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-10-26 10:59:30 -0400 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-01-20 04:05:30 -0500 |
commit | 4b4b9238a30e308b85be2249eadad74ca5d02178 (patch) | |
tree | e7bbd1b107074691f8f45d03bc839e0ae42c155b /drivers/gpu/drm/i915/intel_display.c | |
parent | 7da903ef04851aba81e4ddabf65c15fb71b7ce47 (diff) |
drm/i915: Kill hwmode save/restore
drm core no longer uses crtc->hwmode, and neither does i915, so we can totally ignore it
in i915.
Reviewed-by: mario.kleiner.de@gmail.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 920fcff8818c..6efac680d01a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -9597,21 +9597,19 @@ static int __intel_set_mode(struct drm_crtc *crtc, | |||
9597 | { | 9597 | { |
9598 | struct drm_device *dev = crtc->dev; | 9598 | struct drm_device *dev = crtc->dev; |
9599 | drm_i915_private_t *dev_priv = dev->dev_private; | 9599 | drm_i915_private_t *dev_priv = dev->dev_private; |
9600 | struct drm_display_mode *saved_mode, *saved_hwmode; | 9600 | struct drm_display_mode *saved_mode; |
9601 | struct intel_crtc_config *pipe_config = NULL; | 9601 | struct intel_crtc_config *pipe_config = NULL; |
9602 | struct intel_crtc *intel_crtc; | 9602 | struct intel_crtc *intel_crtc; |
9603 | unsigned disable_pipes, prepare_pipes, modeset_pipes; | 9603 | unsigned disable_pipes, prepare_pipes, modeset_pipes; |
9604 | int ret = 0; | 9604 | int ret = 0; |
9605 | 9605 | ||
9606 | saved_mode = kcalloc(2, sizeof(*saved_mode), GFP_KERNEL); | 9606 | saved_mode = kmalloc(sizeof(*saved_mode), GFP_KERNEL); |
9607 | if (!saved_mode) | 9607 | if (!saved_mode) |
9608 | return -ENOMEM; | 9608 | return -ENOMEM; |
9609 | saved_hwmode = saved_mode + 1; | ||
9610 | 9609 | ||
9611 | intel_modeset_affected_pipes(crtc, &modeset_pipes, | 9610 | intel_modeset_affected_pipes(crtc, &modeset_pipes, |
9612 | &prepare_pipes, &disable_pipes); | 9611 | &prepare_pipes, &disable_pipes); |
9613 | 9612 | ||
9614 | *saved_hwmode = crtc->hwmode; | ||
9615 | *saved_mode = crtc->mode; | 9613 | *saved_mode = crtc->mode; |
9616 | 9614 | ||
9617 | /* Hack: Because we don't (yet) support global modeset on multiple | 9615 | /* Hack: Because we don't (yet) support global modeset on multiple |
@@ -9686,9 +9684,6 @@ static int __intel_set_mode(struct drm_crtc *crtc, | |||
9686 | dev_priv->display.crtc_enable(&intel_crtc->base); | 9684 | dev_priv->display.crtc_enable(&intel_crtc->base); |
9687 | 9685 | ||
9688 | if (modeset_pipes) { | 9686 | if (modeset_pipes) { |
9689 | /* Store real post-adjustment hardware mode. */ | ||
9690 | crtc->hwmode = pipe_config->adjusted_mode; | ||
9691 | |||
9692 | /* Calculate and store various constants which | 9687 | /* Calculate and store various constants which |
9693 | * are later needed by vblank and swap-completion | 9688 | * are later needed by vblank and swap-completion |
9694 | * timestamping. They are derived from true hwmode. | 9689 | * timestamping. They are derived from true hwmode. |
@@ -9699,10 +9694,8 @@ static int __intel_set_mode(struct drm_crtc *crtc, | |||
9699 | 9694 | ||
9700 | /* FIXME: add subpixel order */ | 9695 | /* FIXME: add subpixel order */ |
9701 | done: | 9696 | done: |
9702 | if (ret && crtc->enabled) { | 9697 | if (ret && crtc->enabled) |
9703 | crtc->hwmode = *saved_hwmode; | ||
9704 | crtc->mode = *saved_mode; | 9698 | crtc->mode = *saved_mode; |
9705 | } | ||
9706 | 9699 | ||
9707 | out: | 9700 | out: |
9708 | kfree(pipe_config); | 9701 | kfree(pipe_config); |