mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210610183237.3920-6-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
This commit is contained in:
parent
337e54f77c
commit
d502f6c438
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user