drm/i915: don't save all the encoder/crtc state in set_config

We actually only touch the connector -> encoder and encoder -> crtc
linking. So it's enough to just save/restore that.

While at it, also switch to kcalloc to allocate these arrays (omission
in the commit message spotted by Jesse Barnes).

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2012-07-05 16:20:48 +02:00
parent 8d3e375e77
commit 1aa4b628ee
2 changed files with 17 additions and 15 deletions

View File

@@ -424,8 +424,8 @@ extern void intel_panel_destroy_backlight(struct drm_device *dev);
extern enum drm_connector_status intel_panel_detect(struct drm_device *dev);
struct intel_set_config {
struct drm_connector *save_connectors;
struct drm_encoder *save_encoders;
struct drm_encoder **save_connector_encoders;
struct drm_crtc **save_encoder_crtcs;
struct drm_crtc *save_crtcs;
bool fb_changed;