mdss-mdp.txt 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. Qualcomm MDSS MDP
  2. MDSS is Mobile Display SubSystem which implements Linux framebuffer APIs to
  3. drive user interface to different panel interfaces. MDP driver is the core of
  4. MDSS which manage all data paths to different panel interfaces.
  5. Required properties
  6. - compatible : Must be "qcom,mdss_mdp"
  7. - reg : offset and length of the register set for the device.
  8. - reg-names : names to refer to register sets related to this device
  9. - interrupts : Interrupt associated with MDSS.
  10. - vdd-supply : Phandle for vdd regulator device node.
  11. - qcom,max-clk-rate: Specify maximum MDP core clock rate in hz that this
  12. device supports.
  13. - qcom,mdss-pipe-vig-off: Array of offset for MDP source surface pipes of
  14. type VIG, the offsets are calculated from
  15. register "mdp_phys" defined in reg property.
  16. The number of offsets defined here should
  17. reflect the amount of VIG pipes that can be
  18. active in MDP for this configuration.
  19. - qcom,mdss-pipe-vig-fetch-id: Array of shared memory pool fetch ids
  20. corresponding to the VIG pipe offsets defined in
  21. previous property, the amount of fetch ids
  22. defined should match the number of offsets
  23. defined in property: qcom,mdss-pipe-vig-off
  24. - qcom,mdss-pipe-vig-xin-id: Array of VBIF clients ids (xins) corresponding
  25. to the respective VIG pipes. Number of xin ids
  26. defined should match the number of offsets
  27. defined in property: qcom,mdss-pipe-vig-off
  28. - qcom,mdss-pipe-vig-clk-ctrl-off: Array of offsets describing clk control
  29. offsets for dynamic clock gating. 1st value
  30. in the array represents offset of the control
  31. register. 2nd value represents bit offset within
  32. control register and 3rd value represents bit
  33. offset within status register. Number of tuples
  34. defined should match the number of offsets
  35. defined in property: qcom,mdss-pipe-vig-off
  36. - qcom,mdss-pipe-rgb-off: Array of offsets for MDP source surface pipes of
  37. type RGB, the offsets are calculated from
  38. register "mdp_phys" defined in reg property.
  39. The number of offsets defined here should
  40. reflect the amount of RGB pipes that can be
  41. active in MDP for this configuration.
  42. - qcom,mdss-pipe-rgb-fetch-id: Array of shared memory pool fetch ids
  43. corresponding to the RGB pipe offsets defined in
  44. previous property, the amount of fetch ids
  45. defined should match the number of offsets
  46. defined in property: qcom,mdss-pipe-rgb-off
  47. - qcom,mdss-pipe-rgb-xin-id: Array of VBIF clients ids (xins) corresponding
  48. to the respective RGB pipes. Number of xin ids
  49. defined should match the number of offsets
  50. defined in property: qcom,mdss-pipe-rgb-off
  51. - qcom,mdss-pipe-rgb-clk-ctrl-off: Array of offsets describing clk control
  52. offsets for dynamic clock gating. 1st value
  53. in the array represents offset of the control
  54. register. 2nd value represents bit offset within
  55. control register and 3rd value represents bit
  56. offset within status register. Number of tuples
  57. defined should match the number of offsets
  58. defined in property: qcom,mdss-pipe-rgb-off
  59. - qcom,mdss-pipe-dma-off: Array of offsets for MDP source surface pipes of
  60. type DMA, the offsets are calculated from
  61. register "mdp_phys" defined in reg property.
  62. The number of offsets defined here should
  63. reflect the amount of DMA pipes that can be
  64. active in MDP for this configuration.
  65. - qcom,mdss-pipe-dma-fetch-id: Array of shared memory pool fetch ids
  66. corresponding to the DMA pipe offsets defined in
  67. previous property, the amount of fetch ids
  68. defined should match the number of offsets
  69. defined in property: qcom,mdss-pipe-dma-off
  70. - qcom,mdss-pipe-dma-xin-id: Array of VBIF clients ids (xins) corresponding
  71. to the respective DMA pipes. Number of xin ids
  72. defined should match the number of offsets
  73. defined in property: qcom,mdss-pipe-dma-off
  74. - qcom,mdss-pipe-dma-clk-ctrl-off: Array of offsets describing clk control
  75. offsets for dynamic clock gating. 1st value
  76. in the array represents offset of the control
  77. register. 2nd value represents bit offset within
  78. control register and 3rd value represents bit
  79. offset within status register. Number of tuples
  80. defined should match the number of offsets
  81. defined in property: qcom,mdss-pipe-dma-off
  82. - qcom,mdss-smp-data: Array of shared memory pool data. There should
  83. be only two values in this property. The first
  84. value corresponds to the number of smp blocks
  85. and the second is the size of each block
  86. present in the mdss hardware.
  87. - qcom,mdss-ctl-off: Array of offset addresses for the available ctl
  88. hw blocks within MDP, these offsets are
  89. calculated from register "mdp_phys" defined in
  90. reg property. The number of ctl offsets defined
  91. here should reflect the number of control paths
  92. that can be configured concurrently on MDP for
  93. this configuration.
  94. - qcom,mdss-wb-off: Array of offset addresses for the progammable
  95. writeback blocks within MDP. The number of
  96. offsets defined should match the number of ctl
  97. blocks defined in property: qcom,mdss-ctl-off
  98. - qcom,mdss-mixer-intf-off: Array of offset addresses for the available
  99. mixer blocks that can drive data to panel
  100. interfaces.
  101. These offsets are be calculated from register
  102. "mdp_phys" defined in reg property.
  103. The number of offsets defined should reflect the
  104. amount of mixers that can drive data to a panel
  105. interface.
  106. - qcom,mdss-dspp-off: Array of offset addresses for the available dspp
  107. blocks. These offsets are calculated from
  108. regsiter "mdp_phys" defined in reg property.
  109. The number of dspp blocks should match the
  110. number of mixers driving data to interface
  111. defined in property: qcom,mdss-mixer-intf-off
  112. - qcom,mdss-pingpong-off: Array of offset addresses for the available
  113. pingpong blocks. These offsets are calculated
  114. from regsiter "mdp_phys" defined in reg property.
  115. The number of pingpong blocks should match the
  116. number of mixers driving data to interface
  117. defined in property: qcom,mdss-mixer-intf-off
  118. - qcom,mdss-mixer-wb-off: Array of offset addresses for the available
  119. mixer blocks that can be drive data to writeback
  120. block. These offsets will be calculated from
  121. register "mdp_phys" defined in reg property.
  122. The number of writeback mixer offsets defined
  123. should reflect the number of mixers that can
  124. drive data to a writeback block.
  125. - qcom,mdss-intf-off: Array of offset addresses for the available MDP
  126. video interface blocks that can drive data to a
  127. panel controller through timing engine.
  128. The offsets are calculated from "mdp_phys"
  129. defined in reg property. The number of offsets
  130. defiend should reflect the number of progammable
  131. interface blocks available in hardware.
  132. - qcom,mdss-pref-prim-intf: A string which indicates the configured hardware
  133. interface between MDP and the primary panel.
  134. Individual panel controller drivers initialize
  135. hardware based on this property.
  136. Based on the interfaces supported at present,
  137. possible values are:
  138. - "dsi"
  139. - "edp"
  140. - "hdmi"
  141. Bus Scaling Data:
  142. - qcom,msm-bus,name: String property describing MDSS client.
  143. - qcom,msm-bus,num-cases: This is the the number of Bus Scaling use cases
  144. defined in the vectors property. This must be
  145. set to <3> for MDSS driver where use-case 0 is
  146. used to take off MDSS BW votes from the system.
  147. And use-case 1 & 2 are used in ping-pong fashion
  148. to generate run-time BW requests.
  149. - qcom,msm-bus,active-only: A boolean flag indicating if it is active only.
  150. - qcom,msm-bus,num-paths: This represents the number of paths in each
  151. Bus Scaling Usecase. This value depends on
  152. how many number of AXI master ports are
  153. dedicated to MDSS for particular chipset.
  154. - qcom,msm-bus,vectors-KBps: * A series of 4 cell properties, with a format
  155. of (src, dst, ab, ib) which is defined at
  156. Documentation/devicetree/bindings/arm/msm/msm_bus.txt
  157. * Current values of src & dst are defined at
  158. arch/arm/mach-msm/msm_bus_board.h
  159. src values allowed for MDSS are:
  160. 22 = MSM_BUS_MASTER_MDP_PORT0
  161. 23 = MSM_BUS_MASTER_MDP_PORT1
  162. dst values allowed for MDSS are:
  163. 512 = MSM_BUS_SLAVE_EBI_CH0
  164. ab: Represents aggregated bandwidth.
  165. ib: Represents instantaneous bandwidth.
  166. * Total number of 4 cell properties will be
  167. (number of use-cases * number of paths).
  168. * These values will be overridden by the driver
  169. based on the run-time requirements. So initial
  170. ab and ib values defined here are random and
  171. bare no logic except for the use-case 0 where ab
  172. and ib values needs to be 0.
  173. - qcom,mdss-prefill-outstanding-buffer-bytes: The size of mdp outstanding buffer
  174. in bytes. The buffer is filled during prefill
  175. time and the buffer size shall be included in
  176. prefill bandwidth calculation.
  177. - qcom,mdss-prefill-y-buffer-bytes: The size of mdp y plane buffer in bytes. The
  178. buffer is filled during prefill time when format
  179. is YUV and the buffer size shall be included in
  180. prefill bandwidth calculation.
  181. - qcom,mdss-prefill-scaler-buffer-lines-bilinear: The value indicates how many lines
  182. of scaler line buffer need to be filled during
  183. prefill time. If bilinear scalar is enabled, then this
  184. number of lines is used to determine how many bytes
  185. of scaler buffer to be included in prefill bandwidth
  186. calculation.
  187. - qcom,mdss-prefill-scaler-buffer-lines-caf: The value indicates how many lines of
  188. of scaler line buffer need to be filled during
  189. prefill time. If CAF mode filter is enabled, then
  190. this number of lines is used to determine how many
  191. bytes of scaler buffer to be included in prefill
  192. bandwidth calculation.
  193. - qcom,mdss-prefill-post-scaler-buffer: The size of post scaler buffer in bytes.
  194. The buffer is used to smooth the output of the
  195. scaler. If the buffer is present in h/w, it is
  196. filled during prefill time and the number of bytes
  197. shall be included in prefill bandwidth calculation.
  198. - qcom,mdss-prefill-pingpong-buffer-pixels: The size of pingpong buffer in pixels.
  199. The buffer is used to keep pixels flowing to the
  200. panel interface. If the vertical start position of a
  201. layer is in the beginning of the active area, pingpong
  202. buffer must be filled during prefill time to generate
  203. starting lines. The number of bytes to be filled is
  204. determined by the line width, starting position,
  205. byte per pixel and scaling ratio, this number shall be
  206. included in prefill bandwidth calculation.
  207. - qcom,mdss-prefill-fbc-lines: The value indicates how many lines are required to fill
  208. fbc buffer during prefill time if FBC (Frame Buffer
  209. Compressor) is enabled. The number of bytes to be filled
  210. is determined by the line width, bytes per pixel and
  211. scaling ratio, this number shall be included in prefill bandwidth
  212. calculation.
  213. Optional properties:
  214. - vdd-cx-supply : Phandle for vdd CX regulator device node.
  215. - batfet-supply : Phandle for battery FET regulator device node.
  216. - qcom,vbif-settings : Array with key-value pairs of constant VBIF register
  217. settings used to setup MDSS QoS for optimum performance.
  218. The key used should be offset from "vbif_phys" register
  219. defined in reg property.
  220. - qcom,mdp-settings : Array with key-value pairs of constant MDP register
  221. settings used to setup MDSS QoS for best performance.
  222. The key used should be offset from "mdp_phys" register
  223. defined in reg property.
  224. - qcom,mdss-rot-block-size: The size of a memory block (in pixels) to be used
  225. by the rotator. If this property is not specified,
  226. then a default value of 128 pixels would be used.
  227. - qcom,mdss-has-bwc: Boolean property to indicate the presence of bandwidth
  228. compression feature in the rotator.
  229. - qcom,mdss-has-decimation: Boolean property to indicate the presence of
  230. decimation feature in fetch.
  231. - qcom,mdss-ad-off: Array of offset addresses for the available
  232. Assertive Display (AD) blocks. These offsets
  233. are calculated from the register "mdp_phys"
  234. defined in reg property. The number of AD
  235. offsets should be less than or equal to the
  236. number of mixers driving interfaces defined in
  237. property: qcom,mdss-mixer-intf-off. Assumes
  238. that AD blocks are aligned with the mixer
  239. offsets as well (i.e. the first mixer offset
  240. corresponds to the same pathway as the first
  241. AD offset).
  242. - qcom,mdss-has-wfd-blk: Boolean property to indicate the presence of dedicated
  243. writeback wfd block in MDSS as opposed to writeback
  244. block that is shared between rotator and wfd.
  245. - qcom,mdss-no-lut-read: Boolean property to indicate reading of LUT is
  246. not supported.
  247. - qcom,mdss-smp-mb-per-pipe: Maximum number of shared memory pool blocks
  248. restricted for a source surface pipe. If this
  249. property is not specified, no such restriction
  250. would be applied.
  251. - qcom,mdss-pipe-rgb-fixed-mmb: Array of indexes describing fixed Memory Macro
  252. Blocks (MMBs) for rgb pipes. First value denotes
  253. total numbers of MMBs per pipe while values, if
  254. any, following first one denotes indexes of MMBs
  255. to that RGB pipe.
  256. - qcom,max-bandwidth-low-kbps: This value indicates the max bandwidth in KB
  257. that can be supported without underflow.
  258. This is a low bandwidth threshold which should
  259. be applied in most scenarios to be safe from
  260. underflows when unable to satisfy bandwith
  261. requirements.
  262. - qcom,max-bandwidth-high-kbps: This value indicates the max bandwidth in KB
  263. that can be supported without underflow.
  264. This is a high bandwidth threshold which can be
  265. applied in scenarios where panel interface can
  266. be more tolerant to memory latency such as
  267. command mode panels.
  268. - qcom,mdss-rotator-ot-limit: This integer value indicates maximum number of pending
  269. writes that can be allowed from rotator client. Default
  270. value is 16 which is the maximum. This value can be
  271. used to reduce the pending writes limit dynamically
  272. and can be tuned to match performance requirements
  273. depending upon system state.
  274. - qcom,mdss-clk-levels: This array indicates the mdp core clock level selection
  275. array. Core clock is calculated for each frame and
  276. hence depending upon calculated value, clock rate
  277. will be rounded up to the next level according to
  278. this table. Order of entries need to be ordered in
  279. ascending order.
  280. Fudge Factors: Fudge factors are used to boost demand for
  281. resources like bus bandswidth, clk rate etc. to
  282. overcome system inefficiencies and avoid any
  283. glitches. These fudge factors are expressed in
  284. terms of numerator and denominator. First value
  285. is numerator followed by denominator. They all
  286. are optional but highly recommended.
  287. Ex:
  288. x = value to be fudged
  289. a = numerator, default value is 1
  290. b = denominator, default value is 1
  291. FUDGE(x, a, b) = ((x * a) / b)
  292. - qcom,mdss-ib-factor: This fudge factor is applied to calculated ib
  293. values in default conditions.
  294. - qcom,mdss-ib-factor-overlap: This fudge factor is applied to calculated ib
  295. values when the overlap bandwidth is the
  296. predominant value compared to prefill bandwidth
  297. value.
  298. - qcom,mdss-clk-factor: This fudge factor is applied to calculated mdp
  299. clk rate in default conditions.
  300. - qcom,mdss-highest-bank-bit: Property to indicate tile format as opposed to usual
  301. linear format. The value tells the GPU highest memory
  302. bank bit used.
  303. Optional subnodes:
  304. Child nodes representing the frame buffer virtual devices.
  305. Subnode properties:
  306. - compatible : Must be "qcom,mdss-fb"
  307. - cell-index : Index representing frame buffer
  308. - qcom,mdss-mixer-swap: A boolean property that indicates if the mixer muxes
  309. need to be swapped based on the target panel.
  310. By default the property is not defined.
  311. - qcom,mdss-fb-split: Array of splitted framebuffer size. There should
  312. be only two values in this property. The values
  313. correspond to the left and right size respectively.
  314. MDP muxes two mixer output together before sending to
  315. the panel interface and these values are used to set
  316. each mixer width, so the sum of these two values
  317. should be equal to the panel x-resolution.
  318. Note that if the sum of two values is not equal to
  319. x-resolution or this subnode itself is not defined
  320. in device tree there are two cases: 1)split is not
  321. enabled if framebuffer size is less than max mixer
  322. width; 2) the defaut even split is enabled if frambuffer
  323. size is greater than max mixer width.
  324. - qcom,memblock-reserve: Specifies the memory location and the size reserved
  325. for the framebuffer used to display the splash screen.
  326. This property is required whenever the continuous splash
  327. screen feature is enabled for the corresponding
  328. framebuffer device.
  329. - qcom,mdss-fb-splash-logo-enabled: The boolean entry enables the framebuffer
  330. driver to display the splash logo image.
  331. It is independent of continuous splash
  332. screen feature and has no relation with
  333. qcom,cont-splash-enabled entry present in
  334. panel configuration.
  335. - qcom,mdss-idle-power-collapse-enabled: Boolean property that enables support
  336. for mdss power collapse in idle
  337. screen use cases with smart panels.
  338. Example:
  339. mdss_mdp: qcom,mdss_mdp@fd900000 {
  340. compatible = "qcom,mdss_mdp";
  341. reg = <0xfd900000 0x22100>,
  342. <0xfd924000 0x1000>;
  343. reg-names = "mdp_phys", "vbif_phys";
  344. interrupts = <0 72 0>;
  345. vdd-supply = <&gdsc_mdss>;
  346. vdd-cx-supply = <&pm8841_s2_corner>;
  347. batfet-supply = <&pm8941_chg_batif>;
  348. qcom,max-bandwidth-low-kbps = <2300000>;
  349. qcom,max-bandwidth-high-kbps = <3000000>;
  350. /* Bus Scale Settings */
  351. qcom,msm-bus,name = "mdss_mdp";
  352. qcom,msm-bus,num-cases = <3>;
  353. qcom,msm-bus,num-paths = <2>;
  354. qcom,msm-bus,vectors-KBps =
  355. <22 512 0 0>, <23 512 0 0>,
  356. <22 512 0 6400000>, <23 512 0 6400000>,
  357. <22 512 0 6400000>, <23 512 0 6400000>;
  358. /* Fudge factors */
  359. qcom,mdss-ab-factor = <2 1>; /* 2 times */
  360. qcom,mdss-ib-factor = <3 2>; /* 1.5 times */
  361. qcom,mdss-clk-factor = <5 4>; /* 1.25 times */
  362. /* Clock levels */
  363. qcom,mdss-clk-levels = <92310000, 177780000, 200000000>;
  364. qcom,max-clk-rate = <320000000>;
  365. qcom,vbif-settings = <0x0004 0x00000001>,
  366. <0x00D8 0x00000707>;
  367. qcom,mdp-settings = <0x02E0 0x000000AA>,
  368. <0x02E4 0x00000055>;
  369. qcom,mdss-pipe-vig-off = <0x00001200 0x00001600
  370. 0x00001A00>;
  371. qcom,mdss-pipe-rgb-off = <0x00001E00 0x00002200
  372. 0x00002600>;
  373. qcom,mdss-pipe-dma-off = <0x00002A00 0x00002E00>;
  374. qcom,mdss-pipe-vig-fetch-id = <1 4 7>;
  375. qcom,mdss-pipe-rgb-fetch-id = <16 17 18>;
  376. qcom,mdss-pipe-dma-fetch-id = <10 13>;
  377. qcom,mdss-pipe-rgb-fixed-mmb = <2 0 1>,
  378. <2 2 3>,
  379. <2 4 5>,
  380. <2 6 7>;
  381. qcom,mdss-pipe-vig-xin-id = <0 4 8>;
  382. qcom,mdss-pipe-rgb-xin-id = <1 5 9>;
  383. qcom,mdss-pipe-dma-xin-id = <2 10>;
  384. qcom,mdss-smp-data = <22 4096>;
  385. qcom,mdss-rot-block-size = <64>;
  386. qcom,mdss-rotator-ot-limit = <2>;
  387. qcom,mdss-smp-mb-per-pipe = <2>;
  388. qcom,mdss-pref-prim-intf = "dsi";
  389. qcom,mdss-has-bwc;
  390. qcom,mdss-has-decimation;
  391. qcom,mdss-has-wfd-blk;
  392. qcom,mdss-no-lut-read;
  393. qcom,mdss-pipe-vig-clk-ctrl-offsets = <0x3AC 0 0>,
  394. <0x3B4 0 0>,
  395. <0x3BC 0 0>,
  396. <0x3C4 0 0>;
  397. qcom,mdss-pipe-rgb-clk-ctrl-offsets = <0x3AC 4 8>,
  398. <0x3B4 4 8>,
  399. <0x3BC 4 8>,
  400. <0x3C4 4 8>;
  401. qcom,mdss-pipe-dma-clk-ctrl-offsets = <0x3AC 8 12>,
  402. <0x3B4 8 12>;
  403. qcom,mdss-ctl-off = <0x00000600 0x00000700 0x00000800
  404. 0x00000900 0x0000A00>;
  405. qcom,mdss-mixer-intf-off = <0x00003200 0x00003600
  406. 0x00003A00>;
  407. qcom,mdss-mixer-wb-off = <0x00003E00 0x00004200>;
  408. qcom,mdss-dspp-off = <0x00004600 0x00004A00 0x00004E00>;
  409. qcom,mdss-pingpong-off = <0x00012D00 0x00012E00 0x00012F00>;
  410. qcom,mdss-wb-off = <0x00011100 0x00013100 0x00015100
  411. 0x00017100 0x00019100>;
  412. qcom,mdss-intf-off = <0x00021100 0x00021300
  413. 0x00021500 0x00021700>;
  414. /* buffer parameters to calculate prefill bandwidth */
  415. qcom,mdss-prefill-outstanding-buffer-bytes = <1024>;
  416. qcom,mdss-prefill-y-buffer-bytes = <4096>;
  417. qcom,mdss-prefill-scaler-buffer-lines-bilinear = <2>;
  418. qcom,mdss-prefill-scaler-buffer-lines-caf = <4>;
  419. qcom,mdss-prefill-post-scaler-buffer-pixels = <2048>;
  420. qcom,mdss-prefill-pingpong-buffer-pixels = <5120>;
  421. qcom,mdss-prefill-fbc-lines = <2>;
  422. qcom,mdss-idle-power-collapse-enabled;
  423. mdss_fb0: qcom,mdss_fb_primary {
  424. cell-index = <0>;
  425. compatible = "qcom,mdss-fb";
  426. qcom,mdss-mixer-swap;
  427. qcom,mdss-fb-split = <480 240>
  428. qcom,mdss-fb-splash-logo-enabled:
  429. };
  430. };