mirror of https://gitee.com/openkylin/linux.git
drm/i915: Reset crtc after resume
Based on a patch by Takashi Iwai. Reported-by: Matthias Hopf <mat@mshopf.de> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27272 Tested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f3269058e7
commit
5d1d0cc87f
|
@ -5551,6 +5551,18 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void intel_crtc_reset(struct drm_crtc *crtc)
|
||||||
|
{
|
||||||
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||||
|
|
||||||
|
/* Reset flags back to the 'unknown' status so that they
|
||||||
|
* will be correctly set on the initial modeset.
|
||||||
|
*/
|
||||||
|
intel_crtc->cursor_addr = 0;
|
||||||
|
intel_crtc->dpms_mode = -1;
|
||||||
|
intel_crtc->active = true; /* force the pipe off on setup_init_config */
|
||||||
|
}
|
||||||
|
|
||||||
static struct drm_crtc_helper_funcs intel_helper_funcs = {
|
static struct drm_crtc_helper_funcs intel_helper_funcs = {
|
||||||
.dpms = intel_crtc_dpms,
|
.dpms = intel_crtc_dpms,
|
||||||
.mode_fixup = intel_crtc_mode_fixup,
|
.mode_fixup = intel_crtc_mode_fixup,
|
||||||
|
@ -5562,6 +5574,7 @@ static struct drm_crtc_helper_funcs intel_helper_funcs = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct drm_crtc_funcs intel_crtc_funcs = {
|
static const struct drm_crtc_funcs intel_crtc_funcs = {
|
||||||
|
.reset = intel_crtc_reset,
|
||||||
.cursor_set = intel_crtc_cursor_set,
|
.cursor_set = intel_crtc_cursor_set,
|
||||||
.cursor_move = intel_crtc_cursor_move,
|
.cursor_move = intel_crtc_cursor_move,
|
||||||
.gamma_set = intel_crtc_gamma_set,
|
.gamma_set = intel_crtc_gamma_set,
|
||||||
|
@ -5652,9 +5665,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
|
||||||
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
|
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
|
||||||
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
|
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
|
||||||
|
|
||||||
intel_crtc->cursor_addr = 0;
|
intel_crtc_reset(&intel_crtc->base);
|
||||||
intel_crtc->dpms_mode = -1;
|
|
||||||
intel_crtc->active = true; /* force the pipe off on setup_init_config */
|
|
||||||
|
|
||||||
if (HAS_PCH_SPLIT(dev)) {
|
if (HAS_PCH_SPLIT(dev)) {
|
||||||
intel_helper_funcs.prepare = ironlake_crtc_prepare;
|
intel_helper_funcs.prepare = ironlake_crtc_prepare;
|
||||||
|
|
Loading…
Reference in New Issue