From: Ville Syrjälä Date: Thu, 6 Feb 2020 20:12:04 +0000 (+0200) Subject: drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check X-Git-Tag: v5.10-rc1~123^2~12^2~42 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/4de962300b883cc4aaafd7b625cbd497a299e6e1 drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check g4x+ sprites have an extra cdclk limitation listed for RGB formats. For some random reason I chose to use cpp>=4 as the check for that. While that does actually work let's deobfuscate it by checking for !is_yuv instead. I suspect is_yuv didn't exist way back when I originally write the code. Also drop the duplicate comment. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200206201204.31704-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula --- diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c index dcc26fdce5d1..63040cb0d4e1 100644 --- a/drivers/gpu/drm/i915/display/intel_sprite.c +++ b/drivers/gpu/drm/i915/display/intel_sprite.c @@ -1639,8 +1639,8 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state, limit -= decimate; /* -10% for RGB */ - if (fb->format->cpp[0] >= 4) - limit--; /* -10% for RGB */ + if (!fb->format->is_yuv) + limit--; /* * We should also do -10% if sprite scaling is enabled