Re: [PATCH 04/15] drm/i915: Stage scaler request for NV12 as src format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +static bool skl_need_scaling(int src_w, int src_h, int dst_w, int dst_h,
> > +	unsigned int rotation, uint32_t pixel_format)
> > +{
> > +	/* need a scaler when sizes doesn't match */
> > +	if (src_w != dst_w || src_h != dst_h)
> > +		return true;
> > +
> > +	/* in case of 90/270 rotation, check src width with dst height and so */
> > +	if (intel_rotation_90_or_270(rotation) &&
> > +			(src_h != dst_w || src_w != dst_h))
> > +		return true;
> > +
> > +	/* need a scaler for nv12 */
> > +	if (pixel_format == DRM_FORMAT_NV12)
> > +		return true;
> > +
> > +	return false;
> > +}
> 
> That still looks wrong to me. Let me repeat how I think it should look:
> 
> {
> 	if (format == NV12)
> 		return true;
> 
> 	if (90_or_270())
> 		return src_w != dst_h || src_h != dst_w;
> 	else
> 		return src_w != dst_w || src_h != dst_h;
> }
> 
> Otherwise looks good.
Sending updated patch shortly.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux