Commit 23d3e379 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix g4x+ sprite dotclock limit for upscaling

Even if we're not doing downscaling we should account for
some of the extra dotclock limitations for g4x+ sprites. In
particular we must never exceed the 90% rule, and with RGB
that limits actually drops to 80%.

So instead of bailing out when upscaling let's clamp the
scaling factor appropriately and go through the rest of
calculation normally. By luck we already did the full
calculations for the 1:1 case.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200206201204.31704-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 8dec2fc1
...@@ -1626,8 +1626,7 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state, ...@@ -1626,8 +1626,7 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
hscale = drm_rect_calc_hscale(&plane_state->uapi.src, hscale = drm_rect_calc_hscale(&plane_state->uapi.src,
&plane_state->uapi.dst, &plane_state->uapi.dst,
0, INT_MAX); 0, INT_MAX);
if (hscale < 0x10000) hscale = max(hscale, 0x10000u);
return pixel_rate;
/* Decimation steps at 2x,4x,8x,16x */ /* Decimation steps at 2x,4x,8x,16x */
decimate = ilog2(hscale >> 16); decimate = ilog2(hscale >> 16);
......
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