Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next

rcar-du support for r8a7793/4
* 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev:
drm: rcar-du: Add support for the R8A7794 DU
drm: rcar-du: Add support for the R8A7793 DU

+38 -8
+9 -5
Documentation/devicetree/bindings/video/renesas,du.txt
··· 5 5 - compatible: must be one of the following. 6 6 - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU 7 7 - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU 8 - - "renesas,du-r8a7791" for R8A7791 (R-Car M2) compatible DU 8 + - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU 9 + - "renesas,du-r8a7793" for R8A7793 (R-Car M2-N) compatible DU 10 + - "renesas,du-r8a7794" for R8A7794 (R-Car E2) compatible DU 9 11 10 12 - reg: A list of base address and length of each memory resource, one for 11 13 each entry in the reg-names property. ··· 24 22 - clock-names: Name of the clocks. This property is model-dependent. 25 23 - R8A7779 uses a single functional clock. The clock doesn't need to be 26 24 named. 27 - - R8A7790 and R8A7791 use one functional clock per channel and one clock 28 - per LVDS encoder. The functional clocks must be named "du.x" with "x" 29 - being the channel numerical index. The LVDS clocks must be named 25 + - R8A779[0134] use one functional clock per channel and one clock per LVDS 26 + encoder (if available). The functional clocks must be named "du.x" with 27 + "x" being the channel numerical index. The LVDS clocks must be named 30 28 "lvds.x" with "x" being the LVDS encoder numerical index. 31 29 - In addition to the functional and encoder clocks, all DU versions also 32 30 support externally supplied pixel clocks. Those clocks are optional. ··· 45 43 ----------------------------------------------------------------------------- 46 44 R8A7779 (H1) DPAD 0 DPAD 1 - 47 45 R8A7790 (H2) DPAD LVDS 0 LVDS 1 48 - R8A7791 (M2) DPAD LVDS 0 - 46 + R8A7791 (M2-W) DPAD LVDS 0 - 47 + R8A7793 (M2-N) DPAD LVDS 0 - 48 + R8A7794 (E2) DPAD 0 DPAD 1 - 49 49 50 50 51 51 Example: R8A7790 (R-Car H2) DU
+26 -1
drivers/gpu/drm/rcar-du/rcar_du_drv.c
··· 84 84 .num_lvds = 2, 85 85 }; 86 86 87 + /* M2-W (r8a7791) and M2-N (r8a7793) are identical */ 87 88 static const struct rcar_du_device_info rcar_du_r8a7791_info = { 88 89 .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK 89 90 | RCAR_DU_FEATURE_EXT_CTRL_REGS, 90 91 .num_crtcs = 2, 91 92 .routes = { 92 - /* R8A7791 has one RGB output, one LVDS output and one 93 + /* R8A779[13] has one RGB output, one LVDS output and one 93 94 * (currently unsupported) TCON output. 94 95 */ 95 96 [RCAR_DU_OUTPUT_DPAD0] = { ··· 107 106 .num_lvds = 1, 108 107 }; 109 108 109 + static const struct rcar_du_device_info rcar_du_r8a7794_info = { 110 + .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK 111 + | RCAR_DU_FEATURE_EXT_CTRL_REGS, 112 + .num_crtcs = 2, 113 + .routes = { 114 + /* R8A7794 has two RGB outputs and one (currently unsupported) 115 + * TCON output. 116 + */ 117 + [RCAR_DU_OUTPUT_DPAD0] = { 118 + .possible_crtcs = BIT(0), 119 + .encoder_type = DRM_MODE_ENCODER_NONE, 120 + .port = 0, 121 + }, 122 + [RCAR_DU_OUTPUT_DPAD1] = { 123 + .possible_crtcs = BIT(1), 124 + .encoder_type = DRM_MODE_ENCODER_NONE, 125 + .port = 1, 126 + }, 127 + }, 128 + .num_lvds = 0, 129 + }; 130 + 110 131 static const struct of_device_id rcar_du_of_table[] = { 111 132 { .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info }, 112 133 { .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info }, 113 134 { .compatible = "renesas,du-r8a7791", .data = &rcar_du_r8a7791_info }, 135 + { .compatible = "renesas,du-r8a7793", .data = &rcar_du_r8a7791_info }, 136 + { .compatible = "renesas,du-r8a7794", .data = &rcar_du_r8a7794_info }, 114 137 { } 115 138 }; 116 139
+3 -2
drivers/gpu/drm/rcar-du/rcar_du_group.c
··· 49 49 u32 defr8 = DEFR8_CODE | DEFR8_DEFE8; 50 50 51 51 /* The DEFR8 register for the first group also controls RGB output 52 - * routing to DPAD0 52 + * routing to DPAD0 for DU instances that support it. 53 53 */ 54 - if (rgrp->index == 0) 54 + if (rgrp->dev->info->routes[RCAR_DU_OUTPUT_DPAD0].possible_crtcs > 1 && 55 + rgrp->index == 0) 55 56 defr8 |= DEFR8_DRGBS_DU(rgrp->dev->dpad0_source); 56 57 57 58 rcar_du_group_write(rgrp, DEFR8, defr8);