drm/i915: Fix FBC cfb stride programming for non X-tiled FB
authorPraveen Paneri <praveen.paneri@intel.com>
Thu, 10 Aug 2017 18:30:33 +0000 (00:00 +0530)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Sat, 26 Aug 2017 00:13:33 +0000 (21:13 -0300)
commit5654a1623c8717c40384b1b79251b4d9dd73b751
treea1b2fbfd6a64b5040e72a91d55381059c40b8c49
parentdfbd4508326218d63e75715217a495adc0b4a454
drm/i915: Fix FBC cfb stride programming for non X-tiled FB

When FBC is enabled for linear, legacy Y-tiled and Yf-tiled
surfaces on gen9, the cfb stride must be programmed by SW as

cfb_stride = ceiling[(at least plane width in pixels)/
     (32 * compression limit factor)] * 8

v2: Minor fix for a build error
v3: Fixed subject, register name and platform check (Ville)
v4: Added WA details in comment (Paulo)
v5:
 - Read modified reg write to preserve other bit values (Paulo)
 - Store modified stride value in reg_params (Paulo)
 - Keep GLK out of the WA (Paulo)
v6:
 - added additional field in reg_params for gen9_wa_cfb_stride (Paulo)
 - Used appropriate bit mask while writing the register (Paulo)
v7 (from Paulo):
 - Fix coding style and spacing issues.
 - Mask the old values before writing.
 - Bikeshed comments and unnecessary checks.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1502389833-32621-1-git-send-email-praveen.paneri@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_fbc.c