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;
}

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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to