On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote:
> >> +  drm_helper_mode_fill_fb_struct(&fb_cma->fb, mode_cmd);
> >> +
> >> +  for (i = 0; i < num_planes; i++)
> >> +          fb_cma->obj[i] = obj[i];
> > 
> > Check for valid num_planes before this loop?
> > 
> 
> Hm, I think the callers already take care of this. drm_format_num_planes will
> always return a valid number and the other caller passes 1 unconditionally.

As long as the array always is big enough to hold the maximum number of
planes I think it's fine. However, if there is some format with 5 planes
(don't know if there is, I only know yuv with multiple planes) it's not
obvious that this code does not support this.

> 
> > 
> > Note I have renamed struct drm_gem_cma_obj to struct drm_gem_cma_object
> > in the patch I just sent.
> > 
> 
> Do you think it makes sense for you to carry this patch as part of your iMX 
> DRM
> series?

I can carry this, but it could be that Laurent has his driver in an
acceptable state earlier. Let's see.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to