Message ID | 1386880917-2951-6-git-send-email-jbarnes@virtuousgeek.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Dec 12, 2013 at 12:41:57PM -0800, Jesse Barnes wrote: > Otherwise subsequent fb activity will try to do blank/unblank on outputs > that were never fully enabled. Hmm, actually this highlights a bug in drm_setup_crtcs() that we do not reconstruct enabled[] after a return false here. Only the first enabled[i] = false is required where we continue rather than abort. -Chris
On Thu, 12 Dec 2013 22:30:41 +0000 Chris Wilson <chris@chris-wilson.co.uk> wrote: > On Thu, Dec 12, 2013 at 12:41:57PM -0800, Jesse Barnes wrote: > > Otherwise subsequent fb activity will try to do blank/unblank on outputs > > that were never fully enabled. > > Hmm, actually this highlights a bug in drm_setup_crtcs() that we do not > reconstruct enabled[] after a return false here. > > Only the first enabled[i] = false is required where we continue rather > than abort. Yeah this one took me awhile to find. Not surprised if there are other bugs lurking here. This one fixes the issue introduced by these patches at least in the multihead config.
On Thu, 12 Dec 2013 22:30:41 +0000 Chris Wilson <chris@chris-wilson.co.uk> wrote: > On Thu, Dec 12, 2013 at 12:41:57PM -0800, Jesse Barnes wrote: > > Otherwise subsequent fb activity will try to do blank/unblank on outputs > > that were never fully enabled. > > Hmm, actually this highlights a bug in drm_setup_crtcs() that we do not > reconstruct enabled[] after a return false here. > > Only the first enabled[i] = false is required where we continue rather > than abort. Fixed, thanks.
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 53675d2..dcadd32 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -308,6 +308,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, if (!encoder || !encoder->crtc) { DRM_DEBUG_KMS("connector %d has no encoder or crtc, skipping\n", connector->base.id); + enabled[i] = false; continue; } @@ -315,6 +316,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, DRM_DEBUG_KMS("connector %s on crtc %d has inconsistent state, aborting\n", drm_get_connector_name(connector), encoder->crtc->base.id); + enabled[i] = false; return false; } @@ -322,6 +324,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, DRM_DEBUG_KMS("connector %s on inactive crtc %d, borting\n", drm_get_connector_name(connector), encoder->crtc->base.id); + enabled[i] = false; return false; }
Otherwise subsequent fb activity will try to do blank/unblank on outputs that were never fully enabled. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> --- drivers/gpu/drm/i915/intel_fbdev.c | 3 +++ 1 file changed, 3 insertions(+)