> > +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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
- Re: [Intel-gfx] [PATCH 09/15] drm/i915: ... Konduru, Chandra
- Re: [Intel-gfx] [PATCH 09/15] drm/i915: ... Konduru, Chandra
- [Intel-gfx] [PATCH 09/15] drm/i915: Add NV12 support... Chandra Konduru
- Re: [Intel-gfx] [PATCH 09/15] drm/i915: Add NV12... Ville Syrjälä
- [Intel-gfx] [PATCH 02/15] drm/i915: In DBUF/WM calcs for ... Chandra Konduru
- Re: [Intel-gfx] [PATCH 02/15] drm/i915: In DBUF/WM c... Ville Syrjälä
- [Intel-gfx] [PATCH 06/15] drm/i915: Upscale scaler max sc... Chandra Konduru
- Re: [Intel-gfx] [PATCH 06/15] drm/i915: Upscale scal... Ville Syrjälä
- [Intel-gfx] [PATCH 04/15] drm/i915: Stage scaler request ... Chandra Konduru
- Re: [Intel-gfx] [PATCH 04/15] drm/i915: Stage scaler... Ville Syrjälä
- Re: [Intel-gfx] [PATCH 04/15] drm/i915: Stage sc... Konduru, Chandra
- [Intel-gfx] [PATCH 04/15] drm/i915: Stage scaler req... Chandra Konduru
- [Intel-gfx] [PATCH 03/15] drm/i915: Set scaler mode for N... Chandra Konduru
- Re: [Intel-gfx] [PATCH 03/15] drm/i915: Set scaler m... Ville Syrjälä
- Re: [Intel-gfx] [PATCH 03/15] drm/i915: Set scal... Daniel Vetter
- Re: [Intel-gfx] [PATCH 03/15] drm/i915: Set ... Daniel Vetter
- [Intel-gfx] [PATCH 12/15] drm/i915: Set initial phase &am... Chandra Konduru
- Re: [Intel-gfx] [PATCH 12/15] drm/i915: Set initial ... Ville Syrjälä
- [Intel-gfx] [PATCH 05/15] drm/i915: Update format_is_yuv(... Chandra Konduru
- Re: [Intel-gfx] [PATCH 05/15] drm/i915: Update forma... Ville Syrjälä
- [Intel-gfx] [PATCH 15/15] drm/i915: Add 90/270 rotation f... Chandra Konduru
