Revert "drm/sun4i: Remove R40 display pipeline compatibles"
Subsystems (5)
PATCH 1/1 Revert "drm/sun4i: Remove R40 display pipeline compatibles"
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.
---
drm-misc-fixes, which contains the patch to be reverted, should be merged into drm-misc-next before tihs patch is applied.
Also, checkpatch.pl is complaining that the R40 mixer compatibles are missing from the device tree bindings. It seems the patch adding them never made it in. Please apply if possible:
https://patchwork.kernel.org/patch/10485815/
Thanks
--- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + drivers/gpu/drm/sun4i/sun8i_mixer.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 1 + 3 files changed, 26 insertions(+)
drivers/gpu/drm/sun4i/sun4i_drv.c +1 -0
@@ -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" },
drivers/gpu/drm/sun4i/sun8i_mixer.c +24 -0
@@ -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,
drivers/gpu/drm/sun4i/sun8i_tcon_top.c +1 -0
@@ -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);
Signature · 1 line
2.19.0
Sean Paul
AppliedQuoted 15 lines · Chen-Yu Tsai
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 <[email protected]>---
Quoted 8 lines
drm-misc-fixes, which contains the patch to be reverted, should be merged into drm-misc-next before tihs patch is applied.
Also, checkpatch.pl is complaining that the R40 mixer compatibles are missing from the device tree bindings. It seems the patch adding them never made it in. Please apply if possible:
https://patchwork.kernel.org/patch/10485815/
Applied both of these to drm-misc-next after backmerging rc5 to pick up the fix.
Sean
Quoted 78 lines
Thanks
--- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + drivers/gpu/drm/sun4i/sun8i_mixer.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 1 + 3 files changed, 26 insertions(+)drivers/gpu/drm/sun4i/sun4i_drv.c +1
-0@@ -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" },drivers/gpu/drm/sun4i/sun8i_mixer.c +24
-0@@ -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,drivers/gpu/drm/sun4i/sun8i_tcon_top.c +1
-0@@ -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);Signature · 1 line
2.19.0
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS