[Intel-gfx] [PATCH] drm/i915: Kconfig option to disable the legacy fbdev support

Daniel Vetter daniel at ffwll.ch
Wed Oct 9 10:33:25 CEST 2013


On Wed, Oct 09, 2013 at 09:09:36AM +0100, Chris Wilson wrote:
> On Wed, Oct 09, 2013 at 09:18:51AM +0200, Daniel Vetter wrote:
> >  mode_fits_in_fbdev(struct drm_device *dev,
> >  		   struct drm_display_mode *mode)
> >  {
> > +#ifdef CONFIG_DRM_I915_FBDEV
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  	struct drm_i915_gem_object *obj;
> >  	struct drm_framebuffer *fb;
> > @@ -7338,6 +7339,9 @@ mode_fits_in_fbdev(struct drm_device *dev,
> >  		return NULL;
> >  
> >  	return fb;
> > +#else
> > +	return NULL;
> > +#endif
> 
> This for example is not fbdev specific. There used to be code, extracted
> from this function, to sanity check that the mode fitted in the fb
> provided by the user and by the bios. Which caught a few problems in the
> past.

Hm, I think we should check the size of the underlying gem bo against the
fb we create. Then core drm should take care of all constraint checking.

But the size check in intel_framebuffer_init seems to indeed be missing.
I'll add something and submit a patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list