Commit d502f6c4 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/fbc: Handle 16bpp compression limit better

The limit++ for the 16bpp case is nonsense since the
compression limit is always supposed to be power of two.
Replace it with <<=1.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210610183237.3920-6-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent 337e54f7
......@@ -239,11 +239,10 @@ static void ilk_fbc_activate(struct drm_i915_private *dev_priv)
dpfc_ctl = DPFC_CTL_PLANE(params->crtc.i9xx_plane);
if (params->fb.format->cpp[0] == 2)
limit++;
limit <<= 1;
switch (limit) {
case 4:
case 3:
dpfc_ctl |= DPFC_CTL_LIMIT_4X;
break;
case 2:
......@@ -319,11 +318,10 @@ static void gen7_fbc_activate(struct drm_i915_private *dev_priv)
dpfc_ctl |= IVB_DPFC_CTL_PLANE(params->crtc.i9xx_plane);
if (params->fb.format->cpp[0] == 2)
limit++;
limit <<= 1;
switch (limit) {
case 4:
case 3:
dpfc_ctl |= DPFC_CTL_LIMIT_4X;
break;
case 2:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment