Re: [PATCH 14/16] drm/i915: Add NV12 as supported format for sprite plane

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

 



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
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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