On Fri, Feb 27, 2015 at 02:40:20PM +0000, Daniel Stone wrote: > On 27 February 2015 at 13:01, Daniel Vetter <daniel@xxxxxxxx> wrote: > > On Thu, Feb 26, 2015 at 03:20:17PM +0200, Tomi Valkeinen wrote: > >> omapdrm doesn't check if the width of the framebuffer and the color > >> diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c > >> index 2975096abdf5..bf98580223d0 100644 > >> --- a/drivers/gpu/drm/omapdrm/omap_fb.c > >> +++ b/drivers/gpu/drm/omapdrm/omap_fb.c > >> @@ -463,6 +463,14 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, > >> goto fail; > >> } > >> > >> + if (mode_cmd->width % format->planes[i].stride_bpp != 0) { > > > > width is in pixels. No idea what you're trying to check here, but this > > probably isn't it. > > stride_bpp is very misnamed: it is the bits per pixel for that plane, > and not stride at all. I think the check should in fact be be (pitch % > format->planes[i].stride_bpp), which would achieve the desired result, > i.e. that the stride can be expressed as an integer number of pixels. I meant that mode_cmd->width is in pixels and so totally not what you want to check here. It probably should be mode_cmd->pitches[i]. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel