> -----Original Message----- > From: Sharma, Shashank > Sent: Thursday, February 15, 2018 2:24 PM > To: Srinivas, Vidya <vidya.srinivas@xxxxxxxxx>; intel- > gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: maarten.lankhorst@xxxxxxxxxxxxxxx; Kamath, Sunil > <sunil.kamath@xxxxxxxxx>; Shankar, Uma <uma.shankar@xxxxxxxxx>; > Konduru, Chandra <chandra.konduru@xxxxxxxxx>; Maiti, Nabendu Bikash > <nabendu.bikash.maiti@xxxxxxxxx> > 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@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx