提交 7ff14559 编写于 作者: D Dave Airlie 提交者: Dave Airlie

drm/i915: duplicate desired mode for use by fbcon.

duplicate the mode into fbcon storage, so when we free modes later
we don't just lose this.
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 c5c07550
...@@ -2310,6 +2310,8 @@ static void intel_crtc_destroy(struct drm_crtc *crtc) ...@@ -2310,6 +2310,8 @@ static void intel_crtc_destroy(struct drm_crtc *crtc)
{ {
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
if (intel_crtc->mode_set.mode)
drm_mode_destroy(crtc->dev, intel_crtc->mode_set.mode);
drm_crtc_cleanup(crtc); drm_crtc_cleanup(crtc);
kfree(intel_crtc); kfree(intel_crtc);
} }
......
...@@ -674,8 +674,12 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc * ...@@ -674,8 +674,12 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *
par->crtc_ids[0] = crtc->base.id; par->crtc_ids[0] = crtc->base.id;
modeset->num_connectors = conn_count; modeset->num_connectors = conn_count;
if (modeset->mode != modeset->crtc->desired_mode) if (modeset->crtc->desired_mode) {
modeset->mode = modeset->crtc->desired_mode; if (modeset->mode)
drm_mode_destroy(dev, modeset->mode);
modeset->mode = drm_mode_duplicate(dev,
modeset->crtc->desired_mode);
}
par->crtc_count = 1; par->crtc_count = 1;
...@@ -824,8 +828,12 @@ static int intelfb_single_fb_probe(struct drm_device *dev) ...@@ -824,8 +828,12 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
par->crtc_ids[crtc_count++] = crtc->base.id; par->crtc_ids[crtc_count++] = crtc->base.id;
modeset->num_connectors = conn_count; modeset->num_connectors = conn_count;
if (modeset->mode != modeset->crtc->desired_mode) if (modeset->crtc->desired_mode) {
modeset->mode = modeset->crtc->desired_mode; if (modeset->mode)
drm_mode_destroy(dev, modeset->mode);
modeset->mode = drm_mode_duplicate(dev,
modeset->crtc->desired_mode);
}
} }
par->crtc_count = crtc_count; par->crtc_count = crtc_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册