[PATCH 7/7] drm/imx: ipuv3-plane: add support for separate alpha planes

Philipp Zabel p.zabel at pengutronix.de
Wed May 20 03:51:41 PDT 2015


Am Dienstag, den 19.05.2015, 18:58 +0200 schrieb Daniel Vetter:
[...]
> > @@ -86,13 +93,36 @@ int ipu_plane_set_base(struct ipu_plane *ipu_plane, struct drm_framebuffer *fb,
> >  	eba = cma_obj->paddr + fb->offsets[0] +
> >  	      fb->pitches[0] * y + (fb->bits_per_pixel >> 3) * x;
> >  
> > +	switch (fb->pixel_format) {
> > +	case DRM_FORMAT_RGB565_A8:
> > +	case DRM_FORMAT_BGR565_A8:
> > +	case DRM_FORMAT_RGB888_A8:
> > +	case DRM_FORMAT_BGR888_A8:
> > +	case DRM_FORMAT_RGBX8888_A8:
> > +	case DRM_FORMAT_BGRX8888_A8:
> > +		alpha_eba = cma_obj->paddr + fb->offsets[1] +
> > +			    fb->pitches[1] * y + x;
> 
> You need to look at the 2nd cma_obj here, i.e. drm_fb_cma_get_gem_obj(fb, 1);
> 
> Yes, userspace is allowed to hand in non-matching. And given that you
> you just reuse the cma helpers and don't reject framebuffers with
> non-matching cma objects your current planar yuv support is also already
> broken. Would be good if you could also patch modetest a bit to exercise
> this ...
> -Daniel

Ow, right. I'll have a look at this.

thanks
Philipp



More information about the dri-devel mailing list