Message ID | 1487326666-15789-2-git-send-email-tomasz.lis@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Feb 17, 2017 at 11:17:46AM +0100, Tomasz Lis wrote: > This fixes an old patch so it doesn't cause infinite retries: > drm/fb: add support for tiled monitor configurations. > > The max count of iterations, 0xa10070f, was carefully selected based on the fact > that it looks cool. > --- > drivers/gpu/drm/drm_fb_helper.c | 4 +++- > drivers/gpu/drm/i915/intel_fbdev.c | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c Change to that file should go through dri-devel. > index 0dd5da8..8e6c535 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -2011,7 +2011,9 @@ static bool drm_target_preferred(struct drm_fb_helper *fb_helper, > > if ((conn_configured & mask) != mask) { > tile_pass++; > - goto retry; > + if (tile_pass < 0xa10070f) Can we have this named? Also it could be more sensible to go with something representing order of how many retries we want rather than going full wizard on it? > + goto retry; > + DRM_ERROR("Max connector check retry count exceeded\n"); > } > return true; > }
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 0dd5da8..8e6c535 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2011,7 +2011,9 @@ static bool drm_target_preferred(struct drm_fb_helper *fb_helper, if ((conn_configured & mask) != mask) { tile_pass++; - goto retry; + if (tile_pass < 0xa10070f) + goto retry; + DRM_ERROR("Max connector check retry count exceeded\n"); } return true; } diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index bc65ecf..2fd0f09 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -498,7 +498,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, if (count > 0 && (conn_configured & mask) != mask) { pass++; - goto retry; + if (pass < 0xa10070f) + goto retry; + DRM_ERROR("Max connector check retry count exceeded\n"); + goto bail; } /*