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

Merge tag 'drm-msm-next-2023-01-30' of https://gitlab.freedesktop.org/drm/msm into drm-next

msm-next for v6.3

There is one devfreq patch, maintainer acked to land via msm-next to
avoid a build break on platforms that do not support PM_DEVFREQ. And
otherwise the usual assortment:

GPU:
- Add MSM_SUBMIT_BO_NO_IMPLICIT
- a2xx: Support to load legacy firmware
- a6xx: GPU devcore dump updates for a650/a660
- GPU devfreq tuning and fixes

DPU, DSI, MDSS:
- Support for SM8350, SM8450 SM8550 and SC8280XP platform

Core:
- Added bindings for SM8150 (driver support already present)

DPU:
- Partial support for DSC on SM8150 and SM8250
- Fixed color transformation matrix being lost on suspend/resume
- Include DSC blocks into register snapshot
- Misc HW catalog fixes

DP:
- Support for DP on SDM845 and SC8280XP platforms
- HPD fixes
- Support for limiting DP link rate via DT property, this enables
- Support for HBR3 rates.

DSI:
- Validate display modes according to the DSI OPP table
- DSI PHY support for the SM6375 platform
- Fixed byte intf clock selection for 14nm PHYs
- Fix the case of empty OPP tables (fixing db410c)
- DT schema rework and fixes

HDMI:
- Turn 8960 HDMI PHY into clock provider,
- Make 8960 HDMI PHY use PXO clock from DT

MDP5:
- Schema conversion to YAML

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv6zQ-zsgS+NG+WuV=tk51q9vA2QdKqYhNgiXQddAdZjA@mail.gmail.com

+4069 -758
+28 -3
Documentation/devicetree/bindings/display/msm/dp-controller.yaml
··· 21 21 - qcom,sc7280-edp 22 22 - qcom,sc8180x-dp 23 23 - qcom,sc8180x-edp 24 + - qcom,sc8280xp-dp 25 + - qcom,sc8280xp-edp 26 + - qcom,sdm845-dp 24 27 - qcom,sm8350-dp 25 28 26 29 reg: ··· 84 81 85 82 data-lanes: 86 83 $ref: /schemas/types.yaml#/definitions/uint32-array 84 + deprecated: true 87 85 minItems: 1 88 86 maxItems: 4 89 87 items: ··· 106 102 description: Input endpoint of the controller 107 103 108 104 port@1: 109 - $ref: /schemas/graph.yaml#/properties/port 105 + $ref: /schemas/graph.yaml#/$defs/port-base 110 106 description: Output endpoint of the controller 107 + properties: 108 + endpoint: 109 + $ref: /schemas/media/video-interfaces.yaml# 110 + unevaluatedProperties: false 111 + properties: 112 + data-lanes: 113 + minItems: 1 114 + maxItems: 4 115 + items: 116 + enum: [ 0, 1, 2, 3 ] 117 + 118 + link-frequencies: 119 + minItems: 1 120 + maxItems: 4 121 + items: 122 + enum: [ 1620000000, 2700000000, 5400000000, 8100000000 ] 123 + 124 + required: 125 + - port@0 126 + - port@1 111 127 112 128 required: 113 129 - compatible ··· 151 127 enum: 152 128 - qcom,sc7280-edp 153 129 - qcom,sc8180x-edp 130 + - qcom,sc8280xp-edp 154 131 then: 155 132 properties: 156 133 "#sound-dai-cells": false 157 - reg: 158 - maxItems: 4 159 134 else: 160 135 properties: 161 136 aux-bus: false ··· 216 193 reg = <1>; 217 194 endpoint { 218 195 remote-endpoint = <&typec>; 196 + data-lanes = <0 1>; 197 + link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>; 219 198 }; 220 199 }; 221 200 };
+8 -4
Documentation/devicetree/bindings/display/msm/dpu-common.yaml
··· 13 13 description: | 14 14 Common properties for QCom DPU display controller. 15 15 16 + # Do not select this by default, otherwise it is also selected for all 17 + # display-controller@ nodes 18 + select: 19 + false 20 + 16 21 properties: 22 + $nodename: 23 + pattern: '^display-controller@[0-9a-f]+$' 24 + 17 25 interrupts: 18 26 maxItems: 1 19 27 ··· 48 40 - port@0 49 41 50 42 required: 51 - - compatible 52 - - reg 53 - - reg-names 54 - - clocks 55 43 - interrupts 56 44 - power-domains 57 45 - operating-points-v2
+255 -30
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
··· 9 9 maintainers: 10 10 - Krishna Manikandan <quic_mkrishn@quicinc.com> 11 11 12 - allOf: 13 - - $ref: "../dsi-controller.yaml#" 14 - 15 12 properties: 16 13 compatible: 17 - enum: 18 - - qcom,mdss-dsi-ctrl 19 - - qcom,dsi-ctrl-6g-qcm2290 14 + oneOf: 15 + - items: 16 + - enum: 17 + - qcom,apq8064-dsi-ctrl 18 + - qcom,msm8916-dsi-ctrl 19 + - qcom,msm8953-dsi-ctrl 20 + - qcom,msm8974-dsi-ctrl 21 + - qcom,msm8996-dsi-ctrl 22 + - qcom,msm8998-dsi-ctrl 23 + - qcom,qcm2290-dsi-ctrl 24 + - qcom,sc7180-dsi-ctrl 25 + - qcom,sc7280-dsi-ctrl 26 + - qcom,sdm660-dsi-ctrl 27 + - qcom,sdm845-dsi-ctrl 28 + - qcom,sm8150-dsi-ctrl 29 + - qcom,sm8250-dsi-ctrl 30 + - qcom,sm8350-dsi-ctrl 31 + - qcom,sm8450-dsi-ctrl 32 + - qcom,sm8550-dsi-ctrl 33 + - const: qcom,mdss-dsi-ctrl 34 + - items: 35 + - enum: 36 + - dsi-ctrl-6g-qcm2290 37 + - const: qcom,mdss-dsi-ctrl 38 + deprecated: true 20 39 21 40 reg: 22 41 maxItems: 1 ··· 47 28 maxItems: 1 48 29 49 30 clocks: 50 - items: 51 - - description: Display byte clock 52 - - description: Display byte interface clock 53 - - description: Display pixel clock 54 - - description: Display core clock 55 - - description: Display AHB clock 56 - - description: Display AXI clock 31 + description: | 32 + Several clocks are used, depending on the variant. Typical ones are:: 33 + - bus:: Display AHB clock. 34 + - byte:: Display byte clock. 35 + - byte_intf:: Display byte interface clock. 36 + - core:: Display core clock. 37 + - core_mss:: Core MultiMedia SubSystem clock. 38 + - iface:: Display AXI clock. 39 + - mdp_core:: MDP Core clock. 40 + - mnoc:: MNOC clock 41 + - pixel:: Display pixel clock. 42 + minItems: 3 43 + maxItems: 9 57 44 58 45 clock-names: 59 - items: 60 - - const: byte 61 - - const: byte_intf 62 - - const: pixel 63 - - const: core 64 - - const: iface 65 - - const: bus 46 + minItems: 3 47 + maxItems: 9 66 48 67 49 phys: 68 50 maxItems: 1 ··· 71 51 phy-names: 72 52 deprecated: true 73 53 const: dsi 74 - 75 - "#address-cells": true 76 - 77 - "#size-cells": true 78 54 79 55 syscon-sfpb: 80 56 description: A phandle to mmss_sfpb syscon node (only for DSIv2). ··· 83 67 2 DSI links. 84 68 85 69 assigned-clocks: 86 - maxItems: 2 70 + minItems: 2 71 + maxItems: 4 87 72 description: | 88 73 Parents of "byte" and "pixel" for the given platform. 74 + For DSIv2 platforms this should contain "byte", "esc", "src" and 75 + "pixel_src" clocks. 89 76 90 77 assigned-clock-parents: 91 - maxItems: 2 78 + minItems: 2 79 + maxItems: 4 92 80 description: | 93 81 The Byte clock and Pixel clock PLL outputs provided by a DSI PHY block. 94 82 ··· 123 103 properties: 124 104 data-lanes: 125 105 maxItems: 4 126 - minItems: 4 106 + minItems: 1 127 107 items: 128 108 enum: [ 0, 1, 2, 3 ] 129 109 ··· 139 119 properties: 140 120 data-lanes: 141 121 maxItems: 4 142 - minItems: 4 122 + minItems: 1 143 123 items: 144 124 enum: [ 0, 1, 2, 3 ] 145 125 146 126 required: 147 127 - port@0 148 128 - port@1 129 + 130 + avdd-supply: 131 + description: 132 + Phandle to vdd regulator device node 133 + 134 + vcca-supply: 135 + description: 136 + Phandle to vdd regulator device node 137 + 138 + vdd-supply: 139 + description: 140 + VDD regulator 141 + 142 + vddio-supply: 143 + description: 144 + VDD-IO regulator 145 + 146 + vdda-supply: 147 + description: 148 + VDDA regulator 149 149 150 150 required: 151 151 - compatible ··· 179 139 - assigned-clock-parents 180 140 - ports 181 141 182 - additionalProperties: false 142 + allOf: 143 + - $ref: ../dsi-controller.yaml# 144 + - if: 145 + properties: 146 + compatible: 147 + contains: 148 + enum: 149 + - qcom,apq8064-dsi-ctrl 150 + then: 151 + properties: 152 + clocks: 153 + maxItems: 7 154 + clock-names: 155 + items: 156 + - const: iface 157 + - const: bus 158 + - const: core_mmss 159 + - const: src 160 + - const: byte 161 + - const: pixel 162 + - const: core 163 + 164 + - if: 165 + properties: 166 + compatible: 167 + contains: 168 + enum: 169 + - qcom,msm8916-dsi-ctrl 170 + then: 171 + properties: 172 + clocks: 173 + maxItems: 6 174 + clock-names: 175 + items: 176 + - const: mdp_core 177 + - const: iface 178 + - const: bus 179 + - const: byte 180 + - const: pixel 181 + - const: core 182 + 183 + - if: 184 + properties: 185 + compatible: 186 + contains: 187 + enum: 188 + - qcom,msm8953-dsi-ctrl 189 + then: 190 + properties: 191 + clocks: 192 + maxItems: 6 193 + clock-names: 194 + items: 195 + - const: mdp_core 196 + - const: iface 197 + - const: bus 198 + - const: byte 199 + - const: pixel 200 + - const: core 201 + 202 + - if: 203 + properties: 204 + compatible: 205 + contains: 206 + enum: 207 + - qcom,msm8974-dsi-ctrl 208 + then: 209 + properties: 210 + clocks: 211 + maxItems: 7 212 + clock-names: 213 + items: 214 + - const: mdp_core 215 + - const: iface 216 + - const: bus 217 + - const: byte 218 + - const: pixel 219 + - const: core 220 + - const: core_mmss 221 + 222 + - if: 223 + properties: 224 + compatible: 225 + contains: 226 + enum: 227 + - qcom,msm8996-dsi-ctrl 228 + then: 229 + properties: 230 + clocks: 231 + maxItems: 7 232 + clock-names: 233 + items: 234 + - const: mdp_core 235 + - const: byte 236 + - const: iface 237 + - const: bus 238 + - const: core_mmss 239 + - const: pixel 240 + - const: core 241 + 242 + - if: 243 + properties: 244 + compatible: 245 + contains: 246 + enum: 247 + - qcom,msm8998-dsi-ctrl 248 + then: 249 + properties: 250 + clocks: 251 + maxItems: 6 252 + clock-names: 253 + items: 254 + - const: byte 255 + - const: byte_intf 256 + - const: pixel 257 + - const: core 258 + - const: iface 259 + - const: bus 260 + 261 + - if: 262 + properties: 263 + compatible: 264 + contains: 265 + enum: 266 + - qcom,sc7180-dsi-ctrl 267 + - qcom,sc7280-dsi-ctrl 268 + - qcom,sm8150-dsi-ctrl 269 + - qcom,sm8250-dsi-ctrl 270 + - qcom,sm8350-dsi-ctrl 271 + - qcom,sm8450-dsi-ctrl 272 + - qcom,sm8550-dsi-ctrl 273 + then: 274 + properties: 275 + clocks: 276 + maxItems: 6 277 + clock-names: 278 + items: 279 + - const: byte 280 + - const: byte_intf 281 + - const: pixel 282 + - const: core 283 + - const: iface 284 + - const: bus 285 + 286 + - if: 287 + properties: 288 + compatible: 289 + contains: 290 + enum: 291 + - qcom,sdm660-dsi-ctrl 292 + then: 293 + properties: 294 + clocks: 295 + maxItems: 9 296 + clock-names: 297 + items: 298 + - const: mdp_core 299 + - const: byte 300 + - const: byte_intf 301 + - const: mnoc 302 + - const: iface 303 + - const: bus 304 + - const: core_mmss 305 + - const: pixel 306 + - const: core 307 + 308 + - if: 309 + properties: 310 + compatible: 311 + contains: 312 + enum: 313 + - qcom,sdm845-dsi-ctrl 314 + then: 315 + properties: 316 + clocks: 317 + maxItems: 6 318 + clock-names: 319 + items: 320 + - const: byte 321 + - const: byte_intf 322 + - const: pixel 323 + - const: core 324 + - const: iface 325 + - const: bus 326 + 327 + unevaluatedProperties: false 183 328 184 329 examples: 185 330 - | ··· 374 149 #include <dt-bindings/power/qcom-rpmpd.h> 375 150 376 151 dsi@ae94000 { 377 - compatible = "qcom,mdss-dsi-ctrl"; 152 + compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 378 153 reg = <0x0ae94000 0x400>; 379 154 reg-names = "dsi_ctrl"; 380 155
+1
Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
··· 16 16 compatible: 17 17 enum: 18 18 - qcom,dsi-phy-28nm-hpm 19 + - qcom,dsi-phy-28nm-hpm-fam-b 19 20 - qcom,dsi-phy-28nm-lp 20 21 - qcom,dsi-phy-28nm-8960 21 22
+4 -1
Documentation/devicetree/bindings/display/msm/dsi-phy-7nm.yaml
··· 18 18 - qcom,dsi-phy-7nm 19 19 - qcom,dsi-phy-7nm-8150 20 20 - qcom,sc7280-dsi-phy-7nm 21 + - qcom,sm6375-dsi-phy-7nm 22 + - qcom,sm8350-dsi-phy-5nm 23 + - qcom,sm8450-dsi-phy-5nm 24 + - qcom,sm8550-dsi-phy-4nm 21 25 22 26 reg: 23 27 items: ··· 48 44 - compatible 49 45 - reg 50 46 - reg-names 51 - - vdds-supply 52 47 53 48 unevaluatedProperties: false 54 49
+3 -4
Documentation/devicetree/bindings/display/msm/dsi-phy-common.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/dsi-phy-common.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Description of Qualcomm Display DSI PHY common dt properties 7 + title: Qualcomm Display DSI PHY Common Properties 8 8 9 9 maintainers: 10 10 - Krishna Manikandan <quic_mkrishn@quicinc.com> 11 11 12 - description: | 13 - This defines the DSI PHY dt properties which are common for all 14 - dsi phy versions. 12 + description: 13 + Common properties for Qualcomm Display DSI PHY. 15 14 16 15 properties: 17 16 "#clock-cells":
+2
Documentation/devicetree/bindings/display/msm/gpu.yaml
··· 149 149 description: GPU 3D engine clock 150 150 - const: rbbmtimer 151 151 description: GPU RBBM Timer for Adreno 5xx series 152 + - const: rbcpr 153 + description: GPU RB Core Power Reduction clock 152 154 minItems: 2 153 155 maxItems: 7 154 156
-132
Documentation/devicetree/bindings/display/msm/mdp5.txt
··· 1 - Qualcomm adreno/snapdragon MDP5 display controller 2 - 3 - Description: 4 - 5 - This is the bindings documentation for the MDP5 display 6 - controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 and MSM8996. 7 - 8 - MDP5: 9 - Required properties: 10 - - compatible: 11 - * "qcom,mdp5" - MDP5 12 - - reg: Physical base address and length of the controller's registers. 13 - - reg-names: The names of register regions. The following regions are required: 14 - * "mdp_phys" 15 - - interrupts: Interrupt line from MDP5 to MDSS interrupt controller. 16 - - clocks: device clocks. See ../clocks/clock-bindings.txt for details. 17 - - clock-names: the following clocks are required. 18 - - * "bus" 19 - - * "iface" 20 - - * "core" 21 - - * "vsync" 22 - - ports: contains the list of output ports from MDP. These connect to interfaces 23 - that are external to the MDP hardware, such as HDMI, DSI, EDP etc (LVDS is a 24 - special case since it is a part of the MDP block itself). 25 - 26 - Each output port contains an endpoint that describes how it is connected to an 27 - external interface. These are described by the standard properties documented 28 - here: 29 - Documentation/devicetree/bindings/graph.txt 30 - Documentation/devicetree/bindings/media/video-interfaces.txt 31 - 32 - The availability of output ports can vary across SoC revisions: 33 - 34 - For MSM8974 and APQ8084: 35 - Port 0 -> MDP_INTF0 (eDP) 36 - Port 1 -> MDP_INTF1 (DSI1) 37 - Port 2 -> MDP_INTF2 (DSI2) 38 - Port 3 -> MDP_INTF3 (HDMI) 39 - 40 - For MSM8916: 41 - Port 0 -> MDP_INTF1 (DSI1) 42 - 43 - For MSM8994 and MSM8996: 44 - Port 0 -> MDP_INTF1 (DSI1) 45 - Port 1 -> MDP_INTF2 (DSI2) 46 - Port 2 -> MDP_INTF3 (HDMI) 47 - 48 - Optional properties: 49 - - clock-names: the following clocks are optional: 50 - * "lut" 51 - * "tbu" 52 - * "tbu_rt" 53 - 54 - Example: 55 - 56 - / { 57 - ... 58 - 59 - mdss: mdss@1a00000 { 60 - compatible = "qcom,mdss"; 61 - reg = <0x1a00000 0x1000>, 62 - <0x1ac8000 0x3000>; 63 - reg-names = "mdss_phys", "vbif_phys"; 64 - 65 - power-domains = <&gcc MDSS_GDSC>; 66 - 67 - clocks = <&gcc GCC_MDSS_AHB_CLK>, 68 - <&gcc GCC_MDSS_AXI_CLK>, 69 - <&gcc GCC_MDSS_VSYNC_CLK>; 70 - clock-names = "iface", 71 - "bus", 72 - "vsync" 73 - 74 - interrupts = <0 72 0>; 75 - 76 - interrupt-controller; 77 - #interrupt-cells = <1>; 78 - 79 - #address-cells = <1>; 80 - #size-cells = <1>; 81 - ranges; 82 - 83 - mdp: mdp@1a01000 { 84 - compatible = "qcom,mdp5"; 85 - reg = <0x1a01000 0x90000>; 86 - reg-names = "mdp_phys"; 87 - 88 - interrupt-parent = <&mdss>; 89 - interrupts = <0 0>; 90 - 91 - clocks = <&gcc GCC_MDSS_AHB_CLK>, 92 - <&gcc GCC_MDSS_AXI_CLK>, 93 - <&gcc GCC_MDSS_MDP_CLK>, 94 - <&gcc GCC_MDSS_VSYNC_CLK>; 95 - clock-names = "iface", 96 - "bus", 97 - "core", 98 - "vsync"; 99 - 100 - ports { 101 - #address-cells = <1>; 102 - #size-cells = <0>; 103 - 104 - port@0 { 105 - reg = <0>; 106 - mdp5_intf1_out: endpoint { 107 - remote-endpoint = <&dsi0_in>; 108 - }; 109 - }; 110 - }; 111 - }; 112 - 113 - dsi0: dsi@1a98000 { 114 - ... 115 - ports { 116 - ... 117 - port@0 { 118 - reg = <0>; 119 - dsi0_in: endpoint { 120 - remote-endpoint = <&mdp5_intf1_out>; 121 - }; 122 - }; 123 - ... 124 - }; 125 - ... 126 - }; 127 - 128 - dsi_phy0: dsi-phy@1a98300 { 129 - ... 130 - }; 131 - }; 132 - };
+8 -1
Documentation/devicetree/bindings/display/msm/mdss-common.yaml
··· 15 15 Device tree bindings for MSM Mobile Display Subsystem(MDSS) that encapsulates 16 16 sub-blocks like DPU display controller, DSI and DP interfaces etc. 17 17 18 + # Do not select this by default, otherwise it is also selected for qcom,mdss 19 + # devices. 20 + select: 21 + false 22 + 18 23 properties: 24 + $nodename: 25 + pattern: "^display-subsystem@[0-9a-f]+$" 26 + 19 27 reg: 20 28 maxItems: 1 21 29 ··· 78 70 - description: MDSS_CORE reset 79 71 80 72 required: 81 - - compatible 82 73 - reg 83 74 - reg-names 84 75 - power-domains
+156
Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,mdp5.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Adreno/Snapdragon Mobile Display controller (MDP5) 8 + 9 + description: 10 + MDP5 display controller found in SoCs like MSM8974, APQ8084, MSM8916, MSM8994 11 + and MSM8996. 12 + 13 + maintainers: 14 + - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 15 + - Rob Clark <robdclark@gmail.com> 16 + 17 + properties: 18 + compatible: 19 + oneOf: 20 + - const: qcom,mdp5 21 + deprecated: true 22 + - items: 23 + - enum: 24 + - qcom,apq8084-mdp5 25 + - qcom,msm8916-mdp5 26 + - qcom,msm8917-mdp5 27 + - qcom,msm8953-mdp5 28 + - qcom,msm8974-mdp5 29 + - qcom,msm8976-mdp5 30 + - qcom,msm8994-mdp5 31 + - qcom,msm8996-mdp5 32 + - qcom,sdm630-mdp5 33 + - qcom,sdm660-mdp5 34 + - const: qcom,mdp5 35 + 36 + $nodename: 37 + pattern: '^display-controller@[0-9a-f]+$' 38 + 39 + reg: 40 + maxItems: 1 41 + 42 + reg-names: 43 + items: 44 + - const: mdp_phys 45 + 46 + interrupts: 47 + maxItems: 1 48 + 49 + clocks: 50 + minItems: 4 51 + maxItems: 7 52 + 53 + clock-names: 54 + oneOf: 55 + - minItems: 4 56 + items: 57 + - const: iface 58 + - const: bus 59 + - const: core 60 + - const: vsync 61 + - const: lut 62 + - const: tbu 63 + - const: tbu_rt 64 + #MSM8996 has additional iommu clock 65 + - items: 66 + - const: iface 67 + - const: bus 68 + - const: core 69 + - const: iommu 70 + - const: vsync 71 + 72 + interconnects: 73 + minItems: 1 74 + items: 75 + - description: Interconnect path from mdp0 (or a single mdp) port to the data bus 76 + - description: Interconnect path from mdp1 port to the data bus 77 + - description: Interconnect path from rotator port to the data bus 78 + 79 + interconnect-names: 80 + minItems: 1 81 + items: 82 + - const: mdp0-mem 83 + - const: mdp1-mem 84 + - const: rotator-mem 85 + 86 + iommus: 87 + items: 88 + - description: apps SMMU with the Stream-ID mask for Hard-Fail port0 89 + 90 + power-domains: 91 + maxItems: 1 92 + 93 + operating-points-v2: true 94 + opp-table: 95 + type: object 96 + 97 + ports: 98 + $ref: /schemas/graph.yaml#/properties/ports 99 + description: > 100 + Contains the list of output ports from DPU device. These ports 101 + connect to interfaces that are external to the DPU hardware, 102 + such as DSI, DP etc. MDP5 devices support up to 4 ports: 103 + one or two DSI ports, HDMI and eDP. 104 + 105 + patternProperties: 106 + "^port@[0-3]+$": 107 + $ref: /schemas/graph.yaml#/properties/port 108 + 109 + # at least one port is required 110 + required: 111 + - port@0 112 + 113 + required: 114 + - compatible 115 + - reg 116 + - reg-names 117 + - clocks 118 + - clock-names 119 + - ports 120 + 121 + additionalProperties: false 122 + 123 + examples: 124 + - | 125 + #include <dt-bindings/clock/qcom,gcc-msm8916.h> 126 + #include <dt-bindings/interrupt-controller/arm-gic.h> 127 + display-controller@1a01000 { 128 + compatible = "qcom,mdp5"; 129 + reg = <0x1a01000 0x90000>; 130 + reg-names = "mdp_phys"; 131 + 132 + interrupt-parent = <&mdss>; 133 + interrupts = <0>; 134 + 135 + clocks = <&gcc GCC_MDSS_AHB_CLK>, 136 + <&gcc GCC_MDSS_AXI_CLK>, 137 + <&gcc GCC_MDSS_MDP_CLK>, 138 + <&gcc GCC_MDSS_VSYNC_CLK>; 139 + clock-names = "iface", 140 + "bus", 141 + "core", 142 + "vsync"; 143 + 144 + ports { 145 + #address-cells = <1>; 146 + #size-cells = <0>; 147 + 148 + port@0 { 149 + reg = <0>; 150 + endpoint { 151 + remote-endpoint = <&dsi0_in>; 152 + }; 153 + }; 154 + }; 155 + }; 156 + ...
+33 -22
Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml
··· 15 15 encapsulates sub-blocks like MDP5, DSI, HDMI, eDP, etc. 16 16 17 17 properties: 18 + $nodename: 19 + pattern: "^display-subsystem@[0-9a-f]+$" 20 + 18 21 compatible: 19 22 enum: 20 23 - qcom,mdss ··· 47 44 The MDSS power domain provided by GCC 48 45 49 46 clocks: 50 - minItems: 1 51 - items: 52 - - description: Display abh clock 53 - - description: Display axi clock 54 - - description: Display vsync clock 47 + oneOf: 48 + - minItems: 3 49 + items: 50 + - description: Display abh clock 51 + - description: Display axi clock 52 + - description: Display vsync clock 53 + - description: Display core clock 54 + - minItems: 1 55 + items: 56 + - description: Display abh clock 57 + - description: Display core clock 55 58 56 59 clock-names: 57 - minItems: 1 58 - items: 59 - - const: iface 60 - - const: bus 61 - - const: vsync 60 + oneOf: 61 + - minItems: 3 62 + items: 63 + - const: iface 64 + - const: bus 65 + - const: vsync 66 + - const: core 67 + - minItems: 1 68 + items: 69 + - const: iface 70 + - const: core 62 71 63 72 "#address-cells": 64 73 const: 1 ··· 99 84 - ranges 100 85 101 86 patternProperties: 102 - "^mdp@[1-9a-f][0-9a-f]*$": 87 + "^display-controller@[1-9a-f][0-9a-f]*$": 103 88 type: object 104 89 properties: 105 90 compatible: 106 - const: qcom,mdp5 91 + contains: 92 + const: qcom,mdp5 107 93 108 94 "^dsi@[1-9a-f][0-9a-f]*$": 109 95 type: object 110 96 properties: 111 97 compatible: 112 - const: qcom,mdss-dsi-ctrl 98 + contains: 99 + const: qcom,mdss-dsi-ctrl 113 100 114 101 "^phy@[1-9a-f][0-9a-f]*$": 115 102 type: object ··· 124 107 - qcom,dsi-phy-20nm 125 108 - qcom,dsi-phy-28nm-hpm 126 109 - qcom,dsi-phy-28nm-lp 127 - 128 - "^hdmi-phy@[1-9a-f][0-9a-f]*$": 129 - type: object 130 - properties: 131 - compatible: 132 - enum: 133 110 - qcom,hdmi-phy-8084 134 111 - qcom,hdmi-phy-8660 135 112 - qcom,hdmi-phy-8960 ··· 148 137 - | 149 138 #include <dt-bindings/clock/qcom,gcc-msm8916.h> 150 139 #include <dt-bindings/interrupt-controller/arm-gic.h> 151 - mdss@1a00000 { 140 + display-subsystem@1a00000 { 152 141 compatible = "qcom,mdss"; 153 142 reg = <0x1a00000 0x1000>, 154 143 <0x1ac8000 0x3000>; ··· 172 161 #size-cells = <1>; 173 162 ranges; 174 163 175 - mdp@1a01000 { 176 - compatible = "qcom,mdp5"; 164 + display-controller@1a01000 { 165 + compatible = "qcom,msm8916-mdp5", "qcom,mdp5"; 177 166 reg = <0x01a01000 0x89000>; 178 167 reg-names = "mdp_phys"; 179 168
+9 -3
Documentation/devicetree/bindings/display/msm/qcom,msm8998-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,msm8998-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for MSM8998 target 7 + title: Qualcomm Display DPU on MSM8998 8 8 9 9 maintainers: 10 10 - AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org> ··· 13 13 14 14 properties: 15 15 compatible: 16 - items: 17 - - const: qcom,msm8998-dpu 16 + const: qcom,msm8998-dpu 18 17 19 18 reg: 20 19 items: ··· 44 45 - const: mnoc 45 46 - const: core 46 47 - const: vsync 48 + 49 + required: 50 + - compatible 51 + - reg 52 + - reg-names 53 + - clocks 54 + - clock-names 47 55 48 56 unevaluatedProperties: false 49 57
+9 -5
Documentation/devicetree/bindings/display/msm/qcom,msm8998-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,msm8998-mdss 21 + const: qcom,msm8998-mdss 23 22 24 23 clocks: 25 24 items: ··· 46 47 type: object 47 48 properties: 48 49 compatible: 49 - const: qcom,mdss-dsi-ctrl 50 + items: 51 + - const: qcom,msm8998-dsi-ctrl 52 + - const: qcom,mdss-dsi-ctrl 50 53 51 54 "^phy@[0-9a-f]+$": 52 55 type: object 53 56 properties: 54 57 compatible: 55 58 const: qcom,dsi-phy-10nm-8998 59 + 60 + required: 61 + - compatible 56 62 57 63 unevaluatedProperties: false 58 64 ··· 130 126 }; 131 127 132 128 dsi@c994000 { 133 - compatible = "qcom,mdss-dsi-ctrl"; 129 + compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 134 130 reg = <0x0c994000 0x400>; 135 131 reg-names = "dsi_ctrl"; 136 132 ··· 200 196 }; 201 197 202 198 dsi@c996000 { 203 - compatible = "qcom,mdss-dsi-ctrl"; 199 + compatible = "qcom,msm8998-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 204 200 reg = <0x0c996000 0x400>; 205 201 reg-names = "dsi_ctrl"; 206 202
+9 -3
Documentation/devicetree/bindings/display/msm/qcom,qcm2290-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,qcm2290-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for QCM2290 target 7 + title: Qualcomm Display DPU on QCM2290 8 8 9 9 maintainers: 10 10 - Loic Poulain <loic.poulain@linaro.org> ··· 13 13 14 14 properties: 15 15 compatible: 16 - items: 17 - - const: qcom,qcm2290-dpu 16 + const: qcom,qcm2290-dpu 18 17 19 18 reg: 20 19 items: ··· 40 41 - const: core 41 42 - const: lut 42 43 - const: vsync 44 + 45 + required: 46 + - compatible 47 + - reg 48 + - reg-names 49 + - clocks 50 + - clock-names 43 51 44 52 unevaluatedProperties: false 45 53
+4 -2
Documentation/devicetree/bindings/display/msm/qcom,qcm2290-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,qcm2290-mdss 21 + const: qcom,qcm2290-mdss 23 22 24 23 clocks: 25 24 items: ··· 59 60 properties: 60 61 compatible: 61 62 const: qcom,dsi-phy-14nm-2290 63 + 64 + required: 65 + - compatible 62 66 63 67 unevaluatedProperties: false 64 68
+9 -3
Documentation/devicetree/bindings/display/msm/qcom,sc7180-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,sc7180-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for SC7180 target 7 + title: Qualcomm Display DPU on SC7180 8 8 9 9 maintainers: 10 10 - Krishna Manikandan <quic_mkrishn@quicinc.com> ··· 13 13 14 14 properties: 15 15 compatible: 16 - items: 17 - - const: qcom,sc7180-dpu 16 + const: qcom,sc7180-dpu 18 17 19 18 reg: 20 19 items: ··· 42 43 - const: lut 43 44 - const: core 44 45 - const: vsync 46 + 47 + required: 48 + - compatible 49 + - reg 50 + - reg-names 51 + - clocks 52 + - clock-names 45 53 46 54 unevaluatedProperties: false 47 55
+8 -4
Documentation/devicetree/bindings/display/msm/qcom,sc7180-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,sc7180-mdss 21 + const: qcom,sc7180-mdss 23 22 24 23 clocks: 25 24 items: ··· 58 59 type: object 59 60 properties: 60 61 compatible: 61 - const: qcom,mdss-dsi-ctrl 62 + items: 63 + - const: qcom,sc7180-dsi-ctrl 64 + - const: qcom,mdss-dsi-ctrl 62 65 63 66 "^phy@[0-9a-f]+$": 64 67 type: object 65 68 properties: 66 69 compatible: 67 70 const: qcom,dsi-phy-10nm 71 + 72 + required: 73 + - compatible 68 74 69 75 unevaluatedProperties: false 70 76 ··· 146 142 }; 147 143 148 144 dsi@ae94000 { 149 - compatible = "qcom,mdss-dsi-ctrl"; 145 + compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 150 146 reg = <0x0ae94000 0x400>; 151 147 reg-names = "dsi_ctrl"; 152 148
+8 -1
Documentation/devicetree/bindings/display/msm/qcom,sc7280-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,sc7280-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for SC7280 7 + title: Qualcomm Display DPU on SC7280 8 8 9 9 maintainers: 10 10 - Krishna Manikandan <quic_mkrishn@quicinc.com> ··· 42 42 - const: lut 43 43 - const: core 44 44 - const: vsync 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - reg-names 50 + - clocks 51 + - clock-names 45 52 46 53 unevaluatedProperties: false 47 54
+7 -2
Documentation/devicetree/bindings/display/msm/qcom,sc7280-mdss.yaml
··· 58 58 type: object 59 59 properties: 60 60 compatible: 61 - const: qcom,mdss-dsi-ctrl 61 + items: 62 + - const: qcom,sc7280-dsi-ctrl 63 + - const: qcom,mdss-dsi-ctrl 62 64 63 65 "^edp@[0-9a-f]+$": 64 66 type: object ··· 75 73 enum: 76 74 - qcom,sc7280-dsi-phy-7nm 77 75 - qcom,sc7280-edp-phy 76 + 77 + required: 78 + - compatible 78 79 79 80 unevaluatedProperties: false 80 81 ··· 167 162 }; 168 163 169 164 dsi@ae94000 { 170 - compatible = "qcom,mdss-dsi-ctrl"; 165 + compatible = "qcom,sc7280-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 171 166 reg = <0x0ae94000 0x400>; 172 167 reg-names = "dsi_ctrl"; 173 168
+122
Documentation/devicetree/bindings/display/msm/qcom,sc8280xp-dpu.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sc8280xp-dpu.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SC8280XP Display Processing Unit 8 + 9 + maintainers: 10 + - Bjorn Andersson <andersson@kernel.org> 11 + 12 + description: 13 + Device tree bindings for SC8280XP Display Processing Unit. 14 + 15 + $ref: /schemas/display/msm/dpu-common.yaml# 16 + 17 + properties: 18 + compatible: 19 + const: qcom,sc8280xp-dpu 20 + 21 + reg: 22 + items: 23 + - description: Address offset and size for mdp register set 24 + - description: Address offset and size for vbif register set 25 + 26 + reg-names: 27 + items: 28 + - const: mdp 29 + - const: vbif 30 + 31 + clocks: 32 + items: 33 + - description: Display hf axi clock 34 + - description: Display sf axi clock 35 + - description: Display ahb clock 36 + - description: Display lut clock 37 + - description: Display core clock 38 + - description: Display vsync clock 39 + 40 + clock-names: 41 + items: 42 + - const: bus 43 + - const: nrt_bus 44 + - const: iface 45 + - const: lut 46 + - const: core 47 + - const: vsync 48 + 49 + unevaluatedProperties: false 50 + 51 + examples: 52 + - | 53 + #include <dt-bindings/clock/qcom,dispcc-sc8280xp.h> 54 + #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> 55 + #include <dt-bindings/interrupt-controller/arm-gic.h> 56 + #include <dt-bindings/interconnect/qcom,sc8280xp.h> 57 + #include <dt-bindings/power/qcom-rpmpd.h> 58 + 59 + display-controller@ae01000 { 60 + compatible = "qcom,sc8280xp-dpu"; 61 + reg = <0x0ae01000 0x8f000>, 62 + <0x0aeb0000 0x2008>; 63 + reg-names = "mdp", "vbif"; 64 + 65 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 66 + <&gcc GCC_DISP_SF_AXI_CLK>, 67 + <&dispcc0 DISP_CC_MDSS_AHB_CLK>, 68 + <&dispcc0 DISP_CC_MDSS_MDP_LUT_CLK>, 69 + <&dispcc0 DISP_CC_MDSS_MDP_CLK>, 70 + <&dispcc0 DISP_CC_MDSS_VSYNC_CLK>; 71 + clock-names = "bus", 72 + "nrt_bus", 73 + "iface", 74 + "lut", 75 + "core", 76 + "vsync"; 77 + 78 + assigned-clocks = <&dispcc0 DISP_CC_MDSS_MDP_CLK>, 79 + <&dispcc0 DISP_CC_MDSS_VSYNC_CLK>; 80 + assigned-clock-rates = <460000000>, 81 + <19200000>; 82 + 83 + operating-points-v2 = <&mdp_opp_table>; 84 + power-domains = <&rpmhpd SC8280XP_MMCX>; 85 + 86 + interrupt-parent = <&mdss0>; 87 + interrupts = <0>; 88 + 89 + ports { 90 + #address-cells = <1>; 91 + #size-cells = <0>; 92 + 93 + port@0 { 94 + reg = <0>; 95 + endpoint { 96 + remote-endpoint = <&mdss0_dp0_in>; 97 + }; 98 + }; 99 + 100 + port@4 { 101 + reg = <4>; 102 + endpoint { 103 + remote-endpoint = <&mdss0_dp1_in>; 104 + }; 105 + }; 106 + 107 + port@5 { 108 + reg = <5>; 109 + endpoint { 110 + remote-endpoint = <&mdss0_dp3_in>; 111 + }; 112 + }; 113 + 114 + port@6 { 115 + reg = <6>; 116 + endpoint { 117 + remote-endpoint = <&mdss0_dp2_in>; 118 + }; 119 + }; 120 + }; 121 + }; 122 + ...
+151
Documentation/devicetree/bindings/display/msm/qcom,sc8280xp-mdss.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sc8280xp-mdss.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SC8280XP Mobile Display Subsystem 8 + 9 + maintainers: 10 + - Bjorn Andersson <andersson@kernel.org> 11 + 12 + description: 13 + Device tree bindings for MSM Mobile Display Subsystem (MDSS) that encapsulates 14 + sub-blocks like DPU display controller, DSI and DP interfaces etc. 15 + 16 + $ref: /schemas/display/msm/mdss-common.yaml# 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sc8280xp-mdss 21 + 22 + clocks: 23 + items: 24 + - description: Display AHB clock from gcc 25 + - description: Display AHB clock from dispcc 26 + - description: Display core clock 27 + 28 + clock-names: 29 + items: 30 + - const: iface 31 + - const: ahb 32 + - const: core 33 + 34 + patternProperties: 35 + "^display-controller@[0-9a-f]+$": 36 + type: object 37 + properties: 38 + compatible: 39 + const: qcom,sc8280xp-dpu 40 + 41 + "^displayport-controller@[0-9a-f]+$": 42 + type: object 43 + properties: 44 + compatible: 45 + enum: 46 + - qcom,sc8280xp-dp 47 + - qcom,sc8280xp-edp 48 + 49 + unevaluatedProperties: false 50 + 51 + examples: 52 + - | 53 + #include <dt-bindings/clock/qcom,dispcc-sc8280xp.h> 54 + #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> 55 + #include <dt-bindings/interrupt-controller/arm-gic.h> 56 + #include <dt-bindings/interconnect/qcom,sc8280xp.h> 57 + #include <dt-bindings/power/qcom-rpmpd.h> 58 + 59 + display-subsystem@ae00000 { 60 + compatible = "qcom,sc8280xp-mdss"; 61 + reg = <0x0ae00000 0x1000>; 62 + reg-names = "mdss"; 63 + 64 + power-domains = <&dispcc0 MDSS_GDSC>; 65 + 66 + clocks = <&gcc GCC_DISP_AHB_CLK>, 67 + <&dispcc0 DISP_CC_MDSS_AHB_CLK>, 68 + <&dispcc0 DISP_CC_MDSS_MDP_CLK>; 69 + clock-names = "iface", 70 + "ahb", 71 + "core"; 72 + 73 + resets = <&dispcc0 DISP_CC_MDSS_CORE_BCR>; 74 + 75 + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 76 + interrupt-controller; 77 + #interrupt-cells = <1>; 78 + 79 + interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt SLAVE_EBI1 0>, 80 + <&mmss_noc MASTER_MDP1 0 &mc_virt SLAVE_EBI1 0>; 81 + interconnect-names = "mdp0-mem", "mdp1-mem"; 82 + 83 + iommus = <&apps_smmu 0x1000 0x402>; 84 + 85 + #address-cells = <1>; 86 + #size-cells = <1>; 87 + ranges; 88 + 89 + display-controller@ae01000 { 90 + compatible = "qcom,sc8280xp-dpu"; 91 + reg = <0x0ae01000 0x8f000>, 92 + <0x0aeb0000 0x2008>; 93 + reg-names = "mdp", "vbif"; 94 + 95 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 96 + <&gcc GCC_DISP_SF_AXI_CLK>, 97 + <&dispcc0 DISP_CC_MDSS_AHB_CLK>, 98 + <&dispcc0 DISP_CC_MDSS_MDP_LUT_CLK>, 99 + <&dispcc0 DISP_CC_MDSS_MDP_CLK>, 100 + <&dispcc0 DISP_CC_MDSS_VSYNC_CLK>; 101 + clock-names = "bus", 102 + "nrt_bus", 103 + "iface", 104 + "lut", 105 + "core", 106 + "vsync"; 107 + 108 + assigned-clocks = <&dispcc0 DISP_CC_MDSS_VSYNC_CLK>; 109 + assigned-clock-rates = <19200000>; 110 + 111 + operating-points-v2 = <&mdss0_mdp_opp_table>; 112 + power-domains = <&rpmhpd SC8280XP_MMCX>; 113 + 114 + interrupt-parent = <&mdss0>; 115 + interrupts = <0>; 116 + 117 + ports { 118 + #address-cells = <1>; 119 + #size-cells = <0>; 120 + 121 + port@0 { 122 + reg = <0>; 123 + endpoint { 124 + remote-endpoint = <&mdss0_dp0_in>; 125 + }; 126 + }; 127 + 128 + port@4 { 129 + reg = <4>; 130 + endpoint { 131 + remote-endpoint = <&mdss0_dp1_in>; 132 + }; 133 + }; 134 + 135 + port@5 { 136 + reg = <5>; 137 + endpoint { 138 + remote-endpoint = <&mdss0_dp3_in>; 139 + }; 140 + }; 141 + 142 + port@6 { 143 + reg = <6>; 144 + endpoint { 145 + remote-endpoint = <&mdss0_dp2_in>; 146 + }; 147 + }; 148 + }; 149 + }; 150 + }; 151 + ...
+9 -3
Documentation/devicetree/bindings/display/msm/qcom,sdm845-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,sdm845-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for SDM845 target 7 + title: Qualcomm Display DPU on SDM845 8 8 9 9 maintainers: 10 10 - Krishna Manikandan <quic_mkrishn@quicinc.com> ··· 13 13 14 14 properties: 15 15 compatible: 16 - items: 17 - - const: qcom,sdm845-dpu 16 + const: qcom,sdm845-dpu 18 17 19 18 reg: 20 19 items: ··· 40 41 - const: bus 41 42 - const: core 42 43 - const: vsync 44 + 45 + required: 46 + - compatible 47 + - reg 48 + - reg-names 49 + - clocks 50 + - clock-names 43 51 44 52 unevaluatedProperties: false 45 53
+15 -5
Documentation/devicetree/bindings/display/msm/qcom,sdm845-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,sdm845-mdss 21 + const: qcom,sdm845-mdss 23 22 24 23 clocks: 25 24 items: ··· 46 47 compatible: 47 48 const: qcom,sdm845-dpu 48 49 50 + "^displayport-controller@[0-9a-f]+$": 51 + type: object 52 + properties: 53 + compatible: 54 + const: qcom,sdm845-dp 55 + 49 56 "^dsi@[0-9a-f]+$": 50 57 type: object 51 58 properties: 52 59 compatible: 53 - const: qcom,mdss-dsi-ctrl 60 + items: 61 + - const: qcom,sdm845-dsi-ctrl 62 + - const: qcom,mdss-dsi-ctrl 54 63 55 64 "^phy@[0-9a-f]+$": 56 65 type: object 57 66 properties: 58 67 compatible: 59 68 const: qcom,dsi-phy-10nm 69 + 70 + required: 71 + - compatible 60 72 61 73 unevaluatedProperties: false 62 74 ··· 138 128 }; 139 129 140 130 dsi@ae94000 { 141 - compatible = "qcom,mdss-dsi-ctrl"; 131 + compatible = "qcom,sdm845-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 142 132 reg = <0x0ae94000 0x400>; 143 133 reg-names = "dsi_ctrl"; 144 134 ··· 208 198 }; 209 199 210 200 dsi@ae96000 { 211 - compatible = "qcom,mdss-dsi-ctrl"; 201 + compatible = "qcom,sdm845-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 212 202 reg = <0x0ae96000 0x400>; 213 203 reg-names = "dsi_ctrl"; 214 204
+2 -3
Documentation/devicetree/bindings/display/msm/qcom,sm6115-dpu.yaml
··· 4 4 $id: http://devicetree.org/schemas/display/msm/qcom,sm6115-dpu.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display DPU dt properties for SM6115 target 7 + title: Qualcomm Display DPU on SM6115 8 8 9 9 maintainers: 10 10 - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> ··· 13 13 14 14 properties: 15 15 compatible: 16 - items: 17 - - const: qcom,sm6115-dpu 16 + const: qcom,sm6115-dpu 18 17 19 18 reg: 20 19 items:
+1 -2
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,sm6115-mdss 21 + const: qcom,sm6115-mdss 23 22 24 23 clocks: 25 24 items:
+92
Documentation/devicetree/bindings/display/msm/qcom,sm8150-dpu.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8150-dpu.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8150 Display DPU 8 + 9 + maintainers: 10 + - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 11 + 12 + $ref: /schemas/display/msm/dpu-common.yaml# 13 + 14 + properties: 15 + compatible: 16 + const: qcom,sm8150-dpu 17 + 18 + reg: 19 + items: 20 + - description: Address offset and size for mdp register set 21 + - description: Address offset and size for vbif register set 22 + 23 + reg-names: 24 + items: 25 + - const: mdp 26 + - const: vbif 27 + 28 + clocks: 29 + items: 30 + - description: Display ahb clock 31 + - description: Display hf axi clock 32 + - description: Display core clock 33 + - description: Display vsync clock 34 + 35 + clock-names: 36 + items: 37 + - const: iface 38 + - const: bus 39 + - const: core 40 + - const: vsync 41 + 42 + unevaluatedProperties: false 43 + 44 + examples: 45 + - | 46 + #include <dt-bindings/clock/qcom,dispcc-sm8150.h> 47 + #include <dt-bindings/clock/qcom,gcc-sm8150.h> 48 + #include <dt-bindings/interrupt-controller/arm-gic.h> 49 + #include <dt-bindings/interconnect/qcom,sm8150.h> 50 + #include <dt-bindings/power/qcom-rpmpd.h> 51 + 52 + display-controller@ae01000 { 53 + compatible = "qcom,sm8150-dpu"; 54 + reg = <0x0ae01000 0x8f000>, 55 + <0x0aeb0000 0x2008>; 56 + reg-names = "mdp", "vbif"; 57 + 58 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 59 + <&gcc GCC_DISP_HF_AXI_CLK>, 60 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 61 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 62 + clock-names = "iface", "bus", "core", "vsync"; 63 + 64 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 65 + assigned-clock-rates = <19200000>; 66 + 67 + operating-points-v2 = <&mdp_opp_table>; 68 + power-domains = <&rpmhpd SM8150_MMCX>; 69 + 70 + interrupt-parent = <&mdss>; 71 + interrupts = <0>; 72 + 73 + ports { 74 + #address-cells = <1>; 75 + #size-cells = <0>; 76 + 77 + port@0 { 78 + reg = <0>; 79 + endpoint { 80 + remote-endpoint = <&dsi0_in>; 81 + }; 82 + }; 83 + 84 + port@1 { 85 + reg = <1>; 86 + endpoint { 87 + remote-endpoint = <&dsi1_in>; 88 + }; 89 + }; 90 + }; 91 + }; 92 + ...
+332
Documentation/devicetree/bindings/display/msm/qcom,sm8150-mdss.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8150-mdss.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8150 Display MDSS 8 + 9 + maintainers: 10 + - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 11 + 12 + description: 13 + Device tree bindings for MSM Mobile Display Subsystem(MDSS) that encapsulates 14 + sub-blocks like DPU display controller, DSI and DP interfaces etc. Device tree 15 + bindings of MDSS are mentioned for SM8150 target. 16 + 17 + $ref: /schemas/display/msm/mdss-common.yaml# 18 + 19 + properties: 20 + compatible: 21 + items: 22 + - const: qcom,sm8150-mdss 23 + 24 + clocks: 25 + items: 26 + - description: Display AHB clock from gcc 27 + - description: Display hf axi clock 28 + - description: Display sf axi clock 29 + - description: Display core clock 30 + 31 + clock-names: 32 + items: 33 + - const: iface 34 + - const: bus 35 + - const: nrt_bus 36 + - const: core 37 + 38 + iommus: 39 + maxItems: 1 40 + 41 + interconnects: 42 + maxItems: 2 43 + 44 + interconnect-names: 45 + maxItems: 2 46 + 47 + patternProperties: 48 + "^display-controller@[0-9a-f]+$": 49 + type: object 50 + properties: 51 + compatible: 52 + const: qcom,sm8150-dpu 53 + 54 + "^dsi@[0-9a-f]+$": 55 + type: object 56 + properties: 57 + compatible: 58 + items: 59 + - const: qcom,sm8150-dsi-ctrl 60 + - const: qcom,mdss-dsi-ctrl 61 + 62 + "^phy@[0-9a-f]+$": 63 + type: object 64 + properties: 65 + compatible: 66 + const: qcom,dsi-phy-7nm 67 + 68 + unevaluatedProperties: false 69 + 70 + examples: 71 + - | 72 + #include <dt-bindings/clock/qcom,dispcc-sm8150.h> 73 + #include <dt-bindings/clock/qcom,gcc-sm8150.h> 74 + #include <dt-bindings/clock/qcom,rpmh.h> 75 + #include <dt-bindings/interrupt-controller/arm-gic.h> 76 + #include <dt-bindings/interconnect/qcom,sm8150.h> 77 + #include <dt-bindings/power/qcom-rpmpd.h> 78 + 79 + display-subsystem@ae00000 { 80 + compatible = "qcom,sm8150-mdss"; 81 + reg = <0x0ae00000 0x1000>; 82 + reg-names = "mdss"; 83 + 84 + interconnects = <&mmss_noc MASTER_MDP_PORT0 &mc_virt SLAVE_EBI_CH0>, 85 + <&mmss_noc MASTER_MDP_PORT1 &mc_virt SLAVE_EBI_CH0>; 86 + interconnect-names = "mdp0-mem", "mdp1-mem"; 87 + 88 + power-domains = <&dispcc MDSS_GDSC>; 89 + 90 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 91 + <&gcc GCC_DISP_HF_AXI_CLK>, 92 + <&gcc GCC_DISP_SF_AXI_CLK>, 93 + <&dispcc DISP_CC_MDSS_MDP_CLK>; 94 + clock-names = "iface", "bus", "nrt_bus", "core"; 95 + 96 + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 97 + interrupt-controller; 98 + #interrupt-cells = <1>; 99 + 100 + iommus = <&apps_smmu 0x800 0x420>; 101 + 102 + #address-cells = <1>; 103 + #size-cells = <1>; 104 + ranges; 105 + 106 + display-controller@ae01000 { 107 + compatible = "qcom,sm8150-dpu"; 108 + reg = <0x0ae01000 0x8f000>, 109 + <0x0aeb0000 0x2008>; 110 + reg-names = "mdp", "vbif"; 111 + 112 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 113 + <&gcc GCC_DISP_HF_AXI_CLK>, 114 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 115 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 116 + clock-names = "iface", "bus", "core", "vsync"; 117 + 118 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 119 + assigned-clock-rates = <19200000>; 120 + 121 + operating-points-v2 = <&mdp_opp_table>; 122 + power-domains = <&rpmhpd SM8150_MMCX>; 123 + 124 + interrupt-parent = <&mdss>; 125 + interrupts = <0>; 126 + 127 + ports { 128 + #address-cells = <1>; 129 + #size-cells = <0>; 130 + 131 + port@0 { 132 + reg = <0>; 133 + dpu_intf1_out: endpoint { 134 + remote-endpoint = <&dsi0_in>; 135 + }; 136 + }; 137 + 138 + port@1 { 139 + reg = <1>; 140 + dpu_intf2_out: endpoint { 141 + remote-endpoint = <&dsi1_in>; 142 + }; 143 + }; 144 + }; 145 + 146 + mdp_opp_table: opp-table { 147 + compatible = "operating-points-v2"; 148 + 149 + opp-171428571 { 150 + opp-hz = /bits/ 64 <171428571>; 151 + required-opps = <&rpmhpd_opp_low_svs>; 152 + }; 153 + 154 + opp-300000000 { 155 + opp-hz = /bits/ 64 <300000000>; 156 + required-opps = <&rpmhpd_opp_svs>; 157 + }; 158 + 159 + opp-345000000 { 160 + opp-hz = /bits/ 64 <345000000>; 161 + required-opps = <&rpmhpd_opp_svs_l1>; 162 + }; 163 + 164 + opp-460000000 { 165 + opp-hz = /bits/ 64 <460000000>; 166 + required-opps = <&rpmhpd_opp_nom>; 167 + }; 168 + }; 169 + }; 170 + 171 + dsi@ae94000 { 172 + compatible = "qcom,sm8150-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 173 + reg = <0x0ae94000 0x400>; 174 + reg-names = "dsi_ctrl"; 175 + 176 + interrupt-parent = <&mdss>; 177 + interrupts = <4>; 178 + 179 + clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>, 180 + <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>, 181 + <&dispcc DISP_CC_MDSS_PCLK0_CLK>, 182 + <&dispcc DISP_CC_MDSS_ESC0_CLK>, 183 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 184 + <&gcc GCC_DISP_HF_AXI_CLK>; 185 + clock-names = "byte", 186 + "byte_intf", 187 + "pixel", 188 + "core", 189 + "iface", 190 + "bus"; 191 + 192 + assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>, 193 + <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>; 194 + assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>; 195 + 196 + operating-points-v2 = <&dsi_opp_table>; 197 + power-domains = <&rpmhpd SM8150_MMCX>; 198 + 199 + phys = <&dsi0_phy>; 200 + phy-names = "dsi"; 201 + 202 + #address-cells = <1>; 203 + #size-cells = <0>; 204 + 205 + ports { 206 + #address-cells = <1>; 207 + #size-cells = <0>; 208 + 209 + port@0 { 210 + reg = <0>; 211 + dsi0_in: endpoint { 212 + remote-endpoint = <&dpu_intf1_out>; 213 + }; 214 + }; 215 + 216 + port@1 { 217 + reg = <1>; 218 + dsi0_out: endpoint { 219 + }; 220 + }; 221 + }; 222 + 223 + dsi_opp_table: opp-table { 224 + compatible = "operating-points-v2"; 225 + 226 + opp-187500000 { 227 + opp-hz = /bits/ 64 <187500000>; 228 + required-opps = <&rpmhpd_opp_low_svs>; 229 + }; 230 + 231 + opp-300000000 { 232 + opp-hz = /bits/ 64 <300000000>; 233 + required-opps = <&rpmhpd_opp_svs>; 234 + }; 235 + 236 + opp-358000000 { 237 + opp-hz = /bits/ 64 <358000000>; 238 + required-opps = <&rpmhpd_opp_svs_l1>; 239 + }; 240 + }; 241 + }; 242 + 243 + dsi0_phy: phy@ae94400 { 244 + compatible = "qcom,dsi-phy-7nm"; 245 + reg = <0x0ae94400 0x200>, 246 + <0x0ae94600 0x280>, 247 + <0x0ae94900 0x260>; 248 + reg-names = "dsi_phy", 249 + "dsi_phy_lane", 250 + "dsi_pll"; 251 + 252 + #clock-cells = <1>; 253 + #phy-cells = <0>; 254 + 255 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 256 + <&rpmhcc RPMH_CXO_CLK>; 257 + clock-names = "iface", "ref"; 258 + vdds-supply = <&vreg_dsi_phy>; 259 + }; 260 + 261 + dsi@ae96000 { 262 + compatible = "qcom,sm8150-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 263 + reg = <0x0ae96000 0x400>; 264 + reg-names = "dsi_ctrl"; 265 + 266 + interrupt-parent = <&mdss>; 267 + interrupts = <5>; 268 + 269 + clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>, 270 + <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>, 271 + <&dispcc DISP_CC_MDSS_PCLK1_CLK>, 272 + <&dispcc DISP_CC_MDSS_ESC1_CLK>, 273 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 274 + <&gcc GCC_DISP_HF_AXI_CLK>; 275 + clock-names = "byte", 276 + "byte_intf", 277 + "pixel", 278 + "core", 279 + "iface", 280 + "bus"; 281 + 282 + assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>, 283 + <&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>; 284 + assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>; 285 + 286 + operating-points-v2 = <&dsi_opp_table>; 287 + power-domains = <&rpmhpd SM8150_MMCX>; 288 + 289 + phys = <&dsi1_phy>; 290 + phy-names = "dsi"; 291 + 292 + #address-cells = <1>; 293 + #size-cells = <0>; 294 + 295 + ports { 296 + #address-cells = <1>; 297 + #size-cells = <0>; 298 + 299 + port@0 { 300 + reg = <0>; 301 + dsi1_in: endpoint { 302 + remote-endpoint = <&dpu_intf2_out>; 303 + }; 304 + }; 305 + 306 + port@1 { 307 + reg = <1>; 308 + dsi1_out: endpoint { 309 + }; 310 + }; 311 + }; 312 + }; 313 + 314 + dsi1_phy: phy@ae96400 { 315 + compatible = "qcom,dsi-phy-7nm"; 316 + reg = <0x0ae96400 0x200>, 317 + <0x0ae96600 0x280>, 318 + <0x0ae96900 0x260>; 319 + reg-names = "dsi_phy", 320 + "dsi_phy_lane", 321 + "dsi_pll"; 322 + 323 + #clock-cells = <1>; 324 + #phy-cells = <0>; 325 + 326 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 327 + <&rpmhcc RPMH_CXO_CLK>; 328 + clock-names = "iface", "ref"; 329 + vdds-supply = <&vreg_dsi_phy>; 330 + }; 331 + }; 332 + ...
+7
Documentation/devicetree/bindings/display/msm/qcom,sm8250-dpu.yaml
··· 39 39 - const: core 40 40 - const: vsync 41 41 42 + required: 43 + - compatible 44 + - reg 45 + - reg-names 46 + - clocks 47 + - clock-names 48 + 42 49 unevaluatedProperties: false 43 50 44 51 examples:
+9 -5
Documentation/devicetree/bindings/display/msm/qcom,sm8250-mdss.yaml
··· 18 18 19 19 properties: 20 20 compatible: 21 - items: 22 - - const: qcom,sm8250-mdss 21 + const: qcom,sm8250-mdss 23 22 24 23 clocks: 25 24 items: ··· 54 55 type: object 55 56 properties: 56 57 compatible: 57 - const: qcom,mdss-dsi-ctrl 58 + items: 59 + - const: qcom,sm8250-dsi-ctrl 60 + - const: qcom,mdss-dsi-ctrl 58 61 59 62 "^phy@[0-9a-f]+$": 60 63 type: object 61 64 properties: 62 65 compatible: 63 66 const: qcom,dsi-phy-7nm 67 + 68 + required: 69 + - compatible 64 70 65 71 unevaluatedProperties: false 66 72 ··· 171 167 }; 172 168 173 169 dsi@ae94000 { 174 - compatible = "qcom,mdss-dsi-ctrl"; 170 + compatible = "qcom,sm8250-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 175 171 reg = <0x0ae94000 0x400>; 176 172 reg-names = "dsi_ctrl"; 177 173 ··· 261 257 }; 262 258 263 259 dsi@ae96000 { 264 - compatible = "qcom,mdss-dsi-ctrl"; 260 + compatible = "qcom,sm8250-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 265 261 reg = <0x0ae96000 0x400>; 266 262 reg-names = "dsi_ctrl"; 267 263
+120
Documentation/devicetree/bindings/display/msm/qcom,sm8350-dpu.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8350-dpu.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8350 Display DPU 8 + 9 + maintainers: 10 + - Robert Foss <robert.foss@linaro.org> 11 + 12 + $ref: /schemas/display/msm/dpu-common.yaml# 13 + 14 + properties: 15 + compatible: 16 + const: qcom,sm8350-dpu 17 + 18 + reg: 19 + items: 20 + - description: Address offset and size for mdp register set 21 + - description: Address offset and size for vbif register set 22 + 23 + reg-names: 24 + items: 25 + - const: mdp 26 + - const: vbif 27 + 28 + clocks: 29 + items: 30 + - description: Display hf axi clock 31 + - description: Display sf axi clock 32 + - description: Display ahb clock 33 + - description: Display lut clock 34 + - description: Display core clock 35 + - description: Display vsync clock 36 + 37 + clock-names: 38 + items: 39 + - const: bus 40 + - const: nrt_bus 41 + - const: iface 42 + - const: lut 43 + - const: core 44 + - const: vsync 45 + 46 + unevaluatedProperties: false 47 + 48 + examples: 49 + - | 50 + #include <dt-bindings/clock/qcom,dispcc-sm8350.h> 51 + #include <dt-bindings/clock/qcom,gcc-sm8350.h> 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + #include <dt-bindings/interconnect/qcom,sm8350.h> 54 + #include <dt-bindings/power/qcom-rpmpd.h> 55 + 56 + display-controller@ae01000 { 57 + compatible = "qcom,sm8350-dpu"; 58 + reg = <0x0ae01000 0x8f000>, 59 + <0x0aeb0000 0x2008>; 60 + reg-names = "mdp", "vbif"; 61 + 62 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 63 + <&gcc GCC_DISP_SF_AXI_CLK>, 64 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 65 + <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>, 66 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 67 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 68 + clock-names = "bus", 69 + "nrt_bus", 70 + "iface", 71 + "lut", 72 + "core", 73 + "vsync"; 74 + 75 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 76 + assigned-clock-rates = <19200000>; 77 + 78 + operating-points-v2 = <&mdp_opp_table>; 79 + power-domains = <&rpmhpd SM8350_MMCX>; 80 + 81 + interrupt-parent = <&mdss>; 82 + interrupts = <0>; 83 + 84 + ports { 85 + #address-cells = <1>; 86 + #size-cells = <0>; 87 + 88 + port@0 { 89 + reg = <0>; 90 + dpu_intf1_out: endpoint { 91 + remote-endpoint = <&dsi0_in>; 92 + }; 93 + }; 94 + }; 95 + 96 + mdp_opp_table: opp-table { 97 + compatible = "operating-points-v2"; 98 + 99 + opp-200000000 { 100 + opp-hz = /bits/ 64 <200000000>; 101 + required-opps = <&rpmhpd_opp_low_svs>; 102 + }; 103 + 104 + opp-300000000 { 105 + opp-hz = /bits/ 64 <300000000>; 106 + required-opps = <&rpmhpd_opp_svs>; 107 + }; 108 + 109 + opp-345000000 { 110 + opp-hz = /bits/ 64 <345000000>; 111 + required-opps = <&rpmhpd_opp_svs_l1>; 112 + }; 113 + 114 + opp-460000000 { 115 + opp-hz = /bits/ 64 <460000000>; 116 + required-opps = <&rpmhpd_opp_nom>; 117 + }; 118 + }; 119 + }; 120 + ...
+223
Documentation/devicetree/bindings/display/msm/qcom,sm8350-mdss.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8350-mdss.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8350 Display MDSS 8 + 9 + maintainers: 10 + - Robert Foss <robert.foss@linaro.org> 11 + 12 + description: 13 + MSM Mobile Display Subsystem(MDSS) that encapsulates sub-blocks like 14 + DPU display controller, DSI and DP interfaces etc. 15 + 16 + $ref: /schemas/display/msm/mdss-common.yaml# 17 + 18 + properties: 19 + compatible: 20 + items: 21 + - const: qcom,sm8350-mdss 22 + 23 + clocks: 24 + items: 25 + - description: Display AHB clock from gcc 26 + - description: Display hf axi clock 27 + - description: Display sf axi clock 28 + - description: Display core clock 29 + 30 + clock-names: 31 + items: 32 + - const: iface 33 + - const: bus 34 + - const: nrt_bus 35 + - const: core 36 + 37 + iommus: 38 + maxItems: 1 39 + 40 + interconnects: 41 + maxItems: 2 42 + 43 + interconnect-names: 44 + items: 45 + - const: mdp0-mem 46 + - const: mdp1-mem 47 + 48 + patternProperties: 49 + "^display-controller@[0-9a-f]+$": 50 + type: object 51 + properties: 52 + compatible: 53 + const: qcom,sm8350-dpu 54 + 55 + "^dsi@[0-9a-f]+$": 56 + type: object 57 + properties: 58 + compatible: 59 + items: 60 + - const: qcom,sm8350-dsi-ctrl 61 + - const: qcom,mdss-dsi-ctrl 62 + 63 + "^phy@[0-9a-f]+$": 64 + type: object 65 + properties: 66 + compatible: 67 + const: qcom,dsi-phy-5nm-8350 68 + 69 + unevaluatedProperties: false 70 + 71 + examples: 72 + - | 73 + #include <dt-bindings/clock/qcom,dispcc-sm8350.h> 74 + #include <dt-bindings/clock/qcom,gcc-sm8350.h> 75 + #include <dt-bindings/clock/qcom,rpmh.h> 76 + #include <dt-bindings/interrupt-controller/arm-gic.h> 77 + #include <dt-bindings/interconnect/qcom,sm8350.h> 78 + #include <dt-bindings/power/qcom-rpmpd.h> 79 + 80 + display-subsystem@ae00000 { 81 + compatible = "qcom,sm8350-mdss"; 82 + reg = <0x0ae00000 0x1000>; 83 + reg-names = "mdss"; 84 + 85 + interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt SLAVE_EBI1 0>, 86 + <&mmss_noc MASTER_MDP1 0 &mc_virt SLAVE_EBI1 0>; 87 + interconnect-names = "mdp0-mem", "mdp1-mem"; 88 + 89 + power-domains = <&dispcc MDSS_GDSC>; 90 + resets = <&dispcc DISP_CC_MDSS_CORE_BCR>; 91 + 92 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 93 + <&gcc GCC_DISP_HF_AXI_CLK>, 94 + <&gcc GCC_DISP_SF_AXI_CLK>, 95 + <&dispcc DISP_CC_MDSS_MDP_CLK>; 96 + clock-names = "iface", "bus", "nrt_bus", "core"; 97 + 98 + iommus = <&apps_smmu 0x820 0x402>; 99 + 100 + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 101 + interrupt-controller; 102 + #interrupt-cells = <1>; 103 + 104 + #address-cells = <1>; 105 + #size-cells = <1>; 106 + ranges; 107 + 108 + display-controller@ae01000 { 109 + compatible = "qcom,sm8350-dpu"; 110 + reg = <0x0ae01000 0x8f000>, 111 + <0x0aeb0000 0x2008>; 112 + reg-names = "mdp", "vbif"; 113 + 114 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 115 + <&gcc GCC_DISP_SF_AXI_CLK>, 116 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 117 + <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>, 118 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 119 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 120 + clock-names = "bus", 121 + "nrt_bus", 122 + "iface", 123 + "lut", 124 + "core", 125 + "vsync"; 126 + 127 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 128 + assigned-clock-rates = <19200000>; 129 + 130 + operating-points-v2 = <&mdp_opp_table>; 131 + power-domains = <&rpmhpd SM8350_MMCX>; 132 + 133 + interrupt-parent = <&mdss>; 134 + interrupts = <0>; 135 + 136 + ports { 137 + #address-cells = <1>; 138 + #size-cells = <0>; 139 + 140 + port@0 { 141 + reg = <0>; 142 + dpu_intf1_out: endpoint { 143 + remote-endpoint = <&dsi0_in>; 144 + }; 145 + }; 146 + }; 147 + 148 + mdp_opp_table: opp-table { 149 + compatible = "operating-points-v2"; 150 + 151 + opp-200000000 { 152 + opp-hz = /bits/ 64 <200000000>; 153 + required-opps = <&rpmhpd_opp_low_svs>; 154 + }; 155 + 156 + opp-300000000 { 157 + opp-hz = /bits/ 64 <300000000>; 158 + required-opps = <&rpmhpd_opp_svs>; 159 + }; 160 + 161 + opp-345000000 { 162 + opp-hz = /bits/ 64 <345000000>; 163 + required-opps = <&rpmhpd_opp_svs_l1>; 164 + }; 165 + 166 + opp-460000000 { 167 + opp-hz = /bits/ 64 <460000000>; 168 + required-opps = <&rpmhpd_opp_nom>; 169 + }; 170 + }; 171 + }; 172 + 173 + dsi0: dsi@ae94000 { 174 + compatible = "qcom,sm8350-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 175 + reg = <0x0ae94000 0x400>; 176 + reg-names = "dsi_ctrl"; 177 + 178 + interrupt-parent = <&mdss>; 179 + interrupts = <4>; 180 + 181 + clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>, 182 + <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>, 183 + <&dispcc DISP_CC_MDSS_PCLK0_CLK>, 184 + <&dispcc DISP_CC_MDSS_ESC0_CLK>, 185 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 186 + <&gcc GCC_DISP_HF_AXI_CLK>; 187 + clock-names = "byte", 188 + "byte_intf", 189 + "pixel", 190 + "core", 191 + "iface", 192 + "bus"; 193 + 194 + assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>, 195 + <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>; 196 + assigned-clock-parents = <&mdss_dsi0_phy 0>, 197 + <&mdss_dsi0_phy 1>; 198 + 199 + operating-points-v2 = <&dsi_opp_table>; 200 + power-domains = <&rpmhpd SM8350_MMCX>; 201 + 202 + phys = <&mdss_dsi0_phy>; 203 + 204 + ports { 205 + #address-cells = <1>; 206 + #size-cells = <0>; 207 + 208 + port@0 { 209 + reg = <0>; 210 + dsi0_in: endpoint { 211 + remote-endpoint = <&dpu_intf1_out>; 212 + }; 213 + }; 214 + 215 + port@1 { 216 + reg = <1>; 217 + dsi0_out: endpoint { 218 + }; 219 + }; 220 + }; 221 + }; 222 + }; 223 + ...
+139
Documentation/devicetree/bindings/display/msm/qcom,sm8450-dpu.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8450-dpu.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8450 Display DPU 8 + 9 + maintainers: 10 + - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 11 + 12 + $ref: /schemas/display/msm/dpu-common.yaml# 13 + 14 + properties: 15 + compatible: 16 + const: qcom,sm8450-dpu 17 + 18 + reg: 19 + items: 20 + - description: Address offset and size for mdp register set 21 + - description: Address offset and size for vbif register set 22 + 23 + reg-names: 24 + items: 25 + - const: mdp 26 + - const: vbif 27 + 28 + clocks: 29 + items: 30 + - description: Display hf axi 31 + - description: Display sf axi 32 + - description: Display ahb 33 + - description: Display lut 34 + - description: Display core 35 + - description: Display vsync 36 + 37 + clock-names: 38 + items: 39 + - const: bus 40 + - const: nrt_bus 41 + - const: iface 42 + - const: lut 43 + - const: core 44 + - const: vsync 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - reg-names 50 + - clocks 51 + - clock-names 52 + 53 + unevaluatedProperties: false 54 + 55 + examples: 56 + - | 57 + #include <dt-bindings/clock/qcom,sm8450-dispcc.h> 58 + #include <dt-bindings/clock/qcom,gcc-sm8450.h> 59 + #include <dt-bindings/interrupt-controller/arm-gic.h> 60 + #include <dt-bindings/interconnect/qcom,sm8450.h> 61 + #include <dt-bindings/power/qcom-rpmpd.h> 62 + 63 + display-controller@ae01000 { 64 + compatible = "qcom,sm8450-dpu"; 65 + reg = <0x0ae01000 0x8f000>, 66 + <0x0aeb0000 0x2008>; 67 + reg-names = "mdp", "vbif"; 68 + 69 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 70 + <&gcc GCC_DISP_SF_AXI_CLK>, 71 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 72 + <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>, 73 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 74 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 75 + clock-names = "bus", 76 + "nrt_bus", 77 + "iface", 78 + "lut", 79 + "core", 80 + "vsync"; 81 + 82 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 83 + assigned-clock-rates = <19200000>; 84 + 85 + operating-points-v2 = <&mdp_opp_table>; 86 + power-domains = <&rpmhpd SM8450_MMCX>; 87 + 88 + interrupt-parent = <&mdss>; 89 + interrupts = <0>; 90 + 91 + ports { 92 + #address-cells = <1>; 93 + #size-cells = <0>; 94 + 95 + port@0 { 96 + reg = <0>; 97 + dpu_intf1_out: endpoint { 98 + remote-endpoint = <&dsi0_in>; 99 + }; 100 + }; 101 + 102 + port@1 { 103 + reg = <1>; 104 + dpu_intf2_out: endpoint { 105 + remote-endpoint = <&dsi1_in>; 106 + }; 107 + }; 108 + }; 109 + 110 + mdp_opp_table: opp-table { 111 + compatible = "operating-points-v2"; 112 + 113 + opp-172000000{ 114 + opp-hz = /bits/ 64 <172000000>; 115 + required-opps = <&rpmhpd_opp_low_svs_d1>; 116 + }; 117 + 118 + opp-200000000 { 119 + opp-hz = /bits/ 64 <200000000>; 120 + required-opps = <&rpmhpd_opp_low_svs>; 121 + }; 122 + 123 + opp-325000000 { 124 + opp-hz = /bits/ 64 <325000000>; 125 + required-opps = <&rpmhpd_opp_svs>; 126 + }; 127 + 128 + opp-375000000 { 129 + opp-hz = /bits/ 64 <375000000>; 130 + required-opps = <&rpmhpd_opp_svs_l1>; 131 + }; 132 + 133 + opp-500000000 { 134 + opp-hz = /bits/ 64 <500000000>; 135 + required-opps = <&rpmhpd_opp_nom>; 136 + }; 137 + }; 138 + }; 139 + ...
+345
Documentation/devicetree/bindings/display/msm/qcom,sm8450-mdss.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/display/msm/qcom,sm8450-mdss.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm SM8450 Display MDSS 8 + 9 + maintainers: 10 + - Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 11 + 12 + description: 13 + SM8450 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like 14 + DPU display controller, DSI and DP interfaces etc. 15 + 16 + $ref: /schemas/display/msm/mdss-common.yaml# 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sm8450-mdss 21 + 22 + clocks: 23 + items: 24 + - description: Display AHB 25 + - description: Display hf AXI 26 + - description: Display sf AXI 27 + - description: Display core 28 + 29 + iommus: 30 + maxItems: 1 31 + 32 + interconnects: 33 + maxItems: 2 34 + 35 + interconnect-names: 36 + maxItems: 2 37 + 38 + patternProperties: 39 + "^display-controller@[0-9a-f]+$": 40 + type: object 41 + properties: 42 + compatible: 43 + const: qcom,sm8450-dpu 44 + 45 + "^dsi@[0-9a-f]+$": 46 + type: object 47 + properties: 48 + compatible: 49 + items: 50 + - const: qcom,sm8450-dsi-ctrl 51 + - const: qcom,mdss-dsi-ctrl 52 + 53 + "^phy@[0-9a-f]+$": 54 + type: object 55 + properties: 56 + compatible: 57 + const: qcom,dsi-phy-5nm-8450 58 + 59 + required: 60 + - compatible 61 + 62 + unevaluatedProperties: false 63 + 64 + examples: 65 + - | 66 + #include <dt-bindings/clock/qcom,sm8450-dispcc.h> 67 + #include <dt-bindings/clock/qcom,gcc-sm8450.h> 68 + #include <dt-bindings/clock/qcom,rpmh.h> 69 + #include <dt-bindings/interrupt-controller/arm-gic.h> 70 + #include <dt-bindings/interconnect/qcom,sm8450.h> 71 + #include <dt-bindings/power/qcom-rpmpd.h> 72 + 73 + display-subsystem@ae00000 { 74 + compatible = "qcom,sm8450-mdss"; 75 + reg = <0x0ae00000 0x1000>; 76 + reg-names = "mdss"; 77 + 78 + interconnects = <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>, 79 + <&mmss_noc MASTER_MDP_DISP 0 &mc_virt SLAVE_EBI1_DISP 0>; 80 + interconnect-names = "mdp0-mem", "mdp1-mem"; 81 + 82 + resets = <&dispcc DISP_CC_MDSS_CORE_BCR>; 83 + 84 + power-domains = <&dispcc MDSS_GDSC>; 85 + 86 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 87 + <&gcc GCC_DISP_HF_AXI_CLK>, 88 + <&gcc GCC_DISP_SF_AXI_CLK>, 89 + <&dispcc DISP_CC_MDSS_MDP_CLK>; 90 + clock-names = "iface", "bus", "nrt_bus", "core"; 91 + 92 + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 93 + interrupt-controller; 94 + #interrupt-cells = <1>; 95 + 96 + iommus = <&apps_smmu 0x2800 0x402>; 97 + 98 + #address-cells = <1>; 99 + #size-cells = <1>; 100 + ranges; 101 + 102 + display-controller@ae01000 { 103 + compatible = "qcom,sm8450-dpu"; 104 + reg = <0x0ae01000 0x8f000>, 105 + <0x0aeb0000 0x2008>; 106 + reg-names = "mdp", "vbif"; 107 + 108 + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, 109 + <&gcc GCC_DISP_SF_AXI_CLK>, 110 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 111 + <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>, 112 + <&dispcc DISP_CC_MDSS_MDP_CLK>, 113 + <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 114 + clock-names = "bus", 115 + "nrt_bus", 116 + "iface", 117 + "lut", 118 + "core", 119 + "vsync"; 120 + 121 + assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>; 122 + assigned-clock-rates = <19200000>; 123 + 124 + operating-points-v2 = <&mdp_opp_table>; 125 + power-domains = <&rpmhpd SM8450_MMCX>; 126 + 127 + interrupt-parent = <&mdss>; 128 + interrupts = <0>; 129 + 130 + ports { 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + 134 + port@0 { 135 + reg = <0>; 136 + dpu_intf1_out: endpoint { 137 + remote-endpoint = <&dsi0_in>; 138 + }; 139 + }; 140 + 141 + port@1 { 142 + reg = <1>; 143 + dpu_intf2_out: endpoint { 144 + remote-endpoint = <&dsi1_in>; 145 + }; 146 + }; 147 + }; 148 + 149 + mdp_opp_table: opp-table { 150 + compatible = "operating-points-v2"; 151 + 152 + opp-172000000{ 153 + opp-hz = /bits/ 64 <172000000>; 154 + required-opps = <&rpmhpd_opp_low_svs_d1>; 155 + }; 156 + 157 + opp-200000000 { 158 + opp-hz = /bits/ 64 <200000000>; 159 + required-opps = <&rpmhpd_opp_low_svs>; 160 + }; 161 + 162 + opp-325000000 { 163 + opp-hz = /bits/ 64 <325000000>; 164 + required-opps = <&rpmhpd_opp_svs>; 165 + }; 166 + 167 + opp-375000000 { 168 + opp-hz = /bits/ 64 <375000000>; 169 + required-opps = <&rpmhpd_opp_svs_l1>; 170 + }; 171 + 172 + opp-500000000 { 173 + opp-hz = /bits/ 64 <500000000>; 174 + required-opps = <&rpmhpd_opp_nom>; 175 + }; 176 + }; 177 + }; 178 + 179 + dsi@ae94000 { 180 + compatible = "qcom,sm8450-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 181 + reg = <0x0ae94000 0x400>; 182 + reg-names = "dsi_ctrl"; 183 + 184 + interrupt-parent = <&mdss>; 185 + interrupts = <4>; 186 + 187 + clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>, 188 + <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>, 189 + <&dispcc DISP_CC_MDSS_PCLK0_CLK>, 190 + <&dispcc DISP_CC_MDSS_ESC0_CLK>, 191 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 192 + <&gcc GCC_DISP_HF_AXI_CLK>; 193 + clock-names = "byte", 194 + "byte_intf", 195 + "pixel", 196 + "core", 197 + "iface", 198 + "bus"; 199 + 200 + assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>, 201 + <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>; 202 + assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>; 203 + 204 + operating-points-v2 = <&dsi_opp_table>; 205 + power-domains = <&rpmhpd SM8450_MMCX>; 206 + 207 + phys = <&dsi0_phy>; 208 + phy-names = "dsi"; 209 + 210 + #address-cells = <1>; 211 + #size-cells = <0>; 212 + 213 + ports { 214 + #address-cells = <1>; 215 + #size-cells = <0>; 216 + 217 + port@0 { 218 + reg = <0>; 219 + dsi0_in: endpoint { 220 + remote-endpoint = <&dpu_intf1_out>; 221 + }; 222 + }; 223 + 224 + port@1 { 225 + reg = <1>; 226 + dsi0_out: endpoint { 227 + }; 228 + }; 229 + }; 230 + 231 + dsi_opp_table: opp-table { 232 + compatible = "operating-points-v2"; 233 + 234 + opp-160310000{ 235 + opp-hz = /bits/ 64 <160310000>; 236 + required-opps = <&rpmhpd_opp_low_svs_d1>; 237 + }; 238 + 239 + opp-187500000 { 240 + opp-hz = /bits/ 64 <187500000>; 241 + required-opps = <&rpmhpd_opp_low_svs>; 242 + }; 243 + 244 + opp-300000000 { 245 + opp-hz = /bits/ 64 <300000000>; 246 + required-opps = <&rpmhpd_opp_svs>; 247 + }; 248 + 249 + opp-358000000 { 250 + opp-hz = /bits/ 64 <358000000>; 251 + required-opps = <&rpmhpd_opp_svs_l1>; 252 + }; 253 + }; 254 + }; 255 + 256 + dsi0_phy: phy@ae94400 { 257 + compatible = "qcom,dsi-phy-5nm-8450"; 258 + reg = <0x0ae94400 0x200>, 259 + <0x0ae94600 0x280>, 260 + <0x0ae94900 0x260>; 261 + reg-names = "dsi_phy", 262 + "dsi_phy_lane", 263 + "dsi_pll"; 264 + 265 + #clock-cells = <1>; 266 + #phy-cells = <0>; 267 + 268 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 269 + <&rpmhcc RPMH_CXO_CLK>; 270 + clock-names = "iface", "ref"; 271 + vdds-supply = <&vreg_dsi_phy>; 272 + }; 273 + 274 + dsi@ae96000 { 275 + compatible = "qcom,sm8450-dsi-ctrl", "qcom,mdss-dsi-ctrl"; 276 + reg = <0x0ae96000 0x400>; 277 + reg-names = "dsi_ctrl"; 278 + 279 + interrupt-parent = <&mdss>; 280 + interrupts = <5>; 281 + 282 + clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>, 283 + <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>, 284 + <&dispcc DISP_CC_MDSS_PCLK1_CLK>, 285 + <&dispcc DISP_CC_MDSS_ESC1_CLK>, 286 + <&dispcc DISP_CC_MDSS_AHB_CLK>, 287 + <&gcc GCC_DISP_HF_AXI_CLK>; 288 + clock-names = "byte", 289 + "byte_intf", 290 + "pixel", 291 + "core", 292 + "iface", 293 + "bus"; 294 + 295 + assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>, 296 + <&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>; 297 + assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>; 298 + 299 + operating-points-v2 = <&dsi_opp_table>; 300 + power-domains = <&rpmhpd SM8450_MMCX>; 301 + 302 + phys = <&dsi1_phy>; 303 + phy-names = "dsi"; 304 + 305 + #address-cells = <1>; 306 + #size-cells = <0>; 307 + 308 + ports { 309 + #address-cells = <1>; 310 + #size-cells = <0>; 311 + 312 + port@0 { 313 + reg = <0>; 314 + dsi1_in: endpoint { 315 + remote-endpoint = <&dpu_intf2_out>; 316 + }; 317 + }; 318 + 319 + port@1 { 320 + reg = <1>; 321 + dsi1_out: endpoint { 322 + }; 323 + }; 324 + }; 325 + }; 326 + 327 + dsi1_phy: phy@ae96400 { 328 + compatible = "qcom,dsi-phy-5nm-8450"; 329 + reg = <0x0ae96400 0x200>, 330 + <0x0ae96600 0x280>, 331 + <0x0ae96900 0x260>; 332 + reg-names = "dsi_phy", 333 + "dsi_phy_lane", 334 + "dsi_pll"; 335 + 336 + #clock-cells = <1>; 337 + #phy-cells = <0>; 338 + 339 + clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>, 340 + <&rpmhcc RPMH_CXO_CLK>; 341 + clock-names = "iface", "ref"; 342 + vdds-supply = <&vreg_dsi_phy>; 343 + }; 344 + }; 345 + ...
+24 -3
Documentation/devicetree/bindings/phy/qcom,hdmi-phy-other.yaml
··· 43 43 vddio-supply: 44 44 description: phandle to VDD I/O supply regulator 45 45 46 + '#clock-cells': 47 + const: 0 48 + 46 49 '#phy-cells': 47 50 const: 0 48 51 ··· 56 53 contains: 57 54 enum: 58 55 - qcom,hdmi-phy-8660 59 - - qcom,hdmi-phy-8960 60 56 then: 61 57 properties: 62 58 clocks: ··· 63 61 clock-names: 64 62 items: 65 63 - const: slave_iface 64 + vddio-supply: false 65 + 66 + - if: 67 + properties: 68 + compatible: 69 + contains: 70 + enum: 71 + - qcom,hdmi-phy-8960 72 + then: 73 + properties: 74 + clocks: 75 + minItems: 1 76 + maxItems: 2 77 + clock-names: 78 + minItems: 1 79 + items: 80 + - const: slave_iface 81 + - const: pxo 66 82 vddio-supply: false 67 83 68 84 - if: ··· 116 96 "hdmi_pll"; 117 97 reg = <0x4a00400 0x60>, 118 98 <0x4a00500 0x100>; 99 + #clock-cells = <0>; 119 100 #phy-cells = <0>; 120 101 power-domains = <&mmcc 1>; 121 - clock-names = "slave_iface"; 122 - clocks = <&clk 21>; 102 + clock-names = "slave_iface", "pxo"; 103 + clocks = <&clk 21>, <&pxo_board>; 123 104 core-vdda-supply = <&pm8921_hdmi_mvs>; 124 105 };
+4 -3
drivers/gpu/drm/msm/Kconfig
··· 23 23 select SHMEM 24 24 select TMPFS 25 25 select QCOM_SCM 26 + select DEVFREQ_GOV_SIMPLE_ONDEMAND 26 27 select WANT_DEV_COREDUMP 27 28 select SND_SOC_HDMI_CODEC if SND_SOC 28 29 select SYNC_FILE ··· 141 140 Choose this option if DSI PHY on SDM845 is used on the platform. 142 141 143 142 config DRM_MSM_DSI_7NM_PHY 144 - bool "Enable DSI 7nm PHY driver in MSM DRM" 143 + bool "Enable DSI 7nm/5nm/4nm PHY driver in MSM DRM" 145 144 depends on DRM_MSM_DSI 146 145 default y 147 146 help 148 - Choose this option if DSI PHY on SM8150/SM8250/SC7280 is used on 149 - the platform. 147 + Choose this option if DSI PHY on SM8150/SM8250/SM8350/SM8450/SM8550/SC7280 148 + is used on the platform. 150 149 151 150 config DRM_MSM_HDMI 152 151 bool "Enable HDMI support in MSM DRM driver"
+23 -4
drivers/gpu/drm/msm/adreno/a2xx_gpu.c
··· 53 53 54 54 static bool a2xx_me_init(struct msm_gpu *gpu) 55 55 { 56 + struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); 57 + struct a2xx_gpu *a2xx_gpu = to_a2xx_gpu(adreno_gpu); 56 58 struct msm_ringbuffer *ring = gpu->rb[0]; 57 59 58 60 OUT_PKT3(ring, CP_ME_INIT, 18); ··· 86 84 /* NQ and External Memory Swap */ 87 85 OUT_RING(ring, 0x00000000); 88 86 /* protected mode error checking (0x1f2 is REG_AXXX_CP_INT_CNTL) */ 89 - OUT_RING(ring, 0x200001f2); 87 + if (a2xx_gpu->protection_disabled) 88 + OUT_RING(ring, 0x00000000); 89 + else 90 + OUT_RING(ring, 0x200001f2); 90 91 /* Disable header dumping and Header dump address */ 91 92 OUT_RING(ring, 0x00000000); 92 93 /* Header dump size */ 93 94 OUT_RING(ring, 0x00000000); 94 95 95 - /* enable protected mode */ 96 - OUT_PKT3(ring, CP_SET_PROTECTED_MODE, 1); 97 - OUT_RING(ring, 1); 96 + if (!a2xx_gpu->protection_disabled) { 97 + /* enable protected mode */ 98 + OUT_PKT3(ring, CP_SET_PROTECTED_MODE, 1); 99 + OUT_RING(ring, 1); 100 + } 98 101 99 102 adreno_flush(gpu, ring, REG_AXXX_CP_RB_WPTR); 100 103 return a2xx_idle(gpu); ··· 108 101 static int a2xx_hw_init(struct msm_gpu *gpu) 109 102 { 110 103 struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); 104 + struct a2xx_gpu *a2xx_gpu = to_a2xx_gpu(adreno_gpu); 111 105 dma_addr_t pt_base, tran_error; 112 106 uint32_t *ptr, len; 113 107 int i, ret; ··· 228 220 ptr = (uint32_t *)(adreno_gpu->fw[ADRENO_FW_PM4]->data); 229 221 len = adreno_gpu->fw[ADRENO_FW_PM4]->size / 4; 230 222 DBG("loading PM4 ucode version: %x", ptr[1]); 223 + 224 + /* 225 + * New firmware files seem to have GPU and firmware version in this 226 + * word (0x20xxxx for A200, 0x220xxx for A220, 0x225xxx for A225). 227 + * Older firmware files, which lack protection support, have 0 instead. 228 + */ 229 + if (ptr[1] == 0) { 230 + dev_warn(gpu->dev->dev, 231 + "Legacy firmware detected, disabling protection support\n"); 232 + a2xx_gpu->protection_disabled = true; 233 + } 231 234 232 235 gpu_write(gpu, REG_AXXX_CP_DEBUG, 233 236 AXXX_CP_DEBUG_MIU_128BIT_WRITE_ENABLE);
+1
drivers/gpu/drm/msm/adreno/a2xx_gpu.h
··· 15 15 struct a2xx_gpu { 16 16 struct adreno_gpu base; 17 17 bool pm_enabled; 18 + bool protection_disabled; 18 19 }; 19 20 #define to_a2xx_gpu(x) container_of(x, struct a2xx_gpu, base) 20 21
+18
drivers/gpu/drm/msm/adreno/a6xx.xml.h
··· 241 241 A6XX_HLSQ_FRONTEND_META = 97, 242 242 A6XX_HLSQ_INDIRECT_META = 98, 243 243 A6XX_HLSQ_BACKEND_META = 99, 244 + A6XX_SP_LB_6_DATA = 112, 245 + A6XX_SP_LB_7_DATA = 113, 246 + A6XX_HLSQ_INST_RAM_1 = 115, 244 247 }; 245 248 246 249 enum a6xx_debugbus_id { ··· 277 274 A6XX_DBGBUS_HLSQ_SPTP = 31, 278 275 A6XX_DBGBUS_RB_0 = 32, 279 276 A6XX_DBGBUS_RB_1 = 33, 277 + A6XX_DBGBUS_RB_2 = 34, 280 278 A6XX_DBGBUS_UCHE_WRAPPER = 36, 281 279 A6XX_DBGBUS_CCU_0 = 40, 282 280 A6XX_DBGBUS_CCU_1 = 41, 281 + A6XX_DBGBUS_CCU_2 = 42, 283 282 A6XX_DBGBUS_VFD_0 = 56, 284 283 A6XX_DBGBUS_VFD_1 = 57, 285 284 A6XX_DBGBUS_VFD_2 = 58, 286 285 A6XX_DBGBUS_VFD_3 = 59, 286 + A6XX_DBGBUS_VFD_4 = 60, 287 + A6XX_DBGBUS_VFD_5 = 61, 287 288 A6XX_DBGBUS_SP_0 = 64, 288 289 A6XX_DBGBUS_SP_1 = 65, 290 + A6XX_DBGBUS_SP_2 = 66, 289 291 A6XX_DBGBUS_TPL1_0 = 72, 290 292 A6XX_DBGBUS_TPL1_1 = 73, 291 293 A6XX_DBGBUS_TPL1_2 = 74, 292 294 A6XX_DBGBUS_TPL1_3 = 75, 295 + A6XX_DBGBUS_TPL1_4 = 76, 296 + A6XX_DBGBUS_TPL1_5 = 77, 297 + A6XX_DBGBUS_SPTP_0 = 88, 298 + A6XX_DBGBUS_SPTP_1 = 89, 299 + A6XX_DBGBUS_SPTP_2 = 90, 300 + A6XX_DBGBUS_SPTP_3 = 91, 301 + A6XX_DBGBUS_SPTP_4 = 92, 302 + A6XX_DBGBUS_SPTP_5 = 93, 293 303 }; 294 304 295 305 enum a6xx_cp_perfcounter_select { ··· 1086 1070 #define REG_A6XX_CP_SQE_INSTR_BASE 0x00000830 1087 1071 1088 1072 #define REG_A6XX_CP_MISC_CNTL 0x00000840 1073 + 1074 + #define REG_A6XX_CP_CHICKEN_DBG 0x00000841 1089 1075 1090 1076 #define REG_A6XX_CP_APRIV_CNTL 0x00000844 1091 1077
+1 -1
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
··· 2028 2028 * to cause power supply issues: 2029 2029 */ 2030 2030 if (adreno_is_a618(adreno_gpu) || adreno_is_7c3(adreno_gpu)) 2031 - gpu->clamp_to_idle = true; 2031 + priv->gpu_clamp_to_idle = true; 2032 2032 2033 2033 /* Check if there is a GMU phandle and set it up */ 2034 2034 node = of_parse_phandle(pdev->dev.of_node, "qcom,gmu", 0);
+59 -2
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
··· 385 385 nr_debugbus_blocks = ARRAY_SIZE(a6xx_debugbus_blocks) + 386 386 (a6xx_has_gbif(to_adreno_gpu(gpu)) ? 1 : 0); 387 387 388 + if (adreno_is_a650_family(to_adreno_gpu(gpu))) 389 + nr_debugbus_blocks += ARRAY_SIZE(a650_debugbus_blocks); 390 + 388 391 a6xx_state->debugbus = state_kcalloc(a6xx_state, nr_debugbus_blocks, 389 392 sizeof(*a6xx_state->debugbus)); 390 393 ··· 413 410 &a6xx_state->debugbus[i]); 414 411 415 412 a6xx_state->nr_debugbus += 1; 413 + } 414 + 415 + 416 + if (adreno_is_a650_family(to_adreno_gpu(gpu))) { 417 + for (i = 0; i < ARRAY_SIZE(a650_debugbus_blocks); i++) 418 + a6xx_get_debugbus_block(gpu, 419 + a6xx_state, 420 + &a650_debugbus_blocks[i], 421 + &a6xx_state->debugbus[i]); 416 422 } 417 423 } 418 424 ··· 536 524 struct a6xx_gpu_state_obj *obj, 537 525 struct a6xx_crashdumper *dumper) 538 526 { 527 + struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); 539 528 u64 *in = dumper->ptr; 540 529 u64 out = dumper->iova + A6XX_CD_DATA_OFFSET; 541 530 size_t datasize; 542 531 int i, regcount = 0; 532 + u32 id = cluster->id; 533 + 534 + /* Skip registers that are not present on older generation */ 535 + if (!adreno_is_a660_family(adreno_gpu) && 536 + cluster->registers == a660_fe_cluster) 537 + return; 538 + 539 + if (adreno_is_a650_family(adreno_gpu) && 540 + cluster->registers == a6xx_ps_cluster) 541 + id = CLUSTER_VPC_PS; 543 542 544 543 /* Some clusters need a selector register to be programmed too */ 545 544 if (cluster->sel_reg) ··· 560 537 int j; 561 538 562 539 in += CRASHDUMP_WRITE(in, REG_A6XX_CP_APERTURE_CNTL_CD, 563 - (cluster->id << 8) | (i << 4) | i); 540 + (id << 8) | (i << 4) | i); 564 541 565 542 for (j = 0; j < cluster->count; j += 2) { 566 543 int count = RANGE(cluster->registers, j); ··· 710 687 u64 out = dumper->iova + A6XX_CD_DATA_OFFSET; 711 688 int i, regcount = 0; 712 689 690 + /* Skip unsupported registers on older generations */ 691 + if (!adreno_is_a660_family(to_adreno_gpu(gpu)) && 692 + (regs->registers == a660_registers)) 693 + return; 694 + 713 695 /* Some blocks might need to program a selector register first */ 714 696 if (regs->val0) 715 697 in += CRASHDUMP_WRITE(in, regs->val0, regs->val1); ··· 748 720 struct a6xx_gpu_state_obj *obj) 749 721 { 750 722 int i, regcount = 0, index = 0; 723 + 724 + /* Skip unsupported registers on older generations */ 725 + if (!adreno_is_a660_family(to_adreno_gpu(gpu)) && 726 + (regs->registers == a660_registers)) 727 + return; 751 728 752 729 for (i = 0; i < regs->count; i += 2) 753 730 regcount += RANGE(regs->registers, i); ··· 942 909 dumper); 943 910 } 944 911 912 + static u32 a6xx_get_cp_roq_size(struct msm_gpu *gpu) 913 + { 914 + /* The value at [16:31] is in 4dword units. Convert it to dwords */ 915 + return gpu_read(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_2) >> 14; 916 + } 917 + 945 918 /* Read a block of data from an indexed register pair */ 946 919 static void a6xx_get_indexed_regs(struct msm_gpu *gpu, 947 920 struct a6xx_gpu_state *a6xx_state, 948 - const struct a6xx_indexed_registers *indexed, 921 + struct a6xx_indexed_registers *indexed, 949 922 struct a6xx_gpu_state_obj *obj) 950 923 { 951 924 int i; 952 925 953 926 obj->handle = (const void *) indexed; 927 + if (indexed->count_fn) 928 + indexed->count = indexed->count_fn(gpu); 929 + 954 930 obj->data = state_kcalloc(a6xx_state, indexed->count, sizeof(u32)); 955 931 if (!obj->data) 956 932 return; ··· 987 945 for (i = 0; i < ARRAY_SIZE(a6xx_indexed_reglist); i++) 988 946 a6xx_get_indexed_regs(gpu, a6xx_state, &a6xx_indexed_reglist[i], 989 947 &a6xx_state->indexed_regs[i]); 948 + 949 + if (adreno_is_a650_family(to_adreno_gpu(gpu))) { 950 + u32 val; 951 + 952 + val = gpu_read(gpu, REG_A6XX_CP_CHICKEN_DBG); 953 + gpu_write(gpu, REG_A6XX_CP_CHICKEN_DBG, val | 4); 954 + 955 + /* Get the contents of the CP mempool */ 956 + a6xx_get_indexed_regs(gpu, a6xx_state, &a6xx_cp_mempool_indexed, 957 + &a6xx_state->indexed_regs[i]); 958 + 959 + gpu_write(gpu, REG_A6XX_CP_CHICKEN_DBG, val); 960 + a6xx_state->nr_indexed_regs = count; 961 + return; 962 + } 990 963 991 964 /* Set the CP mempool size to 0 to stabilize it while dumping */ 992 965 mempool_size = gpu_read(gpu, REG_A6XX_CP_MEM_POOL_SIZE);
+51 -15
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.h
··· 36 36 0xa00e, 0xa0ef, 0xa0f8, 0xa0f8, 37 37 }; 38 38 39 + static const u32 a660_fe_cluster[] = { 40 + 0x9807, 0x9807, 41 + }; 42 + 39 43 static const u32 a6xx_pc_vs_cluster[] = { 40 44 0x9100, 0x9108, 0x9300, 0x9306, 0x9980, 0x9981, 0x9b00, 0x9b07, 41 45 }; 42 46 43 - #define CLUSTER_FE 0 44 - #define CLUSTER_SP_VS 1 45 - #define CLUSTER_PC_VS 2 46 - #define CLUSTER_GRAS 3 47 - #define CLUSTER_SP_PS 4 48 - #define CLUSTER_PS 5 47 + #define CLUSTER_FE 0 48 + #define CLUSTER_SP_VS 1 49 + #define CLUSTER_PC_VS 2 50 + #define CLUSTER_GRAS 3 51 + #define CLUSTER_SP_PS 4 52 + #define CLUSTER_PS 5 53 + #define CLUSTER_VPC_PS 6 49 54 50 55 #define CLUSTER(_id, _reg, _sel_reg, _sel_val) \ 51 56 { .id = _id, .name = #_id,\ ··· 72 67 CLUSTER(CLUSTER_PS, a6xx_ps_cluster, 0, 0), 73 68 CLUSTER(CLUSTER_FE, a6xx_fe_cluster, 0, 0), 74 69 CLUSTER(CLUSTER_PC_VS, a6xx_pc_vs_cluster, 0, 0), 70 + CLUSTER(CLUSTER_FE, a660_fe_cluster, 0, 0), 75 71 }; 76 72 77 73 static const u32 a6xx_sp_vs_hlsq_cluster[] = { ··· 111 105 112 106 static const u32 a6xx_sp_ps_sp_cluster[] = { 113 107 0xa980, 0xa9a8, 0xa9b0, 0xa9bc, 0xa9d0, 0xa9d3, 0xa9e0, 0xa9f3, 114 - 0xaa00, 0xaa00, 0xaa30, 0xaa31, 108 + 0xaa00, 0xaa00, 0xaa30, 0xaa31, 0xaaf2, 0xaaf2, 115 109 }; 116 110 117 111 static const u32 a6xx_sp_ps_sp_2d_cluster[] = { ··· 235 229 SHADER(A6XX_HLSQ_DATAPATH_META, 0x40), 236 230 SHADER(A6XX_HLSQ_FRONTEND_META, 0x40), 237 231 SHADER(A6XX_HLSQ_INDIRECT_META, 0x40), 232 + SHADER(A6XX_SP_LB_6_DATA, 0x200), 233 + SHADER(A6XX_SP_LB_7_DATA, 0x200), 234 + SHADER(A6XX_HLSQ_INST_RAM_1, 0x200), 238 235 }; 239 236 240 237 static const u32 a6xx_rb_rac_registers[] = { ··· 260 251 0x0540, 0x0555, 261 252 /* CP */ 262 253 0x0800, 0x0808, 0x0810, 0x0813, 0x0820, 0x0821, 0x0823, 0x0824, 263 - 0x0826, 0x0827, 0x0830, 0x0833, 0x0840, 0x0843, 0x084f, 0x086f, 254 + 0x0826, 0x0827, 0x0830, 0x0833, 0x0840, 0x0845, 0x084f, 0x086f, 264 255 0x0880, 0x088a, 0x08a0, 0x08ab, 0x08c0, 0x08c4, 0x08d0, 0x08dd, 265 256 0x08f0, 0x08f3, 0x0900, 0x0903, 0x0908, 0x0911, 0x0928, 0x093e, 266 257 0x0942, 0x094d, 0x0980, 0x0984, 0x098d, 0x0996, 0x0998, 0x099e, ··· 283 274 /* VFD */ 284 275 0xa600, 0xa601, 0xa603, 0xa603, 0xa60a, 0xa60a, 0xa610, 0xa617, 285 276 0xa630, 0xa630, 277 + /* HLSQ */ 278 + 0xd002, 0xd003, 279 + }; 280 + 281 + static const u32 a660_registers[] = { 282 + /* UCHE */ 283 + 0x0e3c, 0x0e3c, 286 284 }; 287 285 288 286 #define REGS(_array, _sel_reg, _sel_val) \ ··· 298 282 299 283 static const struct a6xx_registers a6xx_reglist[] = { 300 284 REGS(a6xx_registers, 0, 0), 285 + REGS(a660_registers, 0, 0), 301 286 REGS(a6xx_rb_rac_registers, REG_A6XX_RB_RB_SUB_BLOCK_SEL_CNTL_CD, 0), 302 287 REGS(a6xx_rb_rbp_registers, REG_A6XX_RB_RB_SUB_BLOCK_SEL_CNTL_CD, 9), 303 288 }; ··· 383 366 REGS(a6xx_gmu_gx_registers, 0, 0), 384 367 }; 385 368 386 - static const struct a6xx_indexed_registers { 369 + static u32 a6xx_get_cp_roq_size(struct msm_gpu *gpu); 370 + 371 + static struct a6xx_indexed_registers { 387 372 const char *name; 388 373 u32 addr; 389 374 u32 data; 390 375 u32 count; 376 + u32 (*count_fn)(struct msm_gpu *gpu); 391 377 } a6xx_indexed_reglist[] = { 392 378 { "CP_SQE_STAT", REG_A6XX_CP_SQE_STAT_ADDR, 393 - REG_A6XX_CP_SQE_STAT_DATA, 0x33 }, 379 + REG_A6XX_CP_SQE_STAT_DATA, 0x33, NULL }, 394 380 { "CP_DRAW_STATE", REG_A6XX_CP_DRAW_STATE_ADDR, 395 - REG_A6XX_CP_DRAW_STATE_DATA, 0x100 }, 381 + REG_A6XX_CP_DRAW_STATE_DATA, 0x100, NULL }, 396 382 { "CP_UCODE_DBG_DATA", REG_A6XX_CP_SQE_UCODE_DBG_ADDR, 397 - REG_A6XX_CP_SQE_UCODE_DBG_DATA, 0x6000 }, 383 + REG_A6XX_CP_SQE_UCODE_DBG_DATA, 0x8000, NULL }, 398 384 { "CP_ROQ", REG_A6XX_CP_ROQ_DBG_ADDR, 399 - REG_A6XX_CP_ROQ_DBG_DATA, 0x400 }, 385 + REG_A6XX_CP_ROQ_DBG_DATA, 0, a6xx_get_cp_roq_size}, 400 386 }; 401 387 402 - static const struct a6xx_indexed_registers a6xx_cp_mempool_indexed = { 388 + static struct a6xx_indexed_registers a6xx_cp_mempool_indexed = { 403 389 "CP_MEMPOOL", REG_A6XX_CP_MEM_POOL_DBG_ADDR, 404 - REG_A6XX_CP_MEM_POOL_DBG_DATA, 0x2060, 390 + REG_A6XX_CP_MEM_POOL_DBG_DATA, 0x2060, NULL, 405 391 }; 406 392 407 393 #define DEBUGBUS(_id, _count) { .id = _id, .name = #_id, .count = _count } ··· 461 441 static const struct a6xx_debugbus_block a6xx_cx_debugbus_blocks[] = { 462 442 DEBUGBUS(A6XX_DBGBUS_GMU_CX, 0x100), 463 443 DEBUGBUS(A6XX_DBGBUS_CX, 0x100), 444 + }; 445 + 446 + static const struct a6xx_debugbus_block a650_debugbus_blocks[] = { 447 + DEBUGBUS(A6XX_DBGBUS_RB_2, 0x100), 448 + DEBUGBUS(A6XX_DBGBUS_CCU_2, 0x100), 449 + DEBUGBUS(A6XX_DBGBUS_VFD_4, 0x100), 450 + DEBUGBUS(A6XX_DBGBUS_VFD_5, 0x100), 451 + DEBUGBUS(A6XX_DBGBUS_SP_2, 0x100), 452 + DEBUGBUS(A6XX_DBGBUS_TPL1_4, 0x100), 453 + DEBUGBUS(A6XX_DBGBUS_TPL1_5, 0x100), 454 + DEBUGBUS(A6XX_DBGBUS_SPTP_0, 0x100), 455 + DEBUGBUS(A6XX_DBGBUS_SPTP_1, 0x100), 456 + DEBUGBUS(A6XX_DBGBUS_SPTP_2, 0x100), 457 + DEBUGBUS(A6XX_DBGBUS_SPTP_3, 0x100), 458 + DEBUGBUS(A6XX_DBGBUS_SPTP_4, 0x100), 459 + DEBUGBUS(A6XX_DBGBUS_SPTP_5, 0x100), 464 460 }; 465 461 466 462 #endif
+2 -2
drivers/gpu/drm/msm/adreno/adreno_gpu.c
··· 1083 1083 void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu) 1084 1084 { 1085 1085 struct msm_gpu *gpu = &adreno_gpu->base; 1086 - struct msm_drm_private *priv = gpu->dev->dev_private; 1086 + struct msm_drm_private *priv = gpu->dev ? gpu->dev->dev_private : NULL; 1087 1087 unsigned int i; 1088 1088 1089 1089 for (i = 0; i < ARRAY_SIZE(adreno_gpu->info->fw); i++) 1090 1090 release_firmware(adreno_gpu->fw[i]); 1091 1091 1092 - if (pm_runtime_enabled(&priv->gpu_pdev->dev)) 1092 + if (priv && pm_runtime_enabled(&priv->gpu_pdev->dev)) 1093 1093 pm_runtime_disable(&priv->gpu_pdev->dev); 1094 1094 1095 1095 msm_gpu_cleanup(&adreno_gpu->base);
+9 -8
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
··· 748 748 int i; 749 749 750 750 751 - if (!state->color_mgmt_changed) 751 + if (!state->color_mgmt_changed && !drm_atomic_crtc_needs_modeset(state)) 752 752 return; 753 753 754 754 for (i = 0; i < cstate->num_mixers; i++) { ··· 968 968 if (crtc->state) 969 969 dpu_crtc_destroy_state(crtc, crtc->state); 970 970 971 - __drm_atomic_helper_crtc_reset(crtc, &cstate->base); 971 + if (cstate) 972 + __drm_atomic_helper_crtc_reset(crtc, &cstate->base); 973 + else 974 + __drm_atomic_helper_crtc_reset(crtc, NULL); 972 975 } 973 976 974 977 /** ··· 1153 1150 bool needs_dirtyfb = dpu_crtc_needs_dirtyfb(crtc_state); 1154 1151 1155 1152 pstates = kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL); 1153 + if (!pstates) 1154 + return -ENOMEM; 1156 1155 1157 1156 if (!crtc_state->enable || !crtc_state->active) { 1158 1157 DRM_DEBUG_ATOMIC("crtc%d -> enable %d, active %d, skip atomic_check\n", ··· 1522 1517 static int _dpu_crtc_init_debugfs(struct drm_crtc *crtc) 1523 1518 { 1524 1519 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); 1525 - struct dentry *debugfs_root; 1526 - 1527 - debugfs_root = debugfs_create_dir(dpu_crtc->name, 1528 - crtc->dev->primary->debugfs_root); 1529 1520 1530 1521 debugfs_create_file("status", 0400, 1531 - debugfs_root, 1522 + crtc->debugfs_entry, 1532 1523 dpu_crtc, &_dpu_debugfs_status_fops); 1533 1524 debugfs_create_file("state", 0600, 1534 - debugfs_root, 1525 + crtc->debugfs_entry, 1535 1526 &dpu_crtc->base, 1536 1527 &dpu_crtc_debugfs_state_fops); 1537 1528
+12 -18
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
··· 162 162 * @vsync_event_work: worker to handle vsync event for autorefresh 163 163 * @topology: topology of the display 164 164 * @idle_timeout: idle timeout duration in milliseconds 165 + * @wide_bus_en: wide bus is enabled on this interface 165 166 * @dsc: drm_dsc_config pointer, for DSC-enabled encoders 166 167 */ 167 168 struct dpu_encoder_virt { ··· 341 340 phys_enc->intf_idx - INTF_0, phys_enc->wb_idx - WB_0, 342 341 phys_enc->hw_pp->idx - PINGPONG_0, intr_idx); 343 342 344 - if (phys_enc->parent_ops->handle_frame_done) 345 - phys_enc->parent_ops->handle_frame_done( 346 - phys_enc->parent, phys_enc, 343 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, 347 344 DPU_ENCODER_FRAME_EVENT_ERROR); 348 345 } 349 346 ··· 578 579 topology.num_dspp = topology.num_lm; 579 580 } 580 581 581 - topology.num_enc = 0; 582 582 topology.num_intf = intf_count; 583 583 584 584 if (dpu_enc->dsc) { 585 - /* In case of Display Stream Compression (DSC), we would use 586 - * 2 encoders, 2 layer mixers and 1 interface 585 + /* 586 + * In case of Display Stream Compression (DSC), we would use 587 + * 2 DSC encoders, 2 layer mixers and 1 interface 587 588 * this is power optimal and can drive up to (including) 4k 588 589 * screens 589 590 */ 590 - topology.num_enc = 2; 591 591 topology.num_dsc = 2; 592 - topology.num_intf = 1; 593 592 topology.num_lm = 2; 593 + topology.num_intf = 1; 594 594 } 595 595 596 596 return topology; ··· 1282 1284 return WB_MAX; 1283 1285 } 1284 1286 1285 - static void dpu_encoder_vblank_callback(struct drm_encoder *drm_enc, 1287 + void dpu_encoder_vblank_callback(struct drm_encoder *drm_enc, 1286 1288 struct dpu_encoder_phys *phy_enc) 1287 1289 { 1288 1290 struct dpu_encoder_virt *dpu_enc = NULL; ··· 1304 1306 DPU_ATRACE_END("encoder_vblank_callback"); 1305 1307 } 1306 1308 1307 - static void dpu_encoder_underrun_callback(struct drm_encoder *drm_enc, 1309 + void dpu_encoder_underrun_callback(struct drm_encoder *drm_enc, 1308 1310 struct dpu_encoder_phys *phy_enc) 1309 1311 { 1310 1312 if (!phy_enc) ··· 1380 1382 spin_unlock_irqrestore(&dpu_enc->enc_spinlock, lock_flags); 1381 1383 } 1382 1384 1383 - static void dpu_encoder_frame_done_callback( 1385 + void dpu_encoder_frame_done_callback( 1384 1386 struct drm_encoder *drm_enc, 1385 1387 struct dpu_encoder_phys *ready_phys, u32 event) 1386 1388 { ··· 1828 1830 if (hw_pp->ops.setup_dsc) 1829 1831 hw_pp->ops.setup_dsc(hw_pp); 1830 1832 1833 + if (hw_dsc->ops.dsc_bind_pingpong_blk) 1834 + hw_dsc->ops.dsc_bind_pingpong_blk(hw_dsc, true, hw_pp->idx); 1835 + 1831 1836 if (hw_pp->ops.enable_dsc) 1832 1837 hw_pp->ops.enable_dsc(hw_pp); 1833 1838 } ··· 2234 2233 return 0; 2235 2234 } 2236 2235 2237 - static const struct dpu_encoder_virt_ops dpu_encoder_parent_ops = { 2238 - .handle_vblank_virt = dpu_encoder_vblank_callback, 2239 - .handle_underrun_virt = dpu_encoder_underrun_callback, 2240 - .handle_frame_done = dpu_encoder_frame_done_callback, 2241 - }; 2242 - 2243 2236 static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc, 2244 2237 struct dpu_kms *dpu_kms, 2245 2238 struct msm_display_info *disp_info) ··· 2253 2258 memset(&phys_params, 0, sizeof(phys_params)); 2254 2259 phys_params.dpu_kms = dpu_kms; 2255 2260 phys_params.parent = &dpu_enc->base; 2256 - phys_params.parent_ops = &dpu_encoder_parent_ops; 2257 2261 phys_params.enc_spinlock = &dpu_enc->enc_spinlock; 2258 2262 2259 2263 switch (disp_info->intf_type) {
+26 -21
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
··· 61 61 struct dpu_encoder_phys; 62 62 63 63 /** 64 - * struct dpu_encoder_virt_ops - Interface the containing virtual encoder 65 - * provides for the physical encoders to use to callback. 66 - * @handle_vblank_virt: Notify virtual encoder of vblank IRQ reception 67 - * Note: This is called from IRQ handler context. 68 - * @handle_underrun_virt: Notify virtual encoder of underrun IRQ reception 69 - * Note: This is called from IRQ handler context. 70 - * @handle_frame_done: Notify virtual encoder that this phys encoder 71 - * completes last request frame. 72 - */ 73 - struct dpu_encoder_virt_ops { 74 - void (*handle_vblank_virt)(struct drm_encoder *, 75 - struct dpu_encoder_phys *phys); 76 - void (*handle_underrun_virt)(struct drm_encoder *, 77 - struct dpu_encoder_phys *phys); 78 - void (*handle_frame_done)(struct drm_encoder *, 79 - struct dpu_encoder_phys *phys, u32 event); 80 - }; 81 - 82 - /** 83 64 * struct dpu_encoder_phys_ops - Interface the physical encoders provide to 84 65 * the containing virtual encoder. 85 66 * @late_register: DRM Call. Add Userspace interfaces, debugfs. ··· 180 199 struct dpu_encoder_phys { 181 200 struct drm_encoder *parent; 182 201 struct dpu_encoder_phys_ops ops; 183 - const struct dpu_encoder_virt_ops *parent_ops; 184 202 struct dpu_hw_mdp *hw_mdptop; 185 203 struct dpu_hw_ctl *hw_ctl; 186 204 struct dpu_hw_pingpong *hw_pp; ··· 263 283 struct dpu_enc_phys_init_params { 264 284 struct dpu_kms *dpu_kms; 265 285 struct drm_encoder *parent; 266 - const struct dpu_encoder_virt_ops *parent_ops; 267 286 enum dpu_enc_split_role split_role; 268 287 enum dpu_intf intf_idx; 269 288 enum dpu_wb wb_idx; ··· 378 399 * @phys_enc: Pointer to physical encoder structure 379 400 */ 380 401 void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc); 402 + 403 + /** 404 + * dpu_encoder_vblank_callback - Notify virtual encoder of vblank IRQ reception 405 + * @drm_enc: Pointer to drm encoder structure 406 + * @phys_enc: Pointer to physical encoder 407 + * Note: This is called from IRQ handler context. 408 + */ 409 + void dpu_encoder_vblank_callback(struct drm_encoder *drm_enc, 410 + struct dpu_encoder_phys *phy_enc); 411 + 412 + /** dpu_encoder_underrun_callback - Notify virtual encoder of underrun IRQ reception 413 + * @drm_enc: Pointer to drm encoder structure 414 + * @phys_enc: Pointer to physical encoder 415 + * Note: This is called from IRQ handler context. 416 + */ 417 + void dpu_encoder_underrun_callback(struct drm_encoder *drm_enc, 418 + struct dpu_encoder_phys *phy_enc); 419 + 420 + /** dpu_encoder_frame_done_callback -- Notify virtual encoder that this phys encoder completes last request frame 421 + * @drm_enc: Pointer to drm encoder structure 422 + * @phys_enc: Pointer to physical encoder 423 + * @event: Event to process 424 + */ 425 + void dpu_encoder_frame_done_callback( 426 + struct drm_encoder *drm_enc, 427 + struct dpu_encoder_phys *ready_phys, u32 event); 381 428 382 429 #endif /* __dpu_encoder_phys_H__ */
+5 -13
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
··· 61 61 intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_CMD; 62 62 intf_cfg.stream_sel = cmd_enc->stream_sel; 63 63 intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); 64 + intf_cfg.dsc = dpu_encoder_helper_get_dsc(phys_enc); 64 65 ctl->ops.setup_intf_cfg(ctl, &intf_cfg); 65 66 66 67 /* setup which pp blk will connect to this intf */ ··· 84 83 85 84 DPU_ATRACE_BEGIN("pp_done_irq"); 86 85 /* notify all synchronous clients first, then asynchronous clients */ 87 - if (phys_enc->parent_ops->handle_frame_done) 88 - phys_enc->parent_ops->handle_frame_done(phys_enc->parent, 89 - phys_enc, event); 86 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, event); 90 87 91 88 spin_lock_irqsave(phys_enc->enc_spinlock, lock_flags); 92 89 new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); ··· 110 111 DPU_ATRACE_BEGIN("rd_ptr_irq"); 111 112 cmd_enc = to_dpu_encoder_phys_cmd(phys_enc); 112 113 113 - if (phys_enc->parent_ops->handle_vblank_virt) 114 - phys_enc->parent_ops->handle_vblank_virt(phys_enc->parent, 115 - phys_enc); 114 + dpu_encoder_vblank_callback(phys_enc->parent, phys_enc); 116 115 117 116 atomic_add_unless(&cmd_enc->pending_vblank_cnt, -1, 0); 118 117 wake_up_all(&cmd_enc->pending_vblank_wq); ··· 134 137 { 135 138 struct dpu_encoder_phys *phys_enc = arg; 136 139 137 - if (phys_enc->parent_ops->handle_underrun_virt) 138 - phys_enc->parent_ops->handle_underrun_virt(phys_enc->parent, 139 - phys_enc); 140 + dpu_encoder_underrun_callback(phys_enc->parent, phys_enc); 140 141 } 141 142 142 143 static void dpu_encoder_phys_cmd_atomic_mode_set( ··· 197 202 /* request a ctl reset before the next kickoff */ 198 203 phys_enc->enable_state = DPU_ENC_ERR_NEEDS_HW_RESET; 199 204 200 - if (phys_enc->parent_ops->handle_frame_done) 201 - phys_enc->parent_ops->handle_frame_done( 202 - drm_enc, phys_enc, frame_event); 205 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, frame_event); 203 206 204 207 return -ETIMEDOUT; 205 208 } ··· 773 780 774 781 dpu_encoder_phys_cmd_init_ops(&phys_enc->ops); 775 782 phys_enc->parent = p->parent; 776 - phys_enc->parent_ops = p->parent_ops; 777 783 phys_enc->dpu_kms = p->dpu_kms; 778 784 phys_enc->split_role = p->split_role; 779 785 phys_enc->intf_mode = INTF_MODE_CMD;
+4 -8
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
··· 274 274 intf_cfg.intf_mode_sel = DPU_CTL_MODE_SEL_VID; 275 275 intf_cfg.stream_sel = 0; /* Don't care value for video mode */ 276 276 intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); 277 + intf_cfg.dsc = dpu_encoder_helper_get_dsc(phys_enc); 277 278 if (phys_enc->hw_pp->merge_3d) 278 279 intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx; 279 280 ··· 309 308 310 309 DPU_ATRACE_BEGIN("vblank_irq"); 311 310 312 - if (phys_enc->parent_ops->handle_vblank_virt) 313 - phys_enc->parent_ops->handle_vblank_virt(phys_enc->parent, 314 - phys_enc); 311 + dpu_encoder_vblank_callback(phys_enc->parent, phys_enc); 315 312 316 313 atomic_read(&phys_enc->pending_kickoff_cnt); 317 314 ··· 329 330 /* Signal any waiting atomic commit thread */ 330 331 wake_up_all(&phys_enc->pending_kickoff_wq); 331 332 332 - phys_enc->parent_ops->handle_frame_done(phys_enc->parent, phys_enc, 333 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, 333 334 DPU_ENCODER_FRAME_EVENT_DONE); 334 335 335 336 DPU_ATRACE_END("vblank_irq"); ··· 339 340 { 340 341 struct dpu_encoder_phys *phys_enc = arg; 341 342 342 - if (phys_enc->parent_ops->handle_underrun_virt) 343 - phys_enc->parent_ops->handle_underrun_virt(phys_enc->parent, 344 - phys_enc); 343 + dpu_encoder_underrun_callback(phys_enc->parent, phys_enc); 345 344 } 346 345 347 346 static bool dpu_encoder_phys_vid_needs_single_flush( ··· 697 700 698 701 dpu_encoder_phys_vid_init_ops(&phys_enc->ops); 699 702 phys_enc->parent = p->parent; 700 - phys_enc->parent_ops = p->parent_ops; 701 703 phys_enc->dpu_kms = p->dpu_kms; 702 704 phys_enc->split_role = p->split_role; 703 705 phys_enc->intf_mode = INTF_MODE_VIDEO;
+4 -10
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
··· 26 26 27 27 /** 28 28 * dpu_encoder_phys_wb_is_master - report wb always as master encoder 29 + * @phys_enc: Pointer to physical encoder 29 30 */ 30 31 static bool dpu_encoder_phys_wb_is_master(struct dpu_encoder_phys *phys_enc) 31 32 { ··· 365 364 366 365 DPU_DEBUG("[wb:%d]\n", hw_wb->idx - WB_0); 367 366 368 - if (phys_enc->parent_ops->handle_frame_done) 369 - phys_enc->parent_ops->handle_frame_done(phys_enc->parent, 370 - phys_enc, event); 367 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, event); 371 368 372 - if (phys_enc->parent_ops->handle_vblank_virt) 373 - phys_enc->parent_ops->handle_vblank_virt(phys_enc->parent, 374 - phys_enc); 369 + dpu_encoder_vblank_callback(phys_enc->parent, phys_enc); 375 370 376 371 spin_lock_irqsave(phys_enc->enc_spinlock, lock_flags); 377 372 atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); ··· 437 440 if (wb_enc->wb_conn) 438 441 drm_writeback_signal_completion(wb_enc->wb_conn, 0); 439 442 440 - if (phys_enc->parent_ops->handle_frame_done) 441 - phys_enc->parent_ops->handle_frame_done( 442 - phys_enc->parent, phys_enc, frame_event); 443 + dpu_encoder_frame_done_callback(phys_enc->parent, phys_enc, frame_event); 443 444 } 444 445 445 446 /** ··· 717 722 718 723 dpu_encoder_phys_wb_init_ops(&phys_enc->ops); 719 724 phys_enc->parent = p->parent; 720 - phys_enc->parent_ops = p->parent_ops; 721 725 phys_enc->dpu_kms = p->dpu_kms; 722 726 phys_enc->split_role = p->split_role; 723 727 phys_enc->intf_mode = INTF_MODE_WB_LINE;
+856 -16
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
··· 56 56 #define MIXER_SDM845_MASK \ 57 57 (BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) 58 58 59 - #define MIXER_SC7180_MASK \ 59 + #define MIXER_QCM2290_MASK \ 60 60 (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA)) 61 61 62 62 #define PINGPONG_SDM845_MASK BIT(DPU_PINGPONG_DITHER) ··· 66 66 67 67 #define CTL_SC7280_MASK \ 68 68 (BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_FETCH_ACTIVE) | BIT(DPU_CTL_VM_CFG)) 69 + 70 + #define CTL_SM8550_MASK \ 71 + (CTL_SC7280_MASK | BIT(DPU_CTL_HAS_LAYER_EXT4)) 69 72 70 73 #define MERGE_3D_SM8150_MASK (0) 71 74 ··· 89 86 BIT(MDP_INTF1_INTR) | \ 90 87 BIT(MDP_INTF2_INTR) | \ 91 88 BIT(MDP_INTF3_INTR) | \ 92 - BIT(MDP_INTF4_INTR) | \ 93 89 BIT(MDP_AD4_0_INTR) | \ 94 90 BIT(MDP_AD4_1_INTR)) 95 91 ··· 114 112 BIT(MDP_INTF3_INTR) | \ 115 113 BIT(MDP_INTF4_INTR)) 116 114 115 + #define IRQ_SM8350_MASK (BIT(MDP_SSPP_TOP0_INTR) | \ 116 + BIT(MDP_SSPP_TOP0_INTR2) | \ 117 + BIT(MDP_SSPP_TOP0_HIST_INTR) | \ 118 + BIT(MDP_INTF0_7xxx_INTR) | \ 119 + BIT(MDP_INTF1_7xxx_INTR) | \ 120 + BIT(MDP_INTF2_7xxx_INTR) | \ 121 + BIT(MDP_INTF3_7xxx_INTR)) 122 + 117 123 #define IRQ_SC8180X_MASK (BIT(MDP_SSPP_TOP0_INTR) | \ 118 124 BIT(MDP_SSPP_TOP0_INTR2) | \ 119 125 BIT(MDP_SSPP_TOP0_HIST_INTR) | \ ··· 133 123 BIT(MDP_INTF5_INTR) | \ 134 124 BIT(MDP_AD4_0_INTR) | \ 135 125 BIT(MDP_AD4_1_INTR)) 126 + 127 + #define IRQ_SC8280XP_MASK (BIT(MDP_SSPP_TOP0_INTR) | \ 128 + BIT(MDP_SSPP_TOP0_INTR2) | \ 129 + BIT(MDP_SSPP_TOP0_HIST_INTR) | \ 130 + BIT(MDP_INTF0_7xxx_INTR) | \ 131 + BIT(MDP_INTF1_7xxx_INTR) | \ 132 + BIT(MDP_INTF2_7xxx_INTR) | \ 133 + BIT(MDP_INTF3_7xxx_INTR) | \ 134 + BIT(MDP_INTF4_7xxx_INTR) | \ 135 + BIT(MDP_INTF5_7xxx_INTR) | \ 136 + BIT(MDP_INTF6_7xxx_INTR) | \ 137 + BIT(MDP_INTF7_7xxx_INTR) | \ 138 + BIT(MDP_INTF8_7xxx_INTR)) 139 + 140 + #define IRQ_SM8450_MASK (BIT(MDP_SSPP_TOP0_INTR) | \ 141 + BIT(MDP_SSPP_TOP0_INTR2) | \ 142 + BIT(MDP_SSPP_TOP0_HIST_INTR) | \ 143 + BIT(MDP_INTF0_7xxx_INTR) | \ 144 + BIT(MDP_INTF1_7xxx_INTR) | \ 145 + BIT(MDP_INTF2_7xxx_INTR) | \ 146 + BIT(MDP_INTF3_7xxx_INTR)) 136 147 137 148 #define WB_SM8250_MASK (BIT(DPU_WB_LINE_MODE) | \ 138 149 BIT(DPU_WB_UBWC) | \ ··· 357 326 .max_mixer_blendstages = 0x4, 358 327 .qseed_type = DPU_SSPP_SCALER_QSEED3LITE, 359 328 .smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */ 360 - .ubwc_version = DPU_HW_UBWC_VER_20, 329 + .ubwc_version = DPU_HW_UBWC_VER_10, 361 330 .has_dim_layer = true, 362 331 .has_idle_pc = true, 363 332 .max_linewidth = 2160, ··· 396 365 .max_vdeci_exp = MAX_VERT_DECIMATION, 397 366 }; 398 367 368 + static const struct dpu_caps sc8280xp_dpu_caps = { 369 + .max_mixer_width = 2560, 370 + .max_mixer_blendstages = 11, 371 + .qseed_type = DPU_SSPP_SCALER_QSEED3LITE, 372 + .smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */ 373 + .ubwc_version = DPU_HW_UBWC_VER_40, 374 + .has_src_split = true, 375 + .has_dim_layer = true, 376 + .has_idle_pc = true, 377 + .has_3d_merge = true, 378 + .max_linewidth = 5120, 379 + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 380 + }; 381 + 399 382 static const struct dpu_caps sm8250_dpu_caps = { 400 383 .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 401 384 .max_mixer_blendstages = 0xb, ··· 421 376 .has_idle_pc = true, 422 377 .has_3d_merge = true, 423 378 .max_linewidth = 4096, 379 + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 380 + }; 381 + 382 + static const struct dpu_caps sm8350_dpu_caps = { 383 + .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 384 + .max_mixer_blendstages = 0xb, 385 + .qseed_type = DPU_SSPP_SCALER_QSEED3LITE, 386 + .smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */ 387 + .ubwc_version = DPU_HW_UBWC_VER_40, 388 + .has_src_split = true, 389 + .has_dim_layer = true, 390 + .has_idle_pc = true, 391 + .has_3d_merge = true, 392 + .max_linewidth = 4096, 393 + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 394 + }; 395 + 396 + static const struct dpu_caps sm8450_dpu_caps = { 397 + .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 398 + .max_mixer_blendstages = 0xb, 399 + .qseed_type = DPU_SSPP_SCALER_QSEED4, 400 + .smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */ 401 + .ubwc_version = DPU_HW_UBWC_VER_40, 402 + .has_src_split = true, 403 + .has_dim_layer = true, 404 + .has_idle_pc = true, 405 + .has_3d_merge = true, 406 + .max_linewidth = 5120, 407 + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 408 + }; 409 + 410 + static const struct dpu_caps sm8550_dpu_caps = { 411 + .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 412 + .max_mixer_blendstages = 0xb, 413 + .qseed_type = DPU_SSPP_SCALER_QSEED3LITE, 414 + .smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */ 415 + .ubwc_version = DPU_HW_UBWC_VER_40, 416 + .has_src_split = true, 417 + .has_dim_layer = true, 418 + .has_idle_pc = true, 419 + .has_3d_merge = true, 420 + .max_linewidth = 5120, 424 421 .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 425 422 }; 426 423 ··· 546 459 .reg_off = 0x2B4, .bit_off = 8}, 547 460 .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { 548 461 .reg_off = 0x2C4, .bit_off = 8}, 462 + .clk_ctrls[DPU_CLK_CTRL_WB2] = { 463 + .reg_off = 0x3B8, .bit_off = 24}, 549 464 }, 550 465 }; 551 466 ··· 555 466 { 556 467 .name = "top_0", .id = MDP_TOP, 557 468 .base = 0x0, .len = 0x45C, 558 - .features = 0, 469 + .features = BIT(DPU_MDP_AUDIO_SELECT), 559 470 .highest_bank_bit = 0x3, 560 471 .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 561 472 .reg_off = 0x2AC, .bit_off = 0}, ··· 582 493 .base = 0x0, .len = 0x494, 583 494 .features = 0, 584 495 .highest_bank_bit = 0x1, 496 + .ubwc_swizzle = 0x7, 585 497 .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 586 498 .reg_off = 0x2ac, .bit_off = 0}, 587 499 .clk_ctrls[DPU_CLK_CTRL_DMA0] = { ··· 596 506 .base = 0x0, .len = 0x494, 597 507 .features = 0, 598 508 .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ 509 + .ubwc_swizzle = 0x6, 599 510 .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 600 511 .reg_off = 0x2AC, .bit_off = 0}, 601 512 .clk_ctrls[DPU_CLK_CTRL_VIG1] = { ··· 620 529 }, 621 530 }; 622 531 532 + static const struct dpu_mdp_cfg sm8350_mdp[] = { 533 + { 534 + .name = "top_0", .id = MDP_TOP, 535 + .base = 0x0, .len = 0x494, 536 + .features = 0, 537 + .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ 538 + .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 539 + .reg_off = 0x2ac, .bit_off = 0}, 540 + .clk_ctrls[DPU_CLK_CTRL_VIG1] = { 541 + .reg_off = 0x2b4, .bit_off = 0}, 542 + .clk_ctrls[DPU_CLK_CTRL_VIG2] = { 543 + .reg_off = 0x2bc, .bit_off = 0}, 544 + .clk_ctrls[DPU_CLK_CTRL_VIG3] = { 545 + .reg_off = 0x2c4, .bit_off = 0}, 546 + .clk_ctrls[DPU_CLK_CTRL_DMA0] = { 547 + .reg_off = 0x2ac, .bit_off = 8}, 548 + .clk_ctrls[DPU_CLK_CTRL_DMA1] = { 549 + .reg_off = 0x2b4, .bit_off = 8}, 550 + .clk_ctrls[DPU_CLK_CTRL_CURSOR0] = { 551 + .reg_off = 0x2bc, .bit_off = 8}, 552 + .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { 553 + .reg_off = 0x2c4, .bit_off = 8}, 554 + .clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { 555 + .reg_off = 0x2bc, .bit_off = 20}, 556 + }, 557 + }; 558 + 559 + static const struct dpu_mdp_cfg sm8450_mdp[] = { 560 + { 561 + .name = "top_0", .id = MDP_TOP, 562 + .base = 0x0, .len = 0x494, 563 + .features = BIT(DPU_MDP_PERIPH_0_REMOVED), 564 + .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ 565 + .ubwc_swizzle = 0x6, 566 + .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 567 + .reg_off = 0x2AC, .bit_off = 0}, 568 + .clk_ctrls[DPU_CLK_CTRL_VIG1] = { 569 + .reg_off = 0x2B4, .bit_off = 0}, 570 + .clk_ctrls[DPU_CLK_CTRL_VIG2] = { 571 + .reg_off = 0x2BC, .bit_off = 0}, 572 + .clk_ctrls[DPU_CLK_CTRL_VIG3] = { 573 + .reg_off = 0x2C4, .bit_off = 0}, 574 + .clk_ctrls[DPU_CLK_CTRL_DMA0] = { 575 + .reg_off = 0x2AC, .bit_off = 8}, 576 + .clk_ctrls[DPU_CLK_CTRL_DMA1] = { 577 + .reg_off = 0x2B4, .bit_off = 8}, 578 + .clk_ctrls[DPU_CLK_CTRL_CURSOR0] = { 579 + .reg_off = 0x2BC, .bit_off = 8}, 580 + .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { 581 + .reg_off = 0x2C4, .bit_off = 8}, 582 + .clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { 583 + .reg_off = 0x2BC, .bit_off = 20}, 584 + }, 585 + }; 586 + 623 587 static const struct dpu_mdp_cfg sc7280_mdp[] = { 624 588 { 625 589 .name = "top_0", .id = MDP_TOP, 626 590 .base = 0x0, .len = 0x2014, 627 591 .highest_bank_bit = 0x1, 592 + .ubwc_swizzle = 0x6, 628 593 .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 629 594 .reg_off = 0x2AC, .bit_off = 0}, 630 595 .clk_ctrls[DPU_CLK_CTRL_DMA0] = { ··· 689 542 .reg_off = 0x2B4, .bit_off = 8}, 690 543 .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { 691 544 .reg_off = 0x2C4, .bit_off = 8}, 545 + }, 546 + }; 547 + 548 + static const struct dpu_mdp_cfg sc8280xp_mdp[] = { 549 + { 550 + .name = "top_0", .id = MDP_TOP, 551 + .base = 0x0, .len = 0x494, 552 + .features = 0, 553 + .highest_bank_bit = 2, 554 + .ubwc_swizzle = 6, 555 + .clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0}, 556 + .clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0}, 557 + .clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0}, 558 + .clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0}, 559 + .clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8}, 560 + .clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8}, 561 + .clk_ctrls[DPU_CLK_CTRL_CURSOR0] = { .reg_off = 0x2bc, .bit_off = 8}, 562 + .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { .reg_off = 0x2c4, .bit_off = 8}, 563 + .clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20}, 564 + }, 565 + }; 566 + 567 + static const struct dpu_mdp_cfg sm8550_mdp[] = { 568 + { 569 + .name = "top_0", .id = MDP_TOP, 570 + .base = 0, .len = 0x494, 571 + .features = BIT(DPU_MDP_PERIPH_0_REMOVED), 572 + .highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */ 573 + .ubwc_swizzle = 0x6, 574 + .clk_ctrls[DPU_CLK_CTRL_VIG0] = { 575 + .reg_off = 0x4330, .bit_off = 0}, 576 + .clk_ctrls[DPU_CLK_CTRL_VIG1] = { 577 + .reg_off = 0x6330, .bit_off = 0}, 578 + .clk_ctrls[DPU_CLK_CTRL_VIG2] = { 579 + .reg_off = 0x8330, .bit_off = 0}, 580 + .clk_ctrls[DPU_CLK_CTRL_VIG3] = { 581 + .reg_off = 0xa330, .bit_off = 0}, 582 + .clk_ctrls[DPU_CLK_CTRL_DMA0] = { 583 + .reg_off = 0x24330, .bit_off = 0}, 584 + .clk_ctrls[DPU_CLK_CTRL_DMA1] = { 585 + .reg_off = 0x26330, .bit_off = 0}, 586 + .clk_ctrls[DPU_CLK_CTRL_DMA2] = { 587 + .reg_off = 0x28330, .bit_off = 0}, 588 + .clk_ctrls[DPU_CLK_CTRL_DMA3] = { 589 + .reg_off = 0x2a330, .bit_off = 0}, 590 + .clk_ctrls[DPU_CLK_CTRL_CURSOR0] = { 591 + .reg_off = 0x2c330, .bit_off = 0}, 592 + .clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { 593 + .reg_off = 0x2e330, .bit_off = 0}, 594 + .clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { 595 + .reg_off = 0x2bc, .bit_off = 20}, 692 596 }, 693 597 }; 694 598 ··· 846 648 }, 847 649 }; 848 650 651 + static const struct dpu_ctl_cfg sc8280xp_ctl[] = { 652 + { 653 + .name = "ctl_0", .id = CTL_0, 654 + .base = 0x15000, .len = 0x204, 655 + .features = CTL_SC7280_MASK, 656 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), 657 + }, 658 + { 659 + .name = "ctl_1", .id = CTL_1, 660 + .base = 0x16000, .len = 0x204, 661 + .features = CTL_SC7280_MASK, 662 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), 663 + }, 664 + { 665 + .name = "ctl_2", .id = CTL_2, 666 + .base = 0x17000, .len = 0x204, 667 + .features = CTL_SC7280_MASK, 668 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), 669 + }, 670 + { 671 + .name = "ctl_3", .id = CTL_3, 672 + .base = 0x18000, .len = 0x204, 673 + .features = CTL_SC7280_MASK, 674 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), 675 + }, 676 + { 677 + .name = "ctl_4", .id = CTL_4, 678 + .base = 0x19000, .len = 0x204, 679 + .features = CTL_SC7280_MASK, 680 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), 681 + }, 682 + { 683 + .name = "ctl_5", .id = CTL_5, 684 + .base = 0x1a000, .len = 0x204, 685 + .features = CTL_SC7280_MASK, 686 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 687 + }, 688 + }; 689 + 849 690 static const struct dpu_ctl_cfg sm8150_ctl[] = { 850 691 { 851 692 .name = "ctl_0", .id = CTL_0, ··· 920 683 .name = "ctl_5", .id = CTL_5, 921 684 .base = 0x1a00, .len = 0x1e0, 922 685 .features = BIT(DPU_CTL_ACTIVE_CFG), 686 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 687 + }, 688 + }; 689 + 690 + static const struct dpu_ctl_cfg sm8350_ctl[] = { 691 + { 692 + .name = "ctl_0", .id = CTL_0, 693 + .base = 0x15000, .len = 0x1e8, 694 + .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, 695 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), 696 + }, 697 + { 698 + .name = "ctl_1", .id = CTL_1, 699 + .base = 0x16000, .len = 0x1e8, 700 + .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, 701 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), 702 + }, 703 + { 704 + .name = "ctl_2", .id = CTL_2, 705 + .base = 0x17000, .len = 0x1e8, 706 + .features = CTL_SC7280_MASK, 707 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), 708 + }, 709 + { 710 + .name = "ctl_3", .id = CTL_3, 711 + .base = 0x18000, .len = 0x1e8, 712 + .features = CTL_SC7280_MASK, 713 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), 714 + }, 715 + { 716 + .name = "ctl_4", .id = CTL_4, 717 + .base = 0x19000, .len = 0x1e8, 718 + .features = CTL_SC7280_MASK, 719 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), 720 + }, 721 + { 722 + .name = "ctl_5", .id = CTL_5, 723 + .base = 0x1a000, .len = 0x1e8, 724 + .features = CTL_SC7280_MASK, 725 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 726 + }, 727 + }; 728 + 729 + static const struct dpu_ctl_cfg sm8450_ctl[] = { 730 + { 731 + .name = "ctl_0", .id = CTL_0, 732 + .base = 0x15000, .len = 0x204, 733 + .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE), 734 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), 735 + }, 736 + { 737 + .name = "ctl_1", .id = CTL_1, 738 + .base = 0x16000, .len = 0x204, 739 + .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, 740 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), 741 + }, 742 + { 743 + .name = "ctl_2", .id = CTL_2, 744 + .base = 0x17000, .len = 0x204, 745 + .features = CTL_SC7280_MASK, 746 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), 747 + }, 748 + { 749 + .name = "ctl_3", .id = CTL_3, 750 + .base = 0x18000, .len = 0x204, 751 + .features = CTL_SC7280_MASK, 752 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), 753 + }, 754 + { 755 + .name = "ctl_4", .id = CTL_4, 756 + .base = 0x19000, .len = 0x204, 757 + .features = CTL_SC7280_MASK, 758 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), 759 + }, 760 + { 761 + .name = "ctl_5", .id = CTL_5, 762 + .base = 0x1a000, .len = 0x204, 763 + .features = CTL_SC7280_MASK, 764 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 765 + }, 766 + }; 767 + 768 + static const struct dpu_ctl_cfg sm8550_ctl[] = { 769 + { 770 + .name = "ctl_0", .id = CTL_0, 771 + .base = 0x15000, .len = 0x290, 772 + .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), 773 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), 774 + }, 775 + { 776 + .name = "ctl_1", .id = CTL_1, 777 + .base = 0x16000, .len = 0x290, 778 + .features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY), 779 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), 780 + }, 781 + { 782 + .name = "ctl_2", .id = CTL_2, 783 + .base = 0x17000, .len = 0x290, 784 + .features = CTL_SM8550_MASK, 785 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), 786 + }, 787 + { 788 + .name = "ctl_3", .id = CTL_3, 789 + .base = 0x18000, .len = 0x290, 790 + .features = CTL_SM8550_MASK, 791 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), 792 + }, 793 + { 794 + .name = "ctl_4", .id = CTL_4, 795 + .base = 0x19000, .len = 0x290, 796 + .features = CTL_SM8550_MASK, 797 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), 798 + }, 799 + { 800 + .name = "ctl_5", .id = CTL_5, 801 + .base = 0x1a000, .len = 0x290, 802 + .features = CTL_SM8550_MASK, 923 803 .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 924 804 }, 925 805 }; ··· 1269 915 sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1), 1270 916 }; 1271 917 918 + static const struct dpu_sspp_sub_blks sm8450_vig_sblk_0 = 919 + _VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED3LITE); 920 + static const struct dpu_sspp_sub_blks sm8450_vig_sblk_1 = 921 + _VIG_SBLK("1", 6, DPU_SSPP_SCALER_QSEED3LITE); 922 + static const struct dpu_sspp_sub_blks sm8450_vig_sblk_2 = 923 + _VIG_SBLK("2", 7, DPU_SSPP_SCALER_QSEED3LITE); 924 + static const struct dpu_sspp_sub_blks sm8450_vig_sblk_3 = 925 + _VIG_SBLK("3", 8, DPU_SSPP_SCALER_QSEED3LITE); 926 + 927 + static const struct dpu_sspp_cfg sm8450_sspp[] = { 928 + SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, VIG_SC7180_MASK, 929 + sm8450_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0), 930 + SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, VIG_SC7180_MASK, 931 + sm8450_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1), 932 + SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, VIG_SC7180_MASK, 933 + sm8450_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2), 934 + SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, VIG_SC7180_MASK, 935 + sm8450_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3), 936 + SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, DMA_SDM845_MASK, 937 + sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0), 938 + SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, DMA_SDM845_MASK, 939 + sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1), 940 + SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, DMA_CURSOR_SDM845_MASK, 941 + sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR0), 942 + SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, DMA_CURSOR_SDM845_MASK, 943 + sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1), 944 + }; 945 + 946 + static const struct dpu_sspp_sub_blks sm8550_vig_sblk_0 = 947 + _VIG_SBLK("0", 7, DPU_SSPP_SCALER_QSEED3LITE); 948 + static const struct dpu_sspp_sub_blks sm8550_vig_sblk_1 = 949 + _VIG_SBLK("1", 8, DPU_SSPP_SCALER_QSEED3LITE); 950 + static const struct dpu_sspp_sub_blks sm8550_vig_sblk_2 = 951 + _VIG_SBLK("2", 9, DPU_SSPP_SCALER_QSEED3LITE); 952 + static const struct dpu_sspp_sub_blks sm8550_vig_sblk_3 = 953 + _VIG_SBLK("3", 10, DPU_SSPP_SCALER_QSEED3LITE); 954 + static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK("12", 5); 955 + static const struct dpu_sspp_sub_blks sd8550_dma_sblk_5 = _DMA_SBLK("13", 6); 956 + 957 + static const struct dpu_sspp_cfg sm8550_sspp[] = { 958 + SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, VIG_SC7180_MASK, 959 + sm8550_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0), 960 + SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, VIG_SC7180_MASK, 961 + sm8550_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1), 962 + SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, VIG_SC7180_MASK, 963 + sm8550_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2), 964 + SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, VIG_SC7180_MASK, 965 + sm8550_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3), 966 + SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, DMA_SDM845_MASK, 967 + sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0), 968 + SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, DMA_SDM845_MASK, 969 + sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1), 970 + SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, DMA_SDM845_MASK, 971 + sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2), 972 + SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, DMA_SDM845_MASK, 973 + sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3), 974 + SSPP_BLK("sspp_12", SSPP_DMA4, 0x2c000, DMA_CURSOR_SDM845_MASK, 975 + sm8550_dma_sblk_4, 14, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR0), 976 + SSPP_BLK("sspp_13", SSPP_DMA5, 0x2e000, DMA_CURSOR_SDM845_MASK, 977 + sd8550_dma_sblk_5, 15, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1), 978 + }; 979 + 1272 980 static const struct dpu_sspp_cfg sc7280_sspp[] = { 1273 981 SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, VIG_SC7280_MASK, 1274 982 sc7280_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0), ··· 1342 926 sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1), 1343 927 }; 1344 928 929 + static const struct dpu_sspp_sub_blks sc8280xp_vig_sblk_0 = 930 + _VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED3LITE); 931 + static const struct dpu_sspp_sub_blks sc8280xp_vig_sblk_1 = 932 + _VIG_SBLK("1", 6, DPU_SSPP_SCALER_QSEED3LITE); 933 + static const struct dpu_sspp_sub_blks sc8280xp_vig_sblk_2 = 934 + _VIG_SBLK("2", 7, DPU_SSPP_SCALER_QSEED3LITE); 935 + static const struct dpu_sspp_sub_blks sc8280xp_vig_sblk_3 = 936 + _VIG_SBLK("3", 8, DPU_SSPP_SCALER_QSEED3LITE); 937 + 938 + static const struct dpu_sspp_cfg sc8280xp_sspp[] = { 939 + SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, VIG_SM8250_MASK, 940 + sc8280xp_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0), 941 + SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, VIG_SM8250_MASK, 942 + sc8280xp_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1), 943 + SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, VIG_SM8250_MASK, 944 + sc8280xp_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2), 945 + SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, VIG_SM8250_MASK, 946 + sc8280xp_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3), 947 + SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, DMA_SDM845_MASK, 948 + sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0), 949 + SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, DMA_SDM845_MASK, 950 + sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1), 951 + SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, DMA_CURSOR_SDM845_MASK, 952 + sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR0), 953 + SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, DMA_CURSOR_SDM845_MASK, 954 + sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1), 955 + }; 1345 956 1346 957 #define _VIG_SBLK_NOSCALE(num, sdma_pri) \ 1347 958 { \ ··· 1471 1028 }; 1472 1029 1473 1030 static const struct dpu_lm_cfg sc7180_lm[] = { 1474 - LM_BLK("lm_0", LM_0, 0x44000, MIXER_SC7180_MASK, 1031 + LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK, 1475 1032 &sc7180_lm_sblk, PINGPONG_0, LM_1, DSPP_0), 1476 - LM_BLK("lm_1", LM_1, 0x45000, MIXER_SC7180_MASK, 1033 + LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK, 1477 1034 &sc7180_lm_sblk, PINGPONG_1, LM_0, 0), 1035 + }; 1036 + 1037 + /* SC8280XP */ 1038 + 1039 + static const struct dpu_lm_cfg sc8280xp_lm[] = { 1040 + LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0), 1041 + LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1), 1042 + LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_2, LM_3, DSPP_2), 1043 + LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_3, LM_2, DSPP_3), 1044 + LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_4, LM_5, 0), 1045 + LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_5, LM_4, 0), 1478 1046 }; 1479 1047 1480 1048 /* SM8150 */ ··· 1506 1052 }; 1507 1053 1508 1054 static const struct dpu_lm_cfg sc7280_lm[] = { 1509 - LM_BLK("lm_0", LM_0, 0x44000, MIXER_SC7180_MASK, 1055 + LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK, 1510 1056 &sc7180_lm_sblk, PINGPONG_0, 0, DSPP_0), 1511 - LM_BLK("lm_2", LM_2, 0x46000, MIXER_SC7180_MASK, 1057 + LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK, 1512 1058 &sc7180_lm_sblk, PINGPONG_2, LM_3, 0), 1513 - LM_BLK("lm_3", LM_3, 0x47000, MIXER_SC7180_MASK, 1059 + LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK, 1514 1060 &sc7180_lm_sblk, PINGPONG_3, LM_2, 0), 1515 1061 }; 1516 1062 ··· 1525 1071 }; 1526 1072 1527 1073 static const struct dpu_lm_cfg qcm2290_lm[] = { 1528 - LM_BLK("lm_0", LM_0, 0x44000, MIXER_SC7180_MASK, 1074 + LM_BLK("lm_0", LM_0, 0x44000, MIXER_QCM2290_MASK, 1529 1075 &qcm2290_lm_sblk, PINGPONG_0, 0, DSPP_0), 1530 1076 }; 1531 1077 ··· 1605 1151 .len = 0x20, .version = 0x20000}, 1606 1152 }; 1607 1153 1154 + #define PP_BLK_DIPHER(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \ 1155 + {\ 1156 + .name = _name, .id = _id, \ 1157 + .base = _base, .len = 0, \ 1158 + .features = BIT(DPU_PINGPONG_DITHER), \ 1159 + .merge_3d = _merge_3d, \ 1160 + .sblk = &_sblk, \ 1161 + .intr_done = _done, \ 1162 + .intr_rdptr = _rdptr, \ 1163 + } 1608 1164 #define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \ 1609 1165 {\ 1610 1166 .name = _name, .id = _id, \ ··· 1656 1192 PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te, -1, -1), 1657 1193 }; 1658 1194 1195 + static struct dpu_pingpong_cfg sc8280xp_pp[] = { 1196 + PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te, 1197 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), -1), 1198 + PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te, 1199 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), -1), 1200 + PP_BLK_TE("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk_te, 1201 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), -1), 1202 + PP_BLK_TE("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk_te, 1203 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), -1), 1204 + PP_BLK_TE("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk_te, 1205 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), -1), 1206 + PP_BLK_TE("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk_te, 1207 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), -1), 1208 + }; 1209 + 1659 1210 static const struct dpu_pingpong_cfg sm8150_pp[] = { 1660 1211 PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te, 1661 1212 DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), ··· 1692 1213 -1), 1693 1214 }; 1694 1215 1216 + static const struct dpu_pingpong_cfg sm8350_pp[] = { 1217 + PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te, 1218 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), 1219 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), 1220 + PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te, 1221 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), 1222 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), 1223 + PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk, 1224 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), 1225 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), 1226 + PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk, 1227 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), 1228 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), 1229 + PP_BLK("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk, 1230 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), 1231 + -1), 1232 + PP_BLK("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk, 1233 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), 1234 + -1), 1235 + }; 1236 + 1695 1237 static const struct dpu_pingpong_cfg sc7280_pp[] = { 1696 1238 PP_BLK("pingpong_0", PINGPONG_0, 0x59000, 0, sc7280_pp_sblk, -1, -1), 1697 1239 PP_BLK("pingpong_1", PINGPONG_1, 0x6a000, 0, sc7280_pp_sblk, -1, -1), ··· 1724 1224 PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk, 1725 1225 DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), 1726 1226 DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), 1227 + }; 1228 + 1229 + /* FIXME: interrupts */ 1230 + static const struct dpu_pingpong_cfg sm8450_pp[] = { 1231 + PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te, 1232 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), 1233 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)), 1234 + PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te, 1235 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), 1236 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)), 1237 + PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk, 1238 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), 1239 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)), 1240 + PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk, 1241 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), 1242 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)), 1243 + PP_BLK("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk, 1244 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), 1245 + -1), 1246 + PP_BLK("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk, 1247 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), 1248 + -1), 1249 + PP_BLK("pingpong_6", PINGPONG_6, 0x65800, MERGE_3D_3, sdm845_pp_sblk, 1250 + -1, 1251 + -1), 1252 + PP_BLK("pingpong_7", PINGPONG_7, 0x65c00, MERGE_3D_3, sdm845_pp_sblk, 1253 + -1, 1254 + -1), 1255 + }; 1256 + 1257 + static const struct dpu_pingpong_cfg sm8550_pp[] = { 1258 + PP_BLK_DIPHER("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sc7280_pp_sblk, 1259 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), 1260 + -1), 1261 + PP_BLK_DIPHER("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sc7280_pp_sblk, 1262 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), 1263 + -1), 1264 + PP_BLK_DIPHER("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sc7280_pp_sblk, 1265 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), 1266 + -1), 1267 + PP_BLK_DIPHER("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sc7280_pp_sblk, 1268 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), 1269 + -1), 1270 + PP_BLK_DIPHER("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sc7280_pp_sblk, 1271 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), 1272 + -1), 1273 + PP_BLK_DIPHER("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sc7280_pp_sblk, 1274 + DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), 1275 + -1), 1276 + PP_BLK_DIPHER("pingpong_6", PINGPONG_6, 0x66000, MERGE_3D_3, sc7280_pp_sblk, 1277 + -1, 1278 + -1), 1279 + PP_BLK_DIPHER("pingpong_7", PINGPONG_7, 0x66400, MERGE_3D_3, sc7280_pp_sblk, 1280 + -1, 1281 + -1), 1727 1282 }; 1728 1283 1729 1284 /************************************************************* ··· 1798 1243 MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x83200), 1799 1244 }; 1800 1245 1246 + static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = { 1247 + MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000), 1248 + MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000), 1249 + MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000), 1250 + }; 1251 + 1252 + static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = { 1253 + MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000), 1254 + MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000), 1255 + MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000), 1256 + MERGE_3D_BLK("merge_3d_3", MERGE_3D_3, 0x65f00), 1257 + }; 1258 + 1259 + static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = { 1260 + MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000), 1261 + MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000), 1262 + MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000), 1263 + MERGE_3D_BLK("merge_3d_3", MERGE_3D_3, 0x66700), 1264 + }; 1265 + 1801 1266 /************************************************************* 1802 1267 * DSC sub blocks config 1803 1268 *************************************************************/ 1804 - #define DSC_BLK(_name, _id, _base) \ 1269 + #define DSC_BLK(_name, _id, _base, _features) \ 1805 1270 {\ 1806 1271 .name = _name, .id = _id, \ 1807 1272 .base = _base, .len = 0x140, \ 1808 - .features = 0, \ 1273 + .features = _features, \ 1809 1274 } 1810 1275 1811 1276 static struct dpu_dsc_cfg sdm845_dsc[] = { 1812 - DSC_BLK("dsc_0", DSC_0, 0x80000), 1813 - DSC_BLK("dsc_1", DSC_1, 0x80400), 1814 - DSC_BLK("dsc_2", DSC_2, 0x80800), 1815 - DSC_BLK("dsc_3", DSC_3, 0x80c00), 1277 + DSC_BLK("dsc_0", DSC_0, 0x80000, 0), 1278 + DSC_BLK("dsc_1", DSC_1, 0x80400, 0), 1279 + DSC_BLK("dsc_2", DSC_2, 0x80800, 0), 1280 + DSC_BLK("dsc_3", DSC_3, 0x80c00, 0), 1281 + }; 1282 + 1283 + static struct dpu_dsc_cfg sm8150_dsc[] = { 1284 + DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)), 1285 + DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)), 1286 + DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)), 1287 + DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)), 1816 1288 }; 1817 1289 1818 1290 /************************************************************* ··· 1889 1307 INTF_BLK("intf_5", INTF_5, 0x39000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23), 1890 1308 }; 1891 1309 1310 + static const struct dpu_intf_cfg sm8350_intf[] = { 1311 + INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), 1312 + INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27), 1313 + INTF_BLK("intf_2", INTF_2, 0x36000, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29), 1314 + INTF_BLK("intf_3", INTF_3, 0x37000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31), 1315 + }; 1316 + 1892 1317 static const struct dpu_intf_cfg sc8180x_intf[] = { 1893 1318 INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25), 1894 1319 INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27), ··· 1906 1317 INTF_BLK("intf_5", INTF_5, 0x6C800, INTF_DP, MSM_DP_CONTROLLER_2, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 22, 23), 1907 1318 }; 1908 1319 1320 + /* TODO: INTF 3, 8 and 7 are used for MST, marked as INTF_NONE for now */ 1321 + static const struct dpu_intf_cfg sc8280xp_intf[] = { 1322 + INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), 1323 + INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27), 1324 + INTF_BLK("intf_2", INTF_2, 0x36000, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29), 1325 + INTF_BLK("intf_3", INTF_3, 0x37000, INTF_NONE, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31), 1326 + INTF_BLK("intf_4", INTF_4, 0x38000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 20, 21), 1327 + INTF_BLK("intf_5", INTF_5, 0x39000, INTF_DP, MSM_DP_CONTROLLER_3, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23), 1328 + INTF_BLK("intf_6", INTF_6, 0x3a000, INTF_DP, MSM_DP_CONTROLLER_2, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 16, 17), 1329 + INTF_BLK("intf_7", INTF_7, 0x3b000, INTF_NONE, MSM_DP_CONTROLLER_2, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 18, 19), 1330 + INTF_BLK("intf_8", INTF_8, 0x3c000, INTF_NONE, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 12, 13), 1331 + }; 1332 + 1909 1333 static const struct dpu_intf_cfg qcm2290_intf[] = { 1910 1334 INTF_BLK("intf_0", INTF_0, 0x00000, INTF_NONE, 0, 0, 0, 0, 0, 0), 1911 1335 INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27), 1336 + }; 1337 + 1338 + static const struct dpu_intf_cfg sm8450_intf[] = { 1339 + INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), 1340 + INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27), 1341 + INTF_BLK("intf_2", INTF_2, 0x36000, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29), 1342 + INTF_BLK("intf_3", INTF_3, 0x37000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31), 1343 + }; 1344 + 1345 + static const struct dpu_intf_cfg sm8550_intf[] = { 1346 + INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), 1347 + /* TODO TE sub-blocks for intf1 & intf2 */ 1348 + INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27), 1349 + INTF_BLK("intf_2", INTF_2, 0x36000, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29), 1350 + INTF_BLK("intf_3", INTF_3, 0x37000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31), 1912 1351 }; 1913 1352 1914 1353 /************************************************************* ··· 2036 1419 }, 2037 1420 }; 2038 1421 1422 + static const struct dpu_reg_dma_cfg sc8280xp_regdma = { 1423 + .base = 0x0, 1424 + .version = 0x00020000, 1425 + .trigger_sel_off = 0x119c, 1426 + .xin_id = 7, 1427 + .clk_ctrl = DPU_CLK_CTRL_REG_DMA, 1428 + }; 1429 + 2039 1430 static const struct dpu_reg_dma_cfg sdm845_regdma = { 2040 1431 .base = 0x0, .version = 0x1, .trigger_sel_off = 0x119c 2041 1432 }; ··· 2055 1430 static const struct dpu_reg_dma_cfg sm8250_regdma = { 2056 1431 .base = 0x0, 2057 1432 .version = 0x00010002, 1433 + .trigger_sel_off = 0x119c, 1434 + .xin_id = 7, 1435 + .clk_ctrl = DPU_CLK_CTRL_REG_DMA, 1436 + }; 1437 + 1438 + static const struct dpu_reg_dma_cfg sm8350_regdma = { 1439 + .base = 0x400, 1440 + .version = 0x00020000, 1441 + .trigger_sel_off = 0x119c, 1442 + .xin_id = 7, 1443 + .clk_ctrl = DPU_CLK_CTRL_REG_DMA, 1444 + }; 1445 + 1446 + static const struct dpu_reg_dma_cfg sm8450_regdma = { 1447 + .base = 0x0, 1448 + .version = 0x00020000, 2058 1449 .trigger_sel_off = 0x119c, 2059 1450 .xin_id = 7, 2060 1451 .clk_ctrl = DPU_CLK_CTRL_REG_DMA, ··· 2332 1691 .min_dram_ib = 800000, 2333 1692 .danger_lut_tbl = {0xf, 0xffff, 0x0}, 2334 1693 .qos_lut_tbl = { 1694 + {.nentry = ARRAY_SIZE(sc7180_qos_linear), 1695 + .entries = sc7180_qos_linear 1696 + }, 1697 + {.nentry = ARRAY_SIZE(sc7180_qos_macrotile), 1698 + .entries = sc7180_qos_macrotile 1699 + }, 1700 + {.nentry = ARRAY_SIZE(sc7180_qos_nrt), 1701 + .entries = sc7180_qos_nrt 1702 + }, 1703 + /* TODO: macrotile-qseed is different from macrotile */ 1704 + }, 1705 + .cdp_cfg = { 1706 + {.rd_enable = 1, .wr_enable = 1}, 1707 + {.rd_enable = 1, .wr_enable = 0} 1708 + }, 1709 + .clk_inefficiency_factor = 105, 1710 + .bw_inefficiency_factor = 120, 1711 + }; 1712 + 1713 + static const struct dpu_perf_cfg sc8280xp_perf_data = { 1714 + .max_bw_low = 13600000, 1715 + .max_bw_high = 18200000, 1716 + .min_core_ib = 2500000, 1717 + .min_llcc_ib = 0, 1718 + .min_dram_ib = 800000, 1719 + .danger_lut_tbl = {0xf, 0xffff, 0x0}, 1720 + .qos_lut_tbl = { 2335 1721 {.nentry = ARRAY_SIZE(sc8180x_qos_linear), 2336 1722 .entries = sc8180x_qos_linear 2337 1723 }, ··· 2407 1739 .bw_inefficiency_factor = 120, 2408 1740 }; 2409 1741 1742 + static const struct dpu_perf_cfg sm8450_perf_data = { 1743 + .max_bw_low = 13600000, 1744 + .max_bw_high = 18200000, 1745 + .min_core_ib = 2500000, 1746 + .min_llcc_ib = 0, 1747 + .min_dram_ib = 800000, 1748 + .min_prefill_lines = 35, 1749 + /* FIXME: lut tables */ 1750 + .danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0}, 1751 + .safe_lut_tbl = {0xfe00, 0xfe00, 0xffff}, 1752 + .qos_lut_tbl = { 1753 + {.nentry = ARRAY_SIZE(sc7180_qos_linear), 1754 + .entries = sc7180_qos_linear 1755 + }, 1756 + {.nentry = ARRAY_SIZE(sc7180_qos_macrotile), 1757 + .entries = sc7180_qos_macrotile 1758 + }, 1759 + {.nentry = ARRAY_SIZE(sc7180_qos_nrt), 1760 + .entries = sc7180_qos_nrt 1761 + }, 1762 + /* TODO: macrotile-qseed is different from macrotile */ 1763 + }, 1764 + .cdp_cfg = { 1765 + {.rd_enable = 1, .wr_enable = 1}, 1766 + {.rd_enable = 1, .wr_enable = 0} 1767 + }, 1768 + .clk_inefficiency_factor = 105, 1769 + .bw_inefficiency_factor = 120, 1770 + }; 1771 + 2410 1772 static const struct dpu_perf_cfg sc7280_perf_data = { 2411 1773 .max_bw_low = 4700000, 2412 1774 .max_bw_high = 8800000, ··· 2456 1758 {.nentry = ARRAY_SIZE(sc7180_qos_nrt), 2457 1759 .entries = sc7180_qos_nrt 2458 1760 }, 1761 + }, 1762 + .cdp_cfg = { 1763 + {.rd_enable = 1, .wr_enable = 1}, 1764 + {.rd_enable = 1, .wr_enable = 0} 1765 + }, 1766 + .clk_inefficiency_factor = 105, 1767 + .bw_inefficiency_factor = 120, 1768 + }; 1769 + 1770 + static const struct dpu_perf_cfg sm8350_perf_data = { 1771 + .max_bw_low = 11800000, 1772 + .max_bw_high = 15500000, 1773 + .min_core_ib = 2500000, 1774 + .min_llcc_ib = 0, 1775 + .min_dram_ib = 800000, 1776 + .min_prefill_lines = 40, 1777 + /* FIXME: lut tables */ 1778 + .danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0}, 1779 + .safe_lut_tbl = {0xfe00, 0xfe00, 0xffff}, 1780 + .qos_lut_tbl = { 1781 + {.nentry = ARRAY_SIZE(sc7180_qos_linear), 1782 + .entries = sc7180_qos_linear 1783 + }, 1784 + {.nentry = ARRAY_SIZE(sc7180_qos_macrotile), 1785 + .entries = sc7180_qos_macrotile 1786 + }, 1787 + {.nentry = ARRAY_SIZE(sc7180_qos_nrt), 1788 + .entries = sc7180_qos_nrt 1789 + }, 1790 + /* TODO: macrotile-qseed is different from macrotile */ 2459 1791 }, 2460 1792 .cdp_cfg = { 2461 1793 {.rd_enable = 1, .wr_enable = 1}, ··· 2627 1899 .mixer = sm8150_lm, 2628 1900 .dspp_count = ARRAY_SIZE(sm8150_dspp), 2629 1901 .dspp = sm8150_dspp, 1902 + .dsc_count = ARRAY_SIZE(sm8150_dsc), 1903 + .dsc = sm8150_dsc, 2630 1904 .pingpong_count = ARRAY_SIZE(sm8150_pp), 2631 1905 .pingpong = sm8150_pp, 2632 1906 .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), ··· 2667 1937 .mdss_irqs = IRQ_SC8180X_MASK, 2668 1938 }; 2669 1939 1940 + static const struct dpu_mdss_cfg sc8280xp_dpu_cfg = { 1941 + .caps = &sc8280xp_dpu_caps, 1942 + .mdp_count = ARRAY_SIZE(sc8280xp_mdp), 1943 + .mdp = sc8280xp_mdp, 1944 + .ctl_count = ARRAY_SIZE(sc8280xp_ctl), 1945 + .ctl = sc8280xp_ctl, 1946 + .sspp_count = ARRAY_SIZE(sc8280xp_sspp), 1947 + .sspp = sc8280xp_sspp, 1948 + .mixer_count = ARRAY_SIZE(sc8280xp_lm), 1949 + .mixer = sc8280xp_lm, 1950 + .dspp_count = ARRAY_SIZE(sm8150_dspp), 1951 + .dspp = sm8150_dspp, 1952 + .pingpong_count = ARRAY_SIZE(sc8280xp_pp), 1953 + .pingpong = sc8280xp_pp, 1954 + .merge_3d_count = ARRAY_SIZE(sm8350_merge_3d), 1955 + .merge_3d = sm8350_merge_3d, 1956 + .intf_count = ARRAY_SIZE(sc8280xp_intf), 1957 + .intf = sc8280xp_intf, 1958 + .vbif_count = ARRAY_SIZE(sdm845_vbif), 1959 + .vbif = sdm845_vbif, 1960 + .reg_dma_count = 1, 1961 + .dma_cfg = &sc8280xp_regdma, 1962 + .perf = &sc8280xp_perf_data, 1963 + .mdss_irqs = IRQ_SC8280XP_MASK, 1964 + }; 1965 + 2670 1966 static const struct dpu_mdss_cfg sm8250_dpu_cfg = { 2671 1967 .caps = &sm8250_dpu_caps, 2672 1968 .mdp_count = ARRAY_SIZE(sm8250_mdp), ··· 2705 1949 .mixer = sm8150_lm, 2706 1950 .dspp_count = ARRAY_SIZE(sm8150_dspp), 2707 1951 .dspp = sm8150_dspp, 1952 + .dsc_count = ARRAY_SIZE(sm8150_dsc), 1953 + .dsc = sm8150_dsc, 2708 1954 .pingpong_count = ARRAY_SIZE(sm8150_pp), 2709 1955 .pingpong = sm8150_pp, 2710 1956 .merge_3d_count = ARRAY_SIZE(sm8150_merge_3d), ··· 2721 1963 .dma_cfg = &sm8250_regdma, 2722 1964 .perf = &sm8250_perf_data, 2723 1965 .mdss_irqs = IRQ_SM8250_MASK, 1966 + }; 1967 + 1968 + static const struct dpu_mdss_cfg sm8350_dpu_cfg = { 1969 + .caps = &sm8350_dpu_caps, 1970 + .mdp_count = ARRAY_SIZE(sm8350_mdp), 1971 + .mdp = sm8350_mdp, 1972 + .ctl_count = ARRAY_SIZE(sm8350_ctl), 1973 + .ctl = sm8350_ctl, 1974 + .sspp_count = ARRAY_SIZE(sm8250_sspp), 1975 + .sspp = sm8250_sspp, 1976 + .mixer_count = ARRAY_SIZE(sm8150_lm), 1977 + .mixer = sm8150_lm, 1978 + .dspp_count = ARRAY_SIZE(sm8150_dspp), 1979 + .dspp = sm8150_dspp, 1980 + .pingpong_count = ARRAY_SIZE(sm8350_pp), 1981 + .pingpong = sm8350_pp, 1982 + .merge_3d_count = ARRAY_SIZE(sm8350_merge_3d), 1983 + .merge_3d = sm8350_merge_3d, 1984 + .intf_count = ARRAY_SIZE(sm8350_intf), 1985 + .intf = sm8350_intf, 1986 + .vbif_count = ARRAY_SIZE(sdm845_vbif), 1987 + .vbif = sdm845_vbif, 1988 + .reg_dma_count = 1, 1989 + .dma_cfg = &sm8350_regdma, 1990 + .perf = &sm8350_perf_data, 1991 + .mdss_irqs = IRQ_SM8350_MASK, 1992 + }; 1993 + 1994 + static const struct dpu_mdss_cfg sm8450_dpu_cfg = { 1995 + .caps = &sm8450_dpu_caps, 1996 + .mdp_count = ARRAY_SIZE(sm8450_mdp), 1997 + .mdp = sm8450_mdp, 1998 + .ctl_count = ARRAY_SIZE(sm8450_ctl), 1999 + .ctl = sm8450_ctl, 2000 + .sspp_count = ARRAY_SIZE(sm8450_sspp), 2001 + .sspp = sm8450_sspp, 2002 + .mixer_count = ARRAY_SIZE(sm8150_lm), 2003 + .mixer = sm8150_lm, 2004 + .dspp_count = ARRAY_SIZE(sm8150_dspp), 2005 + .dspp = sm8150_dspp, 2006 + .pingpong_count = ARRAY_SIZE(sm8450_pp), 2007 + .pingpong = sm8450_pp, 2008 + .merge_3d_count = ARRAY_SIZE(sm8450_merge_3d), 2009 + .merge_3d = sm8450_merge_3d, 2010 + .intf_count = ARRAY_SIZE(sm8450_intf), 2011 + .intf = sm8450_intf, 2012 + .vbif_count = ARRAY_SIZE(sdm845_vbif), 2013 + .vbif = sdm845_vbif, 2014 + .reg_dma_count = 1, 2015 + .dma_cfg = &sm8450_regdma, 2016 + .perf = &sm8450_perf_data, 2017 + .mdss_irqs = IRQ_SM8450_MASK, 2018 + }; 2019 + 2020 + static const struct dpu_mdss_cfg sm8550_dpu_cfg = { 2021 + .caps = &sm8550_dpu_caps, 2022 + .mdp_count = ARRAY_SIZE(sm8550_mdp), 2023 + .mdp = sm8550_mdp, 2024 + .ctl_count = ARRAY_SIZE(sm8550_ctl), 2025 + .ctl = sm8550_ctl, 2026 + .sspp_count = ARRAY_SIZE(sm8550_sspp), 2027 + .sspp = sm8550_sspp, 2028 + .mixer_count = ARRAY_SIZE(sm8150_lm), 2029 + .mixer = sm8150_lm, 2030 + .dspp_count = ARRAY_SIZE(sm8150_dspp), 2031 + .dspp = sm8150_dspp, 2032 + .pingpong_count = ARRAY_SIZE(sm8550_pp), 2033 + .pingpong = sm8550_pp, 2034 + .merge_3d_count = ARRAY_SIZE(sm8550_merge_3d), 2035 + .merge_3d = sm8550_merge_3d, 2036 + .intf_count = ARRAY_SIZE(sm8550_intf), 2037 + .intf = sm8550_intf, 2038 + .vbif_count = ARRAY_SIZE(sdm845_vbif), 2039 + .vbif = sdm845_vbif, 2040 + .reg_dma_count = 1, 2041 + .dma_cfg = &sm8450_regdma, 2042 + .perf = &sm8450_perf_data, 2043 + .mdss_irqs = IRQ_SM8450_MASK, 2724 2044 }; 2725 2045 2726 2046 static const struct dpu_mdss_cfg sc7280_dpu_cfg = { ··· 2859 2023 { .hw_rev = DPU_HW_VER_620, .dpu_cfg = &sc7180_dpu_cfg}, 2860 2024 { .hw_rev = DPU_HW_VER_630, .dpu_cfg = &sm6115_dpu_cfg}, 2861 2025 { .hw_rev = DPU_HW_VER_650, .dpu_cfg = &qcm2290_dpu_cfg}, 2026 + { .hw_rev = DPU_HW_VER_700, .dpu_cfg = &sm8350_dpu_cfg}, 2862 2027 { .hw_rev = DPU_HW_VER_720, .dpu_cfg = &sc7280_dpu_cfg}, 2028 + { .hw_rev = DPU_HW_VER_800, .dpu_cfg = &sc8280xp_dpu_cfg}, 2029 + { .hw_rev = DPU_HW_VER_810, .dpu_cfg = &sm8450_dpu_cfg}, 2030 + { .hw_rev = DPU_HW_VER_900, .dpu_cfg = &sm8550_dpu_cfg}, 2863 2031 }; 2864 2032 2865 2033 const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
+18 -1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
··· 46 46 #define DPU_HW_VER_620 DPU_HW_VER(6, 2, 0) /* sc7180 v1.0 */ 47 47 #define DPU_HW_VER_630 DPU_HW_VER(6, 3, 0) /* sm6115|sm4250 */ 48 48 #define DPU_HW_VER_650 DPU_HW_VER(6, 5, 0) /* qcm2290|sm4125 */ 49 + #define DPU_HW_VER_700 DPU_HW_VER(7, 0, 0) /* sm8350 */ 49 50 #define DPU_HW_VER_720 DPU_HW_VER(7, 2, 0) /* sc7280 */ 51 + #define DPU_HW_VER_800 DPU_HW_VER(8, 0, 0) /* sc8280xp */ 52 + #define DPU_HW_VER_810 DPU_HW_VER(8, 1, 0) /* sm8450 */ 53 + #define DPU_HW_VER_900 DPU_HW_VER(9, 0, 0) /* sm8550 */ 50 54 51 55 #define IS_MSM8996_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_170) 52 56 #define IS_MSM8998_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_300) ··· 87 83 * @DPU_MDP_UBWC_1_0, This chipsets supports Universal Bandwidth 88 84 * compression initial revision 89 85 * @DPU_MDP_UBWC_1_5, Universal Bandwidth compression version 1.5 86 + * @DPU_MDP_PERIPH_0_REMOVED Indicates that access to periph top0 block results 87 + * in a failure 90 88 * @DPU_MDP_MAX Maximum value 91 89 92 90 */ ··· 99 93 DPU_MDP_UBWC_1_0, 100 94 DPU_MDP_UBWC_1_5, 101 95 DPU_MDP_AUDIO_SELECT, 96 + DPU_MDP_PERIPH_0_REMOVED, 102 97 DPU_MDP_MAX 103 98 }; 104 99 ··· 199 192 * @DPU_CTL_SPLIT_DISPLAY: CTL supports video mode split display 200 193 * @DPU_CTL_FETCH_ACTIVE: Active CTL for fetch HW (SSPPs) 201 194 * @DPU_CTL_VM_CFG: CTL config to support multiple VMs 195 + * @DPU_CTL_HAS_LAYER_EXT4: CTL has the CTL_LAYER_EXT4 register 202 196 * @DPU_CTL_MAX 203 197 */ 204 198 enum { ··· 207 199 DPU_CTL_ACTIVE_CFG, 208 200 DPU_CTL_FETCH_ACTIVE, 209 201 DPU_CTL_VM_CFG, 202 + DPU_CTL_HAS_LAYER_EXT4, 210 203 DPU_CTL_MAX 211 204 }; 212 205 ··· 273 264 DPU_VBIF_QOS_OTLIM = 0x1, 274 265 DPU_VBIF_QOS_REMAP, 275 266 DPU_VBIF_MAX 267 + }; 268 + 269 + /** 270 + * DSC features 271 + * @DPU_DSC_OUTPUT_CTRL Configure which PINGPONG block gets 272 + * the pixel output from this DSC. 273 + */ 274 + enum { 275 + DPU_DSC_OUTPUT_CTRL = 0x1, 276 276 }; 277 277 278 278 /** ··· 537 519 * @base: register base offset to mdss 538 520 * @features bit mask identifying sub-blocks/features 539 521 * @highest_bank_bit: UBWC parameter 540 - * @ubwc_static: ubwc static configuration 541 522 * @ubwc_swizzle: ubwc default swizzle setting 542 523 * @clk_ctrls clock control register definition 543 524 */
+49 -96
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
··· 17 17 (0x70 + (((lm) - LM_0) * 0x004)) 18 18 #define CTL_LAYER_EXT3(lm) \ 19 19 (0xA0 + (((lm) - LM_0) * 0x004)) 20 + #define CTL_LAYER_EXT4(lm) \ 21 + (0xB8 + (((lm) - LM_0) * 0x004)) 20 22 #define CTL_TOP 0x014 21 23 #define CTL_FLUSH 0x018 22 24 #define CTL_START 0x01C ··· 379 377 DPU_REG_WRITE(c, CTL_FETCH_PIPE_ACTIVE, 0); 380 378 } 381 379 380 + struct ctl_blend_config { 381 + int idx, shift, ext_shift; 382 + }; 383 + 384 + static const struct ctl_blend_config ctl_blend_config[][2] = { 385 + [SSPP_NONE] = { { -1 }, { -1 } }, 386 + [SSPP_MAX] = { { -1 }, { -1 } }, 387 + [SSPP_VIG0] = { { 0, 0, 0 }, { 3, 0 } }, 388 + [SSPP_VIG1] = { { 0, 3, 2 }, { 3, 4 } }, 389 + [SSPP_VIG2] = { { 0, 6, 4 }, { 3, 8 } }, 390 + [SSPP_VIG3] = { { 0, 26, 6 }, { 3, 12 } }, 391 + [SSPP_RGB0] = { { 0, 9, 8 }, { -1 } }, 392 + [SSPP_RGB1] = { { 0, 12, 10 }, { -1 } }, 393 + [SSPP_RGB2] = { { 0, 15, 12 }, { -1 } }, 394 + [SSPP_RGB3] = { { 0, 29, 14 }, { -1 } }, 395 + [SSPP_DMA0] = { { 0, 18, 16 }, { 2, 8 } }, 396 + [SSPP_DMA1] = { { 0, 21, 18 }, { 2, 12 } }, 397 + [SSPP_DMA2] = { { 2, 0 }, { 2, 16 } }, 398 + [SSPP_DMA3] = { { 2, 4 }, { 2, 20 } }, 399 + [SSPP_DMA4] = { { 4, 0 }, { 4, 8 } }, 400 + [SSPP_DMA5] = { { 4, 4 }, { 4, 12 } }, 401 + [SSPP_CURSOR0] = { { 1, 20 }, { -1 } }, 402 + [SSPP_CURSOR1] = { { 1, 26 }, { -1 } }, 403 + }; 404 + 382 405 static void dpu_hw_ctl_setup_blendstage(struct dpu_hw_ctl *ctx, 383 406 enum dpu_lm lm, struct dpu_hw_stage_cfg *stage_cfg) 384 407 { 385 408 struct dpu_hw_blk_reg_map *c = &ctx->hw; 386 - u32 mixercfg = 0, mixercfg_ext = 0, mix, ext; 387 - u32 mixercfg_ext2 = 0, mixercfg_ext3 = 0; 409 + u32 mix, ext, mix_ext; 410 + u32 mixercfg[5] = { 0 }; 388 411 int i, j; 389 412 int stages; 390 413 int pipes_per_stage; ··· 424 397 else 425 398 pipes_per_stage = 1; 426 399 427 - mixercfg = CTL_MIXER_BORDER_OUT; /* always set BORDER_OUT */ 400 + mixercfg[0] = CTL_MIXER_BORDER_OUT; /* always set BORDER_OUT */ 428 401 429 402 if (!stage_cfg) 430 403 goto exit; ··· 433 406 /* overflow to ext register if 'i + 1 > 7' */ 434 407 mix = (i + 1) & 0x7; 435 408 ext = i >= 7; 409 + mix_ext = (i + 1) & 0xf; 436 410 437 411 for (j = 0 ; j < pipes_per_stage; j++) { 438 412 enum dpu_sspp_multirect_index rect_index = 439 413 stage_cfg->multirect_index[i][j]; 414 + enum dpu_sspp pipe = stage_cfg->stage[i][j]; 415 + const struct ctl_blend_config *cfg = 416 + &ctl_blend_config[pipe][rect_index == DPU_SSPP_RECT_1]; 440 417 441 - switch (stage_cfg->stage[i][j]) { 442 - case SSPP_VIG0: 443 - if (rect_index == DPU_SSPP_RECT_1) { 444 - mixercfg_ext3 |= ((i + 1) & 0xF) << 0; 445 - } else { 446 - mixercfg |= mix << 0; 447 - mixercfg_ext |= ext << 0; 448 - } 449 - break; 450 - case SSPP_VIG1: 451 - if (rect_index == DPU_SSPP_RECT_1) { 452 - mixercfg_ext3 |= ((i + 1) & 0xF) << 4; 453 - } else { 454 - mixercfg |= mix << 3; 455 - mixercfg_ext |= ext << 2; 456 - } 457 - break; 458 - case SSPP_VIG2: 459 - if (rect_index == DPU_SSPP_RECT_1) { 460 - mixercfg_ext3 |= ((i + 1) & 0xF) << 8; 461 - } else { 462 - mixercfg |= mix << 6; 463 - mixercfg_ext |= ext << 4; 464 - } 465 - break; 466 - case SSPP_VIG3: 467 - if (rect_index == DPU_SSPP_RECT_1) { 468 - mixercfg_ext3 |= ((i + 1) & 0xF) << 12; 469 - } else { 470 - mixercfg |= mix << 26; 471 - mixercfg_ext |= ext << 6; 472 - } 473 - break; 474 - case SSPP_RGB0: 475 - mixercfg |= mix << 9; 476 - mixercfg_ext |= ext << 8; 477 - break; 478 - case SSPP_RGB1: 479 - mixercfg |= mix << 12; 480 - mixercfg_ext |= ext << 10; 481 - break; 482 - case SSPP_RGB2: 483 - mixercfg |= mix << 15; 484 - mixercfg_ext |= ext << 12; 485 - break; 486 - case SSPP_RGB3: 487 - mixercfg |= mix << 29; 488 - mixercfg_ext |= ext << 14; 489 - break; 490 - case SSPP_DMA0: 491 - if (rect_index == DPU_SSPP_RECT_1) { 492 - mixercfg_ext2 |= ((i + 1) & 0xF) << 8; 493 - } else { 494 - mixercfg |= mix << 18; 495 - mixercfg_ext |= ext << 16; 496 - } 497 - break; 498 - case SSPP_DMA1: 499 - if (rect_index == DPU_SSPP_RECT_1) { 500 - mixercfg_ext2 |= ((i + 1) & 0xF) << 12; 501 - } else { 502 - mixercfg |= mix << 21; 503 - mixercfg_ext |= ext << 18; 504 - } 505 - break; 506 - case SSPP_DMA2: 507 - if (rect_index == DPU_SSPP_RECT_1) { 508 - mixercfg_ext2 |= ((i + 1) & 0xF) << 16; 509 - } else { 510 - mix |= (i + 1) & 0xF; 511 - mixercfg_ext2 |= mix << 0; 512 - } 513 - break; 514 - case SSPP_DMA3: 515 - if (rect_index == DPU_SSPP_RECT_1) { 516 - mixercfg_ext2 |= ((i + 1) & 0xF) << 20; 517 - } else { 518 - mix |= (i + 1) & 0xF; 519 - mixercfg_ext2 |= mix << 4; 520 - } 521 - break; 522 - case SSPP_CURSOR0: 523 - mixercfg_ext |= ((i + 1) & 0xF) << 20; 524 - break; 525 - case SSPP_CURSOR1: 526 - mixercfg_ext |= ((i + 1) & 0xF) << 26; 527 - break; 528 - default: 529 - break; 418 + /* 419 + * CTL_LAYER has 3-bit field (and extra bits in EXT register), 420 + * all EXT registers has 4-bit fields. 421 + */ 422 + if (cfg->idx == 0) { 423 + mixercfg[0] |= mix << cfg->shift; 424 + mixercfg[1] |= ext << cfg->ext_shift; 425 + } else { 426 + mixercfg[cfg->idx] |= mix_ext << cfg->shift; 530 427 } 531 428 } 532 429 } 533 430 534 431 exit: 535 - DPU_REG_WRITE(c, CTL_LAYER(lm), mixercfg); 536 - DPU_REG_WRITE(c, CTL_LAYER_EXT(lm), mixercfg_ext); 537 - DPU_REG_WRITE(c, CTL_LAYER_EXT2(lm), mixercfg_ext2); 538 - DPU_REG_WRITE(c, CTL_LAYER_EXT3(lm), mixercfg_ext3); 432 + DPU_REG_WRITE(c, CTL_LAYER(lm), mixercfg[0]); 433 + DPU_REG_WRITE(c, CTL_LAYER_EXT(lm), mixercfg[1]); 434 + DPU_REG_WRITE(c, CTL_LAYER_EXT2(lm), mixercfg[2]); 435 + DPU_REG_WRITE(c, CTL_LAYER_EXT3(lm), mixercfg[3]); 436 + if ((test_bit(DPU_CTL_HAS_LAYER_EXT4, &ctx->caps->features))) 437 + DPU_REG_WRITE(c, CTL_LAYER_EXT4(lm), mixercfg[4]); 539 438 } 540 439 541 440
+27
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c
··· 29 29 #define DSC_RANGE_MAX_QP 0x0B0 30 30 #define DSC_RANGE_BPG_OFFSET 0x0EC 31 31 32 + #define DSC_CTL(m) (0x1800 - 0x3FC * (m - DSC_0)) 33 + 32 34 static void dpu_hw_dsc_disable(struct dpu_hw_dsc *dsc) 33 35 { 34 36 struct dpu_hw_blk_reg_map *c = &dsc->hw; ··· 152 150 } 153 151 } 154 152 153 + static void dpu_hw_dsc_bind_pingpong_blk( 154 + struct dpu_hw_dsc *hw_dsc, 155 + bool enable, 156 + const enum dpu_pingpong pp) 157 + { 158 + struct dpu_hw_blk_reg_map *c = &hw_dsc->hw; 159 + int mux_cfg = 0xF; 160 + u32 dsc_ctl_offset; 161 + 162 + dsc_ctl_offset = DSC_CTL(hw_dsc->idx); 163 + 164 + if (enable) 165 + mux_cfg = (pp - PINGPONG_0) & 0x7; 166 + 167 + DRM_DEBUG_KMS("%s dsc:%d %s pp:%d\n", 168 + enable ? "Binding" : "Unbinding", 169 + hw_dsc->idx - DSC_0, 170 + enable ? "to" : "from", 171 + pp - PINGPONG_0); 172 + 173 + DPU_REG_WRITE(c, dsc_ctl_offset, mux_cfg); 174 + } 175 + 155 176 static struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc, 156 177 const struct dpu_mdss_cfg *m, 157 178 void __iomem *addr, ··· 199 174 ops->dsc_disable = dpu_hw_dsc_disable; 200 175 ops->dsc_config = dpu_hw_dsc_config; 201 176 ops->dsc_config_thresh = dpu_hw_dsc_config_thresh; 177 + if (cap & BIT(DPU_DSC_OUTPUT_CTRL)) 178 + ops->dsc_bind_pingpong_blk = dpu_hw_dsc_bind_pingpong_blk; 202 179 }; 203 180 204 181 struct dpu_hw_dsc *dpu_hw_dsc_init(enum dpu_dsc idx, void __iomem *addr,
+4
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h
··· 42 42 */ 43 43 void (*dsc_config_thresh)(struct dpu_hw_dsc *hw_dsc, 44 44 struct drm_dsc_config *dsc); 45 + 46 + void (*dsc_bind_pingpong_blk)(struct dpu_hw_dsc *hw_dsc, 47 + bool enable, 48 + enum dpu_pingpong pp); 45 49 }; 46 50 47 51 struct dpu_hw_dsc {
+24 -6
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
··· 35 35 #define MDP_INTF_3_OFF_REV_7xxx 0x37000 36 36 #define MDP_INTF_4_OFF_REV_7xxx 0x38000 37 37 #define MDP_INTF_5_OFF_REV_7xxx 0x39000 38 + #define MDP_INTF_6_OFF_REV_7xxx 0x3a000 39 + #define MDP_INTF_7_OFF_REV_7xxx 0x3b000 40 + #define MDP_INTF_8_OFF_REV_7xxx 0x3c000 38 41 39 42 /** 40 43 * struct dpu_intr_reg - array of DPU register sets ··· 141 138 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_CLEAR, 142 139 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_EN, 143 140 MDP_INTF_5_OFF_REV_7xxx+INTF_INTR_STATUS 141 + }, 142 + [MDP_INTF6_7xxx_INTR] = { 143 + MDP_INTF_6_OFF_REV_7xxx+INTF_INTR_CLEAR, 144 + MDP_INTF_6_OFF_REV_7xxx+INTF_INTR_EN, 145 + MDP_INTF_6_OFF_REV_7xxx+INTF_INTR_STATUS 146 + }, 147 + [MDP_INTF7_7xxx_INTR] = { 148 + MDP_INTF_7_OFF_REV_7xxx+INTF_INTR_CLEAR, 149 + MDP_INTF_7_OFF_REV_7xxx+INTF_INTR_EN, 150 + MDP_INTF_7_OFF_REV_7xxx+INTF_INTR_STATUS 151 + }, 152 + [MDP_INTF8_7xxx_INTR] = { 153 + MDP_INTF_8_OFF_REV_7xxx+INTF_INTR_CLEAR, 154 + MDP_INTF_8_OFF_REV_7xxx+INTF_INTR_EN, 155 + MDP_INTF_8_OFF_REV_7xxx+INTF_INTR_STATUS 144 156 }, 145 157 }; 146 158 ··· 270 252 271 253 cache_irq_mask = intr->cache_irq_mask[reg_idx]; 272 254 if (cache_irq_mask & DPU_IRQ_MASK(irq_idx)) { 273 - dbgstr = "DPU IRQ already set:"; 255 + dbgstr = "already "; 274 256 } else { 275 - dbgstr = "DPU IRQ enabled:"; 257 + dbgstr = ""; 276 258 277 259 cache_irq_mask |= DPU_IRQ_MASK(irq_idx); 278 260 /* Cleaning any pending interrupt */ ··· 286 268 intr->cache_irq_mask[reg_idx] = cache_irq_mask; 287 269 } 288 270 289 - pr_debug("%s MASK:0x%.8lx, CACHE-MASK:0x%.8x\n", dbgstr, 271 + pr_debug("DPU IRQ %d %senabled: MASK:0x%.8lx, CACHE-MASK:0x%.8x\n", irq_idx, dbgstr, 290 272 DPU_IRQ_MASK(irq_idx), cache_irq_mask); 291 273 292 274 return 0; ··· 319 301 320 302 cache_irq_mask = intr->cache_irq_mask[reg_idx]; 321 303 if ((cache_irq_mask & DPU_IRQ_MASK(irq_idx)) == 0) { 322 - dbgstr = "DPU IRQ is already cleared:"; 304 + dbgstr = "already "; 323 305 } else { 324 - dbgstr = "DPU IRQ mask disable:"; 306 + dbgstr = ""; 325 307 326 308 cache_irq_mask &= ~DPU_IRQ_MASK(irq_idx); 327 309 /* Disable interrupts based on the new mask */ ··· 335 317 intr->cache_irq_mask[reg_idx] = cache_irq_mask; 336 318 } 337 319 338 - pr_debug("%s MASK:0x%.8lx, CACHE-MASK:0x%.8x\n", dbgstr, 320 + pr_debug("DPU IRQ %d %sdisabled: MASK:0x%.8lx, CACHE-MASK:0x%.8x\n", irq_idx, dbgstr, 339 321 DPU_IRQ_MASK(irq_idx), cache_irq_mask); 340 322 341 323 return 0;
+3
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h
··· 31 31 MDP_INTF3_7xxx_INTR, 32 32 MDP_INTF4_7xxx_INTR, 33 33 MDP_INTF5_7xxx_INTR, 34 + MDP_INTF6_7xxx_INTR, 35 + MDP_INTF7_7xxx_INTR, 36 + MDP_INTF8_7xxx_INTR, 34 37 MDP_INTR_MAX, 35 38 }; 36 39
+7
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
··· 120 120 SSPP_DMA1, 121 121 SSPP_DMA2, 122 122 SSPP_DMA3, 123 + SSPP_DMA4, 124 + SSPP_DMA5, 123 125 SSPP_CURSOR0, 124 126 SSPP_CURSOR1, 125 127 SSPP_MAX ··· 197 195 PINGPONG_3, 198 196 PINGPONG_4, 199 197 PINGPONG_5, 198 + PINGPONG_6, 199 + PINGPONG_7, 200 200 PINGPONG_S0, 201 201 PINGPONG_MAX 202 202 }; ··· 207 203 MERGE_3D_0 = 1, 208 204 MERGE_3D_1, 209 205 MERGE_3D_2, 206 + MERGE_3D_3, 210 207 MERGE_3D_MAX 211 208 }; 212 209 ··· 219 214 INTF_4, 220 215 INTF_5, 221 216 INTF_6, 217 + INTF_7, 218 + INTF_8, 222 219 INTF_MAX 223 220 }; 224 221
+5 -1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
··· 310 310 ctx->mdp->highest_bank_bit << 18); 311 311 switch (ctx->catalog->caps->ubwc_version) { 312 312 case DPU_HW_UBWC_VER_10: 313 - /* TODO: UBWC v1 case */ 313 + fast_clear = fmt->alpha_enable ? BIT(31) : 0; 314 + DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL, 315 + fast_clear | (ctx->mdp->ubwc_swizzle & 0x1) | 316 + BIT(8) | 317 + (ctx->mdp->highest_bank_bit << 4)); 314 318 break; 315 319 case DPU_HW_UBWC_VER_20: 316 320 fast_clear = fmt->alpha_enable ? BIT(31) : 0;
-25
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c
··· 7 7 #include "dpu_hw_top.h" 8 8 #include "dpu_kms.h" 9 9 10 - #define SSPP_SPARE 0x28 11 - 12 10 #define FLD_SPLIT_DISPLAY_CMD BIT(1) 13 11 #define FLD_SMART_PANEL_FREE_RUN BIT(2) 14 12 #define FLD_INTF_1_SW_TRG_MUX BIT(4) 15 13 #define FLD_INTF_2_SW_TRG_MUX BIT(8) 16 14 #define FLD_TE_LINE_INTER_WATERLEVEL_MASK 0xFFFF 17 15 18 - #define DANGER_STATUS 0x360 19 - #define SAFE_STATUS 0x364 20 - 21 - #define TE_LINE_INTERVAL 0x3F4 22 - 23 16 #define TRAFFIC_SHAPER_EN BIT(31) 24 17 #define TRAFFIC_SHAPER_RD_CLIENT(num) (0x030 + (num * 4)) 25 18 #define TRAFFIC_SHAPER_WR_CLIENT(num) (0x060 + (num * 4)) 26 19 #define TRAFFIC_SHAPER_FIXPOINT_FACTOR 4 27 - 28 - #define MDP_WD_TIMER_0_CTL 0x380 29 - #define MDP_WD_TIMER_0_CTL2 0x384 30 - #define MDP_WD_TIMER_0_LOAD_VALUE 0x388 31 - #define MDP_WD_TIMER_1_CTL 0x390 32 - #define MDP_WD_TIMER_1_CTL2 0x394 33 - #define MDP_WD_TIMER_1_LOAD_VALUE 0x398 34 - #define MDP_WD_TIMER_2_CTL 0x420 35 - #define MDP_WD_TIMER_2_CTL2 0x424 36 - #define MDP_WD_TIMER_2_LOAD_VALUE 0x428 37 - #define MDP_WD_TIMER_3_CTL 0x430 38 - #define MDP_WD_TIMER_3_CTL2 0x434 39 - #define MDP_WD_TIMER_3_LOAD_VALUE 0x438 40 - #define MDP_WD_TIMER_4_CTL 0x440 41 - #define MDP_WD_TIMER_4_CTL2 0x444 42 - #define MDP_WD_TIMER_4_LOAD_VALUE 0x448 43 20 44 21 #define MDP_TICK_COUNT 16 45 22 #define XO_CLK_RATE 19200 ··· 24 47 25 48 #define CALCULATE_WD_LOAD_VALUE(fps) \ 26 49 ((uint32_t)((MS_TICKS_IN_SEC * XO_CLK_RATE)/(MDP_TICK_COUNT * fps))) 27 - 28 - #define DCE_SEL 0x450 29 50 30 51 static void dpu_hw_setup_split_pipe(struct dpu_hw_mdp *mdp, 31 52 struct split_pipe_cfg *cfg)
+21
drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h
··· 16 16 #define INTR_CLEAR 0x018 17 17 #define INTR2_EN 0x008 18 18 #define INTR2_STATUS 0x00c 19 + #define SSPP_SPARE 0x028 19 20 #define INTR2_CLEAR 0x02c 20 21 #define HIST_INTR_EN 0x01c 21 22 #define HIST_INTR_STATUS 0x020 ··· 29 28 #define DSPP_IGC_COLOR0_RAM_LUTN 0x300 30 29 #define DSPP_IGC_COLOR1_RAM_LUTN 0x304 31 30 #define DSPP_IGC_COLOR2_RAM_LUTN 0x308 31 + #define DANGER_STATUS 0x360 32 + #define SAFE_STATUS 0x364 32 33 #define HW_EVENTS_CTL 0x37C 34 + #define MDP_WD_TIMER_0_CTL 0x380 35 + #define MDP_WD_TIMER_0_CTL2 0x384 36 + #define MDP_WD_TIMER_0_LOAD_VALUE 0x388 37 + #define MDP_WD_TIMER_1_CTL 0x390 38 + #define MDP_WD_TIMER_1_CTL2 0x394 39 + #define MDP_WD_TIMER_1_LOAD_VALUE 0x398 33 40 #define CLK_CTRL3 0x3A8 34 41 #define CLK_STATUS3 0x3AC 35 42 #define CLK_CTRL4 0x3B0 ··· 52 43 #define HDMI_DP_CORE_SELECT 0x408 53 44 #define MDP_OUT_CTL_0 0x410 54 45 #define MDP_VSYNC_SEL 0x414 46 + #define MDP_WD_TIMER_2_CTL 0x420 47 + #define MDP_WD_TIMER_2_CTL2 0x424 48 + #define MDP_WD_TIMER_2_LOAD_VALUE 0x428 49 + #define MDP_WD_TIMER_3_CTL 0x430 50 + #define MDP_WD_TIMER_3_CTL2 0x434 51 + #define MDP_WD_TIMER_3_LOAD_VALUE 0x438 52 + #define MDP_WD_TIMER_4_CTL 0x440 53 + #define MDP_WD_TIMER_4_CTL2 0x444 54 + #define MDP_WD_TIMER_4_LOAD_VALUE 0x448 55 55 #define DCE_SEL 0x450 56 + 57 + #define MDP_PERIPH_TOP0 MDP_WD_TIMER_0_CTL 58 + #define MDP_PERIPH_TOP0_END CLK_CTRL3 56 59 57 60 #endif /*_DPU_HWIO_H */
+18 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
··· 927 927 msm_disp_snapshot_add_block(disp_state, cat->wb[i].len, 928 928 dpu_kms->mmio + cat->wb[i].base, "wb_%d", i); 929 929 930 - msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len, 931 - dpu_kms->mmio + cat->mdp[0].base, "top"); 930 + if (cat->mdp[0].features & BIT(DPU_MDP_PERIPH_0_REMOVED)) { 931 + msm_disp_snapshot_add_block(disp_state, MDP_PERIPH_TOP0, 932 + dpu_kms->mmio + cat->mdp[0].base, "top"); 933 + msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len - MDP_PERIPH_TOP0_END, 934 + dpu_kms->mmio + cat->mdp[0].base + MDP_PERIPH_TOP0_END, "top_2"); 935 + } else { 936 + msm_disp_snapshot_add_block(disp_state, cat->mdp[0].len, 937 + dpu_kms->mmio + cat->mdp[0].base, "top"); 938 + } 939 + 940 + /* dump DSC sub-blocks HW regs info */ 941 + for (i = 0; i < cat->dsc_count; i++) 942 + msm_disp_snapshot_add_block(disp_state, cat->dsc[i].len, 943 + dpu_kms->mmio + cat->dsc[i].base, "dsc_%d", i); 932 944 933 945 pm_runtime_put_sync(&dpu_kms->pdev->dev); 934 946 } ··· 1304 1292 { .compatible = "qcom,sc7180-dpu", }, 1305 1293 { .compatible = "qcom,sc7280-dpu", }, 1306 1294 { .compatible = "qcom,sc8180x-dpu", }, 1295 + { .compatible = "qcom,sc8280xp-dpu", }, 1307 1296 { .compatible = "qcom,sm6115-dpu", }, 1308 1297 { .compatible = "qcom,sm8150-dpu", }, 1309 1298 { .compatible = "qcom,sm8250-dpu", }, 1299 + { .compatible = "qcom,sm8350-dpu", }, 1300 + { .compatible = "qcom,sm8450-dpu", }, 1301 + { .compatible = "qcom,sm8550-dpu", }, 1310 1302 {} 1311 1303 }; 1312 1304 MODULE_DEVICE_TABLE(of, dpu_dt_match);
+6 -9
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
··· 1126 1126 struct dpu_plane_state *pstate = to_dpu_plane_state(state); 1127 1127 struct drm_crtc *crtc = state->crtc; 1128 1128 struct drm_framebuffer *fb = state->fb; 1129 - bool is_rt_pipe, update_qos_remap; 1129 + bool is_rt_pipe; 1130 1130 const struct dpu_format *fmt = 1131 1131 to_dpu_format(msm_framebuffer_format(fb)); 1132 1132 struct dpu_hw_pipe_cfg pipe_cfg; ··· 1138 1138 pstate->pending = true; 1139 1139 1140 1140 is_rt_pipe = (dpu_crtc_get_client_type(crtc) != NRT_CLIENT); 1141 + pstate->needs_qos_remap |= (is_rt_pipe != pdpu->is_rt_pipe); 1142 + pdpu->is_rt_pipe = is_rt_pipe; 1143 + 1141 1144 _dpu_plane_set_qos_ctrl(plane, false, DPU_PLANE_QOS_PANIC_CTRL); 1142 1145 1143 1146 DPU_DEBUG_PLANE(pdpu, "FB[%u] " DRM_RECT_FP_FMT "->crtc%u " DRM_RECT_FMT ··· 1222 1219 _dpu_plane_set_ot_limit(plane, crtc, &pipe_cfg); 1223 1220 } 1224 1221 1225 - update_qos_remap = (is_rt_pipe != pdpu->is_rt_pipe) || 1226 - pstate->needs_qos_remap; 1227 - 1228 - if (update_qos_remap) { 1229 - if (is_rt_pipe != pdpu->is_rt_pipe) 1230 - pdpu->is_rt_pipe = is_rt_pipe; 1231 - else if (pstate->needs_qos_remap) 1232 - pstate->needs_qos_remap = false; 1222 + if (pstate->needs_qos_remap) { 1223 + pstate->needs_qos_remap = false; 1233 1224 _dpu_plane_set_qos_remap(plane); 1234 1225 } 1235 1226
+12 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
··· 496 496 497 497 /* check if DSC required are allocated or not */ 498 498 for (i = 0; i < num_dsc; i++) { 499 + if (!rm->dsc_blks[i]) { 500 + DPU_ERROR("DSC %d does not exist\n", i); 501 + return -EIO; 502 + } 503 + 499 504 if (global_state->dsc_to_enc_id[i]) { 500 505 DPU_ERROR("DSC %d is already allocated\n", i); 501 506 return -EIO; ··· 548 543 { 549 544 reqs->topology = req_topology; 550 545 551 - DRM_DEBUG_KMS("num_lm: %d num_enc: %d num_intf: %d\n", 552 - reqs->topology.num_lm, reqs->topology.num_enc, 546 + DRM_DEBUG_KMS("num_lm: %d num_dsc: %d num_intf: %d\n", 547 + reqs->topology.num_lm, reqs->topology.num_dsc, 553 548 reqs->topology.num_intf); 554 549 555 550 return 0; ··· 663 658 if (num_blks == blks_size) { 664 659 DPU_ERROR("More than %d resources assigned to enc %d\n", 665 660 blks_size, enc_id); 661 + break; 662 + } 663 + if (!hw_blks[i]) { 664 + DPU_ERROR("Allocated resource %d unavailable to assign to enc %d\n", 665 + type, enc_id); 666 666 break; 667 667 } 668 668 blks[num_blks++] = hw_blks[i];
+2
drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
··· 70 70 int rc = 0; 71 71 72 72 dpu_wb_conn = devm_kzalloc(dev->dev, sizeof(*dpu_wb_conn), GFP_KERNEL); 73 + if (!dpu_wb_conn) 74 + return -ENOMEM; 73 75 74 76 drm_connector_helper_add(&dpu_wb_conn->base.base, &dpu_wb_conn_helper_funcs); 75 77
+4 -5
drivers/gpu/drm/msm/disp/mdp4/mdp4_irq.c
··· 69 69 struct mdp_kms *mdp_kms = to_mdp_kms(kms); 70 70 struct mdp4_kms *mdp4_kms = to_mdp4_kms(mdp_kms); 71 71 struct drm_device *dev = mdp4_kms->dev; 72 - struct msm_drm_private *priv = dev->dev_private; 73 - unsigned int id; 72 + struct drm_crtc *crtc; 74 73 uint32_t status, enable; 75 74 76 75 enable = mdp4_read(mdp4_kms, REG_MDP4_INTR_ENABLE); ··· 80 81 81 82 mdp_dispatch_irqs(mdp_kms, status); 82 83 83 - for (id = 0; id < priv->num_crtcs; id++) 84 - if (status & mdp4_crtc_vblank(priv->crtcs[id])) 85 - drm_handle_vblank(dev, id); 84 + drm_for_each_crtc(crtc, dev) 85 + if (status & mdp4_crtc_vblank(crtc)) 86 + drm_crtc_handle_vblank(crtc); 86 87 87 88 return IRQ_HANDLED; 88 89 }
+4 -1
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
··· 1139 1139 if (crtc->state) 1140 1140 mdp5_crtc_destroy_state(crtc, crtc->state); 1141 1141 1142 - __drm_atomic_helper_crtc_reset(crtc, &mdp5_cstate->base); 1142 + if (mdp5_cstate) 1143 + __drm_atomic_helper_crtc_reset(crtc, &mdp5_cstate->base); 1144 + else 1145 + __drm_atomic_helper_crtc_reset(crtc, NULL); 1143 1146 } 1144 1147 1145 1148 static const struct drm_crtc_funcs mdp5_crtc_no_lm_cursor_funcs = {
+4 -5
drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c
··· 82 82 struct mdp_kms *mdp_kms = to_mdp_kms(kms); 83 83 struct mdp5_kms *mdp5_kms = to_mdp5_kms(mdp_kms); 84 84 struct drm_device *dev = mdp5_kms->dev; 85 - struct msm_drm_private *priv = dev->dev_private; 86 - unsigned int id; 85 + struct drm_crtc *crtc; 87 86 uint32_t status, enable; 88 87 89 88 enable = mdp5_read(mdp5_kms, REG_MDP5_INTR_EN); ··· 93 94 94 95 mdp_dispatch_irqs(mdp_kms, status); 95 96 96 - for (id = 0; id < priv->num_crtcs; id++) 97 - if (status & mdp5_crtc_vblank(priv->crtcs[id])) 98 - drm_handle_vblank(dev, id); 97 + drm_for_each_crtc(crtc, dev) 98 + if (status & mdp5_crtc_vblank(crtc)) 99 + drm_crtc_handle_vblank(crtc); 99 100 100 101 return IRQ_HANDLED; 101 102 }
+3
drivers/gpu/drm/msm/disp/msm_disp_snapshot.c
··· 129 129 } 130 130 131 131 priv = drm_dev->dev_private; 132 + if (!priv->kms) 133 + return; 134 + 132 135 kms = priv->kms; 133 136 134 137 if (kms->dump_worker)
+103 -56
drivers/gpu/drm/msm/dp/dp_display.c
··· 122 122 123 123 struct msm_dp_desc { 124 124 phys_addr_t io_start; 125 + unsigned int id; 125 126 unsigned int connector_type; 126 127 bool wide_bus_en; 127 128 }; 128 129 129 - struct msm_dp_config { 130 - const struct msm_dp_desc *descs; 131 - size_t num_descs; 132 - }; 133 - 134 130 static const struct msm_dp_desc sc7180_dp_descs[] = { 135 - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 136 - }; 137 - 138 - static const struct msm_dp_config sc7180_dp_cfg = { 139 - .descs = sc7180_dp_descs, 140 - .num_descs = ARRAY_SIZE(sc7180_dp_descs), 131 + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 132 + {} 141 133 }; 142 134 143 135 static const struct msm_dp_desc sc7280_dp_descs[] = { 144 - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 145 - [MSM_DP_CONTROLLER_1] = { .io_start = 0x0aea0000, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 146 - }; 147 - 148 - static const struct msm_dp_config sc7280_dp_cfg = { 149 - .descs = sc7280_dp_descs, 150 - .num_descs = ARRAY_SIZE(sc7280_dp_descs), 136 + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 137 + { .io_start = 0x0aea0000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 138 + {} 151 139 }; 152 140 153 141 static const struct msm_dp_desc sc8180x_dp_descs[] = { 154 - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 155 - [MSM_DP_CONTROLLER_1] = { .io_start = 0x0ae98000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 156 - [MSM_DP_CONTROLLER_2] = { .io_start = 0x0ae9a000, .connector_type = DRM_MODE_CONNECTOR_eDP }, 142 + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 143 + { .io_start = 0x0ae98000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 144 + { .io_start = 0x0ae9a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_eDP }, 145 + {} 157 146 }; 158 147 159 - static const struct msm_dp_config sc8180x_dp_cfg = { 160 - .descs = sc8180x_dp_descs, 161 - .num_descs = ARRAY_SIZE(sc8180x_dp_descs), 148 + static const struct msm_dp_desc sc8280xp_dp_descs[] = { 149 + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 150 + { .io_start = 0x0ae98000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 151 + { .io_start = 0x0ae9a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 152 + { .io_start = 0x0aea0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 153 + { .io_start = 0x22090000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 154 + { .io_start = 0x22098000, .id = MSM_DP_CONTROLLER_1, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 155 + { .io_start = 0x2209a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 156 + { .io_start = 0x220a0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, 157 + {} 158 + }; 159 + 160 + static const struct msm_dp_desc sc8280xp_edp_descs[] = { 161 + { .io_start = 0x0ae9a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 162 + { .io_start = 0x0aea0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 163 + { .io_start = 0x2209a000, .id = MSM_DP_CONTROLLER_2, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 164 + { .io_start = 0x220a0000, .id = MSM_DP_CONTROLLER_3, .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, 165 + {} 162 166 }; 163 167 164 168 static const struct msm_dp_desc sm8350_dp_descs[] = { 165 - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 166 - }; 167 - 168 - static const struct msm_dp_config sm8350_dp_cfg = { 169 - .descs = sm8350_dp_descs, 170 - .num_descs = ARRAY_SIZE(sm8350_dp_descs), 169 + { .io_start = 0x0ae90000, .id = MSM_DP_CONTROLLER_0, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, 170 + {} 171 171 }; 172 172 173 173 static const struct of_device_id dp_dt_match[] = { 174 - { .compatible = "qcom,sc7180-dp", .data = &sc7180_dp_cfg }, 175 - { .compatible = "qcom,sc7280-dp", .data = &sc7280_dp_cfg }, 176 - { .compatible = "qcom,sc7280-edp", .data = &sc7280_dp_cfg }, 177 - { .compatible = "qcom,sc8180x-dp", .data = &sc8180x_dp_cfg }, 178 - { .compatible = "qcom,sc8180x-edp", .data = &sc8180x_dp_cfg }, 179 - { .compatible = "qcom,sm8350-dp", .data = &sm8350_dp_cfg }, 174 + { .compatible = "qcom,sc7180-dp", .data = &sc7180_dp_descs }, 175 + { .compatible = "qcom,sc7280-dp", .data = &sc7280_dp_descs }, 176 + { .compatible = "qcom,sc7280-edp", .data = &sc7280_dp_descs }, 177 + { .compatible = "qcom,sc8180x-dp", .data = &sc8180x_dp_descs }, 178 + { .compatible = "qcom,sc8180x-edp", .data = &sc8180x_dp_descs }, 179 + { .compatible = "qcom,sc8280xp-dp", .data = &sc8280xp_dp_descs }, 180 + { .compatible = "qcom,sc8280xp-edp", .data = &sc8280xp_edp_descs }, 181 + { .compatible = "qcom,sdm845-dp", .data = &sc7180_dp_descs }, 182 + { .compatible = "qcom,sm8350-dp", .data = &sm8350_dp_descs }, 180 183 {} 181 184 }; 182 185 ··· 393 390 struct edid *edid; 394 391 395 392 dp->panel->max_dp_lanes = dp->parser->max_dp_lanes; 393 + dp->panel->max_dp_link_rate = dp->parser->max_dp_link_rate; 394 + 395 + drm_dbg_dp(dp->drm_dev, "max_lanes=%d max_link_rate=%d\n", 396 + dp->panel->max_dp_lanes, dp->panel->max_dp_link_rate); 396 397 397 398 rc = dp_panel_read_sink_caps(dp->panel, dp->dp_display.connector); 398 399 if (rc) ··· 614 607 } 615 608 616 609 /* enable HDP irq_hpd/replug interrupt */ 617 - dp_catalog_hpd_config_intr(dp->catalog, 618 - DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, true); 610 + if (dp->dp_display.internal_hpd) 611 + dp_catalog_hpd_config_intr(dp->catalog, 612 + DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, 613 + true); 619 614 620 615 drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", 621 616 dp->dp_display.connector_type, state); ··· 657 648 dp->dp_display.connector_type, state); 658 649 659 650 /* disable irq_hpd/replug interrupts */ 660 - dp_catalog_hpd_config_intr(dp->catalog, 661 - DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, false); 651 + if (dp->dp_display.internal_hpd) 652 + dp_catalog_hpd_config_intr(dp->catalog, 653 + DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, 654 + false); 662 655 663 656 /* unplugged, no more irq_hpd handle */ 664 657 dp_del_event(dp, EV_IRQ_HPD_INT); ··· 686 675 } 687 676 688 677 /* disable HPD plug interrupts */ 689 - dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false); 678 + if (dp->dp_display.internal_hpd) 679 + dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false); 690 680 691 681 /* 692 682 * We don't need separate work for disconnect as ··· 705 693 dp_display_handle_plugged_change(&dp->dp_display, false); 706 694 707 695 /* enable HDP plug interrupt to prepare for next plugin */ 708 - if (!dp->dp_display.is_edp) 696 + if (dp->dp_display.internal_hpd) 709 697 dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, true); 710 698 711 699 drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", ··· 1090 1078 dp_display_host_init(dp); 1091 1079 dp_catalog_ctrl_hpd_config(dp->catalog); 1092 1080 1093 - /* Enable plug and unplug interrupts only for external DisplayPort */ 1094 - if (!dp->dp_display.is_edp) 1081 + /* Enable plug and unplug interrupts only if requested */ 1082 + if (dp->dp_display.internal_hpd) 1095 1083 dp_catalog_hpd_config_intr(dp->catalog, 1096 1084 DP_DP_HPD_PLUG_INT_MASK | 1097 1085 DP_DP_HPD_UNPLUG_INT_MASK, ··· 1274 1262 return 0; 1275 1263 } 1276 1264 1277 - static const struct msm_dp_desc *dp_display_get_desc(struct platform_device *pdev, 1278 - unsigned int *id) 1265 + static const struct msm_dp_desc *dp_display_get_desc(struct platform_device *pdev) 1279 1266 { 1280 - const struct msm_dp_config *cfg = of_device_get_match_data(&pdev->dev); 1267 + const struct msm_dp_desc *descs = of_device_get_match_data(&pdev->dev); 1281 1268 struct resource *res; 1282 1269 int i; 1283 1270 ··· 1284 1273 if (!res) 1285 1274 return NULL; 1286 1275 1287 - for (i = 0; i < cfg->num_descs; i++) { 1288 - if (cfg->descs[i].io_start == res->start) { 1289 - *id = i; 1290 - return &cfg->descs[i]; 1291 - } 1276 + for (i = 0; i < descs[i].io_start; i++) { 1277 + if (descs[i].io_start == res->start) 1278 + return &descs[i]; 1292 1279 } 1293 1280 1294 1281 dev_err(&pdev->dev, "unknown displayport instance\n"); ··· 1308 1299 if (!dp) 1309 1300 return -ENOMEM; 1310 1301 1311 - desc = dp_display_get_desc(pdev, &dp->id); 1302 + desc = dp_display_get_desc(pdev); 1312 1303 if (!desc) 1313 1304 return -EINVAL; 1314 1305 1315 1306 dp->pdev = pdev; 1316 1307 dp->name = "drm_dp"; 1308 + dp->id = desc->id; 1317 1309 dp->dp_display.connector_type = desc->connector_type; 1318 1310 dp->wide_bus_en = desc->wide_bus_en; 1319 1311 dp->dp_display.is_edp = ··· 1383 1373 1384 1374 dp_catalog_ctrl_hpd_config(dp->catalog); 1385 1375 1386 - 1387 - if (!dp->dp_display.is_edp) 1376 + if (dp->dp_display.internal_hpd) 1388 1377 dp_catalog_hpd_config_intr(dp->catalog, 1389 1378 DP_DP_HPD_PLUG_INT_MASK | 1390 1379 DP_DP_HPD_UNPLUG_INT_MASK, ··· 1506 1497 dp = container_of(dp_display, struct dp_display_private, dp_display); 1507 1498 1508 1499 if (!dp_display->is_edp) 1509 - dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 100); 1500 + dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 0); 1510 1501 } 1511 1502 1512 1503 bool msm_dp_wide_bus_available(const struct msm_dp *dp_display) ··· 1779 1770 1780 1771 dp_display->dp_mode.h_active_low = 1781 1772 !!(dp_display->dp_mode.drm_mode.flags & DRM_MODE_FLAG_NHSYNC); 1773 + } 1774 + 1775 + void dp_bridge_hpd_enable(struct drm_bridge *bridge) 1776 + { 1777 + struct msm_dp_bridge *dp_bridge = to_dp_bridge(bridge); 1778 + struct msm_dp *dp_display = dp_bridge->dp_display; 1779 + 1780 + dp_display->internal_hpd = true; 1781 + } 1782 + 1783 + void dp_bridge_hpd_disable(struct drm_bridge *bridge) 1784 + { 1785 + struct msm_dp_bridge *dp_bridge = to_dp_bridge(bridge); 1786 + struct msm_dp *dp_display = dp_bridge->dp_display; 1787 + 1788 + dp_display->internal_hpd = false; 1789 + } 1790 + 1791 + void dp_bridge_hpd_notify(struct drm_bridge *bridge, 1792 + enum drm_connector_status status) 1793 + { 1794 + struct msm_dp_bridge *dp_bridge = to_dp_bridge(bridge); 1795 + struct msm_dp *dp_display = dp_bridge->dp_display; 1796 + struct dp_display_private *dp = container_of(dp_display, struct dp_display_private, dp_display); 1797 + 1798 + /* Without next_bridge interrupts are handled by the DP core directly */ 1799 + if (dp_display->internal_hpd) 1800 + return; 1801 + 1802 + if (!dp->core_initialized) { 1803 + drm_dbg_dp(dp->drm_dev, "not initialized\n"); 1804 + return; 1805 + } 1806 + 1807 + if (!dp_display->is_connected && status == connector_status_connected) 1808 + dp_add_event(dp, EV_HPD_PLUG_INT, 0, 0); 1809 + else if (dp_display->is_connected && status == connector_status_disconnected) 1810 + dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0); 1782 1811 }
+1
drivers/gpu/drm/msm/dp/dp_display.h
··· 21 21 bool power_on; 22 22 unsigned int connector_type; 23 23 bool is_edp; 24 + bool internal_hpd; 24 25 25 26 hdmi_codec_plugged_cb plugged_cb; 26 27
+3
drivers/gpu/drm/msm/dp/dp_drm.c
··· 102 102 .get_modes = dp_bridge_get_modes, 103 103 .detect = dp_bridge_detect, 104 104 .atomic_check = dp_bridge_atomic_check, 105 + .hpd_enable = dp_bridge_hpd_enable, 106 + .hpd_disable = dp_bridge_hpd_disable, 107 + .hpd_notify = dp_bridge_hpd_notify, 105 108 }; 106 109 107 110 struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
+4
drivers/gpu/drm/msm/dp/dp_drm.h
··· 32 32 void dp_bridge_mode_set(struct drm_bridge *drm_bridge, 33 33 const struct drm_display_mode *mode, 34 34 const struct drm_display_mode *adjusted_mode); 35 + void dp_bridge_hpd_enable(struct drm_bridge *bridge); 36 + void dp_bridge_hpd_disable(struct drm_bridge *bridge); 37 + void dp_bridge_hpd_notify(struct drm_bridge *bridge, 38 + enum drm_connector_status status); 35 39 36 40 #endif /* _DP_DRM_H_ */
+4 -3
drivers/gpu/drm/msm/dp/dp_panel.c
··· 75 75 link_info->rate = drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]); 76 76 link_info->num_lanes = dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK; 77 77 78 + /* Limit data lanes from data-lanes of endpoint property of dtsi */ 78 79 if (link_info->num_lanes > dp_panel->max_dp_lanes) 79 80 link_info->num_lanes = dp_panel->max_dp_lanes; 80 81 81 - /* Limit support upto HBR2 until HBR3 support is added */ 82 - if (link_info->rate >= (drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4))) 83 - link_info->rate = drm_dp_bw_code_to_link_rate(DP_LINK_BW_5_4); 82 + /* Limit link rate from link-frequencies of endpoint property of dtsi */ 83 + if (link_info->rate > dp_panel->max_dp_link_rate) 84 + link_info->rate = dp_panel->max_dp_link_rate; 84 85 85 86 drm_dbg_dp(panel->drm_dev, "version: %d.%d\n", major, minor); 86 87 drm_dbg_dp(panel->drm_dev, "link_rate=%d\n", link_info->rate);
+1
drivers/gpu/drm/msm/dp/dp_panel.h
··· 50 50 51 51 u32 vic; 52 52 u32 max_dp_lanes; 53 + u32 max_dp_link_rate; 53 54 54 55 u32 max_bw_code; 55 56 };
+41 -7
drivers/gpu/drm/msm/dp/dp_parser.c
··· 91 91 return 0; 92 92 } 93 93 94 + static u32 dp_parser_link_frequencies(struct device_node *of_node) 95 + { 96 + struct device_node *endpoint; 97 + u64 frequency = 0; 98 + int cnt; 99 + 100 + endpoint = of_graph_get_endpoint_by_regs(of_node, 1, 0); /* port@1 */ 101 + if (!endpoint) 102 + return 0; 103 + 104 + cnt = of_property_count_u64_elems(endpoint, "link-frequencies"); 105 + 106 + if (cnt > 0) 107 + of_property_read_u64_index(endpoint, "link-frequencies", 108 + cnt - 1, &frequency); 109 + of_node_put(endpoint); 110 + 111 + do_div(frequency, 112 + 10 * /* from symbol rate to link rate */ 113 + 1000); /* kbytes */ 114 + 115 + return frequency; 116 + } 117 + 94 118 static int dp_parser_misc(struct dp_parser *parser) 95 119 { 96 120 struct device_node *of_node = parser->pdev->dev.of_node; 97 - int len; 121 + int cnt; 98 122 99 - len = drm_of_get_data_lanes_count(of_node, 1, DP_MAX_NUM_DP_LANES); 100 - if (len < 0) { 101 - DRM_WARN("Invalid property \"data-lanes\", default max DP lanes = %d\n", 102 - DP_MAX_NUM_DP_LANES); 103 - len = DP_MAX_NUM_DP_LANES; 123 + /* 124 + * data-lanes is the property of dp_out endpoint 125 + */ 126 + cnt = drm_of_get_data_lanes_count_ep(of_node, 1, 0, 1, DP_MAX_NUM_DP_LANES); 127 + if (cnt < 0) { 128 + /* legacy code, data-lanes is the property of mdss_dp node */ 129 + cnt = drm_of_get_data_lanes_count(of_node, 1, DP_MAX_NUM_DP_LANES); 104 130 } 105 131 106 - parser->max_dp_lanes = len; 132 + if (cnt > 0) 133 + parser->max_dp_lanes = cnt; 134 + else 135 + parser->max_dp_lanes = DP_MAX_NUM_DP_LANES; /* 4 lanes */ 136 + 137 + parser->max_dp_link_rate = dp_parser_link_frequencies(of_node); 138 + if (!parser->max_dp_link_rate) 139 + parser->max_dp_link_rate = DP_LINK_RATE_HBR2; 140 + 107 141 return 0; 108 142 } 109 143
+2
drivers/gpu/drm/msm/dp/dp_parser.h
··· 15 15 #define DP_LABEL "MDSS DP DISPLAY" 16 16 #define DP_MAX_PIXEL_CLK_KHZ 675000 17 17 #define DP_MAX_NUM_DP_LANES 4 18 + #define DP_LINK_RATE_HBR2 540000 /* kbytes */ 18 19 19 20 enum dp_pm_type { 20 21 DP_CORE_PM, ··· 120 119 struct dp_io io; 121 120 struct dp_display_data disp_data; 122 121 u32 max_dp_lanes; 122 + u32 max_dp_link_rate; 123 123 struct drm_bridge *next_bridge; 124 124 125 125 int (*parse)(struct dp_parser *parser);
+3
drivers/gpu/drm/msm/dsi/dsi.h
··· 118 118 int dsi_link_clk_enable_v2(struct msm_dsi_host *msm_host); 119 119 void dsi_link_clk_disable_6g(struct msm_dsi_host *msm_host); 120 120 void dsi_link_clk_disable_v2(struct msm_dsi_host *msm_host); 121 + unsigned long dsi_byte_clk_get_rate(struct mipi_dsi_host *host, bool is_bonded_dsi, 122 + const struct drm_display_mode *mode); 121 123 int dsi_tx_buf_alloc_6g(struct msm_dsi_host *msm_host, int size); 122 124 int dsi_tx_buf_alloc_v2(struct msm_dsi_host *msm_host, int size); 123 125 void *dsi_tx_buf_get_6g(struct msm_dsi_host *msm_host); ··· 141 139 u32 clk_post; 142 140 u32 clk_pre; 143 141 bool clk_pre_inc_by_2; 142 + bool byte_intf_clk_div_2; 144 143 }; 145 144 146 145 struct msm_dsi_phy_clk_request {
+20 -2
drivers/gpu/drm/msm/dsi/dsi_cfg.c
··· 181 181 .num_dsi = 2, 182 182 }; 183 183 184 + static const struct regulator_bulk_data sm8550_dsi_regulators[] = { 185 + { .supply = "vdda", .init_load_uA = 16800 }, /* 1.2 V */ 186 + }; 187 + 188 + static const struct msm_dsi_config sm8550_dsi_cfg = { 189 + .io_offset = DSI_6G_REG_SHIFT, 190 + .regulator_data = sm8550_dsi_regulators, 191 + .num_regulators = ARRAY_SIZE(sm8550_dsi_regulators), 192 + .bus_clk_names = dsi_sdm845_bus_clk_names, 193 + .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), 194 + .io_start = { 0xae94000, 0xae96000 }, 195 + .num_dsi = 2, 196 + }; 197 + 184 198 static const struct regulator_bulk_data sc7180_dsi_regulators[] = { 185 199 { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ 186 200 }; ··· 223 209 .num_regulators = ARRAY_SIZE(sc7280_dsi_regulators), 224 210 .bus_clk_names = dsi_sc7280_bus_clk_names, 225 211 .num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names), 226 - .io_start = { 0xae94000 }, 227 - .num_dsi = 1, 212 + .io_start = { 0xae94000, 0xae96000 }, 213 + .num_dsi = 2, 228 214 }; 229 215 230 216 static const char * const dsi_qcm2290_bus_clk_names[] = { ··· 314 300 &sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 315 301 {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_5_0, 316 302 &sc7280_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 303 + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_6_0, 304 + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 305 + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_7_0, 306 + &sm8550_dsi_cfg, &msm_dsi_6g_v2_host_ops}, 317 307 }; 318 308 319 309 const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor)
+2
drivers/gpu/drm/msm/dsi/dsi_cfg.h
··· 25 25 #define MSM_DSI_6G_VER_MINOR_V2_4_0 0x20040000 26 26 #define MSM_DSI_6G_VER_MINOR_V2_4_1 0x20040001 27 27 #define MSM_DSI_6G_VER_MINOR_V2_5_0 0x20050000 28 + #define MSM_DSI_6G_VER_MINOR_V2_6_0 0x20060000 29 + #define MSM_DSI_6G_VER_MINOR_V2_7_0 0x20070000 28 30 29 31 #define MSM_DSI_V2_VER_MINOR_8064 0x0 30 32
+35 -34
drivers/gpu/drm/msm/dsi/dsi_host.c
··· 122 122 struct clk *byte_intf_clk; 123 123 124 124 unsigned long byte_clk_rate; 125 + unsigned long byte_intf_clk_rate; 125 126 unsigned long pixel_clk_rate; 126 127 unsigned long esc_clk_rate; 127 128 ··· 399 398 400 399 int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host) 401 400 { 402 - unsigned long byte_intf_rate; 403 401 int ret; 404 402 405 403 DBG("Set clk rates: pclk=%d, byteclk=%lu", ··· 418 418 } 419 419 420 420 if (msm_host->byte_intf_clk) { 421 - /* For CPHY, byte_intf_clk is same as byte_clk */ 422 - if (msm_host->cphy_mode) 423 - byte_intf_rate = msm_host->byte_clk_rate; 424 - else 425 - byte_intf_rate = msm_host->byte_clk_rate / 2; 426 - 427 - ret = clk_set_rate(msm_host->byte_intf_clk, byte_intf_rate); 421 + ret = clk_set_rate(msm_host->byte_intf_clk, msm_host->byte_intf_clk_rate); 428 422 if (ret) { 429 423 pr_err("%s: Failed to set rate byte intf clk, %d\n", 430 424 __func__, ret); ··· 564 570 clk_disable_unprepare(msm_host->byte_clk); 565 571 } 566 572 567 - static unsigned long dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_bonded_dsi) 573 + static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode, bool is_bonded_dsi) 568 574 { 569 - struct drm_display_mode *mode = msm_host->mode; 570 575 unsigned long pclk_rate; 571 576 572 577 pclk_rate = mode->clock * 1000; ··· 582 589 return pclk_rate; 583 590 } 584 591 585 - static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi) 592 + unsigned long dsi_byte_clk_get_rate(struct mipi_dsi_host *host, bool is_bonded_dsi, 593 + const struct drm_display_mode *mode) 586 594 { 595 + struct msm_dsi_host *msm_host = to_msm_dsi_host(host); 587 596 u8 lanes = msm_host->lanes; 588 597 u32 bpp = dsi_get_bpp(msm_host->format); 589 - unsigned long pclk_rate = dsi_get_pclk_rate(msm_host, is_bonded_dsi); 598 + unsigned long pclk_rate = dsi_get_pclk_rate(mode, is_bonded_dsi); 590 599 u64 pclk_bpp = (u64)pclk_rate * bpp; 591 600 592 601 if (lanes == 0) { ··· 602 607 else 603 608 do_div(pclk_bpp, (8 * lanes)); 604 609 605 - msm_host->pixel_clk_rate = pclk_rate; 606 - msm_host->byte_clk_rate = pclk_bpp; 610 + return pclk_bpp; 611 + } 612 + 613 + static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi) 614 + { 615 + msm_host->pixel_clk_rate = dsi_get_pclk_rate(msm_host->mode, is_bonded_dsi); 616 + msm_host->byte_clk_rate = dsi_byte_clk_get_rate(&msm_host->base, is_bonded_dsi, 617 + msm_host->mode); 607 618 608 619 DBG("pclk=%lu, bclk=%lu", msm_host->pixel_clk_rate, 609 620 msm_host->byte_clk_rate); ··· 637 636 638 637 dsi_calc_pclk(msm_host, is_bonded_dsi); 639 638 640 - pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_bonded_dsi) * bpp; 639 + pclk_bpp = (u64)dsi_get_pclk_rate(msm_host->mode, is_bonded_dsi) * bpp; 641 640 do_div(pclk_bpp, 8); 642 641 msm_host->src_clk_rate = pclk_bpp; 643 642 ··· 854 853 */ 855 854 slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); 856 855 857 - /* If slice_per_pkt is greater than slice_per_intf 856 + /* 857 + * If slice_count is greater than slice_per_intf 858 858 * then default to 1. This can happen during partial 859 859 * update. 860 860 */ 861 - if (slice_per_intf > dsc->slice_count) 861 + if (dsc->slice_count > slice_per_intf) 862 862 dsc->slice_count = 1; 863 863 864 864 total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf; ··· 989 987 if (!msm_host->dsc) 990 988 wc = hdisplay * dsi_get_bpp(msm_host->format) / 8 + 1; 991 989 else 992 - wc = mode->hdisplay / 2 + 1; 990 + wc = msm_host->dsc->slice_chunk_size * msm_host->dsc->slice_count + 1; 993 991 994 992 dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_CTRL, 995 993 DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT(wc) | ··· 1885 1883 1886 1884 msm_host = devm_kzalloc(&pdev->dev, sizeof(*msm_host), GFP_KERNEL); 1887 1885 if (!msm_host) { 1888 - ret = -ENOMEM; 1889 - goto fail; 1886 + return -ENOMEM; 1890 1887 } 1891 1888 1892 1889 msm_host->pdev = pdev; ··· 1894 1893 ret = dsi_host_parse_dt(msm_host); 1895 1894 if (ret) { 1896 1895 pr_err("%s: failed to parse dt\n", __func__); 1897 - goto fail; 1896 + return ret; 1898 1897 } 1899 1898 1900 1899 msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", &msm_host->ctrl_size); 1901 1900 if (IS_ERR(msm_host->ctrl_base)) { 1902 1901 pr_err("%s: unable to map Dsi ctrl base\n", __func__); 1903 - ret = PTR_ERR(msm_host->ctrl_base); 1904 - goto fail; 1902 + return PTR_ERR(msm_host->ctrl_base); 1905 1903 } 1906 1904 1907 1905 pm_runtime_enable(&pdev->dev); 1908 1906 1909 1907 msm_host->cfg_hnd = dsi_get_config(msm_host); 1910 1908 if (!msm_host->cfg_hnd) { 1911 - ret = -EINVAL; 1912 1909 pr_err("%s: get config failed\n", __func__); 1913 - goto fail; 1910 + return -EINVAL; 1914 1911 } 1915 1912 cfg = msm_host->cfg_hnd->cfg; 1916 1913 1917 1914 msm_host->id = dsi_host_get_id(msm_host); 1918 1915 if (msm_host->id < 0) { 1919 - ret = msm_host->id; 1920 1916 pr_err("%s: unable to identify DSI host index\n", __func__); 1921 - goto fail; 1917 + return msm_host->id; 1922 1918 } 1923 1919 1924 1920 /* fixup base address by io offset */ ··· 1925 1927 cfg->regulator_data, 1926 1928 &msm_host->supplies); 1927 1929 if (ret) 1928 - goto fail; 1930 + return ret; 1929 1931 1930 1932 ret = dsi_clk_init(msm_host); 1931 1933 if (ret) { 1932 1934 pr_err("%s: unable to initialize dsi clks\n", __func__); 1933 - goto fail; 1935 + return ret; 1934 1936 } 1935 1937 1936 1938 msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL); 1937 1939 if (!msm_host->rx_buf) { 1938 - ret = -ENOMEM; 1939 1940 pr_err("%s: alloc rx temp buf failed\n", __func__); 1940 - goto fail; 1941 + return -ENOMEM; 1941 1942 } 1942 1943 1943 1944 ret = devm_pm_opp_set_clkname(&pdev->dev, "byte"); ··· 1974 1977 1975 1978 /* setup workqueue */ 1976 1979 msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0); 1980 + if (!msm_host->workqueue) 1981 + return -ENOMEM; 1982 + 1977 1983 INIT_WORK(&msm_host->err_work, dsi_err_worker); 1978 1984 1979 1985 msm_dsi->id = msm_host->id; 1980 1986 1981 1987 DBG("Dsi Host %d initialized", msm_host->id); 1982 1988 return 0; 1983 - 1984 - fail: 1985 - return ret; 1986 1989 } 1987 1990 1988 1991 void msm_dsi_host_destroy(struct mipi_dsi_host *host) ··· 2387 2390 DBG("dsi host already on"); 2388 2391 goto unlock_ret; 2389 2392 } 2393 + 2394 + msm_host->byte_intf_clk_rate = msm_host->byte_clk_rate; 2395 + if (phy_shared_timings->byte_intf_clk_div_2) 2396 + msm_host->byte_intf_clk_rate /= 2; 2390 2397 2391 2398 msm_dsi_sfpb_config(msm_host, true); 2392 2399
+20
drivers/gpu/drm/msm/dsi/dsi_manager.c
··· 450 450 int id = dsi_mgr_bridge_get_id(bridge); 451 451 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); 452 452 struct mipi_dsi_host *host = msm_dsi->host; 453 + struct platform_device *pdev = msm_dsi->pdev; 454 + struct dev_pm_opp *opp; 455 + unsigned long byte_clk_rate; 456 + 457 + byte_clk_rate = dsi_byte_clk_get_rate(host, IS_BONDED_DSI(), mode); 458 + 459 + opp = dev_pm_opp_find_freq_ceil(&pdev->dev, &byte_clk_rate); 460 + if (!IS_ERR(opp)) { 461 + dev_pm_opp_put(opp); 462 + } else if (PTR_ERR(opp) == -ERANGE) { 463 + /* 464 + * An empty table is created by devm_pm_opp_set_clkname() even 465 + * if there is none. Thus find_freq_ceil will still return 466 + * -ERANGE in such case. 467 + */ 468 + if (dev_pm_opp_get_opp_count(&pdev->dev) != 0) 469 + return MODE_CLOCK_RANGE; 470 + } else { 471 + return MODE_ERROR; 472 + } 453 473 454 474 return msm_dsi_host_check_dsc(host, mode); 455 475 }
+12
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
··· 350 350 timing->shared_timings.clk_pre_inc_by_2 = 0; 351 351 } 352 352 353 + timing->shared_timings.byte_intf_clk_div_2 = true; 354 + 353 355 timing->ta_go = 3; 354 356 timing->ta_sure = 0; 355 357 timing->ta_get = 4; ··· 455 453 tmin = DIV_ROUND_UP(temp, 16 * ui) - 1; 456 454 tmax = 255; 457 455 timing->shared_timings.clk_pre = DIV_ROUND_UP((tmax - tmin) * 125, 10000) + tmin; 456 + 457 + timing->shared_timings.byte_intf_clk_div_2 = true; 458 458 459 459 DBG("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d", 460 460 timing->shared_timings.clk_pre, timing->shared_timings.clk_post, ··· 573 569 .data = &dsi_phy_7nm_8150_cfgs }, 574 570 { .compatible = "qcom,sc7280-dsi-phy-7nm", 575 571 .data = &dsi_phy_7nm_7280_cfgs }, 572 + { .compatible = "qcom,sm6375-dsi-phy-7nm", 573 + .data = &dsi_phy_7nm_6375_cfgs }, 574 + { .compatible = "qcom,sm8350-dsi-phy-5nm", 575 + .data = &dsi_phy_5nm_8350_cfgs }, 576 + { .compatible = "qcom,sm8450-dsi-phy-5nm", 577 + .data = &dsi_phy_5nm_8450_cfgs }, 578 + { .compatible = "qcom,sm8550-dsi-phy-4nm", 579 + .data = &dsi_phy_4nm_8550_cfgs }, 576 580 #endif 577 581 {} 578 582 };
+4
drivers/gpu/drm/msm/dsi/phy/dsi_phy.h
··· 55 55 extern const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs; 56 56 extern const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs; 57 57 extern const struct msm_dsi_phy_cfg dsi_phy_7nm_cfgs; 58 + extern const struct msm_dsi_phy_cfg dsi_phy_7nm_6375_cfgs; 58 59 extern const struct msm_dsi_phy_cfg dsi_phy_7nm_8150_cfgs; 59 60 extern const struct msm_dsi_phy_cfg dsi_phy_7nm_7280_cfgs; 61 + extern const struct msm_dsi_phy_cfg dsi_phy_5nm_8350_cfgs; 62 + extern const struct msm_dsi_phy_cfg dsi_phy_5nm_8450_cfgs; 63 + extern const struct msm_dsi_phy_cfg dsi_phy_4nm_8550_cfgs; 60 64 61 65 struct msm_dsi_dphy_timing { 62 66 u32 clk_zero;
+211 -32
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
··· 39 39 #define VCO_REF_CLK_RATE 19200000 40 40 #define FRAC_BITS 18 41 41 42 + /* Hardware is pre V4.1 */ 43 + #define DSI_PHY_7NM_QUIRK_PRE_V4_1 BIT(0) 42 44 /* Hardware is V4.1 */ 43 - #define DSI_PHY_7NM_QUIRK_V4_1 BIT(0) 45 + #define DSI_PHY_7NM_QUIRK_V4_1 BIT(1) 46 + /* Hardware is V4.2 */ 47 + #define DSI_PHY_7NM_QUIRK_V4_2 BIT(2) 48 + /* Hardware is V4.3 */ 49 + #define DSI_PHY_7NM_QUIRK_V4_3 BIT(3) 50 + /* Hardware is V5.2 */ 51 + #define DSI_PHY_7NM_QUIRK_V5_2 BIT(4) 44 52 45 53 struct dsi_pll_config { 46 54 bool enable_ssc; ··· 124 116 dec_multiple = div_u64(pll_freq * multiplier, divider); 125 117 dec = div_u64_rem(dec_multiple, multiplier, &frac); 126 118 127 - if (!(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1)) 119 + if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1) 128 120 config->pll_clock_inverters = 0x28; 129 - else if (pll_freq <= 1000000000ULL) 130 - config->pll_clock_inverters = 0xa0; 131 - else if (pll_freq <= 2500000000ULL) 132 - config->pll_clock_inverters = 0x20; 133 - else if (pll_freq <= 3020000000ULL) 134 - config->pll_clock_inverters = 0x00; 135 - else 136 - config->pll_clock_inverters = 0x40; 121 + else if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2)) { 122 + if (pll_freq <= 1300000000ULL) 123 + config->pll_clock_inverters = 0xa0; 124 + else if (pll_freq <= 2500000000ULL) 125 + config->pll_clock_inverters = 0x20; 126 + else if (pll_freq <= 4000000000ULL) 127 + config->pll_clock_inverters = 0x00; 128 + else 129 + config->pll_clock_inverters = 0x40; 130 + } else { 131 + if (pll_freq <= 1000000000ULL) 132 + config->pll_clock_inverters = 0xa0; 133 + else if (pll_freq <= 2500000000ULL) 134 + config->pll_clock_inverters = 0x20; 135 + else if (pll_freq <= 3020000000ULL) 136 + config->pll_clock_inverters = 0x00; 137 + else 138 + config->pll_clock_inverters = 0x40; 139 + } 137 140 138 141 config->decimal_div_start = dec; 139 142 config->frac_div_start = frac; ··· 216 197 void __iomem *base = pll->phy->pll_base; 217 198 u8 analog_controls_five_1 = 0x01, vco_config_1 = 0x00; 218 199 219 - if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) { 200 + if (!(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1)) 220 201 if (pll->vco_current_rate >= 3100000000ULL) 221 202 analog_controls_five_1 = 0x03; 222 203 204 + if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) { 223 205 if (pll->vco_current_rate < 1520000000ULL) 224 206 vco_config_1 = 0x08; 225 207 else if (pll->vco_current_rate < 2990000000ULL) 208 + vco_config_1 = 0x01; 209 + } 210 + 211 + if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_2) || 212 + (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3)) { 213 + if (pll->vco_current_rate < 1520000000ULL) 214 + vco_config_1 = 0x08; 215 + else if (pll->vco_current_rate >= 2990000000ULL) 216 + vco_config_1 = 0x01; 217 + } 218 + 219 + if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2)) { 220 + if (pll->vco_current_rate < 1557000000ULL) 221 + vco_config_1 = 0x08; 222 + else 226 223 vco_config_1 = 0x01; 227 224 } 228 225 ··· 266 231 dsi_phy_write(base + REG_DSI_7nm_PHY_PLL_PFILT, 0x2f); 267 232 dsi_phy_write(base + REG_DSI_7nm_PHY_PLL_IFILT, 0x2a); 268 233 dsi_phy_write(base + REG_DSI_7nm_PHY_PLL_IFILT, 269 - pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1 ? 0x3f : 0x22); 234 + !(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1) ? 0x3f : 0x22); 270 235 271 - if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) { 236 + if (!(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1)) { 272 237 dsi_phy_write(base + REG_DSI_7nm_PHY_PLL_PERF_OPTIMIZE, 0x22); 273 238 if (pll->slave) 274 239 dsi_phy_write(pll->slave->phy->pll_base + REG_DSI_7nm_PHY_PLL_PERF_OPTIMIZE, 0x22); ··· 823 788 const u8 *tx_dctrl = tx_dctrl_0; 824 789 void __iomem *lane_base = phy->lane_base; 825 790 826 - if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) 791 + if (!(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1)) 827 792 tx_dctrl = tx_dctrl_1; 828 793 829 794 /* Strength ctrl settings */ ··· 879 844 if (dsi_phy_hw_v4_0_is_pll_on(phy)) 880 845 pr_warn("PLL turned on before configuring PHY\n"); 881 846 847 + /* Request for REFGEN READY */ 848 + if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) || 849 + (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2)) { 850 + dsi_phy_write(phy->base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10, 0x1); 851 + udelay(500); 852 + } 853 + 882 854 /* wait for REFGEN READY */ 883 855 ret = readl_poll_timeout_atomic(base + REG_DSI_7nm_PHY_CMN_PHY_STATUS, 884 856 status, (status & BIT(0)), ··· 900 858 /* Alter PHY configurations if data rate less than 1.5GHZ*/ 901 859 less_than_1500_mhz = (clk_req->bitclk_rate <= 1500000000); 902 860 903 - if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) { 861 + glbl_str_swi_cal_sel_ctrl = 0x00; 862 + if (phy->cphy_mode) { 863 + vreg_ctrl_0 = 0x51; 864 + vreg_ctrl_1 = 0x55; 865 + glbl_hstx_str_ctrl_0 = 0x00; 866 + glbl_pemph_ctrl_0 = 0x11; 867 + lane_ctrl0 = 0x17; 868 + } else { 904 869 vreg_ctrl_0 = less_than_1500_mhz ? 0x53 : 0x52; 870 + vreg_ctrl_1 = 0x5c; 871 + glbl_hstx_str_ctrl_0 = 0x88; 872 + glbl_pemph_ctrl_0 = 0x00; 873 + lane_ctrl0 = 0x1f; 874 + } 875 + 876 + if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2)) { 905 877 if (phy->cphy_mode) { 878 + vreg_ctrl_0 = 0x45; 879 + vreg_ctrl_1 = 0x45; 880 + glbl_rescode_top_ctrl = 0x00; 881 + glbl_rescode_bot_ctrl = 0x00; 882 + } else { 883 + vreg_ctrl_0 = 0x44; 884 + vreg_ctrl_1 = 0x19; 885 + glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3c : 0x03; 886 + glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x38 : 0x3c; 887 + } 888 + } else if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3)) { 889 + if (phy->cphy_mode) { 890 + glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3d : 0x01; 891 + glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x38 : 0x3b; 892 + } else { 893 + glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3d : 0x01; 894 + glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x38 : 0x39; 895 + } 896 + } else if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_2) { 897 + if (phy->cphy_mode) { 898 + glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3d : 0x01; 899 + glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x38 : 0x3b; 900 + } else { 901 + glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3c : 0x00; 902 + glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x38 : 0x39; 903 + } 904 + } else if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_1) { 905 + if (phy->cphy_mode) { 906 + glbl_hstx_str_ctrl_0 = 0x88; 906 907 glbl_rescode_top_ctrl = 0x00; 907 908 glbl_rescode_bot_ctrl = 0x3c; 908 909 } else { 909 910 glbl_rescode_top_ctrl = less_than_1500_mhz ? 0x3d : 0x00; 910 911 glbl_rescode_bot_ctrl = less_than_1500_mhz ? 0x39 : 0x3c; 911 912 } 912 - glbl_str_swi_cal_sel_ctrl = 0x00; 913 - glbl_hstx_str_ctrl_0 = 0x88; 914 913 } else { 915 - vreg_ctrl_0 = less_than_1500_mhz ? 0x5B : 0x59; 916 914 if (phy->cphy_mode) { 917 915 glbl_str_swi_cal_sel_ctrl = 0x03; 918 916 glbl_hstx_str_ctrl_0 = 0x66; 919 917 } else { 918 + vreg_ctrl_0 = less_than_1500_mhz ? 0x5B : 0x59; 920 919 glbl_str_swi_cal_sel_ctrl = less_than_1500_mhz ? 0x03 : 0x00; 921 920 glbl_hstx_str_ctrl_0 = less_than_1500_mhz ? 0x66 : 0x88; 922 921 } 923 922 glbl_rescode_top_ctrl = 0x03; 924 923 glbl_rescode_bot_ctrl = 0x3c; 925 - } 926 - 927 - if (phy->cphy_mode) { 928 - vreg_ctrl_0 = 0x51; 929 - vreg_ctrl_1 = 0x55; 930 - glbl_pemph_ctrl_0 = 0x11; 931 - lane_ctrl0 = 0x17; 932 - } else { 933 - vreg_ctrl_1 = 0x5c; 934 - glbl_pemph_ctrl_0 = 0x00; 935 - lane_ctrl0 = 0x1f; 936 924 } 937 925 938 926 /* de-assert digital and pll power down */ ··· 976 904 dsi_phy_write(base + REG_DSI_7nm_PHY_CMN_RBUF_CTRL, 0x00); 977 905 978 906 /* program CMN_CTRL_4 for minor_ver 2 chipsets*/ 979 - data = dsi_phy_read(base + REG_DSI_7nm_PHY_CMN_REVISION_ID0); 980 - data = data & (0xf0); 981 - if (data == 0x20) 907 + if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) || 908 + (dsi_phy_read(base + REG_DSI_7nm_PHY_CMN_REVISION_ID0) & (0xf0)) == 0x20) 982 909 dsi_phy_write(base + REG_DSI_7nm_PHY_CMN_CTRL_4, 0x04); 983 910 984 911 /* Configure PHY lane swap (TODO: we need to calculate this) */ ··· 1088 1017 pr_warn("Turning OFF PHY while PLL is on\n"); 1089 1018 1090 1019 dsi_phy_hw_v4_0_config_lpcdrx(phy, false); 1020 + 1021 + /* Turn off REFGEN Vote */ 1022 + if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) || 1023 + (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2)) { 1024 + dsi_phy_write(base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10, 0x0); 1025 + wmb(); 1026 + /* Delay to ensure HW removes vote before PHY shut down */ 1027 + udelay(2); 1028 + } 1029 + 1091 1030 data = dsi_phy_read(base + REG_DSI_7nm_PHY_CMN_CTRL_0); 1092 1031 1093 1032 /* disable all lanes */ ··· 1119 1038 1120 1039 static const struct regulator_bulk_data dsi_phy_7nm_37750uA_regulators[] = { 1121 1040 { .supply = "vdds", .init_load_uA = 37550 }, 1041 + }; 1042 + 1043 + static const struct regulator_bulk_data dsi_phy_7nm_97800uA_regulators[] = { 1044 + { .supply = "vdds", .init_load_uA = 97800 }, 1045 + }; 1046 + 1047 + static const struct regulator_bulk_data dsi_phy_7nm_98400uA_regulators[] = { 1048 + { .supply = "vdds", .init_load_uA = 98400 }, 1122 1049 }; 1123 1050 1124 1051 const struct msm_dsi_phy_cfg dsi_phy_7nm_cfgs = { ··· 1152 1063 .quirks = DSI_PHY_7NM_QUIRK_V4_1, 1153 1064 }; 1154 1065 1066 + const struct msm_dsi_phy_cfg dsi_phy_7nm_6375_cfgs = { 1067 + .has_phy_lane = true, 1068 + .ops = { 1069 + .enable = dsi_7nm_phy_enable, 1070 + .disable = dsi_7nm_phy_disable, 1071 + .pll_init = dsi_pll_7nm_init, 1072 + .save_pll_state = dsi_7nm_pll_save_state, 1073 + .restore_pll_state = dsi_7nm_pll_restore_state, 1074 + }, 1075 + .min_pll_rate = 600000000UL, 1076 + #ifdef CONFIG_64BIT 1077 + .max_pll_rate = 5000000000ULL, 1078 + #else 1079 + .max_pll_rate = ULONG_MAX, 1080 + #endif 1081 + .io_start = { 0x5e94400 }, 1082 + .num_dsi_phy = 1, 1083 + .quirks = DSI_PHY_7NM_QUIRK_V4_1, 1084 + }; 1085 + 1155 1086 const struct msm_dsi_phy_cfg dsi_phy_7nm_8150_cfgs = { 1156 1087 .has_phy_lane = true, 1157 1088 .regulator_data = dsi_phy_7nm_36mA_regulators, ··· 1188 1079 .max_pll_rate = 3500000000UL, 1189 1080 .io_start = { 0xae94400, 0xae96400 }, 1190 1081 .num_dsi_phy = 2, 1082 + .quirks = DSI_PHY_7NM_QUIRK_PRE_V4_1, 1191 1083 }; 1192 1084 1193 1085 const struct msm_dsi_phy_cfg dsi_phy_7nm_7280_cfgs = { ··· 1211 1101 .io_start = { 0xae94400 }, 1212 1102 .num_dsi_phy = 1, 1213 1103 .quirks = DSI_PHY_7NM_QUIRK_V4_1, 1104 + }; 1105 + 1106 + const struct msm_dsi_phy_cfg dsi_phy_5nm_8350_cfgs = { 1107 + .has_phy_lane = true, 1108 + .regulator_data = dsi_phy_7nm_37750uA_regulators, 1109 + .num_regulators = ARRAY_SIZE(dsi_phy_7nm_37750uA_regulators), 1110 + .ops = { 1111 + .enable = dsi_7nm_phy_enable, 1112 + .disable = dsi_7nm_phy_disable, 1113 + .pll_init = dsi_pll_7nm_init, 1114 + .save_pll_state = dsi_7nm_pll_save_state, 1115 + .restore_pll_state = dsi_7nm_pll_restore_state, 1116 + .set_continuous_clock = dsi_7nm_set_continuous_clock, 1117 + }, 1118 + .min_pll_rate = 600000000UL, 1119 + #ifdef CONFIG_64BIT 1120 + .max_pll_rate = 5000000000UL, 1121 + #else 1122 + .max_pll_rate = ULONG_MAX, 1123 + #endif 1124 + .io_start = { 0xae94400, 0xae96400 }, 1125 + .num_dsi_phy = 2, 1126 + .quirks = DSI_PHY_7NM_QUIRK_V4_2, 1127 + }; 1128 + 1129 + const struct msm_dsi_phy_cfg dsi_phy_5nm_8450_cfgs = { 1130 + .has_phy_lane = true, 1131 + .regulator_data = dsi_phy_7nm_97800uA_regulators, 1132 + .num_regulators = ARRAY_SIZE(dsi_phy_7nm_97800uA_regulators), 1133 + .ops = { 1134 + .enable = dsi_7nm_phy_enable, 1135 + .disable = dsi_7nm_phy_disable, 1136 + .pll_init = dsi_pll_7nm_init, 1137 + .save_pll_state = dsi_7nm_pll_save_state, 1138 + .restore_pll_state = dsi_7nm_pll_restore_state, 1139 + .set_continuous_clock = dsi_7nm_set_continuous_clock, 1140 + }, 1141 + .min_pll_rate = 600000000UL, 1142 + #ifdef CONFIG_64BIT 1143 + .max_pll_rate = 5000000000UL, 1144 + #else 1145 + .max_pll_rate = ULONG_MAX, 1146 + #endif 1147 + .io_start = { 0xae94400, 0xae96400 }, 1148 + .num_dsi_phy = 2, 1149 + .quirks = DSI_PHY_7NM_QUIRK_V4_3, 1150 + }; 1151 + 1152 + const struct msm_dsi_phy_cfg dsi_phy_4nm_8550_cfgs = { 1153 + .has_phy_lane = true, 1154 + .regulator_data = dsi_phy_7nm_98400uA_regulators, 1155 + .num_regulators = ARRAY_SIZE(dsi_phy_7nm_98400uA_regulators), 1156 + .ops = { 1157 + .enable = dsi_7nm_phy_enable, 1158 + .disable = dsi_7nm_phy_disable, 1159 + .pll_init = dsi_pll_7nm_init, 1160 + .save_pll_state = dsi_7nm_pll_save_state, 1161 + .restore_pll_state = dsi_7nm_pll_restore_state, 1162 + .set_continuous_clock = dsi_7nm_set_continuous_clock, 1163 + }, 1164 + .min_pll_rate = 600000000UL, 1165 + #ifdef CONFIG_64BIT 1166 + .max_pll_rate = 5000000000UL, 1167 + #else 1168 + .max_pll_rate = ULONG_MAX, 1169 + #endif 1170 + .io_start = { 0xae95000, 0xae97000 }, 1171 + .num_dsi_phy = 2, 1172 + .quirks = DSI_PHY_7NM_QUIRK_V5_2, 1214 1173 };
+4
drivers/gpu/drm/msm/hdmi/hdmi.c
··· 120 120 int ret; 121 121 122 122 hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0); 123 + if (!hdmi->workq) { 124 + ret = -ENOMEM; 125 + goto fail; 126 + } 123 127 124 128 hdmi->i2c = msm_hdmi_i2c_init(hdmi); 125 129 if (IS_ERR(hdmi->i2c)) {
+13 -8
drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c
··· 406 406 .set_rate = hdmi_pll_set_rate, 407 407 }; 408 408 409 - static const char * const hdmi_pll_parents[] = { 410 - "pxo", 409 + static const struct clk_parent_data hdmi_pll_parents[] = { 410 + { .fw_name = "pxo", .name = "pxo_board" }, 411 411 }; 412 412 413 413 static struct clk_init_data pll_init = { 414 414 .name = "hdmi_pll", 415 415 .ops = &hdmi_pll_ops, 416 - .parent_names = hdmi_pll_parents, 416 + .parent_data = hdmi_pll_parents, 417 417 .num_parents = ARRAY_SIZE(hdmi_pll_parents), 418 418 .flags = CLK_IGNORE_UNUSED, 419 419 }; ··· 422 422 { 423 423 struct device *dev = &pdev->dev; 424 424 struct hdmi_pll_8960 *pll; 425 - struct clk *clk; 426 - int i; 425 + int i, ret; 427 426 428 427 /* sanity check: */ 429 428 for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++) ··· 442 443 pll->pdev = pdev; 443 444 pll->clk_hw.init = &pll_init; 444 445 445 - clk = devm_clk_register(dev, &pll->clk_hw); 446 - if (IS_ERR(clk)) { 446 + ret = devm_clk_hw_register(dev, &pll->clk_hw); 447 + if (ret < 0) { 447 448 DRM_DEV_ERROR(dev, "failed to register pll clock\n"); 448 - return -EINVAL; 449 + return ret; 450 + } 451 + 452 + ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, &pll->clk_hw); 453 + if (ret) { 454 + DRM_DEV_ERROR(dev, "%s: failed to register clk provider: %d\n", __func__, ret); 455 + return ret; 449 456 } 450 457 451 458 return 0;
+12
drivers/gpu/drm/msm/msm_debugfs.c
··· 305 305 { 306 306 struct drm_device *dev = minor->dev; 307 307 struct msm_drm_private *priv = dev->dev_private; 308 + struct dentry *gpu_devfreq; 308 309 309 310 drm_debugfs_create_files(msm_debugfs_list, 310 311 ARRAY_SIZE(msm_debugfs_list), ··· 325 324 326 325 debugfs_create_file("shrink", S_IRWXU, minor->debugfs_root, 327 326 dev, &shrink_fops); 327 + 328 + gpu_devfreq = debugfs_create_dir("devfreq", minor->debugfs_root); 329 + 330 + debugfs_create_bool("idle_clamp",0600, gpu_devfreq, 331 + &priv->gpu_clamp_to_idle); 332 + 333 + debugfs_create_u32("upthreshold",0600, gpu_devfreq, 334 + &priv->gpu_devfreq_config.upthreshold); 335 + 336 + debugfs_create_u32("downdifferential",0600, gpu_devfreq, 337 + &priv->gpu_devfreq_config.downdifferential); 328 338 329 339 if (priv->kms && priv->kms->funcs->debugfs_init) 330 340 priv->kms->funcs->debugfs_init(priv->kms, minor);
+12 -6
drivers/gpu/drm/msm/msm_drv.c
··· 45 45 * - 1.7.0 - Add MSM_PARAM_SUSPENDS to access suspend count 46 46 * - 1.8.0 - Add MSM_BO_CACHED_COHERENT for supported GPUs (a6xx) 47 47 * - 1.9.0 - Add MSM_SUBMIT_FENCE_SN_IN 48 + * - 1.10.0 - Add MSM_SUBMIT_BO_NO_IMPLICIT 48 49 */ 49 50 #define MSM_VERSION_MAJOR 1 50 - #define MSM_VERSION_MINOR 9 51 + #define MSM_VERSION_MINOR 10 51 52 #define MSM_VERSION_PATCHLEVEL 0 52 53 53 54 static const struct drm_mode_config_funcs mode_config_funcs = { ··· 149 148 { 150 149 struct msm_drm_private *priv = dev->dev_private; 151 150 struct msm_kms *kms = priv->kms; 151 + 152 + if (!priv->kms) 153 + return; 152 154 153 155 kms->funcs->irq_uninstall(kms); 154 156 if (kms->irq_requested) ··· 270 266 component_unbind_all(dev, ddev); 271 267 272 268 ddev->dev_private = NULL; 273 - drm_dev_put(ddev); 274 - 275 269 destroy_workqueue(priv->wq); 276 270 277 271 return 0; ··· 420 418 priv->dev = ddev; 421 419 422 420 priv->wq = alloc_ordered_workqueue("msm", 0); 421 + if (!priv->wq) 422 + return -ENOMEM; 423 423 424 424 INIT_LIST_HEAD(&priv->objects); 425 425 mutex_init(&priv->obj_lock); ··· 444 440 445 441 ret = msm_init_vram(ddev); 446 442 if (ret) 447 - return ret; 443 + goto err_drm_dev_put; 448 444 449 445 /* Bind all our sub-components: */ 450 446 ret = component_bind_all(dev, ddev); 451 447 if (ret) 452 - return ret; 448 + goto err_drm_dev_put; 453 449 454 450 dma_set_max_seg_size(dev, UINT_MAX); 455 451 ··· 495 491 if (IS_ERR(priv->event_thread[i].worker)) { 496 492 ret = PTR_ERR(priv->event_thread[i].worker); 497 493 DRM_DEV_ERROR(dev, "failed to create crtc_event kthread\n"); 498 - ret = PTR_ERR(priv->event_thread[i].worker); 494 + priv->event_thread[i].worker = NULL; 499 495 goto err_msm_uninit; 500 496 } 501 497 ··· 544 540 545 541 err_msm_uninit: 546 542 msm_drm_uninit(dev); 543 + err_drm_dev_put: 544 + drm_dev_put(ddev); 547 545 return ret; 548 546 } 549 547
+10 -2
drivers/gpu/drm/msm/msm_drv.h
··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/clk.h> 13 13 #include <linux/cpufreq.h> 14 + #include <linux/devfreq.h> 14 15 #include <linux/module.h> 15 16 #include <linux/component.h> 16 17 #include <linux/platform_device.h> ··· 62 61 MSM_DP_CONTROLLER_0, 63 62 MSM_DP_CONTROLLER_1, 64 63 MSM_DP_CONTROLLER_2, 64 + MSM_DP_CONTROLLER_3, 65 65 MSM_DP_CONTROLLER_COUNT, 66 66 }; 67 67 ··· 84 82 /** 85 83 * struct msm_display_topology - defines a display topology pipeline 86 84 * @num_lm: number of layer mixers used 87 - * @num_enc: number of compression encoder blocks used 88 85 * @num_intf: number of interfaces the panel is mounted on 89 86 * @num_dspp: number of dspp blocks used 90 87 * @num_dsc: number of Display Stream Compression (DSC) blocks used 91 88 */ 92 89 struct msm_display_topology { 93 90 u32 num_lm; 94 - u32 num_enc; 95 91 u32 num_intf; 96 92 u32 num_dspp; 97 93 u32 num_dsc; ··· 232 232 * "have the CP position registers changed since last time?" 233 233 */ 234 234 unsigned int hangcheck_period; 235 + 236 + /** gpu_devfreq_config: Devfreq tuning config for the GPU. */ 237 + struct devfreq_simple_ondemand_data gpu_devfreq_config; 238 + 239 + /** 240 + * gpu_clamp_to_idle: Enable clamping to idle freq when inactive 241 + */ 242 + bool gpu_clamp_to_idle; 235 243 236 244 /** 237 245 * disable_err_irq:
+1 -1
drivers/gpu/drm/msm/msm_fence.c
··· 22 22 return ERR_PTR(-ENOMEM); 23 23 24 24 fctx->dev = dev; 25 - strncpy(fctx->name, name, sizeof(fctx->name)); 25 + strscpy(fctx->name, name, sizeof(fctx->name)); 26 26 fctx->context = dma_fence_context_alloc(1); 27 27 fctx->index = index++; 28 28 fctx->fenceptr = fenceptr;
+15
drivers/gpu/drm/msm/msm_gem_submit.c
··· 209 209 goto out; 210 210 } 211 211 submit->cmd[i].relocs = kmalloc(sz, GFP_KERNEL); 212 + if (!submit->cmd[i].relocs) { 213 + ret = -ENOMEM; 214 + goto out; 215 + } 212 216 ret = copy_from_user(submit->cmd[i].relocs, userptr, sz); 213 217 if (ret) { 214 218 ret = -EFAULT; ··· 338 334 if (ret) 339 335 return ret; 340 336 337 + /* If userspace has determined that explicit fencing is 338 + * used, it can disable implicit sync on the entire 339 + * submit: 340 + */ 341 341 if (no_implicit) 342 + continue; 343 + 344 + /* Otherwise userspace can ask for implicit sync to be 345 + * disabled on specific buffers. This is useful for internal 346 + * usermode driver managed buffers, suballocation, etc. 347 + */ 348 + if (submit->bos[i].flags & MSM_SUBMIT_BO_NO_IMPLICIT) 342 349 continue; 343 350 344 351 ret = drm_sched_job_add_implicit_dependencies(&submit->base,
+7 -8
drivers/gpu/drm/msm/msm_gpu.h
··· 109 109 struct mutex lock; 110 110 111 111 /** 112 - * idle_constraint: 112 + * idle_freq: 113 113 * 114 - * A PM QoS constraint to limit max freq while the GPU is idle. 114 + * Shadow frequency used while the GPU is idle. From the PoV of 115 + * the devfreq governor, we are continuing to sample busyness and 116 + * adjust frequency while the GPU is idle, but we use this shadow 117 + * value as the GPU is actually clamped to minimum frequency while 118 + * it is inactive. 115 119 */ 116 - struct dev_pm_qos_request idle_freq; 120 + unsigned long idle_freq; 117 121 118 122 /** 119 123 * boost_constraint: ··· 138 134 139 135 /** idle_time: Time of last transition to idle: */ 140 136 ktime_t idle_time; 141 - 142 - struct devfreq_dev_status average_status; 143 137 144 138 /** 145 139 * idle_work: ··· 276 274 uint32_t suspend_count; 277 275 278 276 struct msm_gpu_state *crashstate; 279 - 280 - /* Enable clamping to idle freq when inactive: */ 281 - bool clamp_to_idle; 282 277 283 278 /* True if the hardware supports expanded apriv (a650 and newer) */ 284 279 bool hw_apriv;
+70 -78
drivers/gpu/drm/msm/msm_gpu_devfreq.c
··· 33 33 34 34 trace_msm_gpu_freq_change(dev_pm_opp_get_freq(opp)); 35 35 36 + /* 37 + * If the GPU is idle, devfreq is not aware, so just stash 38 + * the new target freq (to use when we return to active) 39 + */ 40 + if (df->idle_freq) { 41 + df->idle_freq = *freq; 42 + dev_pm_opp_put(opp); 43 + return 0; 44 + } 45 + 36 46 if (gpu->funcs->gpu_set_freq) { 37 47 mutex_lock(&df->lock); 38 48 gpu->funcs->gpu_set_freq(gpu, opp, df->suspended); ··· 58 48 59 49 static unsigned long get_freq(struct msm_gpu *gpu) 60 50 { 51 + struct msm_gpu_devfreq *df = &gpu->devfreq; 52 + 53 + /* 54 + * If the GPU is idle, use the shadow/saved freq to avoid 55 + * confusing devfreq (which is unaware that we are switching 56 + * to lowest freq until the device is active again) 57 + */ 58 + if (df->idle_freq) 59 + return df->idle_freq; 60 + 61 61 if (gpu->funcs->gpu_get_freq) 62 62 return gpu->funcs->gpu_get_freq(gpu); 63 63 64 64 return clk_get_rate(gpu->core_clk); 65 65 } 66 66 67 - static void get_raw_dev_status(struct msm_gpu *gpu, 67 + static int msm_devfreq_get_dev_status(struct device *dev, 68 68 struct devfreq_dev_status *status) 69 69 { 70 + struct msm_gpu *gpu = dev_to_gpu(dev); 70 71 struct msm_gpu_devfreq *df = &gpu->devfreq; 71 72 u64 busy_cycles, busy_time; 72 73 unsigned long sample_rate; ··· 93 72 if (df->suspended) { 94 73 mutex_unlock(&df->lock); 95 74 status->busy_time = 0; 96 - return; 75 + return 0; 97 76 } 98 77 99 78 busy_cycles = gpu->funcs->gpu_busy(gpu, &sample_rate); ··· 108 87 busy_time = ~0LU; 109 88 110 89 status->busy_time = busy_time; 111 - } 112 - 113 - static void update_average_dev_status(struct msm_gpu *gpu, 114 - const struct devfreq_dev_status *raw) 115 - { 116 - struct msm_gpu_devfreq *df = &gpu->devfreq; 117 - const u32 polling_ms = df->devfreq->profile->polling_ms; 118 - const u32 max_history_ms = polling_ms * 11 / 10; 119 - struct devfreq_dev_status *avg = &df->average_status; 120 - u64 avg_freq; 121 - 122 - /* simple_ondemand governor interacts poorly with gpu->clamp_to_idle. 123 - * When we enforce the constraint on idle, it calls get_dev_status 124 - * which would normally reset the stats. When we remove the 125 - * constraint on active, it calls get_dev_status again where busy_time 126 - * would be 0. 127 - * 128 - * To remedy this, we always return the average load over the past 129 - * polling_ms. 130 - */ 131 - 132 - /* raw is longer than polling_ms or avg has no history */ 133 - if (div_u64(raw->total_time, USEC_PER_MSEC) >= polling_ms || 134 - !avg->total_time) { 135 - *avg = *raw; 136 - return; 137 - } 138 - 139 - /* Truncate the oldest history first. 140 - * 141 - * Because we keep the history with a single devfreq_dev_status, 142 - * rather than a list of devfreq_dev_status, we have to assume freq 143 - * and load are the same over avg->total_time. We can scale down 144 - * avg->busy_time and avg->total_time by the same factor to drop 145 - * history. 146 - */ 147 - if (div_u64(avg->total_time + raw->total_time, USEC_PER_MSEC) >= 148 - max_history_ms) { 149 - const u32 new_total_time = polling_ms * USEC_PER_MSEC - 150 - raw->total_time; 151 - avg->busy_time = div_u64( 152 - mul_u32_u32(avg->busy_time, new_total_time), 153 - avg->total_time); 154 - avg->total_time = new_total_time; 155 - } 156 - 157 - /* compute the average freq over avg->total_time + raw->total_time */ 158 - avg_freq = mul_u32_u32(avg->current_frequency, avg->total_time); 159 - avg_freq += mul_u32_u32(raw->current_frequency, raw->total_time); 160 - do_div(avg_freq, avg->total_time + raw->total_time); 161 - 162 - avg->current_frequency = avg_freq; 163 - avg->busy_time += raw->busy_time; 164 - avg->total_time += raw->total_time; 165 - } 166 - 167 - static int msm_devfreq_get_dev_status(struct device *dev, 168 - struct devfreq_dev_status *status) 169 - { 170 - struct msm_gpu *gpu = dev_to_gpu(dev); 171 - struct devfreq_dev_status raw; 172 - 173 - get_raw_dev_status(gpu, &raw); 174 - update_average_dev_status(gpu, &raw); 175 - *status = gpu->devfreq.average_status; 176 90 177 91 return 0; 178 92 } ··· 139 183 void msm_devfreq_init(struct msm_gpu *gpu) 140 184 { 141 185 struct msm_gpu_devfreq *df = &gpu->devfreq; 186 + struct msm_drm_private *priv = gpu->dev->dev_private; 142 187 143 188 /* We need target support to do devfreq */ 144 189 if (!gpu->funcs->gpu_busy) 145 190 return; 146 191 192 + /* 193 + * Setup default values for simple_ondemand governor tuning. We 194 + * want to throttle up at 50% load for the double-buffer case, 195 + * where due to stalling waiting for vblank we could get stuck 196 + * at (for ex) 30fps at 50% utilization. 197 + */ 198 + priv->gpu_devfreq_config.upthreshold = 50; 199 + priv->gpu_devfreq_config.downdifferential = 10; 200 + 147 201 mutex_init(&df->lock); 148 202 149 - dev_pm_qos_add_request(&gpu->pdev->dev, &df->idle_freq, 150 - DEV_PM_QOS_MAX_FREQUENCY, 151 - PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE); 152 203 dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq, 153 204 DEV_PM_QOS_MIN_FREQUENCY, 0); 154 205 ··· 172 209 173 210 df->devfreq = devm_devfreq_add_device(&gpu->pdev->dev, 174 211 &msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND, 175 - NULL); 212 + &priv->gpu_devfreq_config); 176 213 177 214 if (IS_ERR(df->devfreq)) { 178 215 DRM_DEV_ERROR(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n"); 179 - dev_pm_qos_remove_request(&df->idle_freq); 180 216 dev_pm_qos_remove_request(&df->boost_freq); 181 217 df->devfreq = NULL; 182 218 return; ··· 217 255 218 256 devfreq_cooling_unregister(gpu->cooling); 219 257 dev_pm_qos_remove_request(&df->boost_freq); 220 - dev_pm_qos_remove_request(&df->idle_freq); 221 258 } 222 259 223 260 void msm_devfreq_resume(struct msm_gpu *gpu) ··· 289 328 { 290 329 struct msm_gpu_devfreq *df = &gpu->devfreq; 291 330 unsigned int idle_time; 331 + unsigned long target_freq; 292 332 293 333 if (!has_devfreq(gpu)) 294 334 return; ··· 299 337 */ 300 338 cancel_idle_work(df); 301 339 340 + /* 341 + * Hold devfreq lock to synchronize with get_dev_status()/ 342 + * target() callbacks 343 + */ 344 + mutex_lock(&df->devfreq->lock); 345 + 346 + target_freq = df->idle_freq; 347 + 302 348 idle_time = ktime_to_ms(ktime_sub(ktime_get(), df->idle_time)); 349 + 350 + df->idle_freq = 0; 351 + 352 + /* 353 + * We could have become active again before the idle work had a 354 + * chance to run, in which case the df->idle_freq would have 355 + * still been zero. In this case, no need to change freq. 356 + */ 357 + if (target_freq) 358 + msm_devfreq_target(&gpu->pdev->dev, &target_freq, 0); 359 + 360 + mutex_unlock(&df->devfreq->lock); 303 361 304 362 /* 305 363 * If we've been idle for a significant fraction of a polling ··· 329 347 if (idle_time > msm_devfreq_profile.polling_ms) { 330 348 msm_devfreq_boost(gpu, 2); 331 349 } 332 - 333 - dev_pm_qos_update_request(&df->idle_freq, 334 - PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE); 335 350 } 336 351 337 352 ··· 337 358 struct msm_gpu_devfreq *df = container_of(work, 338 359 struct msm_gpu_devfreq, idle_work.work); 339 360 struct msm_gpu *gpu = container_of(df, struct msm_gpu, devfreq); 361 + struct msm_drm_private *priv = gpu->dev->dev_private; 362 + unsigned long idle_freq, target_freq = 0; 363 + 364 + /* 365 + * Hold devfreq lock to synchronize with get_dev_status()/ 366 + * target() callbacks 367 + */ 368 + mutex_lock(&df->devfreq->lock); 369 + 370 + idle_freq = get_freq(gpu); 371 + 372 + if (priv->gpu_clamp_to_idle) 373 + msm_devfreq_target(&gpu->pdev->dev, &target_freq, 0); 340 374 341 375 df->idle_time = ktime_get(); 376 + df->idle_freq = idle_freq; 342 377 343 - if (gpu->clamp_to_idle) 344 - dev_pm_qos_update_request(&df->idle_freq, 0); 378 + mutex_unlock(&df->devfreq->lock); 345 379 } 346 380 347 381 void msm_devfreq_idle(struct msm_gpu *gpu)
+16
drivers/gpu/drm/msm/msm_mdss.c
··· 286 286 /* UBWC_2_0 */ 287 287 msm_mdss_setup_ubwc_dec_20(msm_mdss, 0x11f); 288 288 break; 289 + case DPU_HW_VER_700: 290 + /* TODO: highest_bank_bit = 2 for LP_DDR4 */ 291 + msm_mdss_setup_ubwc_dec_40(msm_mdss, UBWC_4_0, 6, 1, 3, 1); 292 + break; 289 293 case DPU_HW_VER_720: 290 294 msm_mdss_setup_ubwc_dec_40(msm_mdss, UBWC_3_0, 6, 1, 1, 1); 295 + break; 296 + case DPU_HW_VER_800: 297 + msm_mdss_setup_ubwc_dec_40(msm_mdss, UBWC_4_0, 6, 1, 2, 1); 298 + break; 299 + case DPU_HW_VER_810: 300 + case DPU_HW_VER_900: 301 + /* TODO: highest_bank_bit = 2 for LP_DDR4 */ 302 + msm_mdss_setup_ubwc_dec_40(msm_mdss, UBWC_4_0, 6, 1, 3, 1); 291 303 break; 292 304 } 293 305 ··· 527 515 { .compatible = "qcom,sc7180-mdss" }, 528 516 { .compatible = "qcom,sc7280-mdss" }, 529 517 { .compatible = "qcom,sc8180x-mdss" }, 518 + { .compatible = "qcom,sc8280xp-mdss" }, 530 519 { .compatible = "qcom,sm6115-mdss" }, 531 520 { .compatible = "qcom,sm8150-mdss" }, 532 521 { .compatible = "qcom,sm8250-mdss" }, 522 + { .compatible = "qcom,sm8350-mdss" }, 523 + { .compatible = "qcom,sm8450-mdss" }, 524 + { .compatible = "qcom,sm8550-mdss" }, 533 525 {} 534 526 }; 535 527 MODULE_DEVICE_TABLE(of, mdss_dt_match);
+2 -5
include/linux/devfreq.h
··· 273 273 struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node); 274 274 struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, 275 275 const char *phandle_name, int index); 276 + #endif /* CONFIG_PM_DEVFREQ */ 276 277 277 - #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) 278 278 /** 279 279 * struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq 280 280 * and devfreq_add_device ··· 292 292 unsigned int upthreshold; 293 293 unsigned int downdifferential; 294 294 }; 295 - #endif 296 295 297 - #if IS_ENABLED(CONFIG_DEVFREQ_GOV_PASSIVE) 298 296 enum devfreq_parent_dev_type { 299 297 DEVFREQ_PARENT_DEV, 300 298 CPUFREQ_PARENT_DEV, ··· 335 337 struct notifier_block nb; 336 338 struct list_head cpu_data_list; 337 339 }; 338 - #endif 339 340 340 - #else /* !CONFIG_PM_DEVFREQ */ 341 + #if !defined(CONFIG_PM_DEVFREQ) 341 342 static inline struct devfreq *devfreq_add_device(struct device *dev, 342 343 struct devfreq_dev_profile *profile, 343 344 const char *governor_name,
+3 -1
include/uapi/drm/msm_drm.h
··· 222 222 #define MSM_SUBMIT_BO_READ 0x0001 223 223 #define MSM_SUBMIT_BO_WRITE 0x0002 224 224 #define MSM_SUBMIT_BO_DUMP 0x0004 225 + #define MSM_SUBMIT_BO_NO_IMPLICIT 0x0008 225 226 226 227 #define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | \ 227 228 MSM_SUBMIT_BO_WRITE | \ 228 - MSM_SUBMIT_BO_DUMP) 229 + MSM_SUBMIT_BO_DUMP | \ 230 + MSM_SUBMIT_BO_NO_IMPLICIT) 229 231 230 232 struct drm_msm_gem_submit_bo { 231 233 __u32 flags; /* in, mask of MSM_SUBMIT_BO_x */