]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/skl: Make res_blocks/lines intermediate values 32 bits
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 4 Nov 2014 17:06:55 +0000 (17:06 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 7 Nov 2014 17:42:11 +0000 (18:42 +0100)
commitebfb89d210d6da302b2e04b78c512a4f01edf1c7
treebd2747363ba976c5df5a04eb30edb5c036ad8ee3
parent4d71956fcd6b7266baa5894d98de6285a10d6aeb
drm/i915/skl: Make res_blocks/lines intermediate values 32 bits

To align with the ilk WM code and because it makes sense to test against
the upper bounds as soon as possible on variables that are bigger than
the number of bits in the register, let's move the maximum checks from
skl_compute_wm_results() to skl_compute_plane_wm().

v2: Leave the result values to 0 when overflowing the limits (Ville)
    Use 32 bits intermediate variables (Damien)

Instead of using the 16 and 8 bits space we have in the result
structure, use 32 bits local variables until we're sure they fit into
the constraints.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c