Commit 2daac462 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Reorganize overlay filter coeffs into a nicer form

Use two-dimensional arrays and named initializers to make the
overlay filter coefficient tables easier to parse for humans.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1481131693-27993-9-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 7039a6dc
...@@ -580,36 +580,44 @@ static u32 calc_swidthsw(struct drm_i915_private *dev_priv, u32 offset, u32 widt ...@@ -580,36 +580,44 @@ static u32 calc_swidthsw(struct drm_i915_private *dev_priv, u32 offset, u32 widt
return (sw - 32) >> 3; return (sw - 32) >> 3;
} }
static const u16 y_static_hcoeffs[N_HORIZ_Y_TAPS * N_PHASES] = { static const u16 y_static_hcoeffs[N_PHASES][N_HORIZ_Y_TAPS] = {
0x3000, 0xb4a0, 0x1930, 0x1920, 0xb4a0, [ 0] = { 0x3000, 0xb4a0, 0x1930, 0x1920, 0xb4a0, },
0x3000, 0xb500, 0x19d0, 0x1880, 0xb440, [ 1] = { 0x3000, 0xb500, 0x19d0, 0x1880, 0xb440, },
0x3000, 0xb540, 0x1a88, 0x2f80, 0xb3e0, [ 2] = { 0x3000, 0xb540, 0x1a88, 0x2f80, 0xb3e0, },
0x3000, 0xb580, 0x1b30, 0x2e20, 0xb380, [ 3] = { 0x3000, 0xb580, 0x1b30, 0x2e20, 0xb380, },
0x3000, 0xb5c0, 0x1bd8, 0x2cc0, 0xb320, [ 4] = { 0x3000, 0xb5c0, 0x1bd8, 0x2cc0, 0xb320, },
0x3020, 0xb5e0, 0x1c60, 0x2b80, 0xb2c0, [ 5] = { 0x3020, 0xb5e0, 0x1c60, 0x2b80, 0xb2c0, },
0x3020, 0xb5e0, 0x1cf8, 0x2a20, 0xb260, [ 6] = { 0x3020, 0xb5e0, 0x1cf8, 0x2a20, 0xb260, },
0x3020, 0xb5e0, 0x1d80, 0x28e0, 0xb200, [ 7] = { 0x3020, 0xb5e0, 0x1d80, 0x28e0, 0xb200, },
0x3020, 0xb5c0, 0x1e08, 0x3f40, 0xb1c0, [ 8] = { 0x3020, 0xb5c0, 0x1e08, 0x3f40, 0xb1c0, },
0x3020, 0xb580, 0x1e78, 0x3ce0, 0xb160, [ 9] = { 0x3020, 0xb580, 0x1e78, 0x3ce0, 0xb160, },
0x3040, 0xb520, 0x1ed8, 0x3aa0, 0xb120, [10] = { 0x3040, 0xb520, 0x1ed8, 0x3aa0, 0xb120, },
0x3040, 0xb4a0, 0x1f30, 0x3880, 0xb0e0, [11] = { 0x3040, 0xb4a0, 0x1f30, 0x3880, 0xb0e0, },
0x3040, 0xb400, 0x1f78, 0x3680, 0xb0a0, [12] = { 0x3040, 0xb400, 0x1f78, 0x3680, 0xb0a0, },
0x3020, 0xb340, 0x1fb8, 0x34a0, 0xb060, [13] = { 0x3020, 0xb340, 0x1fb8, 0x34a0, 0xb060, },
0x3020, 0xb240, 0x1fe0, 0x32e0, 0xb040, [14] = { 0x3020, 0xb240, 0x1fe0, 0x32e0, 0xb040, },
0x3020, 0xb140, 0x1ff8, 0x3160, 0xb020, [15] = { 0x3020, 0xb140, 0x1ff8, 0x3160, 0xb020, },
0xb000, 0x3000, 0x0800, 0x3000, 0xb000 [16] = { 0xb000, 0x3000, 0x0800, 0x3000, 0xb000, },
}; };
static const u16 uv_static_hcoeffs[N_HORIZ_UV_TAPS * N_PHASES] = { static const u16 uv_static_hcoeffs[N_PHASES][N_HORIZ_UV_TAPS] = {
0x3000, 0x1800, 0x1800, 0xb000, 0x18d0, 0x2e60, [ 0] = { 0x3000, 0x1800, 0x1800, },
0xb000, 0x1990, 0x2ce0, 0xb020, 0x1a68, 0x2b40, [ 1] = { 0xb000, 0x18d0, 0x2e60, },
0xb040, 0x1b20, 0x29e0, 0xb060, 0x1bd8, 0x2880, [ 2] = { 0xb000, 0x1990, 0x2ce0, },
0xb080, 0x1c88, 0x3e60, 0xb0a0, 0x1d28, 0x3c00, [ 3] = { 0xb020, 0x1a68, 0x2b40, },
0xb0c0, 0x1db8, 0x39e0, 0xb0e0, 0x1e40, 0x37e0, [ 4] = { 0xb040, 0x1b20, 0x29e0, },
0xb100, 0x1eb8, 0x3620, 0xb100, 0x1f18, 0x34a0, [ 5] = { 0xb060, 0x1bd8, 0x2880, },
0xb100, 0x1f68, 0x3360, 0xb0e0, 0x1fa8, 0x3240, [ 6] = { 0xb080, 0x1c88, 0x3e60, },
0xb0c0, 0x1fe0, 0x3140, 0xb060, 0x1ff0, 0x30a0, [ 7] = { 0xb0a0, 0x1d28, 0x3c00, },
0x3000, 0x0800, 0x3000 [ 8] = { 0xb0c0, 0x1db8, 0x39e0, },
[ 9] = { 0xb0e0, 0x1e40, 0x37e0, },
[10] = { 0xb100, 0x1eb8, 0x3620, },
[11] = { 0xb100, 0x1f18, 0x34a0, },
[12] = { 0xb100, 0x1f68, 0x3360, },
[13] = { 0xb0e0, 0x1fa8, 0x3240, },
[14] = { 0xb0c0, 0x1fe0, 0x3140, },
[15] = { 0xb060, 0x1ff0, 0x30a0, },
[16] = { 0x3000, 0x0800, 0x3000, },
}; };
static void update_polyphase_filter(struct overlay_registers __iomem *regs) static void update_polyphase_filter(struct overlay_registers __iomem *regs)
......
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