drm/i915: Generalize drain latency computation
authorGajanan Bhat <gajanan.bhat@intel.com>
Wed, 6 Aug 2014 20:28:24 +0000 (01:58 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Aug 2014 15:43:59 +0000 (17:43 +0200)
commit0948c2651413d56c90d7ee9c99d75bef82d4c351
treefe34563921c75641f0138f34c43ab5a122ca8038
parente2fcdaa9c951c51d558fea2cc020d89b382d702e
drm/i915: Generalize drain latency computation

Modify drain latency computation to use it for any plane. Same function can be
used for primary, cursor and sprite planes.

v2: Adressed review comments by Imre and Ville.
    - Moved clock round up in separate patch
    - Added WARN check for clock and pixel size
    - Simplified bit masking
    - Use cursor_base instead of reg read

v3: Changed to bitwise shorthand operator for plane_dl assignment.

Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_pm.c