drm/sun4i: Add VI scaler line size quirk for DE2/DE3
authorJernej Skrabec <jernej.skrabec@siol.net>
Thu, 28 Feb 2019 20:03:28 +0000 (21:03 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 1 Mar 2019 14:30:09 +0000 (15:30 +0100)
While all RGB scalers have maximum line size of 2048, some YUV scalers
have maximum line size of 2048 and some have line size of 4096.

Since there is no rule for that, add a quirk.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190228200329.11128-3-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_mixer.h

index 30a2eff55687b0ddc6e18bc006714fb67ecff84a..a2c4807fc9b750a748e4d72ff3d53e71a8170ec1 100644 (file)
@@ -554,6 +554,7 @@ static int sun8i_mixer_remove(struct platform_device *pdev)
 static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
        .ccsc           = 0,
        .scaler_mask    = 0xf,
+       .scanline_yuv   = 2048,
        .ui_num         = 3,
        .vi_num         = 1,
 };
@@ -561,6 +562,7 @@ static const struct sun8i_mixer_cfg sun8i_a83t_mixer0_cfg = {
 static const struct sun8i_mixer_cfg sun8i_a83t_mixer1_cfg = {
        .ccsc           = 1,
        .scaler_mask    = 0x3,
+       .scanline_yuv   = 2048,
        .ui_num         = 1,
        .vi_num         = 1,
 };
@@ -569,6 +571,7 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
        .ccsc           = 0,
        .mod_rate       = 432000000,
        .scaler_mask    = 0xf,
+       .scanline_yuv   = 2048,
        .ui_num         = 3,
        .vi_num         = 1,
 };
@@ -577,6 +580,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
        .ccsc           = 0,
        .mod_rate       = 297000000,
        .scaler_mask    = 0xf,
+       .scanline_yuv   = 2048,
        .ui_num         = 3,
        .vi_num         = 1,
 };
@@ -585,6 +589,7 @@ static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
        .ccsc           = 1,
        .mod_rate       = 297000000,
        .scaler_mask    = 0x3,
+       .scanline_yuv   = 2048,
        .ui_num         = 1,
        .vi_num         = 1,
 };
@@ -593,6 +598,7 @@ static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
        .vi_num = 2,
        .ui_num = 1,
        .scaler_mask = 0x3,
+       .scanline_yuv = 2048,
        .ccsc = 0,
        .mod_rate = 150000000,
 };
@@ -601,6 +607,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer0_cfg = {
        .ccsc           = 0,
        .mod_rate       = 297000000,
        .scaler_mask    = 0xf,
+       .scanline_yuv   = 4096,
        .ui_num         = 3,
        .vi_num         = 1,
 };
@@ -609,6 +616,7 @@ static const struct sun8i_mixer_cfg sun50i_a64_mixer1_cfg = {
        .ccsc           = 1,
        .mod_rate       = 297000000,
        .scaler_mask    = 0x3,
+       .scanline_yuv   = 2048,
        .ui_num         = 1,
        .vi_num         = 1,
 };
@@ -618,6 +626,7 @@ static const struct sun8i_mixer_cfg sun50i_h6_mixer0_cfg = {
        .is_de3         = true,
        .mod_rate       = 600000000,
        .scaler_mask    = 0xf,
+       .scanline_yuv   = 4096,
        .ui_num         = 3,
        .vi_num         = 1,
 };
index 913d14ce68b0093941ef0b2a0308c1381303f7d8..80e084caa084c41fc30549a226b5942713a9f6fa 100644 (file)
@@ -159,6 +159,7 @@ struct de2_fmt_info {
  * @mod_rate: module clock rate that needs to be set in order to have
  *     a functional block.
  * @is_de3: true, if this is next gen display engine 3.0, false otherwise.
+ * @scaline_yuv: size of a scanline for VI scaler for YUV formats.
  */
 struct sun8i_mixer_cfg {
        int             vi_num;
@@ -167,6 +168,7 @@ struct sun8i_mixer_cfg {
        int             ccsc;
        unsigned long   mod_rate;
        unsigned int    is_de3 : 1;
+       unsigned int    scanline_yuv;
 };
 
 struct sun8i_mixer {