> -----Original Message-----
> From: Sharma, Shashank
> Sent: Thursday, February 15, 2018 2:24 PM
> To: Srinivas, Vidya <vidya.srini...@intel.com>; intel-
> g...@lists.freedesktop.org
> Cc: maarten.lankho...@linux.intel.com; Kamath, Sunil
> <sunil.kam...@intel.com>; Shankar, Uma <uma.shan...@intel.com>;
> Konduru, Chandra <chandra.kond...@intel.com>; Maiti, Nabendu Bikash
> <nabendu.bikash.ma...@intel.com>
> Subject: Re: [PATCH 14/16] drm/i915: Add NV12 as supported format for
> sprite plane
> 
> Regards
> 
> Shashank
> 
> 
> On 2/14/2018 10:27 AM, Vidya Srinivas wrote:
> > +           if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)
> &&
> > +               (plane != 0 || pipe == PIPE_C)) ||
> > +               ((INTEL_GEN(dev_priv) == 10 ||
> > +               IS_GEMINILAKE(dev_priv)) && plane != 0))
> > +                   num_plane_formats -= 1;
> Please correct me if I am wrong, but as far as I see, this whole complex
> if(cond) can be replaced by more readable if's like:
> if (IS_GEMINILAKE(dev_priv) || IS_GEN10(dev_priv)) {
>      if (plane != 0)
>          num_planes_format -=1;
> } else { /* GEN9 */
>      if (plane != 0 || pipe != PIPE_C)
>          num_planes_format -=1;
> }

Agree :) Thanks. Will fix it.

Regards
Vidya

> 
> Or May be even below:
> 
> if (IS_GEN9(dev_priv) && pipe == PIPE_C)
>      num_planes_format -=1;
> else if (plane != 0)
>      num_planes_format -=1;
> 
> Regards
> Shashank
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to