drm/i915/skl+: calculate ddb minimum allocation (v6)
authorKumar, Mahesh <mahesh1.kumar@intel.com>
Tue, 31 May 2016 16:58:59 +0000 (09:58 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 1 Jun 2016 14:36:12 +0000 (07:36 -0700)
commitcbcfd14b3b3583816bb3ffdd5e880a53a2d3856b
treeb63158ced44b3d4c700994859f53bb3ef7f7d22c
parentedd4156fd69a141282c79aaa677ab127d711a927
drm/i915/skl+: calculate ddb minimum allocation (v6)

don't always use 8 ddb as minimum, instead calculate using proper
algorithm.

v2: optimizations as per Matt's comments.

v3 (by Matt):
 - Fix boolean logic for !fb test in skl_ddb_min_alloc()
 - Adjust negative tiling format comparisons in skl_ddb_min_alloc() to
   improve readability.

v4 (by Matt):
 - Rebase onto recent atomic watermark changes
 - Slight tweaks to code flow to make the logic more closely match the
   description in the bspec.

v5 (by Matt):
 - Handle minimum scanline calculation properly for 4 & 8 bpp formats.
   8bpp isn't actually possible right now, but it's listed in the bspec
   so I've included it here for forward compatibility (similar to how
   we have logic for NV12).

v6 (by Matt):
 - Calculate plane_bpp correctly for non-NV12 formats. (Mahesh)

Cc: matthew.d.roper@intel.com
Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Kumar Mahesh <mahesh1.kumar@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464713939-10440-1-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_pm.c