Revert "drm/sun4i: Remove R40 display pipeline compatibles"
authorChen-Yu Tsai <wens@csie.org>
Fri, 21 Sep 2018 14:27:43 +0000 (22:27 +0800)
committerSean Paul <seanpaul@chromium.org>
Thu, 27 Sep 2018 08:18:07 +0000 (04:18 -0400)
This reverts commit 3510e7a7f91088159bfc67e8abdc9f9e77d28870.

During the 4.19 merge window for drm-misc, two patches critical to
supporting the display pipeline on the Allwinner R40 SoC were missed.
They were applied later but missed the merge window deadline. As a
result 4.19-rc1 kernel would crash on the R40 when it couldn't parse
the new device tree structure. We ended up removing support for the
R40 display pipeline for 4.19.

Since the missing patches are already merged for 4.20, we can now
revert the commit that removed support.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180921142743.8711-1-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_drv.c
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_tcon_top.c

index 9027ddde4262c22ba9bb4f9e09b8571af39f2247..1e41c3f5fd6d1c851ac4d2e0dbb2aede2419c404 100644 (file)
@@ -402,6 +402,7 @@ static const struct of_device_id sun4i_drv_of_table[] = {
        { .compatible = "allwinner,sun8i-a33-display-engine" },
        { .compatible = "allwinner,sun8i-a83t-display-engine" },
        { .compatible = "allwinner,sun8i-h3-display-engine" },
+       { .compatible = "allwinner,sun8i-r40-display-engine" },
        { .compatible = "allwinner,sun8i-v3s-display-engine" },
        { .compatible = "allwinner,sun9i-a80-display-engine" },
        { .compatible = "allwinner,sun50i-a64-display-engine" },
index 091f6cf403537a74eb1ea664b491850d513ebba7..8b3d02b146b7a57c5cfe6f25ef7dc83155339180 100644 (file)
@@ -545,6 +545,22 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
        .vi_num         = 1,
 };
 
+static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
+       .ccsc           = 0,
+       .mod_rate       = 297000000,
+       .scaler_mask    = 0xf,
+       .ui_num         = 3,
+       .vi_num         = 1,
+};
+
+static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
+       .ccsc           = 1,
+       .mod_rate       = 297000000,
+       .scaler_mask    = 0x3,
+       .ui_num         = 1,
+       .vi_num         = 1,
+};
+
 static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
        .vi_num = 2,
        .ui_num = 1,
@@ -582,6 +598,14 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
                .compatible = "allwinner,sun8i-h3-de2-mixer-0",
                .data = &sun8i_h3_mixer0_cfg,
        },
+       {
+               .compatible = "allwinner,sun8i-r40-de2-mixer-0",
+               .data = &sun8i_r40_mixer0_cfg,
+       },
+       {
+               .compatible = "allwinner,sun8i-r40-de2-mixer-1",
+               .data = &sun8i_r40_mixer1_cfg,
+       },
        {
                .compatible = "allwinner,sun8i-v3s-de2-mixer",
                .data = &sun8i_v3s_mixer_cfg,
index 9831a9fe2cf4714bf70855a87d8cca4afa1f0ca9..3040a79f298ffa2348b258c14a0307ee76fbd7ce 100644 (file)
@@ -252,6 +252,7 @@ static int sun8i_tcon_top_remove(struct platform_device *pdev)
 
 /* sun4i_drv uses this list to check if a device node is a TCON TOP */
 const struct of_device_id sun8i_tcon_top_of_table[] = {
+       { .compatible = "allwinner,sun8i-r40-tcon-top" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sun8i_tcon_top_of_table);