Merge tag 'drm-msm-next-2023-04-10' of https://gitlab.freedesktop.org/drm/msm into drm-next
main pull request for v6.4 Core Display: ============ * Bugfixes for error handling during probe * rework UBWC decoder programming * prepare_commit cleanup * bindings for SM8550 (MDSS, DPU), SM8450 (DP) * timeout calculation fixup * atomic: use drm_crtc_next_vblank_start() instead of our own custom thing to calculate the start of next vblank DP: == * interrupts cleanup DPU: === * DSPP sub-block flush on sc7280 * support AR30 in addition to XR30 format * Allow using REC_0 and REC_1 to handle wide (4k) RGB planes * Split the HW catalog into individual per-SoC files DSI: === * rework DSI instance ID detection on obscure platforms GPU: === * uapi C++ compatibility fix * a6xx: More robust gdsc reset * a3xx and a4xx devfreq support * update generated headers * various cleanups and fixes * GPU and GEM updates to avoid allocations which could trigger reclaim (shrinker) in fence signaling path * dma-fence deadline hint support and wait-boost * a640 speedbin support * a650 speedbin support Conflicts in drivers/gpu/drm/msm/adreno/adreno_gpu.c: Conflict between the7fa5047a43
("drm: Use of_property_present() for testing DT property presence") and9f251f9340
("drm/msm/adreno: Use OPP for every GPU generation"). The latter removed the of_ function call outright, so I went with what's in the PR unchanged. From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvwuj5tabyW910+N-B=5kFNAC7QNYoQ=0xi3roBjQvFFQ@mail.gmail.com Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
Коммит
b8d85bb505
|
@ -15,16 +15,21 @@ description: |
|
|||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sc7180-dp
|
||||
- qcom,sc7280-dp
|
||||
- qcom,sc7280-edp
|
||||
- qcom,sc8180x-dp
|
||||
- qcom,sc8180x-edp
|
||||
- qcom,sc8280xp-dp
|
||||
- qcom,sc8280xp-edp
|
||||
- qcom,sdm845-dp
|
||||
- qcom,sm8350-dp
|
||||
oneOf:
|
||||
- enum:
|
||||
- qcom,sc7180-dp
|
||||
- qcom,sc7280-dp
|
||||
- qcom,sc7280-edp
|
||||
- qcom,sc8180x-dp
|
||||
- qcom,sc8180x-edp
|
||||
- qcom,sc8280xp-dp
|
||||
- qcom,sc8280xp-edp
|
||||
- qcom,sdm845-dp
|
||||
- qcom,sm8350-dp
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sm8450-dp
|
||||
- const: qcom,sm8350-dp
|
||||
|
||||
reg:
|
||||
minItems: 4
|
||||
|
|
|
@ -25,16 +25,16 @@ properties:
|
|||
- qcom,sc7280-dsi-ctrl
|
||||
- qcom,sdm660-dsi-ctrl
|
||||
- qcom,sdm845-dsi-ctrl
|
||||
- qcom,sm6115-dsi-ctrl
|
||||
- qcom,sm8150-dsi-ctrl
|
||||
- qcom,sm8250-dsi-ctrl
|
||||
- qcom,sm8350-dsi-ctrl
|
||||
- qcom,sm8450-dsi-ctrl
|
||||
- qcom,sm8550-dsi-ctrl
|
||||
- const: qcom,mdss-dsi-ctrl
|
||||
- items:
|
||||
- enum:
|
||||
- dsi-ctrl-6g-qcm2290
|
||||
- const: qcom,mdss-dsi-ctrl
|
||||
- enum:
|
||||
- qcom,dsi-ctrl-6g-qcm2290
|
||||
- qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible
|
||||
deprecated: true
|
||||
|
||||
reg:
|
||||
|
@ -351,6 +351,7 @@ allOf:
|
|||
contains:
|
||||
enum:
|
||||
- qcom,sdm845-dsi-ctrl
|
||||
- qcom,sm6115-dsi-ctrl
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
|
|
|
@ -40,7 +40,13 @@ patternProperties:
|
|||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,dsi-ctrl-6g-qcm2290
|
||||
oneOf:
|
||||
- items:
|
||||
- const: qcom,sm6115-dsi-ctrl
|
||||
- const: qcom,mdss-dsi-ctrl
|
||||
- description: Old binding, please don't use
|
||||
deprecated: true
|
||||
const: qcom,dsi-ctrl-6g-qcm2290
|
||||
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
|
@ -114,7 +120,7 @@ examples:
|
|||
};
|
||||
|
||||
dsi@5e94000 {
|
||||
compatible = "qcom,dsi-ctrl-6g-qcm2290";
|
||||
compatible = "qcom,sm6115-dsi-ctrl", "qcom,mdss-dsi-ctrl";
|
||||
reg = <0x05e94000 0x400>;
|
||||
reg-names = "dsi_ctrl";
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ patternProperties:
|
|||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,dsi-phy-5nm-8450
|
||||
const: qcom,sm8450-dsi-phy-5nm
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
@ -254,7 +254,7 @@ examples:
|
|||
};
|
||||
|
||||
dsi0_phy: phy@ae94400 {
|
||||
compatible = "qcom,dsi-phy-5nm-8450";
|
||||
compatible = "qcom,sm8450-dsi-phy-5nm";
|
||||
reg = <0x0ae94400 0x200>,
|
||||
<0x0ae94600 0x280>,
|
||||
<0x0ae94900 0x260>;
|
||||
|
@ -325,7 +325,7 @@ examples:
|
|||
};
|
||||
|
||||
dsi1_phy: phy@ae96400 {
|
||||
compatible = "qcom,dsi-phy-5nm-8450";
|
||||
compatible = "qcom,sm8450-dsi-phy-5nm";
|
||||
reg = <0x0ae96400 0x200>,
|
||||
<0x0ae96600 0x280>,
|
||||
<0x0ae96900 0x260>;
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/qcom,sm8550-dpu.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm SM8550 Display DPU
|
||||
|
||||
maintainers:
|
||||
- Neil Armstrong <neil.armstrong@linaro.org>
|
||||
|
||||
$ref: /schemas/display/msm/dpu-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8550-dpu
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: Address offset and size for mdp register set
|
||||
- description: Address offset and size for vbif register set
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: mdp
|
||||
- const: vbif
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display AHB
|
||||
- description: Display hf axi
|
||||
- description: Display MDSS ahb
|
||||
- description: Display lut
|
||||
- description: Display core
|
||||
- description: Display vsync
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bus
|
||||
- const: nrt_bus
|
||||
- const: iface
|
||||
- const: lut
|
||||
- const: core
|
||||
- const: vsync
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- clocks
|
||||
- clock-names
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,sm8550-dispcc.h>
|
||||
#include <dt-bindings/clock/qcom,sm8550-gcc.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
display-controller@ae01000 {
|
||||
compatible = "qcom,sm8550-dpu";
|
||||
reg = <0x0ae01000 0x8f000>,
|
||||
<0x0aeb0000 0x2008>;
|
||||
reg-names = "mdp", "vbif";
|
||||
|
||||
clocks = <&gcc GCC_DISP_AHB_CLK>,
|
||||
<&gcc GCC_DISP_HF_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
clock-names = "bus",
|
||||
"nrt_bus",
|
||||
"iface",
|
||||
"lut",
|
||||
"core",
|
||||
"vsync";
|
||||
|
||||
assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
assigned-clock-rates = <19200000>;
|
||||
|
||||
operating-points-v2 = <&mdp_opp_table>;
|
||||
power-domains = <&rpmhpd SM8550_MMCX>;
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dpu_intf1_out: endpoint {
|
||||
remote-endpoint = <&dsi0_in>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dpu_intf2_out: endpoint {
|
||||
remote-endpoint = <&dsi1_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mdp_opp_table: opp-table {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp-200000000 {
|
||||
opp-hz = /bits/ 64 <200000000>;
|
||||
required-opps = <&rpmhpd_opp_low_svs>;
|
||||
};
|
||||
|
||||
opp-325000000 {
|
||||
opp-hz = /bits/ 64 <325000000>;
|
||||
required-opps = <&rpmhpd_opp_svs>;
|
||||
};
|
||||
|
||||
opp-375000000 {
|
||||
opp-hz = /bits/ 64 <375000000>;
|
||||
required-opps = <&rpmhpd_opp_svs_l1>;
|
||||
};
|
||||
|
||||
opp-514000000 {
|
||||
opp-hz = /bits/ 64 <514000000>;
|
||||
required-opps = <&rpmhpd_opp_nom>;
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,333 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/qcom,sm8550-mdss.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm SM8550 Display MDSS
|
||||
|
||||
maintainers:
|
||||
- Neil Armstrong <neil.armstrong@linaro.org>
|
||||
|
||||
description:
|
||||
SM8550 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
|
||||
DPU display controller, DSI and DP interfaces etc.
|
||||
|
||||
$ref: /schemas/display/msm/mdss-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8550-mdss
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display MDSS AHB
|
||||
- description: Display AHB
|
||||
- description: Display hf AXI
|
||||
- description: Display core
|
||||
|
||||
iommus:
|
||||
maxItems: 1
|
||||
|
||||
interconnects:
|
||||
maxItems: 2
|
||||
|
||||
interconnect-names:
|
||||
maxItems: 2
|
||||
|
||||
patternProperties:
|
||||
"^display-controller@[0-9a-f]+$":
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8550-dpu
|
||||
|
||||
"^dsi@[0-9a-f]+$":
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,sm8550-dsi-ctrl
|
||||
- const: qcom,mdss-dsi-ctrl
|
||||
|
||||
"^phy@[0-9a-f]+$":
|
||||
type: object
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8550-dsi-phy-4nm
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,sm8550-dispcc.h>
|
||||
#include <dt-bindings/clock/qcom,sm8550-gcc.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interconnect/qcom,sm8550-rpmh.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
display-subsystem@ae00000 {
|
||||
compatible = "qcom,sm8550-mdss";
|
||||
reg = <0x0ae00000 0x1000>;
|
||||
reg-names = "mdss";
|
||||
|
||||
interconnects = <&mmss_noc MASTER_MDP 0 &gem_noc SLAVE_LLCC 0>,
|
||||
<&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "mdp0-mem", "mdp1-mem";
|
||||
|
||||
resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
|
||||
|
||||
power-domains = <&dispcc MDSS_GDSC>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&gcc GCC_DISP_AHB_CLK>,
|
||||
<&gcc GCC_DISP_HF_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>;
|
||||
clock-names = "iface", "bus", "nrt_bus", "core";
|
||||
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
iommus = <&apps_smmu 0x1c00 0x2>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
display-controller@ae01000 {
|
||||
compatible = "qcom,sm8550-dpu";
|
||||
reg = <0x0ae01000 0x8f000>,
|
||||
<0x0aeb0000 0x2008>;
|
||||
reg-names = "mdp", "vbif";
|
||||
|
||||
clocks = <&gcc GCC_DISP_AHB_CLK>,
|
||||
<&gcc GCC_DISP_HF_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
clock-names = "bus",
|
||||
"nrt_bus",
|
||||
"iface",
|
||||
"lut",
|
||||
"core",
|
||||
"vsync";
|
||||
|
||||
assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
assigned-clock-rates = <19200000>;
|
||||
|
||||
operating-points-v2 = <&mdp_opp_table>;
|
||||
power-domains = <&rpmhpd SM8550_MMCX>;
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dpu_intf1_out: endpoint {
|
||||
remote-endpoint = <&dsi0_in>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dpu_intf2_out: endpoint {
|
||||
remote-endpoint = <&dsi1_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mdp_opp_table: opp-table {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp-200000000 {
|
||||
opp-hz = /bits/ 64 <200000000>;
|
||||
required-opps = <&rpmhpd_opp_low_svs>;
|
||||
};
|
||||
|
||||
opp-325000000 {
|
||||
opp-hz = /bits/ 64 <325000000>;
|
||||
required-opps = <&rpmhpd_opp_svs>;
|
||||
};
|
||||
|
||||
opp-375000000 {
|
||||
opp-hz = /bits/ 64 <375000000>;
|
||||
required-opps = <&rpmhpd_opp_svs_l1>;
|
||||
};
|
||||
|
||||
opp-514000000 {
|
||||
opp-hz = /bits/ 64 <514000000>;
|
||||
required-opps = <&rpmhpd_opp_nom>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dsi@ae94000 {
|
||||
compatible = "qcom,sm8550-dsi-ctrl", "qcom,mdss-dsi-ctrl";
|
||||
reg = <0x0ae94000 0x400>;
|
||||
reg-names = "dsi_ctrl";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <4>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_PCLK0_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_ESC0_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&gcc GCC_DISP_HF_AXI_CLK>;
|
||||
clock-names = "byte",
|
||||
"byte_intf",
|
||||
"pixel",
|
||||
"core",
|
||||
"iface",
|
||||
"bus";
|
||||
|
||||
assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
|
||||
<&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
|
||||
assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
|
||||
|
||||
operating-points-v2 = <&dsi_opp_table>;
|
||||
power-domains = <&rpmhpd SM8550_MMCX>;
|
||||
|
||||
phys = <&dsi0_phy>;
|
||||
phy-names = "dsi";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi0_in: endpoint {
|
||||
remote-endpoint = <&dpu_intf1_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi0_out: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dsi_opp_table: opp-table {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp-187500000 {
|
||||
opp-hz = /bits/ 64 <187500000>;
|
||||
required-opps = <&rpmhpd_opp_low_svs>;
|
||||
};
|
||||
|
||||
opp-300000000 {
|
||||
opp-hz = /bits/ 64 <300000000>;
|
||||
required-opps = <&rpmhpd_opp_svs>;
|
||||
};
|
||||
|
||||
opp-358000000 {
|
||||
opp-hz = /bits/ 64 <358000000>;
|
||||
required-opps = <&rpmhpd_opp_svs_l1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dsi0_phy: phy@ae94400 {
|
||||
compatible = "qcom,sm8550-dsi-phy-4nm";
|
||||
reg = <0x0ae95000 0x200>,
|
||||
<0x0ae95200 0x280>,
|
||||
<0x0ae95500 0x400>;
|
||||
reg-names = "dsi_phy",
|
||||
"dsi_phy_lane",
|
||||
"dsi_pll";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
|
||||
dsi@ae96000 {
|
||||
compatible = "qcom,sm8550-dsi-ctrl", "qcom,mdss-dsi-ctrl";
|
||||
reg = <0x0ae96000 0x400>;
|
||||
reg-names = "dsi_ctrl";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <5>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_PCLK1_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_ESC1_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&gcc GCC_DISP_HF_AXI_CLK>;
|
||||
clock-names = "byte",
|
||||
"byte_intf",
|
||||
"pixel",
|
||||
"core",
|
||||
"iface",
|
||||
"bus";
|
||||
|
||||
assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK_SRC>,
|
||||
<&dispcc DISP_CC_MDSS_PCLK1_CLK_SRC>;
|
||||
assigned-clock-parents = <&dsi1_phy 0>, <&dsi1_phy 1>;
|
||||
|
||||
operating-points-v2 = <&dsi_opp_table>;
|
||||
power-domains = <&rpmhpd SM8550_MMCX>;
|
||||
|
||||
phys = <&dsi1_phy>;
|
||||
phy-names = "dsi";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi1_in: endpoint {
|
||||
remote-endpoint = <&dpu_intf2_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi1_out: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dsi1_phy: phy@ae96400 {
|
||||
compatible = "qcom,sm8550-dsi-phy-4nm";
|
||||
reg = <0x0ae97000 0x200>,
|
||||
<0x0ae97200 0x280>,
|
||||
<0x0ae97500 0x400>;
|
||||
reg-names = "dsi_phy",
|
||||
"dsi_phy_lane",
|
||||
"dsi_pll";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
};
|
||||
...
|
|
@ -6518,6 +6518,7 @@ L: linux-arm-msm@vger.kernel.org
|
|||
L: dri-devel@lists.freedesktop.org
|
||||
L: freedreno@lists.freedesktop.org
|
||||
S: Maintained
|
||||
B: https://gitlab.freedesktop.org/drm/msm/-/issues
|
||||
T: git https://gitlab.freedesktop.org/drm/msm.git
|
||||
F: Documentation/devicetree/bindings/display/msm/
|
||||
F: drivers/gpu/drm/msm/
|
||||
|
|
|
@ -111,30 +111,82 @@ static void panel_bridge_detach(struct drm_bridge *bridge)
|
|||
drm_connector_cleanup(connector);
|
||||
}
|
||||
|
||||
static void panel_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
static void panel_bridge_atomic_pre_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_encoder *encoder = bridge->encoder;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
|
||||
crtc = drm_atomic_get_new_crtc_for_encoder(atomic_state, encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
drm_panel_prepare(panel_bridge->panel);
|
||||
}
|
||||
|
||||
static void panel_bridge_enable(struct drm_bridge *bridge)
|
||||
static void panel_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_encoder *encoder = bridge->encoder;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
|
||||
crtc = drm_atomic_get_new_crtc_for_encoder(atomic_state, encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
drm_panel_enable(panel_bridge->panel);
|
||||
}
|
||||
|
||||
static void panel_bridge_disable(struct drm_bridge *bridge)
|
||||
static void panel_bridge_atomic_disable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_encoder *encoder = bridge->encoder;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
|
||||
crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state, encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
|
||||
if (new_crtc_state && new_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
drm_panel_disable(panel_bridge->panel);
|
||||
}
|
||||
|
||||
static void panel_bridge_post_disable(struct drm_bridge *bridge)
|
||||
static void panel_bridge_atomic_post_disable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_encoder *encoder = bridge->encoder;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state;
|
||||
|
||||
crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state, encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
|
||||
if (new_crtc_state && new_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
drm_panel_unprepare(panel_bridge->panel);
|
||||
}
|
||||
|
@ -161,10 +213,10 @@ static void panel_bridge_debugfs_init(struct drm_bridge *bridge,
|
|||
static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
|
||||
.attach = panel_bridge_attach,
|
||||
.detach = panel_bridge_detach,
|
||||
.pre_enable = panel_bridge_pre_enable,
|
||||
.enable = panel_bridge_enable,
|
||||
.disable = panel_bridge_disable,
|
||||
.post_disable = panel_bridge_post_disable,
|
||||
.atomic_pre_enable = panel_bridge_atomic_pre_enable,
|
||||
.atomic_enable = panel_bridge_atomic_enable,
|
||||
.atomic_disable = panel_bridge_atomic_disable,
|
||||
.atomic_post_disable = panel_bridge_atomic_post_disable,
|
||||
.get_modes = panel_bridge_get_modes,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
|
|
|
@ -984,6 +984,66 @@ drm_atomic_get_new_connector_for_encoder(const struct drm_atomic_state *state,
|
|||
}
|
||||
EXPORT_SYMBOL(drm_atomic_get_new_connector_for_encoder);
|
||||
|
||||
/**
|
||||
* drm_atomic_get_old_crtc_for_encoder - Get old crtc for an encoder
|
||||
* @state: Atomic state
|
||||
* @encoder: The encoder to fetch the crtc state for
|
||||
*
|
||||
* This function finds and returns the crtc that was connected to @encoder
|
||||
* as specified by the @state.
|
||||
*
|
||||
* Returns: The old crtc connected to @encoder, or NULL if the encoder is
|
||||
* not connected.
|
||||
*/
|
||||
struct drm_crtc *
|
||||
drm_atomic_get_old_crtc_for_encoder(struct drm_atomic_state *state,
|
||||
struct drm_encoder *encoder)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *conn_state;
|
||||
|
||||
connector = drm_atomic_get_old_connector_for_encoder(state, encoder);
|
||||
if (!connector)
|
||||
return NULL;
|
||||
|
||||
conn_state = drm_atomic_get_old_connector_state(state, connector);
|
||||
if (!conn_state)
|
||||
return NULL;
|
||||
|
||||
return conn_state->crtc;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_get_old_crtc_for_encoder);
|
||||
|
||||
/**
|
||||
* drm_atomic_get_new_crtc_for_encoder - Get new crtc for an encoder
|
||||
* @state: Atomic state
|
||||
* @encoder: The encoder to fetch the crtc state for
|
||||
*
|
||||
* This function finds and returns the crtc that will be connected to @encoder
|
||||
* as specified by the @state.
|
||||
*
|
||||
* Returns: The new crtc connected to @encoder, or NULL if the encoder is
|
||||
* not connected.
|
||||
*/
|
||||
struct drm_crtc *
|
||||
drm_atomic_get_new_crtc_for_encoder(struct drm_atomic_state *state,
|
||||
struct drm_encoder *encoder)
|
||||
{
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_state *conn_state;
|
||||
|
||||
connector = drm_atomic_get_new_connector_for_encoder(state, encoder);
|
||||
if (!connector)
|
||||
return NULL;
|
||||
|
||||
conn_state = drm_atomic_get_new_connector_state(state, connector);
|
||||
if (!conn_state)
|
||||
return NULL;
|
||||
|
||||
return conn_state->crtc;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_get_new_crtc_for_encoder);
|
||||
|
||||
/**
|
||||
* drm_atomic_get_connector_state - get connector state
|
||||
* @state: global atomic state object
|
||||
|
|
|
@ -1337,7 +1337,15 @@ drm_gem_lru_remove(struct drm_gem_object *obj)
|
|||
}
|
||||
EXPORT_SYMBOL(drm_gem_lru_remove);
|
||||
|
||||
static void
|
||||
/**
|
||||
* drm_gem_lru_move_tail_locked - move the object to the tail of the LRU
|
||||
*
|
||||
* Like &drm_gem_lru_move_tail but lru lock must be held
|
||||
*
|
||||
* @lru: The LRU to move the object into.
|
||||
* @obj: The GEM object to move into this LRU
|
||||
*/
|
||||
void
|
||||
drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj)
|
||||
{
|
||||
lockdep_assert_held_once(lru->lock);
|
||||
|
@ -1349,6 +1357,7 @@ drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj
|
|||
list_add_tail(&obj->lru_node, &lru->list);
|
||||
obj->lru = lru;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_gem_lru_move_tail_locked);
|
||||
|
||||
/**
|
||||
* drm_gem_lru_move_tail - move the object to the tail of the LRU
|
||||
|
|
|
@ -9,6 +9,7 @@ config DRM_MSM
|
|||
depends on QCOM_OCMEM || QCOM_OCMEM=n
|
||||
depends on QCOM_LLCC || QCOM_LLCC=n
|
||||
depends on QCOM_COMMAND_DB || QCOM_COMMAND_DB=n
|
||||
depends on PM
|
||||
select IOMMU_IO_PGTABLE
|
||||
select QCOM_MDT_LOADER if ARCH_QCOM
|
||||
select REGULATOR
|
||||
|
@ -28,6 +29,7 @@ config DRM_MSM
|
|||
select SYNC_FILE
|
||||
select PM_OPP
|
||||
select NVMEM
|
||||
select PM_GENERIC_DOMAINS
|
||||
help
|
||||
DRM/KMS driver for MSM/snapdragon.
|
||||
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2023 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -1060,6 +1060,12 @@ enum a2xx_mh_perfcnt_select {
|
|||
AXI_TOTAL_READ_REQUEST_DATA_BEATS = 181,
|
||||
};
|
||||
|
||||
enum perf_mode_cnt {
|
||||
PERF_STATE_RESET = 0,
|
||||
PERF_STATE_ENABLE = 1,
|
||||
PERF_STATE_FREEZE = 2,
|
||||
};
|
||||
|
||||
enum adreno_mmu_clnt_beh {
|
||||
BEH_NEVR = 0,
|
||||
BEH_TRAN_RNG = 1,
|
||||
|
@ -1307,6 +1313,18 @@ static inline uint32_t A2XX_MH_MMU_VA_RANGE_VA_BASE(uint32_t val)
|
|||
#define A2XX_RBBM_PM_OVERRIDE1_MH_TCROQ_SCLK_PM_OVERRIDE 0x80000000
|
||||
|
||||
#define REG_A2XX_RBBM_PM_OVERRIDE2 0x0000039d
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_PA_REG_SCLK_PM_OVERRIDE 0x00000001
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_PA_PA_SCLK_PM_OVERRIDE 0x00000002
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_PA_AG_SCLK_PM_OVERRIDE 0x00000004
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_VGT_REG_SCLK_PM_OVERRIDE 0x00000008
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_VGT_FIFOS_SCLK_PM_OVERRIDE 0x00000010
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_VGT_VGT_SCLK_PM_OVERRIDE 0x00000020
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_DEBUG_PERF_SCLK_PM_OVERRIDE 0x00000040
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_PERM_SCLK_PM_OVERRIDE 0x00000080
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_GC_GA_GMEM0_PM_OVERRIDE 0x00000100
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_GC_GA_GMEM1_PM_OVERRIDE 0x00000200
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_GC_GA_GMEM2_PM_OVERRIDE 0x00000400
|
||||
#define A2XX_RBBM_PM_OVERRIDE2_GC_GA_GMEM3_PM_OVERRIDE 0x00000800
|
||||
|
||||
#define REG_A2XX_RBBM_DEBUG_OUT 0x000003a0
|
||||
|
||||
|
@ -1334,6 +1352,12 @@ static inline uint32_t A2XX_MH_MMU_VA_RANGE_VA_BASE(uint32_t val)
|
|||
#define REG_A2XX_RBBM_PERIPHID2 0x000003fa
|
||||
|
||||
#define REG_A2XX_CP_PERFMON_CNTL 0x00000444
|
||||
#define A2XX_CP_PERFMON_CNTL_PERF_MODE_CNT__MASK 0x00000007
|
||||
#define A2XX_CP_PERFMON_CNTL_PERF_MODE_CNT__SHIFT 0
|
||||
static inline uint32_t A2XX_CP_PERFMON_CNTL_PERF_MODE_CNT(enum perf_mode_cnt val)
|
||||
{
|
||||
return ((val) << A2XX_CP_PERFMON_CNTL_PERF_MODE_CNT__SHIFT) & A2XX_CP_PERFMON_CNTL_PERF_MODE_CNT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A2XX_CP_PERFCOUNTER_SELECT 0x00000445
|
||||
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -477,6 +477,16 @@ static struct msm_gpu_state *a3xx_gpu_state_get(struct msm_gpu *gpu)
|
|||
return state;
|
||||
}
|
||||
|
||||
static u64 a3xx_gpu_busy(struct msm_gpu *gpu, unsigned long *out_sample_rate)
|
||||
{
|
||||
u64 busy_cycles;
|
||||
|
||||
busy_cycles = gpu_read64(gpu, REG_A3XX_RBBM_PERFCTR_RBBM_1_LO);
|
||||
*out_sample_rate = clk_get_rate(gpu->core_clk);
|
||||
|
||||
return busy_cycles;
|
||||
}
|
||||
|
||||
static u32 a3xx_get_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
||||
{
|
||||
ring->memptrs->rptr = gpu_read(gpu, REG_AXXX_CP_RB_RPTR);
|
||||
|
@ -498,6 +508,7 @@ static const struct adreno_gpu_funcs funcs = {
|
|||
#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
|
||||
.show = adreno_show,
|
||||
#endif
|
||||
.gpu_busy = a3xx_gpu_busy,
|
||||
.gpu_state_get = a3xx_gpu_state_get,
|
||||
.gpu_state_put = adreno_gpu_state_put,
|
||||
.create_address_space = adreno_create_address_space,
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@ -3159,6 +3159,18 @@ static inline uint32_t A4XX_TPL1_TP_TEX_COUNT_GS(uint32_t val)
|
|||
#define REG_A4XX_TPL1_TP_GS_BORDER_COLOR_BASE_ADDR 0x0000238d
|
||||
|
||||
#define REG_A4XX_TPL1_TP_FS_TEX_COUNT 0x000023a0
|
||||
#define A4XX_TPL1_TP_FS_TEX_COUNT_FS__MASK 0x000000ff
|
||||
#define A4XX_TPL1_TP_FS_TEX_COUNT_FS__SHIFT 0
|
||||
static inline uint32_t A4XX_TPL1_TP_FS_TEX_COUNT_FS(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_TPL1_TP_FS_TEX_COUNT_FS__SHIFT) & A4XX_TPL1_TP_FS_TEX_COUNT_FS__MASK;
|
||||
}
|
||||
#define A4XX_TPL1_TP_FS_TEX_COUNT_CS__MASK 0x0000ff00
|
||||
#define A4XX_TPL1_TP_FS_TEX_COUNT_CS__SHIFT 8
|
||||
static inline uint32_t A4XX_TPL1_TP_FS_TEX_COUNT_CS(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_TPL1_TP_FS_TEX_COUNT_CS__SHIFT) & A4XX_TPL1_TP_FS_TEX_COUNT_CS__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_TPL1_TP_FS_BORDER_COLOR_BASE_ADDR 0x000023a1
|
||||
|
||||
|
|
|
@ -611,6 +611,16 @@ static int a4xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u64 a4xx_gpu_busy(struct msm_gpu *gpu, unsigned long *out_sample_rate)
|
||||
{
|
||||
u64 busy_cycles;
|
||||
|
||||
busy_cycles = gpu_read64(gpu, REG_A4XX_RBBM_PERFCTR_RBBM_1_LO);
|
||||
*out_sample_rate = clk_get_rate(gpu->core_clk);
|
||||
|
||||
return busy_cycles;
|
||||
}
|
||||
|
||||
static u32 a4xx_get_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
||||
{
|
||||
ring->memptrs->rptr = gpu_read(gpu, REG_A4XX_CP_RB_RPTR);
|
||||
|
@ -632,6 +642,7 @@ static const struct adreno_gpu_funcs funcs = {
|
|||
#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
|
||||
.show = adreno_show,
|
||||
#endif
|
||||
.gpu_busy = a4xx_gpu_busy,
|
||||
.gpu_state_get = a4xx_gpu_state_get,
|
||||
.gpu_state_put = adreno_gpu_state_put,
|
||||
.create_address_space = adreno_create_address_space,
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
Copyright (C) 2013-2023 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -4218,6 +4218,7 @@ static inline uint32_t A5XX_SP_CS_CONFIG_SHADEROBJOFFSET(uint32_t val)
|
|||
#define REG_A5XX_SP_FS_CONFIG_MAX_CONST 0x0000e58b
|
||||
|
||||
#define REG_A5XX_SP_VS_CTRL_REG0 0x0000e590
|
||||
#define A5XX_SP_VS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_VS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4316,6 +4317,7 @@ static inline uint32_t A5XX_SP_VS_VPC_DST_REG_OUTLOC3(uint32_t val)
|
|||
#define REG_A5XX_SP_VS_OBJ_START_HI 0x0000e5ad
|
||||
|
||||
#define REG_A5XX_SP_FS_CTRL_REG0 0x0000e5c0
|
||||
#define A5XX_SP_FS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_FS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4406,6 +4408,7 @@ static inline uint32_t A5XX_SP_FS_MRT_REG_COLOR_FORMAT(enum a5xx_color_fmt val)
|
|||
#define REG_A5XX_UNKNOWN_E5DB 0x0000e5db
|
||||
|
||||
#define REG_A5XX_SP_CS_CTRL_REG0 0x0000e5f0
|
||||
#define A5XX_SP_CS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_CS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_CS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_CS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4440,6 +4443,7 @@ static inline uint32_t A5XX_SP_CS_CTRL_REG0_BRANCHSTACK(uint32_t val)
|
|||
#define REG_A5XX_SP_CS_OBJ_START_HI 0x0000e5f4
|
||||
|
||||
#define REG_A5XX_SP_HS_CTRL_REG0 0x0000e600
|
||||
#define A5XX_SP_HS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_HS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_HS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_HS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4474,6 +4478,7 @@ static inline uint32_t A5XX_SP_HS_CTRL_REG0_BRANCHSTACK(uint32_t val)
|
|||
#define REG_A5XX_SP_HS_OBJ_START_HI 0x0000e604
|
||||
|
||||
#define REG_A5XX_SP_DS_CTRL_REG0 0x0000e610
|
||||
#define A5XX_SP_DS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_DS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_DS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_DS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4508,6 +4513,7 @@ static inline uint32_t A5XX_SP_DS_CTRL_REG0_BRANCHSTACK(uint32_t val)
|
|||
#define REG_A5XX_SP_DS_OBJ_START_HI 0x0000e62d
|
||||
|
||||
#define REG_A5XX_SP_GS_CTRL_REG0 0x0000e640
|
||||
#define A5XX_SP_GS_CTRL_REG0_BUFFER 0x00000004
|
||||
#define A5XX_SP_GS_CTRL_REG0_THREADSIZE__MASK 0x00000008
|
||||
#define A5XX_SP_GS_CTRL_REG0_THREADSIZE__SHIFT 3
|
||||
static inline uint32_t A5XX_SP_GS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
|
||||
|
@ -4665,11 +4671,11 @@ static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(uint32_t val)
|
|||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_SIZE__MASK 0xff000000
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_SIZE__SHIFT 24
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_SIZE(uint32_t val)
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_CENTERRHW__MASK 0xff000000
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_CENTERRHW__SHIFT 24
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_CENTERRHW(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_2_REG_SIZE__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_SIZE__MASK;
|
||||
return ((val) << A5XX_HLSQ_CONTROL_2_REG_CENTERRHW__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_CENTERRHW__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_HLSQ_CONTROL_3_REG 0x0000e787
|
||||
|
|
|
@ -567,7 +567,7 @@ static void a5xx_ucode_check_version(struct a5xx_gpu *a5xx_gpu,
|
|||
msm_gem_put_vaddr(obj);
|
||||
}
|
||||
|
||||
static int a5xx_ucode_init(struct msm_gpu *gpu)
|
||||
static int a5xx_ucode_load(struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu);
|
||||
|
@ -605,9 +605,24 @@ static int a5xx_ucode_init(struct msm_gpu *gpu)
|
|||
a5xx_ucode_check_version(a5xx_gpu, a5xx_gpu->pfp_bo);
|
||||
}
|
||||
|
||||
gpu_write64(gpu, REG_A5XX_CP_ME_INSTR_BASE_LO, a5xx_gpu->pm4_iova);
|
||||
if (a5xx_gpu->has_whereami) {
|
||||
if (!a5xx_gpu->shadow_bo) {
|
||||
a5xx_gpu->shadow = msm_gem_kernel_new(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a5xx_gpu->shadow_bo,
|
||||
&a5xx_gpu->shadow_iova);
|
||||
|
||||
gpu_write64(gpu, REG_A5XX_CP_PFP_INSTR_BASE_LO, a5xx_gpu->pfp_iova);
|
||||
if (IS_ERR(a5xx_gpu->shadow))
|
||||
return PTR_ERR(a5xx_gpu->shadow);
|
||||
|
||||
msm_gem_object_set_name(a5xx_gpu->shadow_bo, "shadow");
|
||||
}
|
||||
} else if (gpu->nr_rings > 1) {
|
||||
/* Disable preemption if WHERE_AM_I isn't available */
|
||||
a5xx_preempt_fini(gpu);
|
||||
gpu->nr_rings = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -900,9 +915,8 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
|
|||
if (adreno_is_a530(adreno_gpu) || adreno_is_a540(adreno_gpu))
|
||||
a5xx_gpmu_ucode_init(gpu);
|
||||
|
||||
ret = a5xx_ucode_init(gpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
gpu_write64(gpu, REG_A5XX_CP_ME_INSTR_BASE_LO, a5xx_gpu->pm4_iova);
|
||||
gpu_write64(gpu, REG_A5XX_CP_PFP_INSTR_BASE_LO, a5xx_gpu->pfp_iova);
|
||||
|
||||
/* Set the ringbuffer address */
|
||||
gpu_write64(gpu, REG_A5XX_CP_RB_BASE, gpu->rb[0]->iova);
|
||||
|
@ -916,27 +930,10 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A5XX_CP_RB_CNTL,
|
||||
MSM_GPU_RB_CNTL_DEFAULT | AXXX_CP_RB_CNTL_NO_UPDATE);
|
||||
|
||||
/* Create a privileged buffer for the RPTR shadow */
|
||||
if (a5xx_gpu->has_whereami) {
|
||||
if (!a5xx_gpu->shadow_bo) {
|
||||
a5xx_gpu->shadow = msm_gem_kernel_new(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a5xx_gpu->shadow_bo,
|
||||
&a5xx_gpu->shadow_iova);
|
||||
|
||||
if (IS_ERR(a5xx_gpu->shadow))
|
||||
return PTR_ERR(a5xx_gpu->shadow);
|
||||
|
||||
msm_gem_object_set_name(a5xx_gpu->shadow_bo, "shadow");
|
||||
}
|
||||
|
||||
/* Configure the RPTR shadow if needed: */
|
||||
if (a5xx_gpu->shadow_bo) {
|
||||
gpu_write64(gpu, REG_A5XX_CP_RB_RPTR_ADDR,
|
||||
shadowptr(a5xx_gpu, gpu->rb[0]));
|
||||
} else if (gpu->nr_rings > 1) {
|
||||
/* Disable preemption if WHERE_AM_I isn't available */
|
||||
a5xx_preempt_fini(gpu);
|
||||
gpu->nr_rings = 1;
|
||||
}
|
||||
|
||||
a5xx_preempt_hw_init(gpu);
|
||||
|
@ -1099,14 +1096,19 @@ bool a5xx_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
|||
static int a5xx_fault_handler(void *arg, unsigned long iova, int flags, void *data)
|
||||
{
|
||||
struct msm_gpu *gpu = arg;
|
||||
pr_warn_ratelimited("*** gpu fault: iova=%08lx, flags=%d (%u,%u,%u,%u)\n",
|
||||
iova, flags,
|
||||
struct adreno_smmu_fault_info *info = data;
|
||||
char block[12] = "unknown";
|
||||
u32 scratch[] = {
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(4)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(5)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(6)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(7)));
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(7)),
|
||||
};
|
||||
|
||||
return 0;
|
||||
if (info)
|
||||
snprintf(block, sizeof(block), "%x", info->fsynr1);
|
||||
|
||||
return adreno_fault_handler(gpu, iova, flags, info, block, scratch);
|
||||
}
|
||||
|
||||
static void a5xx_cp_err_irq(struct msm_gpu *gpu)
|
||||
|
@ -1682,6 +1684,7 @@ static const struct adreno_gpu_funcs funcs = {
|
|||
.get_param = adreno_get_param,
|
||||
.set_param = adreno_set_param,
|
||||
.hw_init = a5xx_hw_init,
|
||||
.ucode_load = a5xx_ucode_load,
|
||||
.pm_suspend = a5xx_pm_suspend,
|
||||
.pm_resume = a5xx_pm_resume,
|
||||
.recover = a5xx_recover,
|
||||
|
@ -1743,6 +1746,7 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
|||
struct a5xx_gpu *a5xx_gpu = NULL;
|
||||
struct adreno_gpu *adreno_gpu;
|
||||
struct msm_gpu *gpu;
|
||||
unsigned int nr_rings;
|
||||
int ret;
|
||||
|
||||
if (!pdev) {
|
||||
|
@ -1763,7 +1767,12 @@ struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
|||
|
||||
check_speed_bin(&pdev->dev);
|
||||
|
||||
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 4);
|
||||
nr_rings = 4;
|
||||
|
||||
if (adreno_is_a510(adreno_gpu))
|
||||
nr_rings = 1;
|
||||
|
||||
ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, nr_rings);
|
||||
if (ret) {
|
||||
a5xx_destroy(&(a5xx_gpu->base.base));
|
||||
return ERR_PTR(ret);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -621,6 +621,8 @@ setup_pdc:
|
|||
/* ensure no writes happen before the uCode is fully written */
|
||||
wmb();
|
||||
|
||||
a6xx_rpmh_stop(gmu);
|
||||
|
||||
err:
|
||||
if (!IS_ERR_OR_NULL(pdcptr))
|
||||
iounmap(pdcptr);
|
||||
|
@ -753,7 +755,6 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
|
|||
|
||||
static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
|
||||
{
|
||||
static bool rpmh_init;
|
||||
struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu);
|
||||
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
|
||||
int ret;
|
||||
|
@ -776,15 +777,9 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
|
|||
/* Turn on register retention */
|
||||
gmu_write(gmu, REG_A6XX_GMU_GENERAL_7, 1);
|
||||
|
||||
/* We only need to load the RPMh microcode once */
|
||||
if (!rpmh_init) {
|
||||
a6xx_gmu_rpmh_init(gmu);
|
||||
rpmh_init = true;
|
||||
} else {
|
||||
ret = a6xx_rpmh_start(gmu);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
ret = a6xx_rpmh_start(gmu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = a6xx_gmu_fw_load(gmu);
|
||||
if (ret)
|
||||
|
@ -1482,6 +1477,12 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
|
|||
|
||||
pm_runtime_force_suspend(gmu->dev);
|
||||
|
||||
/*
|
||||
* Since cxpd is a virt device, the devlink with gmu-dev will be removed
|
||||
* automatically when we do detach
|
||||
*/
|
||||
dev_pm_domain_detach(gmu->cxpd, false);
|
||||
|
||||
if (!IS_ERR_OR_NULL(gmu->gxpd)) {
|
||||
pm_runtime_disable(gmu->gxpd);
|
||||
dev_pm_domain_detach(gmu->gxpd, false);
|
||||
|
@ -1504,6 +1505,17 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
|
|||
gmu->initialized = false;
|
||||
}
|
||||
|
||||
static int cxpd_notifier_cb(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct a6xx_gmu *gmu = container_of(nb, struct a6xx_gmu, pd_nb);
|
||||
|
||||
if (action == GENPD_NOTIFY_OFF)
|
||||
complete_all(&gmu->pd_gate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
|
||||
|
@ -1608,8 +1620,10 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
|||
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
gmu->rscc = a6xx_gmu_get_mmio(pdev, "rscc");
|
||||
if (IS_ERR(gmu->rscc))
|
||||
if (IS_ERR(gmu->rscc)) {
|
||||
ret = -ENODEV;
|
||||
goto err_mmio;
|
||||
}
|
||||
} else {
|
||||
gmu->rscc = gmu->mmio + 0x23000;
|
||||
}
|
||||
|
@ -1618,8 +1632,26 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
|||
gmu->hfi_irq = a6xx_gmu_get_irq(gmu, pdev, "hfi", a6xx_hfi_irq);
|
||||
gmu->gmu_irq = a6xx_gmu_get_irq(gmu, pdev, "gmu", a6xx_gmu_irq);
|
||||
|
||||
if (gmu->hfi_irq < 0 || gmu->gmu_irq < 0)
|
||||
if (gmu->hfi_irq < 0 || gmu->gmu_irq < 0) {
|
||||
ret = -ENODEV;
|
||||
goto err_mmio;
|
||||
}
|
||||
|
||||
gmu->cxpd = dev_pm_domain_attach_by_name(gmu->dev, "cx");
|
||||
if (IS_ERR(gmu->cxpd)) {
|
||||
ret = PTR_ERR(gmu->cxpd);
|
||||
goto err_mmio;
|
||||
}
|
||||
|
||||
if (!device_link_add(gmu->dev, gmu->cxpd,
|
||||
DL_FLAG_PM_RUNTIME)) {
|
||||
ret = -ENODEV;
|
||||
goto detach_cxpd;
|
||||
}
|
||||
|
||||
init_completion(&gmu->pd_gate);
|
||||
complete_all(&gmu->pd_gate);
|
||||
gmu->pd_nb.notifier_call = cxpd_notifier_cb;
|
||||
|
||||
/*
|
||||
* Get a link to the GX power domain to reset the GPU in case of GMU
|
||||
|
@ -1633,10 +1665,16 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
|||
/* Set up the HFI queues */
|
||||
a6xx_hfi_init(gmu);
|
||||
|
||||
/* Initialize RPMh */
|
||||
a6xx_gmu_rpmh_init(gmu);
|
||||
|
||||
gmu->initialized = true;
|
||||
|
||||
return 0;
|
||||
|
||||
detach_cxpd:
|
||||
dev_pm_domain_detach(gmu->cxpd, false);
|
||||
|
||||
err_mmio:
|
||||
iounmap(gmu->mmio);
|
||||
if (platform_get_resource_byname(pdev, IORESOURCE_MEM, "rscc"))
|
||||
|
@ -1644,8 +1682,6 @@ err_mmio:
|
|||
free_irq(gmu->gmu_irq, gmu);
|
||||
free_irq(gmu->hfi_irq, gmu);
|
||||
|
||||
ret = -ENODEV;
|
||||
|
||||
err_memory:
|
||||
a6xx_gmu_memory_free(gmu);
|
||||
err_put_device:
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
#ifndef _A6XX_GMU_H_
|
||||
#define _A6XX_GMU_H_
|
||||
|
||||
#include <linux/completion.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/notifier.h>
|
||||
#include "msm_drv.h"
|
||||
#include "a6xx_hfi.h"
|
||||
|
||||
|
@ -56,6 +58,7 @@ struct a6xx_gmu {
|
|||
int gmu_irq;
|
||||
|
||||
struct device *gxpd;
|
||||
struct device *cxpd;
|
||||
|
||||
int idle_level;
|
||||
|
||||
|
@ -89,6 +92,10 @@ struct a6xx_gmu {
|
|||
bool initialized;
|
||||
bool hung;
|
||||
bool legacy; /* a618 or a630 */
|
||||
|
||||
/* For power domain callback */
|
||||
struct notifier_block pd_nb;
|
||||
struct completion pd_gate;
|
||||
};
|
||||
|
||||
static inline u32 gmu_read(struct a6xx_gmu *gmu, u32 offset)
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2023 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/devfreq.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/soc/qcom/llcc-qcom.h>
|
||||
|
||||
#define GPU_PAS_ID 13
|
||||
|
@ -187,7 +187,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
|
|||
* GPU registers so we need to add 0x1a800 to the register value on A630
|
||||
* to get the right value from PM4.
|
||||
*/
|
||||
get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO,
|
||||
get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER,
|
||||
rbmemptr_stats(ring, index, alwayson_start));
|
||||
|
||||
/* Invalidate CCU depth and color */
|
||||
|
@ -228,7 +228,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
|
|||
|
||||
get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP(0),
|
||||
rbmemptr_stats(ring, index, cpcycles_end));
|
||||
get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO,
|
||||
get_stats_counter(ring, REG_A6XX_CP_ALWAYS_ON_COUNTER,
|
||||
rbmemptr_stats(ring, index, alwayson_end));
|
||||
|
||||
/* Write the fence to the scratch register */
|
||||
|
@ -247,7 +247,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
|
|||
OUT_RING(ring, submit->seqno);
|
||||
|
||||
trace_msm_gpu_submit_flush(submit,
|
||||
gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO));
|
||||
gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER));
|
||||
|
||||
a6xx_flush(gpu, ring);
|
||||
}
|
||||
|
@ -917,7 +917,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int a6xx_ucode_init(struct msm_gpu *gpu)
|
||||
static int a6xx_ucode_load(struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
|
@ -946,7 +946,23 @@ static int a6xx_ucode_init(struct msm_gpu *gpu)
|
|||
}
|
||||
}
|
||||
|
||||
gpu_write64(gpu, REG_A6XX_CP_SQE_INSTR_BASE, a6xx_gpu->sqe_iova);
|
||||
/*
|
||||
* Expanded APRIV and targets that support WHERE_AM_I both need a
|
||||
* privileged buffer to store the RPTR shadow
|
||||
*/
|
||||
if ((adreno_gpu->base.hw_apriv || a6xx_gpu->has_whereami) &&
|
||||
!a6xx_gpu->shadow_bo) {
|
||||
a6xx_gpu->shadow = msm_gem_kernel_new(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a6xx_gpu->shadow_bo,
|
||||
&a6xx_gpu->shadow_iova);
|
||||
|
||||
if (IS_ERR(a6xx_gpu->shadow))
|
||||
return PTR_ERR(a6xx_gpu->shadow);
|
||||
|
||||
msm_gem_object_set_name(a6xx_gpu->shadow_bo, "shadow");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -997,7 +1013,7 @@ static int hw_init(struct msm_gpu *gpu)
|
|||
* memory rendering at this point in time and we don't want to block off
|
||||
* part of the virtual memory space.
|
||||
*/
|
||||
gpu_write64(gpu, REG_A6XX_RBBM_SECVID_TSB_TRUSTED_BASE_LO, 0x00000000);
|
||||
gpu_write64(gpu, REG_A6XX_RBBM_SECVID_TSB_TRUSTED_BASE, 0x00000000);
|
||||
gpu_write(gpu, REG_A6XX_RBBM_SECVID_TSB_TRUSTED_SIZE, 0x00000000);
|
||||
|
||||
/* Turn on 64 bit addressing for all blocks */
|
||||
|
@ -1037,18 +1053,15 @@ static int hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_RBBM_PERFCTR_GPU_BUSY_MASKED, 0xffffffff);
|
||||
|
||||
/* Disable L2 bypass in the UCHE */
|
||||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_RANGE_MAX_LO, 0xffffffc0);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_RANGE_MAX_HI, 0x0001ffff);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_TRAP_BASE_LO, 0xfffff000);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_TRAP_BASE_HI, 0x0001ffff);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_THRU_BASE_LO, 0xfffff000);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_THRU_BASE_HI, 0x0001ffff);
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_WRITE_RANGE_MAX, 0x0001ffffffffffc0llu);
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_TRAP_BASE, 0x0001fffffffff000llu);
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_WRITE_THRU_BASE, 0x0001fffffffff000llu);
|
||||
|
||||
if (!adreno_is_a650_family(adreno_gpu)) {
|
||||
/* Set the GMEM VA range [0x100000:0x100000 + gpu->gmem - 1] */
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_GMEM_RANGE_MIN_LO, 0x00100000);
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_GMEM_RANGE_MIN, 0x00100000);
|
||||
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_GMEM_RANGE_MAX_LO,
|
||||
gpu_write64(gpu, REG_A6XX_UCHE_GMEM_RANGE_MAX,
|
||||
0x00100000 + adreno_gpu->gmem - 1);
|
||||
}
|
||||
|
||||
|
@ -1135,9 +1148,7 @@ static int hw_init(struct msm_gpu *gpu)
|
|||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = a6xx_ucode_init(gpu);
|
||||
if (ret)
|
||||
goto out;
|
||||
gpu_write64(gpu, REG_A6XX_CP_SQE_INSTR_BASE, a6xx_gpu->sqe_iova);
|
||||
|
||||
/* Set the ringbuffer address */
|
||||
gpu_write64(gpu, REG_A6XX_CP_RB_BASE, gpu->rb[0]->iova);
|
||||
|
@ -1152,26 +1163,9 @@ static int hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_CP_RB_CNTL,
|
||||
MSM_GPU_RB_CNTL_DEFAULT | AXXX_CP_RB_CNTL_NO_UPDATE);
|
||||
|
||||
/*
|
||||
* Expanded APRIV and targets that support WHERE_AM_I both need a
|
||||
* privileged buffer to store the RPTR shadow
|
||||
*/
|
||||
|
||||
if (adreno_gpu->base.hw_apriv || a6xx_gpu->has_whereami) {
|
||||
if (!a6xx_gpu->shadow_bo) {
|
||||
a6xx_gpu->shadow = msm_gem_kernel_new(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a6xx_gpu->shadow_bo,
|
||||
&a6xx_gpu->shadow_iova);
|
||||
|
||||
if (IS_ERR(a6xx_gpu->shadow))
|
||||
return PTR_ERR(a6xx_gpu->shadow);
|
||||
|
||||
msm_gem_object_set_name(a6xx_gpu->shadow_bo, "shadow");
|
||||
}
|
||||
|
||||
gpu_write64(gpu, REG_A6XX_CP_RB_RPTR_ADDR_LO,
|
||||
/* Configure the RPTR shadow if needed: */
|
||||
if (a6xx_gpu->shadow_bo) {
|
||||
gpu_write64(gpu, REG_A6XX_CP_RB_RPTR_ADDR,
|
||||
shadowptr(a6xx_gpu, gpu->rb[0]));
|
||||
}
|
||||
|
||||
|
@ -1259,6 +1253,7 @@ static void a6xx_recover(struct msm_gpu *gpu)
|
|||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
|
||||
int i, active_submits;
|
||||
|
||||
adreno_dump_info(gpu);
|
||||
|
@ -1297,6 +1292,10 @@ static void a6xx_recover(struct msm_gpu *gpu)
|
|||
*/
|
||||
gpu->active_submits = 0;
|
||||
|
||||
reinit_completion(&gmu->pd_gate);
|
||||
dev_pm_genpd_add_notifier(gmu->cxpd, &gmu->pd_nb);
|
||||
dev_pm_genpd_synced_poweroff(gmu->cxpd);
|
||||
|
||||
/* Drop the rpm refcount from active submits */
|
||||
if (active_submits)
|
||||
pm_runtime_put(&gpu->pdev->dev);
|
||||
|
@ -1304,8 +1303,10 @@ static void a6xx_recover(struct msm_gpu *gpu)
|
|||
/* And the final one from recover worker */
|
||||
pm_runtime_put_sync(&gpu->pdev->dev);
|
||||
|
||||
/* Call into gpucc driver to poll for cx gdsc collapse */
|
||||
reset_control_reset(gpu->cx_collapse);
|
||||
if (!wait_for_completion_timeout(&gmu->pd_gate, msecs_to_jiffies(1000)))
|
||||
DRM_DEV_ERROR(&gpu->pdev->dev, "cx gdsc didn't collapse\n");
|
||||
|
||||
dev_pm_genpd_remove_notifier(gmu->cxpd);
|
||||
|
||||
pm_runtime_use_autosuspend(&gpu->pdev->dev);
|
||||
|
||||
|
@ -1361,73 +1362,23 @@ static const char *a6xx_fault_block(struct msm_gpu *gpu, u32 id)
|
|||
return a6xx_uche_fault_block(gpu, id);
|
||||
}
|
||||
|
||||
#define ARM_SMMU_FSR_TF BIT(1)
|
||||
#define ARM_SMMU_FSR_PF BIT(3)
|
||||
#define ARM_SMMU_FSR_EF BIT(4)
|
||||
|
||||
static int a6xx_fault_handler(void *arg, unsigned long iova, int flags, void *data)
|
||||
{
|
||||
struct msm_gpu *gpu = arg;
|
||||
struct adreno_smmu_fault_info *info = data;
|
||||
const char *type = "UNKNOWN";
|
||||
const char *block;
|
||||
bool do_devcoredump = info && !READ_ONCE(gpu->crashstate);
|
||||
const char *block = "unknown";
|
||||
|
||||
/*
|
||||
* If we aren't going to be resuming later from fault_worker, then do
|
||||
* it now.
|
||||
*/
|
||||
if (!do_devcoredump) {
|
||||
gpu->aspace->mmu->funcs->resume_translation(gpu->aspace->mmu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print a default message if we couldn't get the data from the
|
||||
* adreno-smmu-priv
|
||||
*/
|
||||
if (!info) {
|
||||
pr_warn_ratelimited("*** gpu fault: iova=%.16lx flags=%d (%u,%u,%u,%u)\n",
|
||||
iova, flags,
|
||||
u32 scratch[] = {
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(4)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(5)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(6)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(7)));
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(7)),
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
||||
if (info)
|
||||
block = a6xx_fault_block(gpu, info->fsynr1 & 0xff);
|
||||
|
||||
if (info->fsr & ARM_SMMU_FSR_TF)
|
||||
type = "TRANSLATION";
|
||||
else if (info->fsr & ARM_SMMU_FSR_PF)
|
||||
type = "PERMISSION";
|
||||
else if (info->fsr & ARM_SMMU_FSR_EF)
|
||||
type = "EXTERNAL";
|
||||
|
||||
block = a6xx_fault_block(gpu, info->fsynr1 & 0xff);
|
||||
|
||||
pr_warn_ratelimited("*** gpu fault: ttbr0=%.16llx iova=%.16lx dir=%s type=%s source=%s (%u,%u,%u,%u)\n",
|
||||
info->ttbr0, iova,
|
||||
flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ",
|
||||
type, block,
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(4)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(5)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(6)),
|
||||
gpu_read(gpu, REG_A6XX_CP_SCRATCH_REG(7)));
|
||||
|
||||
if (do_devcoredump) {
|
||||
/* Turn off the hangcheck timer to keep it from bothering us */
|
||||
del_timer(&gpu->hangcheck_timer);
|
||||
|
||||
gpu->fault_info.ttbr0 = info->ttbr0;
|
||||
gpu->fault_info.iova = iova;
|
||||
gpu->fault_info.flags = flags;
|
||||
gpu->fault_info.type = type;
|
||||
gpu->fault_info.block = block;
|
||||
|
||||
kthread_queue_work(gpu->worker, &gpu->fault_work);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return adreno_fault_handler(gpu, iova, flags, info, block, scratch);
|
||||
}
|
||||
|
||||
static void a6xx_cp_hw_err_irq(struct msm_gpu *gpu)
|
||||
|
@ -1712,7 +1663,7 @@ static int a6xx_get_timestamp(struct msm_gpu *gpu, uint64_t *value)
|
|||
/* Force the GPU power on so we can read this register */
|
||||
a6xx_gmu_set_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
|
||||
|
||||
*value = gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER_LO);
|
||||
*value = gpu_read64(gpu, REG_A6XX_CP_ALWAYS_ON_COUNTER);
|
||||
|
||||
a6xx_gmu_clear_oob(&a6xx_gpu->gmu, GMU_OOB_PERFCOUNTER_SET);
|
||||
|
||||
|
@ -1848,8 +1799,8 @@ static bool a6xx_progress(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
|||
* to prevent prefetching into an unrelated submit. (And
|
||||
* either way, at some point the ROQ will be full.)
|
||||
*/
|
||||
cp_state.ib1_rem += gpu_read(gpu, REG_A6XX_CP_CSQ_IB1_STAT) >> 16;
|
||||
cp_state.ib2_rem += gpu_read(gpu, REG_A6XX_CP_CSQ_IB2_STAT) >> 16;
|
||||
cp_state.ib1_rem += gpu_read(gpu, REG_A6XX_CP_ROQ_AVAIL_IB1) >> 16;
|
||||
cp_state.ib2_rem += gpu_read(gpu, REG_A6XX_CP_ROQ_AVAIL_IB2) >> 16;
|
||||
|
||||
progress = !!memcmp(&cp_state, &ring->last_cp_state, sizeof(cp_state));
|
||||
|
||||
|
@ -1886,6 +1837,31 @@ static u32 a619_get_speed_bin(u32 fuse)
|
|||
return UINT_MAX;
|
||||
}
|
||||
|
||||
static u32 a640_get_speed_bin(u32 fuse)
|
||||
{
|
||||
if (fuse == 0)
|
||||
return 0;
|
||||
else if (fuse == 1)
|
||||
return 1;
|
||||
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
static u32 a650_get_speed_bin(u32 fuse)
|
||||
{
|
||||
if (fuse == 0)
|
||||
return 0;
|
||||
else if (fuse == 1)
|
||||
return 1;
|
||||
/* Yep, 2 and 3 are swapped! :/ */
|
||||
else if (fuse == 2)
|
||||
return 3;
|
||||
else if (fuse == 3)
|
||||
return 2;
|
||||
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
static u32 adreno_7c3_get_speed_bin(u32 fuse)
|
||||
{
|
||||
if (fuse == 0)
|
||||
|
@ -1911,6 +1887,12 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse)
|
|||
if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev))
|
||||
val = adreno_7c3_get_speed_bin(fuse);
|
||||
|
||||
if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev))
|
||||
val = a640_get_speed_bin(fuse);
|
||||
|
||||
if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev))
|
||||
val = a650_get_speed_bin(fuse);
|
||||
|
||||
if (val == UINT_MAX) {
|
||||
DRM_DEV_ERROR(dev,
|
||||
"missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n",
|
||||
|
@ -1954,6 +1936,7 @@ static const struct adreno_gpu_funcs funcs = {
|
|||
.get_param = adreno_get_param,
|
||||
.set_param = adreno_set_param,
|
||||
.hw_init = a6xx_hw_init,
|
||||
.ucode_load = a6xx_ucode_load,
|
||||
.pm_suspend = a6xx_pm_suspend,
|
||||
.pm_resume = a6xx_pm_resume,
|
||||
.recover = a6xx_recover,
|
||||
|
|
|
@ -147,7 +147,7 @@ static int a6xx_crashdumper_run(struct msm_gpu *gpu,
|
|||
/* Make sure all pending memory writes are posted */
|
||||
wmb();
|
||||
|
||||
gpu_write64(gpu, REG_A6XX_CP_CRASH_SCRIPT_BASE_LO, dumper->iova);
|
||||
gpu_write64(gpu, REG_A6XX_CP_CRASH_SCRIPT_BASE, dumper->iova);
|
||||
|
||||
gpu_write(gpu, REG_A6XX_CP_CRASH_DUMP_CNTL, 1);
|
||||
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2023 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -49,11 +49,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
|
||||
enum chip {
|
||||
A2XX = 0,
|
||||
A3XX = 0,
|
||||
A4XX = 0,
|
||||
A5XX = 0,
|
||||
A6XX = 0,
|
||||
A2XX = 2,
|
||||
A3XX = 3,
|
||||
A4XX = 4,
|
||||
A5XX = 5,
|
||||
A6XX = 6,
|
||||
A7XX = 7,
|
||||
};
|
||||
|
||||
enum adreno_pa_su_sc_draw {
|
||||
|
@ -210,6 +211,17 @@ enum a5xx_line_mode {
|
|||
RECTANGULAR = 1,
|
||||
};
|
||||
|
||||
enum a6xx_tex_prefetch_cmd {
|
||||
TEX_PREFETCH_UNK0 = 0,
|
||||
TEX_PREFETCH_SAM = 1,
|
||||
TEX_PREFETCH_GATHER4R = 2,
|
||||
TEX_PREFETCH_GATHER4G = 3,
|
||||
TEX_PREFETCH_GATHER4B = 4,
|
||||
TEX_PREFETCH_GATHER4A = 5,
|
||||
TEX_PREFETCH_UNK6 = 6,
|
||||
TEX_PREFETCH_UNK7 = 7,
|
||||
};
|
||||
|
||||
#define REG_AXXX_CP_RB_BASE 0x000001c0
|
||||
|
||||
#define REG_AXXX_CP_RB_CNTL 0x000001c1
|
||||
|
|
|
@ -432,31 +432,35 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
|
|||
if (ret)
|
||||
return NULL;
|
||||
|
||||
if (gpu->funcs->ucode_load) {
|
||||
ret = gpu->funcs->ucode_load(gpu);
|
||||
if (ret)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now that we have firmware loaded, and are ready to begin
|
||||
* booting the gpu, go ahead and enable runpm:
|
||||
*/
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
/* Make sure pm runtime is active and reset any previous errors */
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
DRM_DEV_ERROR(dev->dev, "Couldn't power up the GPU: %d\n", ret);
|
||||
return NULL;
|
||||
goto err_disable_rpm;
|
||||
}
|
||||
|
||||
mutex_lock(&gpu->lock);
|
||||
ret = msm_gpu_hw_init(gpu);
|
||||
mutex_unlock(&gpu->lock);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(dev->dev, "gpu hw init failed: %d\n", ret);
|
||||
return NULL;
|
||||
goto err_put_rpm;
|
||||
}
|
||||
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
if (gpu->funcs->debugfs_init) {
|
||||
gpu->funcs->debugfs_init(gpu, dev->primary);
|
||||
|
@ -465,6 +469,13 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
|
|||
#endif
|
||||
|
||||
return gpu;
|
||||
|
||||
err_put_rpm:
|
||||
pm_runtime_put_sync_suspend(&pdev->dev);
|
||||
err_disable_rpm:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int find_chipid(struct device *dev, struct adreno_rev *rev)
|
||||
|
@ -548,6 +559,10 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
|
|||
return PTR_ERR(gpu);
|
||||
}
|
||||
|
||||
ret = dev_pm_opp_of_find_icc_paths(dev, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -566,8 +581,8 @@ static void adreno_unbind(struct device *dev, struct device *master,
|
|||
}
|
||||
|
||||
static const struct component_ops a3xx_ops = {
|
||||
.bind = adreno_bind,
|
||||
.unbind = adreno_unbind,
|
||||
.bind = adreno_bind,
|
||||
.unbind = adreno_unbind,
|
||||
};
|
||||
|
||||
static void adreno_device_register_headless(void)
|
||||
|
|
|
@ -208,7 +208,7 @@ adreno_iommu_create_address_space(struct msm_gpu *gpu,
|
|||
struct msm_gem_address_space *aspace;
|
||||
u64 start, size;
|
||||
|
||||
mmu = msm_iommu_new(&pdev->dev, quirks);
|
||||
mmu = msm_iommu_gpu_new(&pdev->dev, gpu, quirks);
|
||||
if (IS_ERR_OR_NULL(mmu))
|
||||
return ERR_CAST(mmu);
|
||||
|
||||
|
@ -246,6 +246,66 @@ u64 adreno_private_address_space_size(struct msm_gpu *gpu)
|
|||
return SZ_4G;
|
||||
}
|
||||
|
||||
#define ARM_SMMU_FSR_TF BIT(1)
|
||||
#define ARM_SMMU_FSR_PF BIT(3)
|
||||
#define ARM_SMMU_FSR_EF BIT(4)
|
||||
|
||||
int adreno_fault_handler(struct msm_gpu *gpu, unsigned long iova, int flags,
|
||||
struct adreno_smmu_fault_info *info, const char *block,
|
||||
u32 scratch[4])
|
||||
{
|
||||
const char *type = "UNKNOWN";
|
||||
bool do_devcoredump = info && !READ_ONCE(gpu->crashstate);
|
||||
|
||||
/*
|
||||
* If we aren't going to be resuming later from fault_worker, then do
|
||||
* it now.
|
||||
*/
|
||||
if (!do_devcoredump) {
|
||||
gpu->aspace->mmu->funcs->resume_translation(gpu->aspace->mmu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print a default message if we couldn't get the data from the
|
||||
* adreno-smmu-priv
|
||||
*/
|
||||
if (!info) {
|
||||
pr_warn_ratelimited("*** gpu fault: iova=%.16lx flags=%d (%u,%u,%u,%u)\n",
|
||||
iova, flags,
|
||||
scratch[0], scratch[1], scratch[2], scratch[3]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (info->fsr & ARM_SMMU_FSR_TF)
|
||||
type = "TRANSLATION";
|
||||
else if (info->fsr & ARM_SMMU_FSR_PF)
|
||||
type = "PERMISSION";
|
||||
else if (info->fsr & ARM_SMMU_FSR_EF)
|
||||
type = "EXTERNAL";
|
||||
|
||||
pr_warn_ratelimited("*** gpu fault: ttbr0=%.16llx iova=%.16lx dir=%s type=%s source=%s (%u,%u,%u,%u)\n",
|
||||
info->ttbr0, iova,
|
||||
flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ",
|
||||
type, block,
|
||||
scratch[0], scratch[1], scratch[2], scratch[3]);
|
||||
|
||||
if (do_devcoredump) {
|
||||
/* Turn off the hangcheck timer to keep it from bothering us */
|
||||
del_timer(&gpu->hangcheck_timer);
|
||||
|
||||
gpu->fault_info.ttbr0 = info->ttbr0;
|
||||
gpu->fault_info.iova = iova;
|
||||
gpu->fault_info.flags = flags;
|
||||
gpu->fault_info.type = type;
|
||||
gpu->fault_info.block = block;
|
||||
|
||||
kthread_queue_work(gpu->worker, &gpu->fault_work);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adreno_get_param(struct msm_gpu *gpu, struct msm_file_private *ctx,
|
||||
uint32_t param, uint64_t *value, uint32_t *len)
|
||||
{
|
||||
|
@ -503,16 +563,9 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu,
|
|||
|
||||
int adreno_hw_init(struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
int ret, i;
|
||||
|
||||
VERB("%s", gpu->name);
|
||||
|
||||
ret = adreno_load_fw(adreno_gpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < gpu->nr_rings; i++) {
|
||||
for (int i = 0; i < gpu->nr_rings; i++) {
|
||||
struct msm_ringbuffer *ring = gpu->rb[i];
|
||||
|
||||
if (!ring)
|
||||
|
@ -922,73 +975,46 @@ void adreno_wait_ring(struct msm_ringbuffer *ring, uint32_t ndwords)
|
|||
ring->id);
|
||||
}
|
||||
|
||||
/* Get legacy powerlevels from qcom,gpu-pwrlevels and populate the opp table */
|
||||
static int adreno_get_legacy_pwrlevels(struct device *dev)
|
||||
{
|
||||
struct device_node *child, *node;
|
||||
int ret;
|
||||
|
||||
node = of_get_compatible_child(dev->of_node, "qcom,gpu-pwrlevels");
|
||||
if (!node) {
|
||||
DRM_DEV_DEBUG(dev, "Could not find the GPU powerlevels\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
for_each_child_of_node(node, child) {
|
||||
unsigned int val;
|
||||
|
||||
ret = of_property_read_u32(child, "qcom,gpu-freq", &val);
|
||||
if (ret)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Skip the intentionally bogus clock value found at the bottom
|
||||
* of most legacy frequency tables
|
||||
*/
|
||||
if (val != 27000000)
|
||||
dev_pm_opp_add(dev, val, 0);
|
||||
}
|
||||
|
||||
of_node_put(node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void adreno_get_pwrlevels(struct device *dev,
|
||||
static int adreno_get_pwrlevels(struct device *dev,
|
||||
struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
unsigned long freq = ULONG_MAX;
|
||||
struct dev_pm_opp *opp;
|
||||
int ret;
|
||||
|
||||
gpu->fast_rate = 0;
|
||||
|
||||
/* You down with OPP? */
|
||||
if (!of_property_present(dev->of_node, "operating-points-v2"))
|
||||
ret = adreno_get_legacy_pwrlevels(dev);
|
||||
else {
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret)
|
||||
DRM_DEV_ERROR(dev, "Unable to set the OPP table\n");
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
/* Find the fastest defined rate */
|
||||
opp = dev_pm_opp_find_freq_floor(dev, &freq);
|
||||
if (!IS_ERR(opp)) {
|
||||
gpu->fast_rate = freq;
|
||||
dev_pm_opp_put(opp);
|
||||
/* devm_pm_opp_of_add_table may error out but will still create an OPP table */
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret == -ENODEV) {
|
||||
/* Special cases for ancient hw with ancient DT bindings */
|
||||
if (adreno_is_a2xx(adreno_gpu)) {
|
||||
dev_warn(dev, "Unable to find the OPP table. Falling back to 200 MHz.\n");
|
||||
dev_pm_opp_add(dev, 200000000, 0);
|
||||
} else if (adreno_is_a320(adreno_gpu)) {
|
||||
dev_warn(dev, "Unable to find the OPP table. Falling back to 450 MHz.\n");
|
||||
dev_pm_opp_add(dev, 450000000, 0);
|
||||
} else {
|
||||
DRM_DEV_ERROR(dev, "Unable to find the OPP table\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
} else if (ret) {
|
||||
DRM_DEV_ERROR(dev, "Unable to set the OPP table\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!gpu->fast_rate) {
|
||||
dev_warn(dev,
|
||||
"Could not find a clock rate. Using a reasonable default\n");
|
||||
/* Pick a suitably safe clock speed for any target */
|
||||
gpu->fast_rate = 200000000;
|
||||
}
|
||||
/* Find the fastest defined rate */
|
||||
opp = dev_pm_opp_find_freq_floor(dev, &freq);
|
||||
if (IS_ERR(opp))
|
||||
return PTR_ERR(opp);
|
||||
|
||||
gpu->fast_rate = freq;
|
||||
dev_pm_opp_put(opp);
|
||||
|
||||
DBG("fast_rate=%u, slow_rate=27000000", gpu->fast_rate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adreno_gpu_ocmem_init(struct device *dev, struct adreno_gpu *adreno_gpu,
|
||||
|
@ -1046,6 +1072,24 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
struct adreno_rev *rev = &config->rev;
|
||||
const char *gpu_name;
|
||||
u32 speedbin;
|
||||
int ret;
|
||||
|
||||
/* Only handle the core clock when GMU is not in use */
|
||||
if (config->rev.core < 6) {
|
||||
/*
|
||||
* This can only be done before devm_pm_opp_of_add_table(), or
|
||||
* dev_pm_opp_set_config() will WARN_ON()
|
||||
*/
|
||||
if (IS_ERR(devm_clk_get(dev, "core"))) {
|
||||
/*
|
||||
* If "core" is absent, go for the legacy clock name.
|
||||
* If we got this far in probing, it's a given one of
|
||||
* them exists.
|
||||
*/
|
||||
devm_pm_opp_set_clkname(dev, "core_clk");
|
||||
} else
|
||||
devm_pm_opp_set_clkname(dev, "core");
|
||||
}
|
||||
|
||||
adreno_gpu->funcs = funcs;
|
||||
adreno_gpu->info = adreno_info(config->rev);
|
||||
|
@ -1070,7 +1114,9 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
|
||||
adreno_gpu_config.nr_rings = nr_rings;
|
||||
|
||||
adreno_get_pwrlevels(dev, gpu);
|
||||
ret = adreno_get_pwrlevels(dev, gpu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
adreno_gpu->info->inactive_period);
|
||||
|
|
|
@ -341,6 +341,10 @@ adreno_iommu_create_address_space(struct msm_gpu *gpu,
|
|||
struct platform_device *pdev,
|
||||
unsigned long quirks);
|
||||
|
||||
int adreno_fault_handler(struct msm_gpu *gpu, unsigned long iova, int flags,
|
||||
struct adreno_smmu_fault_info *info, const char *block,
|
||||
u32 scratch[4]);
|
||||
|
||||
int adreno_read_speedbin(struct device *dev, u32 *speedbin);
|
||||
|
||||
/*
|
||||
|
|
|
@ -8,21 +8,21 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-06-21 15:24:24)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14609 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 69086 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2021-11-24 23:05:10)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113358 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149512 bytes, from 2022-01-31 23:06:21)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx.xml ( 184954 bytes, from 2022-03-03 16:41:33)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 91929 bytes, from 2023-02-28 23:52:27)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 15434 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 74995 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84231 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 113474 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 149590 bytes, from 2023-02-14 19:37:12)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 198949 bytes, from 2023-03-20 18:06:23)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11404 bytes, from 2023-03-10 18:32:53)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2022-08-02 16:38:43)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 9055 bytes, from 2023-03-10 18:32:52)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2976 bytes, from 2023-03-10 18:32:52)
|
||||
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
Copyright (C) 2013-2023 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -76,6 +76,10 @@ enum vgt_event_type {
|
|||
VS_FETCH_DONE = 27,
|
||||
FACENESS_FLUSH = 28,
|
||||
WT_DONE_TS = 8,
|
||||
START_FRAGMENT_CTRS = 13,
|
||||
STOP_FRAGMENT_CTRS = 14,
|
||||
START_COMPUTE_CTRS = 15,
|
||||
STOP_COMPUTE_CTRS = 16,
|
||||
FLUSH_SO_0 = 17,
|
||||
FLUSH_SO_1 = 18,
|
||||
FLUSH_SO_2 = 19,
|
||||
|
@ -86,7 +90,7 @@ enum vgt_event_type {
|
|||
PC_CCU_FLUSH_DEPTH_TS = 28,
|
||||
PC_CCU_FLUSH_COLOR_TS = 29,
|
||||
BLIT = 30,
|
||||
UNK_25 = 37,
|
||||
LRZ_CLEAR = 37,
|
||||
LRZ_FLUSH = 38,
|
||||
BLIT_OP_FILL_2D = 39,
|
||||
BLIT_OP_COPY_2D = 40,
|
||||
|
@ -95,6 +99,20 @@ enum vgt_event_type {
|
|||
UNK_2C = 44,
|
||||
UNK_2D = 45,
|
||||
CACHE_INVALIDATE = 49,
|
||||
LABEL = 63,
|
||||
CCU_INVALIDATE_DEPTH = 24,
|
||||
CCU_INVALIDATE_COLOR = 25,
|
||||
CCU_RESOLVE_CLEAN = 26,
|
||||
CCU_FLUSH_DEPTH = 28,
|
||||
CCU_FLUSH_COLOR = 29,
|
||||
CCU_RESOLVE = 30,
|
||||
CCU_END_RESOLVE_GROUP = 31,
|
||||
CCU_CLEAN_DEPTH = 32,
|
||||
CCU_CLEAN_COLOR = 33,
|
||||
CACHE_RESET = 48,
|
||||
CACHE_CLEAN = 49,
|
||||
CACHE_FLUSH7 = 50,
|
||||
CACHE_INVALIDATE7 = 51,
|
||||
};
|
||||
|
||||
enum pc_di_primtype {
|
||||
|
@ -290,6 +308,9 @@ enum adreno_pm4_type3_packets {
|
|||
IN_INCR_UPDT_CONST = 86,
|
||||
IN_INCR_UPDT_INSTR = 87,
|
||||
PKT4 = 4,
|
||||
IN_IB_END = 10,
|
||||
IN_GMU_INTERRUPT = 11,
|
||||
IN_PREEMPT = 15,
|
||||
CP_SCRATCH_WRITE = 76,
|
||||
CP_REG_TO_MEM_OFFSET_MEM = 116,
|
||||
CP_REG_TO_MEM_OFFSET_REG = 114,
|
||||
|
@ -297,10 +318,20 @@ enum adreno_pm4_type3_packets {
|
|||
CP_WAIT_TWO_REGS = 112,
|
||||
CP_MEMCPY = 117,
|
||||
CP_SET_BIN_DATA5_OFFSET = 46,
|
||||
CP_CONTEXT_SWITCH = 84,
|
||||
CP_SET_CTXSWITCH_IB = 85,
|
||||
CP_REG_WRITE = 109,
|
||||
CP_START_BIN = 80,
|
||||
CP_END_BIN = 81,
|
||||
CP_PREEMPT_DISABLE = 108,
|
||||
CP_WAIT_TIMESTAMP = 20,
|
||||
CP_THREAD_CONTROL = 23,
|
||||
CP_CONTEXT_REG_BUNCH2 = 93,
|
||||
CP_UNK15 = 21,
|
||||
CP_UNK16 = 22,
|
||||
CP_UNK18 = 24,
|
||||
CP_UNK1B = 27,
|
||||
CP_UNK49 = 73,
|
||||
};
|
||||
|
||||
enum adreno_state_block {
|
||||
|
@ -480,6 +511,13 @@ enum reg_tracker {
|
|||
TRACK_CNTL_REG = 1,
|
||||
TRACK_RENDER_CNTL = 2,
|
||||
UNK_EVENT_WRITE = 4,
|
||||
TRACK_LRZ = 8,
|
||||
};
|
||||
|
||||
enum cp_thread {
|
||||
CP_SET_THREAD_BR = 1,
|
||||
CP_SET_THREAD_BV = 2,
|
||||
CP_SET_THREAD_BOTH = 3,
|
||||
};
|
||||
|
||||
#define REG_CP_LOAD_STATE_0 0x00000000
|
||||
|
@ -1256,6 +1294,10 @@ static inline uint32_t CP_SET_BIN_DATA5_6_BIN_PRIM_STRM_HI(uint32_t val)
|
|||
return ((val) << CP_SET_BIN_DATA5_6_BIN_PRIM_STRM_HI__SHIFT) & CP_SET_BIN_DATA5_6_BIN_PRIM_STRM_HI__MASK;
|
||||
}
|
||||
|
||||
#define REG_CP_SET_BIN_DATA5_7 0x00000007
|
||||
|
||||
#define REG_CP_SET_BIN_DATA5_9 0x00000009
|
||||
|
||||
#define REG_CP_SET_BIN_DATA5_OFFSET_0 0x00000000
|
||||
#define CP_SET_BIN_DATA5_OFFSET_0_VSC_SIZE__MASK 0x003f0000
|
||||
#define CP_SET_BIN_DATA5_OFFSET_0_VSC_SIZE__SHIFT 16
|
||||
|
@ -2202,7 +2244,18 @@ static inline uint32_t A6XX_CP_REG_TEST_0_BIT(uint32_t val)
|
|||
{
|
||||
return ((val) << A6XX_CP_REG_TEST_0_BIT__SHIFT) & A6XX_CP_REG_TEST_0_BIT__MASK;
|
||||
}
|
||||
#define A6XX_CP_REG_TEST_0_WAIT_FOR_ME 0x02000000
|
||||
#define A6XX_CP_REG_TEST_0_SKIP_WAIT_FOR_ME 0x02000000
|
||||
#define A6XX_CP_REG_TEST_0_PRED_BIT__MASK 0x7c000000
|
||||
#define A6XX_CP_REG_TEST_0_PRED_BIT__SHIFT 26
|
||||
static inline uint32_t A6XX_CP_REG_TEST_0_PRED_BIT(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_CP_REG_TEST_0_PRED_BIT__SHIFT) & A6XX_CP_REG_TEST_0_PRED_BIT__MASK;
|
||||
}
|
||||
#define A6XX_CP_REG_TEST_0_PRED_UPDATE 0x80000000
|
||||
|
||||
#define REG_A6XX_CP_REG_TEST_PRED_MASK 0x00000001
|
||||
|
||||
#define REG_A6XX_CP_REG_TEST_PRED_VAL 0x00000002
|
||||
|
||||
#define REG_CP_COND_REG_EXEC_0 0x00000000
|
||||
#define CP_COND_REG_EXEC_0_REG0__MASK 0x0003ffff
|
||||
|
@ -2211,6 +2264,12 @@ static inline uint32_t CP_COND_REG_EXEC_0_REG0(uint32_t val)
|
|||
{
|
||||
return ((val) << CP_COND_REG_EXEC_0_REG0__SHIFT) & CP_COND_REG_EXEC_0_REG0__MASK;
|
||||
}
|
||||
#define CP_COND_REG_EXEC_0_PRED_BIT__MASK 0x007c0000
|
||||
#define CP_COND_REG_EXEC_0_PRED_BIT__SHIFT 18
|
||||
static inline uint32_t CP_COND_REG_EXEC_0_PRED_BIT(uint32_t val)
|
||||
{
|
||||
return ((val) << CP_COND_REG_EXEC_0_PRED_BIT__SHIFT) & CP_COND_REG_EXEC_0_PRED_BIT__MASK;
|
||||
}
|
||||
#define CP_COND_REG_EXEC_0_BINNING 0x02000000
|
||||
#define CP_COND_REG_EXEC_0_GMEM 0x04000000
|
||||
#define CP_COND_REG_EXEC_0_SYSMEM 0x08000000
|
||||
|
@ -2308,13 +2367,17 @@ static inline uint32_t CP_SET_CTXSWITCH_IB_2_TYPE(enum ctxswitch_ib val)
|
|||
}
|
||||
|
||||
#define REG_CP_REG_WRITE_0 0x00000000
|
||||
#define CP_REG_WRITE_0_TRACKER__MASK 0x00000007
|
||||
#define CP_REG_WRITE_0_TRACKER__MASK 0x0000000f
|
||||
#define CP_REG_WRITE_0_TRACKER__SHIFT 0
|
||||
static inline uint32_t CP_REG_WRITE_0_TRACKER(enum reg_tracker val)
|
||||
{
|
||||
return ((val) << CP_REG_WRITE_0_TRACKER__SHIFT) & CP_REG_WRITE_0_TRACKER__MASK;
|
||||
}
|
||||
|
||||
#define REG_CP_REG_WRITE_1 0x00000001
|
||||
|
||||
#define REG_CP_REG_WRITE_2 0x00000002
|
||||
|
||||
#define REG_CP_SMMU_TABLE_UPDATE_0 0x00000000
|
||||
#define CP_SMMU_TABLE_UPDATE_0_TTBR0_LO__MASK 0xffffffff
|
||||
#define CP_SMMU_TABLE_UPDATE_0_TTBR0_LO__SHIFT 0
|
||||
|
@ -2361,5 +2424,21 @@ static inline uint32_t CP_SMMU_TABLE_UPDATE_3_CONTEXTBANK(uint32_t val)
|
|||
|
||||
#define REG_CP_START_BIN_BODY_DWORDS 0x00000004
|
||||
|
||||
#define REG_CP_WAIT_TIMESTAMP_0 0x00000000
|
||||
|
||||
#define REG_CP_WAIT_TIMESTAMP_ADDR 0x00000001
|
||||
|
||||
#define REG_CP_WAIT_TIMESTAMP_TIMESTAMP 0x00000003
|
||||
|
||||
#define REG_CP_THREAD_CONTROL_0 0x00000000
|
||||
#define CP_THREAD_CONTROL_0_THREAD__MASK 0x00000003
|
||||
#define CP_THREAD_CONTROL_0_THREAD__SHIFT 0
|
||||
static inline uint32_t CP_THREAD_CONTROL_0_THREAD(enum cp_thread val)
|
||||
{
|
||||
return ((val) << CP_THREAD_CONTROL_0_THREAD__SHIFT) & CP_THREAD_CONTROL_0_THREAD__MASK;
|
||||
}
|
||||
#define CP_THREAD_CONTROL_0_CONCURRENT_BIN_DISABLE 0x08000000
|
||||
#define CP_THREAD_CONTROL_0_SYNC_THREADS 0x80000000
|
||||
|
||||
|
||||
#endif /* ADRENO_PM4_XML */
|
||||
|
|
|
@ -0,0 +1,210 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_3_0_MSM8998_H
|
||||
#define _DPU_3_0_MSM8998_H
|
||||
|
||||
static const struct dpu_caps msm8998_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0x7,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg msm8998_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_10,
|
||||
.highest_bank_bit = 0x2,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg msm8998_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x458,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 12 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR0] = { .reg_off = 0x3a8, .bit_off = 15 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR1] = { .reg_off = 0x3b0, .bit_off = 15 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg msm8998_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x94,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x94,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x94,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0x94,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0x94,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg msm8998_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1ac, VIG_MSM8998_MASK,
|
||||
msm8998_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1ac, VIG_MSM8998_MASK,
|
||||
msm8998_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1ac, VIG_MSM8998_MASK,
|
||||
msm8998_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1ac, VIG_MSM8998_MASK,
|
||||
msm8998_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1ac, DMA_MSM8998_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1ac, DMA_MSM8998_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1ac, DMA_CURSOR_MSM8998_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1ac, DMA_CURSOR_MSM8998_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg msm8998_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_0, LM_2, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_1, LM_5, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_2, LM_0, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_MAX, 0, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_MAX, 0, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_MSM8998_MASK,
|
||||
&msm8998_lm_sblk, PINGPONG_3, LM_1, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg msm8998_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg msm8998_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_MSM8998_MASK,
|
||||
&msm8998_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_MSM8998_MASK,
|
||||
&msm8998_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg msm8998_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, 0, 25, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x280, INTF_DSI, 0, 25, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6b000, 0x280, INTF_DSI, 1, 25, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6b800, 0x280, INTF_HDMI, 0, 25, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg msm8998_perf_data = {
|
||||
.max_bw_low = 6700000,
|
||||
.max_bw_high = 6700000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.undersized_prefill_lines = 2,
|
||||
.xtra_prefill_lines = 2,
|
||||
.dest_scale_prefill_lines = 3,
|
||||
.macrotile_prefill_lines = 4,
|
||||
.yuv_nv12_prefill_lines = 8,
|
||||
.linear_prefill_lines = 1,
|
||||
.downscaling_prefill_lines = 1,
|
||||
.amortizable_threshold = 25,
|
||||
.min_prefill_lines = 25,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfffc, 0xff00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(msm8998_qos_linear),
|
||||
.entries = msm8998_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(msm8998_qos_macrotile),
|
||||
.entries = msm8998_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(msm8998_qos_nrt),
|
||||
.entries = msm8998_qos_nrt
|
||||
},
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 200,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_msm8998_cfg = {
|
||||
.caps = &msm8998_dpu_caps,
|
||||
.ubwc = &msm8998_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(msm8998_mdp),
|
||||
.mdp = msm8998_mdp,
|
||||
.ctl_count = ARRAY_SIZE(msm8998_ctl),
|
||||
.ctl = msm8998_ctl,
|
||||
.sspp_count = ARRAY_SIZE(msm8998_sspp),
|
||||
.sspp = msm8998_sspp,
|
||||
.mixer_count = ARRAY_SIZE(msm8998_lm),
|
||||
.mixer = msm8998_lm,
|
||||
.dspp_count = ARRAY_SIZE(msm8998_dspp),
|
||||
.dspp = msm8998_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(msm8998_pp),
|
||||
.pingpong = msm8998_pp,
|
||||
.intf_count = ARRAY_SIZE(msm8998_intf),
|
||||
.intf = msm8998_intf,
|
||||
.vbif_count = ARRAY_SIZE(msm8998_vbif),
|
||||
.vbif = msm8998_vbif,
|
||||
.reg_dma_count = 0,
|
||||
.perf = &msm8998_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR) | \
|
||||
BIT(MDP_INTF2_INTR) | \
|
||||
BIT(MDP_INTF3_INTR) | \
|
||||
BIT(MDP_INTF4_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,210 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_4_0_SDM845_H
|
||||
#define _DPU_4_0_SDM845_H
|
||||
|
||||
static const struct dpu_caps sdm845_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sdm845_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_20,
|
||||
.highest_bank_bit = 0x2,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sdm845_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x45c,
|
||||
.features = BIT(DPU_MDP_AUDIO_SELECT),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sdm845_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0xe4,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0xe4,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0xe4,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0xe4,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0xe4,
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sdm845_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1c8, VIG_SDM845_MASK_SDMA,
|
||||
sdm845_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1c8, VIG_SDM845_MASK_SDMA,
|
||||
sdm845_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1c8, VIG_SDM845_MASK_SDMA,
|
||||
sdm845_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1c8, VIG_SDM845_MASK_SDMA,
|
||||
sdm845_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1c8, DMA_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1c8, DMA_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1c8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1c8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sdm845_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, 0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, 0),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_5, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x0, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_MAX, 0, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x0, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_MAX, 0, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sdm845_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sdm845_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, 0),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, 0),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, 0),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sdm845_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, 0, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x280, INTF_DSI, 0, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6b000, 0x280, INTF_DSI, 1, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6b800, 0x280, INTF_DP, 1, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sdm845_perf_data = {
|
||||
.max_bw_low = 6800000,
|
||||
.max_bw_high = 6800000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.undersized_prefill_lines = 2,
|
||||
.xtra_prefill_lines = 2,
|
||||
.dest_scale_prefill_lines = 3,
|
||||
.macrotile_prefill_lines = 4,
|
||||
.yuv_nv12_prefill_lines = 8,
|
||||
.linear_prefill_lines = 1,
|
||||
.downscaling_prefill_lines = 1,
|
||||
.amortizable_threshold = 25,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0xf000, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sdm845_qos_linear),
|
||||
.entries = sdm845_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sdm845_qos_macrotile),
|
||||
.entries = sdm845_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sdm845_qos_nrt),
|
||||
.entries = sdm845_qos_nrt
|
||||
},
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sdm845_cfg = {
|
||||
.caps = &sdm845_dpu_caps,
|
||||
.ubwc = &sdm845_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sdm845_mdp),
|
||||
.mdp = sdm845_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sdm845_ctl),
|
||||
.ctl = sdm845_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sdm845_sspp),
|
||||
.sspp = sdm845_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sdm845_lm),
|
||||
.mixer = sdm845_lm,
|
||||
.pingpong_count = ARRAY_SIZE(sdm845_pp),
|
||||
.pingpong = sdm845_pp,
|
||||
.dsc_count = ARRAY_SIZE(sdm845_dsc),
|
||||
.dsc = sdm845_dsc,
|
||||
.intf_count = ARRAY_SIZE(sdm845_intf),
|
||||
.intf = sdm845_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sdm845_regdma,
|
||||
.perf = &sdm845_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR) | \
|
||||
BIT(MDP_INTF2_INTR) | \
|
||||
BIT(MDP_INTF3_INTR) | \
|
||||
BIT(MDP_AD4_0_INTR) | \
|
||||
BIT(MDP_AD4_1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,237 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_5_0_SM8150_H
|
||||
#define _DPU_5_0_SM8150_H
|
||||
|
||||
static const struct dpu_caps sm8150_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm8150_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_30,
|
||||
.highest_bank_bit = 0x2,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8150_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x45c,
|
||||
.features = BIT(DPU_MDP_AUDIO_SELECT),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */
|
||||
static const struct dpu_ctl_cfg sm8150_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a00, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm8150_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f0, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f0, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f0, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1f0, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm8150_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm8150_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sm8150_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sm8150_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x83000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x83100),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x83200),
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm8150_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8150_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2bc, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6b000, 0x2bc, INTF_DSI, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6b800, 0x280, INTF_DP, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8150_perf_data = {
|
||||
.max_bw_low = 12800000,
|
||||
.max_bw_high = 12800000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff8, 0xf000, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sm8150_qos_linear),
|
||||
.entries = sm8150_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm8150_cfg = {
|
||||
.caps = &sm8150_dpu_caps,
|
||||
.ubwc = &sm8150_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm8150_mdp),
|
||||
.mdp = sm8150_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8150_ctl),
|
||||
.ctl = sm8150_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm8150_sspp),
|
||||
.sspp = sm8150_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8150_lm),
|
||||
.mixer = sm8150_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm8150_dspp),
|
||||
.dspp = sm8150_dspp,
|
||||
.dsc_count = ARRAY_SIZE(sm8150_dsc),
|
||||
.dsc = sm8150_dsc,
|
||||
.pingpong_count = ARRAY_SIZE(sm8150_pp),
|
||||
.pingpong = sm8150_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),
|
||||
.merge_3d = sm8150_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sm8150_intf),
|
||||
.intf = sm8150_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8150_regdma,
|
||||
.perf = &sm8150_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR) | \
|
||||
BIT(MDP_INTF2_INTR) | \
|
||||
BIT(MDP_INTF3_INTR) | \
|
||||
BIT(MDP_AD4_0_INTR) | \
|
||||
BIT(MDP_AD4_1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,217 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_5_1_SC8180X_H
|
||||
#define _DPU_5_1_SC8180X_H
|
||||
|
||||
static const struct dpu_caps sc8180x_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sc8180x_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_30,
|
||||
.highest_bank_bit = 0x3,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sc8180x_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x45c,
|
||||
.features = BIT(DPU_MDP_AUDIO_SELECT),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sc8180x_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a00, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sc8180x_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1f0, VIG_SDM845_MASK,
|
||||
sdm845_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f0, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f0, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f0, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1f0, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sc8180x_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, 0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, 0),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sc8180x_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sc8180x_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x83000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x83100),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x83200),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc8180x_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2bc, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6b000, 0x2bc, INTF_DSI, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
/* INTF_3 is for MST, wired to INTF_DP 0 and 1, use dummy index until this is supported */
|
||||
INTF_BLK("intf_3", INTF_3, 0x6b800, 0x280, INTF_DP, 999, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
INTF_BLK("intf_4", INTF_4, 0x6c000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 20, 21),
|
||||
INTF_BLK("intf_5", INTF_5, 0x6c800, 0x280, INTF_DP, MSM_DP_CONTROLLER_2, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sc8180x_perf_data = {
|
||||
.max_bw_low = 9600000,
|
||||
.max_bw_high = 9600000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sc8180x_cfg = {
|
||||
.caps = &sc8180x_dpu_caps,
|
||||
.ubwc = &sc8180x_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sc8180x_mdp),
|
||||
.mdp = sc8180x_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sc8180x_ctl),
|
||||
.ctl = sc8180x_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sc8180x_sspp),
|
||||
.sspp = sc8180x_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sc8180x_lm),
|
||||
.mixer = sc8180x_lm,
|
||||
.pingpong_count = ARRAY_SIZE(sc8180x_pp),
|
||||
.pingpong = sc8180x_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sc8180x_merge_3d),
|
||||
.merge_3d = sc8180x_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sc8180x_intf),
|
||||
.intf = sc8180x_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8150_regdma,
|
||||
.perf = &sc8180x_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR) | \
|
||||
BIT(MDP_INTF2_INTR) | \
|
||||
BIT(MDP_INTF3_INTR) | \
|
||||
BIT(MDP_INTF4_INTR) | \
|
||||
BIT(MDP_INTF5_INTR) | \
|
||||
BIT(MDP_AD4_0_INTR) | \
|
||||
BIT(MDP_AD4_1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,244 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_6_0_SM8250_H
|
||||
#define _DPU_6_0_SM8250_H
|
||||
|
||||
static const struct dpu_caps sm8250_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm8250_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
.ubwc_swizzle = 0x6,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8250_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_WB2] = { .reg_off = 0x3b8, .bit_off = 24 },
|
||||
},
|
||||
};
|
||||
|
||||
/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */
|
||||
static const struct dpu_ctl_cfg sm8250_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a00, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm8250_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK_SDMA,
|
||||
sm8250_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1f8, VIG_SC7180_MASK_SDMA,
|
||||
sm8250_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1f8, VIG_SC7180_MASK_SDMA,
|
||||
sm8250_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1f8, VIG_SC7180_MASK_SDMA,
|
||||
sm8250_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f8, DMA_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1f8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm8250_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm8250_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sm8250_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sm8250_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x83000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x83100),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x83200),
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm8250_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8250_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2c0, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6b000, 0x2c0, INTF_DSI, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6b800, 0x280, INTF_DP, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_wb_cfg sm8250_wb[] = {
|
||||
WB_BLK("wb_2", WB_2, 0x65000, WB_SM8250_MASK, DPU_CLK_CTRL_WB2, 6,
|
||||
VBIF_RT, MDP_SSPP_TOP0_INTR, 4096, 4),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8250_perf_data = {
|
||||
.max_bw_low = 13700000,
|
||||
.max_bw_high = 16600000,
|
||||
.min_core_ib = 4800000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 35,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm8250_cfg = {
|
||||
.caps = &sm8250_dpu_caps,
|
||||
.ubwc = &sm8250_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm8250_mdp),
|
||||
.mdp = sm8250_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8250_ctl),
|
||||
.ctl = sm8250_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm8250_sspp),
|
||||
.sspp = sm8250_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8250_lm),
|
||||
.mixer = sm8250_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm8250_dspp),
|
||||
.dspp = sm8250_dspp,
|
||||
.dsc_count = ARRAY_SIZE(sm8250_dsc),
|
||||
.dsc = sm8250_dsc,
|
||||
.pingpong_count = ARRAY_SIZE(sm8250_pp),
|
||||
.pingpong = sm8250_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sm8250_merge_3d),
|
||||
.merge_3d = sm8250_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sm8250_intf),
|
||||
.intf = sm8250_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.wb_count = ARRAY_SIZE(sm8250_wb),
|
||||
.wb = sm8250_wb,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8250_regdma,
|
||||
.perf = &sm8250_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR) | \
|
||||
BIT(MDP_INTF2_INTR) | \
|
||||
BIT(MDP_INTF3_INTR) | \
|
||||
BIT(MDP_INTF4_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,156 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_6_2_SC7180_H
|
||||
#define _DPU_6_2_SC7180_H
|
||||
|
||||
static const struct dpu_caps sc7180_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0x9,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sc7180_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_20,
|
||||
.highest_bank_bit = 0x3,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sc7180_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_WB2] = { .reg_off = 0x3b8, .bit_off = 24 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sc7180_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1dc,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x1dc,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x1dc,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sc7180_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK,
|
||||
sc7180_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f8, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f8, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sc7180_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sc7180_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sc7180_lm_sblk, PINGPONG_1, LM_0, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sc7180_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sc7180_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sc7180_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk_te, -1, -1),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te, -1, -1),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc7180_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6a000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2c0, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
};
|
||||
|
||||
static const struct dpu_wb_cfg sc7180_wb[] = {
|
||||
WB_BLK("wb_2", WB_2, 0x65000, WB_SM8250_MASK, DPU_CLK_CTRL_WB2, 6,
|
||||
VBIF_RT, MDP_SSPP_TOP0_INTR, 4096, 4),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sc7180_perf_data = {
|
||||
.max_bw_low = 6800000,
|
||||
.max_bw_high = 6800000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 1600000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xff, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sc7180_cfg = {
|
||||
.caps = &sc7180_dpu_caps,
|
||||
.ubwc = &sc7180_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sc7180_mdp),
|
||||
.mdp = sc7180_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sc7180_ctl),
|
||||
.ctl = sc7180_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sc7180_sspp),
|
||||
.sspp = sc7180_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sc7180_lm),
|
||||
.mixer = sc7180_lm,
|
||||
.dspp_count = ARRAY_SIZE(sc7180_dspp),
|
||||
.dspp = sc7180_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sc7180_pp),
|
||||
.pingpong = sc7180_pp,
|
||||
.intf_count = ARRAY_SIZE(sc7180_intf),
|
||||
.intf = sc7180_intf,
|
||||
.wb_count = ARRAY_SIZE(sc7180_wb),
|
||||
.wb = sc7180_wb,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sdm845_regdma,
|
||||
.perf = &sc7180_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,129 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_6_3_SM6115_H
|
||||
#define _DPU_6_3_SM6115_H
|
||||
|
||||
static const struct dpu_caps sm6115_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0x4,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.max_linewidth = 2160,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm6115_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_10,
|
||||
.highest_bank_bit = 0x1,
|
||||
.ubwc_swizzle = 0x7,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm6115_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sm6115_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1dc,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm6115_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK,
|
||||
sm6115_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm6115_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_QCM2290_MASK,
|
||||
&qcm2290_lm_sblk, PINGPONG_0, 0, DSPP_0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm6115_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sm6115_pp[] = {
|
||||
PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm6115_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x00000, 0x280, INTF_NONE, 0, 0, 0, 0, 0, 0),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2c0, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm6115_perf_data = {
|
||||
.max_bw_low = 3100000,
|
||||
.max_bw_high = 4000000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xff, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm6115_cfg = {
|
||||
.caps = &sm6115_dpu_caps,
|
||||
.ubwc = &sm6115_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm6115_mdp),
|
||||
.mdp = sm6115_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm6115_ctl),
|
||||
.ctl = sm6115_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm6115_sspp),
|
||||
.sspp = sm6115_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm6115_lm),
|
||||
.mixer = sm6115_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm6115_dspp),
|
||||
.dspp = sm6115_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sm6115_pp),
|
||||
.pingpong = sm6115_pp,
|
||||
.intf_count = ARRAY_SIZE(sm6115_intf),
|
||||
.intf = sm6115_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.perf = &sm6115_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,119 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_6_5_QCM2290_H
|
||||
#define _DPU_6_5_QCM2290_H
|
||||
|
||||
static const struct dpu_caps qcm2290_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0x4,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.max_linewidth = 2160,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg qcm2290_ubwc_cfg = {
|
||||
.highest_bank_bit = 0x2,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg qcm2290_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg qcm2290_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0x1dc,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg qcm2290_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_QCM2290_MASK,
|
||||
qcm2290_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
|
||||
qcm2290_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg qcm2290_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_QCM2290_MASK,
|
||||
&qcm2290_lm_sblk, PINGPONG_0, 0, DSPP_0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg qcm2290_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg qcm2290_pp[] = {
|
||||
PP_BLK("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg qcm2290_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x00000, 0x280, INTF_NONE, 0, 0, 0, 0, 0, 0),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6a800, 0x2c0, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg qcm2290_perf_data = {
|
||||
.max_bw_low = 2700000,
|
||||
.max_bw_high = 2700000,
|
||||
.min_core_ib = 1300000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 1600000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xff, 0x0, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0x0, 0x0},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(qcm2290_qos_linear),
|
||||
.entries = qcm2290_qos_linear
|
||||
},
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_qcm2290_cfg = {
|
||||
.caps = &qcm2290_dpu_caps,
|
||||
.ubwc = &qcm2290_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(qcm2290_mdp),
|
||||
.mdp = qcm2290_mdp,
|
||||
.ctl_count = ARRAY_SIZE(qcm2290_ctl),
|
||||
.ctl = qcm2290_ctl,
|
||||
.sspp_count = ARRAY_SIZE(qcm2290_sspp),
|
||||
.sspp = qcm2290_sspp,
|
||||
.mixer_count = ARRAY_SIZE(qcm2290_lm),
|
||||
.mixer = qcm2290_lm,
|
||||
.dspp_count = ARRAY_SIZE(qcm2290_dspp),
|
||||
.dspp = qcm2290_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(qcm2290_pp),
|
||||
.pingpong = qcm2290_pp,
|
||||
.intf_count = ARRAY_SIZE(qcm2290_intf),
|
||||
.intf = qcm2290_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.perf = &qcm2290_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,226 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_7_0_SM8350_H
|
||||
#define _DPU_7_0_SM8350_H
|
||||
|
||||
static const struct dpu_caps sm8350_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm8350_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8350_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
|
||||
},
|
||||
};
|
||||
|
||||
/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */
|
||||
static const struct dpu_ctl_cfg sm8350_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x1e8,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x16000, .len = 0x1e8,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x17000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x18000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x19000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm8350_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x1f8, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x1f8, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x1f8, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f8, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f8, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x1f8, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm8350_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm8350_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sm8350_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8350_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, 0x2c4, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x36000, 0x2c4, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x37000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8350_perf_data = {
|
||||
.max_bw_low = 11800000,
|
||||
.max_bw_high = 15500000,
|
||||
.min_core_ib = 2500000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 40,
|
||||
/* FIXME: lut tables */
|
||||
.danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0},
|
||||
.safe_lut_tbl = {0xfe00, 0xfe00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm8350_cfg = {
|
||||
.caps = &sm8350_dpu_caps,
|
||||
.ubwc = &sm8350_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm8350_mdp),
|
||||
.mdp = sm8350_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8350_ctl),
|
||||
.ctl = sm8350_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm8350_sspp),
|
||||
.sspp = sm8350_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8350_lm),
|
||||
.mixer = sm8350_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm8350_dspp),
|
||||
.dspp = sm8350_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sm8350_pp),
|
||||
.pingpong = sm8350_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sm8350_merge_3d),
|
||||
.merge_3d = sm8350_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sm8350_intf),
|
||||
.intf = sm8350_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8350_regdma,
|
||||
.perf = &sm8350_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_7xxx_INTR) | \
|
||||
BIT(MDP_INTF1_7xxx_INTR) | \
|
||||
BIT(MDP_INTF2_7xxx_INTR) | \
|
||||
BIT(MDP_INTF3_7xxx_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,158 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_7_2_SC7280_H
|
||||
#define _DPU_7_2_SC7280_H
|
||||
|
||||
static const struct dpu_caps sc7280_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0x7,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.max_linewidth = 2400,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sc7280_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_30,
|
||||
.highest_bank_bit = 0x1,
|
||||
.ubwc_swizzle = 0x6,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sc7280_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x2014,
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sc7280_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x16000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x17000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x18000, .len = 0x1e8,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sc7280_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x1f8, VIG_SC7280_MASK_SDMA,
|
||||
sc7280_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x1f8, DMA_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x1f8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x1f8, DMA_CURSOR_SDM845_MASK_SDMA,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sc7280_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sc7180_lm_sblk, PINGPONG_0, 0, DSPP_0),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sc7180_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sc7180_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sc7280_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sc7180_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sc7280_pp[] = {
|
||||
PP_BLK("pingpong_0", PINGPONG_0, 0x69000, 0, sc7280_pp_sblk, -1, -1),
|
||||
PP_BLK("pingpong_1", PINGPONG_1, 0x6a000, 0, sc7280_pp_sblk, -1, -1),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, 0, sc7280_pp_sblk, -1, -1),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, 0, sc7280_pp_sblk, -1, -1),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc7280_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, 0x2c4, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_5", INTF_5, 0x39000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sc7280_perf_data = {
|
||||
.max_bw_low = 4700000,
|
||||
.max_bw_high = 8800000,
|
||||
.min_core_ib = 2500000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 1600000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xffff, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xff00, 0xff00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sc7280_cfg = {
|
||||
.caps = &sc7280_dpu_caps,
|
||||
.ubwc = &sc7280_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sc7280_mdp),
|
||||
.mdp = sc7280_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sc7280_ctl),
|
||||
.ctl = sc7280_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sc7280_sspp),
|
||||
.sspp = sc7280_sspp,
|
||||
.dspp_count = ARRAY_SIZE(sc7280_dspp),
|
||||
.dspp = sc7280_dspp,
|
||||
.mixer_count = ARRAY_SIZE(sc7280_lm),
|
||||
.mixer = sc7280_lm,
|
||||
.pingpong_count = ARRAY_SIZE(sc7280_pp),
|
||||
.pingpong = sc7280_pp,
|
||||
.intf_count = ARRAY_SIZE(sc7280_intf),
|
||||
.intf = sc7280_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.perf = &sc7280_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_7xxx_INTR) | \
|
||||
BIT(MDP_INTF1_7xxx_INTR) | \
|
||||
BIT(MDP_INTF5_7xxx_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,222 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_8_0_SC8280XP_H
|
||||
#define _DPU_8_0_SC8280XP_H
|
||||
|
||||
static const struct dpu_caps sc8280xp_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 11,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 5120,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sc8280xp_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.highest_bank_bit = 2,
|
||||
.ubwc_swizzle = 6,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sc8280xp_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = BIT(DPU_MDP_PERIPH_0_REMOVED),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_ctl_cfg sc8280xp_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x16000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x17000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x18000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x19000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x2ac, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x2ac, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x2ac, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x2ac, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x2ac, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x2ac, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x2ac, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x2ac, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_2, LM_3, DSPP_2),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_3, LM_2, DSPP_3),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK, &sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sc8280xp_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sc8280xp_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), -1),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), -1),
|
||||
PP_BLK_TE("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), -1),
|
||||
PP_BLK_TE("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11), -1),
|
||||
PP_BLK_TE("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30), -1),
|
||||
PP_BLK_TE("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31), -1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sc8280xp_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000),
|
||||
};
|
||||
|
||||
/* TODO: INTF 3, 8 and 7 are used for MST, marked as INTF_NONE for now */
|
||||
static const struct dpu_intf_cfg sc8280xp_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, 0x300, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x36000, 0x300, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x37000, 0x280, INTF_NONE, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
INTF_BLK("intf_4", INTF_4, 0x38000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 20, 21),
|
||||
INTF_BLK("intf_5", INTF_5, 0x39000, 0x280, INTF_DP, MSM_DP_CONTROLLER_3, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
|
||||
INTF_BLK("intf_6", INTF_6, 0x3a000, 0x280, INTF_DP, MSM_DP_CONTROLLER_2, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 16, 17),
|
||||
INTF_BLK("intf_7", INTF_7, 0x3b000, 0x280, INTF_NONE, MSM_DP_CONTROLLER_2, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 18, 19),
|
||||
INTF_BLK("intf_8", INTF_8, 0x3c000, 0x280, INTF_NONE, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 12, 13),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sc8280xp_perf_data = {
|
||||
.max_bw_low = 13600000,
|
||||
.max_bw_high = 18200000,
|
||||
.min_core_ib = 2500000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc8180x_qos_linear),
|
||||
.entries = sc8180x_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc8180x_qos_macrotile),
|
||||
.entries = sc8180x_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sc8280xp_cfg = {
|
||||
.caps = &sc8280xp_dpu_caps,
|
||||
.ubwc = &sc8280xp_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sc8280xp_mdp),
|
||||
.mdp = sc8280xp_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sc8280xp_ctl),
|
||||
.ctl = sc8280xp_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sc8280xp_sspp),
|
||||
.sspp = sc8280xp_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sc8280xp_lm),
|
||||
.mixer = sc8280xp_lm,
|
||||
.dspp_count = ARRAY_SIZE(sc8280xp_dspp),
|
||||
.dspp = sc8280xp_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sc8280xp_pp),
|
||||
.pingpong = sc8280xp_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sc8280xp_merge_3d),
|
||||
.merge_3d = sc8280xp_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sc8280xp_intf),
|
||||
.intf = sc8280xp_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sc8280xp_regdma,
|
||||
.perf = &sc8280xp_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_7xxx_INTR) | \
|
||||
BIT(MDP_INTF1_7xxx_INTR) | \
|
||||
BIT(MDP_INTF2_7xxx_INTR) | \
|
||||
BIT(MDP_INTF3_7xxx_INTR) | \
|
||||
BIT(MDP_INTF4_7xxx_INTR) | \
|
||||
BIT(MDP_INTF5_7xxx_INTR) | \
|
||||
BIT(MDP_INTF6_7xxx_INTR) | \
|
||||
BIT(MDP_INTF7_7xxx_INTR) | \
|
||||
BIT(MDP_INTF8_7xxx_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,234 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_8_1_SM8450_H
|
||||
#define _DPU_8_1_SM8450_H
|
||||
|
||||
static const struct dpu_caps sm8450_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 5120,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm8450_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
.ubwc_swizzle = 0x6,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8450_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = BIT(DPU_MDP_PERIPH_0_REMOVED),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x2b4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x2bc, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0x2c4, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
|
||||
},
|
||||
};
|
||||
|
||||
/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */
|
||||
static const struct dpu_ctl_cfg sm8450_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x204,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x16000, .len = 0x204,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x17000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x18000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x19000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a000, .len = 0x204,
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm8450_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x32c, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x32c, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x32c, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x32c, VIG_SC7180_MASK,
|
||||
sm8250_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x32c, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x32c, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x32c, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x32c, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm8450_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
/* FIXME: interrupts */
|
||||
static const struct dpu_pingpong_cfg sm8450_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 12)),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sdm845_pp_sblk_te,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 13)),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 14)),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 15)),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sdm845_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
PP_BLK("pingpong_6", PINGPONG_6, 0x65800, MERGE_3D_3, sdm845_pp_sblk,
|
||||
-1,
|
||||
-1),
|
||||
PP_BLK("pingpong_7", PINGPONG_7, 0x65c00, MERGE_3D_3, sdm845_pp_sblk,
|
||||
-1,
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000),
|
||||
MERGE_3D_BLK("merge_3d_3", MERGE_3D_3, 0x65f00),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8450_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, 0x300, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x36000, 0x300, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x37000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8450_perf_data = {
|
||||
.max_bw_low = 13600000,
|
||||
.max_bw_high = 18200000,
|
||||
.min_core_ib = 2500000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 35,
|
||||
/* FIXME: lut tables */
|
||||
.danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0},
|
||||
.safe_lut_tbl = {0xfe00, 0xfe00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm8450_cfg = {
|
||||
.caps = &sm8450_dpu_caps,
|
||||
.ubwc = &sm8450_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm8450_mdp),
|
||||
.mdp = sm8450_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8450_ctl),
|
||||
.ctl = sm8450_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm8450_sspp),
|
||||
.sspp = sm8450_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8450_lm),
|
||||
.mixer = sm8450_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm8450_dspp),
|
||||
.dspp = sm8450_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sm8450_pp),
|
||||
.pingpong = sm8450_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sm8450_merge_3d),
|
||||
.merge_3d = sm8450_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sm8450_intf),
|
||||
.intf = sm8450_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8450_regdma,
|
||||
.perf = &sm8450_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_7xxx_INTR) | \
|
||||
BIT(MDP_INTF1_7xxx_INTR) | \
|
||||
BIT(MDP_INTF2_7xxx_INTR) | \
|
||||
BIT(MDP_INTF3_7xxx_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,239 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_9_0_SM8550_H
|
||||
#define _DPU_9_0_SM8550_H
|
||||
|
||||
static const struct dpu_caps sm8550_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED4,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 5120,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_ubwc_cfg sm8550_ubwc_cfg = {
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8550_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0, .len = 0x494,
|
||||
.features = BIT(DPU_MDP_PERIPH_0_REMOVED),
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = { .reg_off = 0x4330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = { .reg_off = 0x6330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = { .reg_off = 0x8330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = { .reg_off = 0xa330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x24330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x26330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x28330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2a330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA4] = { .reg_off = 0x2c330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA5] = { .reg_off = 0x2e330, .bit_off = 0 },
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
|
||||
},
|
||||
};
|
||||
|
||||
/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */
|
||||
static const struct dpu_ctl_cfg sm8550_ctl[] = {
|
||||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x16000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK | BIT(DPU_CTL_SPLIT_DISPLAY),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x17000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x18000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x19000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a000, .len = 0x290,
|
||||
.features = CTL_SM8550_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_sspp_cfg sm8550_sspp[] = {
|
||||
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, 0x344, VIG_SC7180_MASK,
|
||||
sm8550_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_1", SSPP_VIG1, 0x6000, 0x344, VIG_SC7180_MASK,
|
||||
sm8550_vig_sblk_1, 4, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG1),
|
||||
SSPP_BLK("sspp_2", SSPP_VIG2, 0x8000, 0x344, VIG_SC7180_MASK,
|
||||
sm8550_vig_sblk_2, 8, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG2),
|
||||
SSPP_BLK("sspp_3", SSPP_VIG3, 0xa000, 0x344, VIG_SC7180_MASK,
|
||||
sm8550_vig_sblk_3, 12, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG3),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, 0x344, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, 0x344, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, 0x344, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA2),
|
||||
SSPP_BLK("sspp_11", SSPP_DMA3, 0x2a000, 0x344, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_3, 13, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA3),
|
||||
SSPP_BLK("sspp_12", SSPP_DMA4, 0x2c000, 0x344, DMA_CURSOR_SDM845_MASK,
|
||||
sm8550_dma_sblk_4, 14, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA4),
|
||||
SSPP_BLK("sspp_13", SSPP_DMA5, 0x2e000, 0x344, DMA_CURSOR_SDM845_MASK,
|
||||
sm8550_dma_sblk_5, 15, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA5),
|
||||
};
|
||||
|
||||
static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, DSPP_0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, DSPP_1),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg sm8550_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
|
||||
&sm8150_dspp_sblk),
|
||||
};
|
||||
static const struct dpu_pingpong_cfg sm8550_pp[] = {
|
||||
PP_BLK_DIPHER("pingpong_0", PINGPONG_0, 0x69000, MERGE_3D_0, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_1", PINGPONG_1, 0x6a000, MERGE_3D_0, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_2", PINGPONG_2, 0x6b000, MERGE_3D_1, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_3", PINGPONG_3, 0x6c000, MERGE_3D_1, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_4", PINGPONG_4, 0x6d000, MERGE_3D_2, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_5", PINGPONG_5, 0x6e000, MERGE_3D_2, sc7280_pp_sblk,
|
||||
DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_6", PINGPONG_6, 0x66000, MERGE_3D_3, sc7280_pp_sblk,
|
||||
-1,
|
||||
-1),
|
||||
PP_BLK_DIPHER("pingpong_7", PINGPONG_7, 0x66400, MERGE_3D_3, sc7280_pp_sblk,
|
||||
-1,
|
||||
-1),
|
||||
};
|
||||
|
||||
static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {
|
||||
MERGE_3D_BLK("merge_3d_0", MERGE_3D_0, 0x4e000),
|
||||
MERGE_3D_BLK("merge_3d_1", MERGE_3D_1, 0x4f000),
|
||||
MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x50000),
|
||||
MERGE_3D_BLK("merge_3d_3", MERGE_3D_3, 0x66700),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8550_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, 0x280, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
/* TODO TE sub-blocks for intf1 & intf2 */
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, 0x300, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x36000, 0x300, INTF_DSI, 1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x37000, 0x280, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8550_perf_data = {
|
||||
.max_bw_low = 13600000,
|
||||
.max_bw_high = 18200000,
|
||||
.min_core_ib = 2500000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 35,
|
||||
/* FIXME: lut tables */
|
||||
.danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0},
|
||||
.safe_lut_tbl = {0xfe00, 0xfe00, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
.clk_inefficiency_factor = 105,
|
||||
.bw_inefficiency_factor = 120,
|
||||
};
|
||||
|
||||
const struct dpu_mdss_cfg dpu_sm8550_cfg = {
|
||||
.caps = &sm8550_dpu_caps,
|
||||
.ubwc = &sm8550_ubwc_cfg,
|
||||
.mdp_count = ARRAY_SIZE(sm8550_mdp),
|
||||
.mdp = sm8550_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8550_ctl),
|
||||
.ctl = sm8550_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sm8550_sspp),
|
||||
.sspp = sm8550_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8550_lm),
|
||||
.mixer = sm8550_lm,
|
||||
.dspp_count = ARRAY_SIZE(sm8550_dspp),
|
||||
.dspp = sm8550_dspp,
|
||||
.pingpong_count = ARRAY_SIZE(sm8550_pp),
|
||||
.pingpong = sm8550_pp,
|
||||
.merge_3d_count = ARRAY_SIZE(sm8550_merge_3d),
|
||||
.merge_3d = sm8550_merge_3d,
|
||||
.intf_count = ARRAY_SIZE(sm8550_intf),
|
||||
.intf = sm8550_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = &sm8450_regdma,
|
||||
.perf = &sm8550_perf_data,
|
||||
.mdss_irqs = BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_7xxx_INTR) | \
|
||||
BIT(MDP_INTF1_7xxx_INTR) | \
|
||||
BIT(MDP_INTF2_7xxx_INTR) | \
|
||||
BIT(MDP_INTF3_7xxx_INTR),
|
||||
};
|
||||
|
||||
#endif
|
|
@ -21,6 +21,7 @@
|
|||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_rect.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
#include <drm/drm_self_refresh_helper.h>
|
||||
|
||||
#include "dpu_kms.h"
|
||||
#include "dpu_hw_lm.h"
|
||||
|
@ -400,6 +401,47 @@ static void _dpu_crtc_program_lm_output_roi(struct drm_crtc *crtc)
|
|||
}
|
||||
}
|
||||
|
||||
static void _dpu_crtc_blend_setup_pipe(struct drm_crtc *crtc,
|
||||
struct drm_plane *plane,
|
||||
struct dpu_crtc_mixer *mixer,
|
||||
u32 num_mixers,
|
||||
enum dpu_stage stage,
|
||||
struct dpu_format *format,
|
||||
uint64_t modifier,
|
||||
struct dpu_sw_pipe *pipe,
|
||||
unsigned int stage_idx,
|
||||
struct dpu_hw_stage_cfg *stage_cfg
|
||||
)
|
||||
{
|
||||
uint32_t lm_idx;
|
||||
enum dpu_sspp sspp_idx;
|
||||
struct drm_plane_state *state;
|
||||
|
||||
sspp_idx = pipe->sspp->idx;
|
||||
|
||||
state = plane->state;
|
||||
|
||||
trace_dpu_crtc_setup_mixer(DRMID(crtc), DRMID(plane),
|
||||
state, to_dpu_plane_state(state), stage_idx,
|
||||
format->base.pixel_format,
|
||||
modifier);
|
||||
|
||||
DRM_DEBUG_ATOMIC("crtc %d stage:%d - plane %d sspp %d fb %d multirect_idx %d\n",
|
||||
crtc->base.id,
|
||||
stage,
|
||||
plane->base.id,
|
||||
sspp_idx - SSPP_NONE,
|
||||
state->fb ? state->fb->base.id : -1,
|
||||
pipe->multirect_index);
|
||||
|
||||
stage_cfg->stage[stage][stage_idx] = sspp_idx;
|
||||
stage_cfg->multirect_index[stage][stage_idx] = pipe->multirect_index;
|
||||
|
||||
/* blend config update */
|
||||
for (lm_idx = 0; lm_idx < num_mixers; lm_idx++)
|
||||
mixer[lm_idx].lm_ctl->ops.update_pending_flush_sspp(mixer[lm_idx].lm_ctl, sspp_idx);
|
||||
}
|
||||
|
||||
static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
|
||||
struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer,
|
||||
struct dpu_hw_stage_cfg *stage_cfg)
|
||||
|
@ -412,15 +454,12 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
|
|||
struct dpu_format *format;
|
||||
struct dpu_hw_ctl *ctl = mixer->lm_ctl;
|
||||
|
||||
uint32_t stage_idx, lm_idx;
|
||||
int zpos_cnt[DPU_STAGE_MAX + 1] = { 0 };
|
||||
uint32_t lm_idx;
|
||||
bool bg_alpha_enable = false;
|
||||
DECLARE_BITMAP(fetch_active, SSPP_MAX);
|
||||
|
||||
memset(fetch_active, 0, sizeof(fetch_active));
|
||||
drm_atomic_crtc_for_each_plane(plane, crtc) {
|
||||
enum dpu_sspp sspp_idx;
|
||||
|
||||
state = plane->state;
|
||||
if (!state)
|
||||
continue;
|
||||
|
@ -431,40 +470,30 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
|
|||
pstate = to_dpu_plane_state(state);
|
||||
fb = state->fb;
|
||||
|
||||
sspp_idx = dpu_plane_pipe(plane);
|
||||
set_bit(sspp_idx, fetch_active);
|
||||
|
||||
DRM_DEBUG_ATOMIC("crtc %d stage:%d - plane %d sspp %d fb %d\n",
|
||||
crtc->base.id,
|
||||
pstate->stage,
|
||||
plane->base.id,
|
||||
sspp_idx - SSPP_VIG0,
|
||||
state->fb ? state->fb->base.id : -1);
|
||||
|
||||
format = to_dpu_format(msm_framebuffer_format(pstate->base.fb));
|
||||
|
||||
if (pstate->stage == DPU_STAGE_BASE && format->alpha_enable)
|
||||
bg_alpha_enable = true;
|
||||
|
||||
stage_idx = zpos_cnt[pstate->stage]++;
|
||||
stage_cfg->stage[pstate->stage][stage_idx] =
|
||||
sspp_idx;
|
||||
stage_cfg->multirect_index[pstate->stage][stage_idx] =
|
||||
pstate->multirect_index;
|
||||
set_bit(pstate->pipe.sspp->idx, fetch_active);
|
||||
_dpu_crtc_blend_setup_pipe(crtc, plane,
|
||||
mixer, cstate->num_mixers,
|
||||
pstate->stage,
|
||||
format, fb ? fb->modifier : 0,
|
||||
&pstate->pipe, 0, stage_cfg);
|
||||
|
||||
trace_dpu_crtc_setup_mixer(DRMID(crtc), DRMID(plane),
|
||||
state, pstate, stage_idx,
|
||||
sspp_idx - SSPP_VIG0,
|
||||
format->base.pixel_format,
|
||||
fb ? fb->modifier : 0);
|
||||
if (pstate->r_pipe.sspp) {
|
||||
set_bit(pstate->r_pipe.sspp->idx, fetch_active);
|
||||
_dpu_crtc_blend_setup_pipe(crtc, plane,
|
||||
mixer, cstate->num_mixers,
|
||||
pstate->stage,
|
||||
format, fb ? fb->modifier : 0,
|
||||
&pstate->r_pipe, 1, stage_cfg);
|
||||
}
|
||||
|
||||
/* blend config update */
|
||||
for (lm_idx = 0; lm_idx < cstate->num_mixers; lm_idx++) {
|
||||
_dpu_crtc_setup_blend_cfg(mixer + lm_idx,
|
||||
pstate, format);
|
||||
|
||||
mixer[lm_idx].lm_ctl->ops.update_pending_flush_sspp(mixer[lm_idx].lm_ctl,
|
||||
sspp_idx);
|
||||
_dpu_crtc_setup_blend_cfg(mixer + lm_idx, pstate, format);
|
||||
|
||||
if (bg_alpha_enable && !format->alpha_enable)
|
||||
mixer[lm_idx].mixer_op_mode = 0;
|
||||
|
@ -767,7 +796,7 @@ static void _dpu_crtc_setup_cp_blocks(struct drm_crtc *crtc)
|
|||
|
||||
/* stage config flush mask */
|
||||
ctl->ops.update_pending_flush_dspp(ctl,
|
||||
mixer[i].hw_dspp->idx);
|
||||
mixer[i].hw_dspp->idx, DPU_DSPP_PCC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1021,6 +1050,18 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
|
|||
|
||||
DRM_DEBUG_KMS("crtc%d\n", crtc->base.id);
|
||||
|
||||
/* If disable is triggered while in self refresh mode,
|
||||
* reset the encoder software state so that in enable
|
||||
* it won't trigger a warn while assigning crtc.
|
||||
*/
|
||||
if (old_crtc_state->self_refresh_active) {
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev,
|
||||
old_crtc_state->encoder_mask) {
|
||||
dpu_encoder_assign_crtc(encoder, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Disable/save vblank irq handling */
|
||||
drm_crtc_vblank_off(crtc);
|
||||
|
||||
|
@ -1032,7 +1073,14 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
|
|||
*/
|
||||
if (dpu_encoder_get_intf_mode(encoder) == INTF_MODE_VIDEO)
|
||||
release_bandwidth = true;
|
||||
dpu_encoder_assign_crtc(encoder, NULL);
|
||||
|
||||
/*
|
||||
* If disable is triggered during psr active(e.g: screen dim in PSR),
|
||||
* we will need encoder->crtc connection to process the device sleep &
|
||||
* preserve it during psr sequence.
|
||||
*/
|
||||
if (!crtc->state->self_refresh_active)
|
||||
dpu_encoder_assign_crtc(encoder, NULL);
|
||||
}
|
||||
|
||||
/* wait for frame_event_done completion */
|
||||
|
@ -1080,6 +1128,9 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
|
|||
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
|
||||
struct drm_encoder *encoder;
|
||||
bool request_bandwidth = false;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
|
||||
|
||||
pm_runtime_get_sync(crtc->dev->dev);
|
||||
|
||||
|
@ -1102,25 +1153,23 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
|
|||
trace_dpu_crtc_enable(DRMID(crtc), true, dpu_crtc);
|
||||
dpu_crtc->enabled = true;
|
||||
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)
|
||||
dpu_encoder_assign_crtc(encoder, crtc);
|
||||
if (!old_crtc_state->self_refresh_active) {
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)
|
||||
dpu_encoder_assign_crtc(encoder, crtc);
|
||||
}
|
||||
|
||||
/* Enable/restore vblank irq handling */
|
||||
drm_crtc_vblank_on(crtc);
|
||||
}
|
||||
|
||||
struct plane_state {
|
||||
struct dpu_plane_state *dpu_pstate;
|
||||
const struct drm_plane_state *drm_pstate;
|
||||
int stage;
|
||||
u32 pipe_id;
|
||||
};
|
||||
|
||||
static bool dpu_crtc_needs_dirtyfb(struct drm_crtc_state *cstate)
|
||||
{
|
||||
struct drm_crtc *crtc = cstate->crtc;
|
||||
struct drm_encoder *encoder;
|
||||
|
||||
if (cstate->self_refresh_active)
|
||||
return true;
|
||||
|
||||
drm_for_each_encoder_mask (encoder, crtc->dev, cstate->encoder_mask) {
|
||||
if (dpu_encoder_get_intf_mode(encoder) == INTF_MODE_CMD) {
|
||||
return true;
|
||||
|
@ -1137,151 +1186,46 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
crtc);
|
||||
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
|
||||
struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc_state);
|
||||
struct plane_state *pstates;
|
||||
|
||||
const struct drm_plane_state *pstate;
|
||||
struct drm_plane *plane;
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
int cnt = 0, rc = 0, mixer_width = 0, i, z_pos;
|
||||
int rc = 0;
|
||||
|
||||
struct dpu_multirect_plane_states multirect_plane[DPU_STAGE_MAX * 2];
|
||||
int multirect_count = 0;
|
||||
const struct drm_plane_state *pipe_staged[SSPP_MAX];
|
||||
int left_zpos_cnt = 0, right_zpos_cnt = 0;
|
||||
struct drm_rect crtc_rect = { 0 };
|
||||
bool needs_dirtyfb = dpu_crtc_needs_dirtyfb(crtc_state);
|
||||
|
||||
pstates = kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL);
|
||||
if (!pstates)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!crtc_state->enable || !crtc_state->active) {
|
||||
if (!crtc_state->enable || !drm_atomic_crtc_effectively_active(crtc_state)) {
|
||||
DRM_DEBUG_ATOMIC("crtc%d -> enable %d, active %d, skip atomic_check\n",
|
||||
crtc->base.id, crtc_state->enable,
|
||||
crtc_state->active);
|
||||
memset(&cstate->new_perf, 0, sizeof(cstate->new_perf));
|
||||
goto end;
|
||||
return 0;
|
||||
}
|
||||
|
||||
mode = &crtc_state->adjusted_mode;
|
||||
DRM_DEBUG_ATOMIC("%s: check\n", dpu_crtc->name);
|
||||
|
||||
/* force a full mode set if active state changed */
|
||||
if (crtc_state->active_changed)
|
||||
crtc_state->mode_changed = true;
|
||||
|
||||
memset(pipe_staged, 0, sizeof(pipe_staged));
|
||||
|
||||
if (cstate->num_mixers) {
|
||||
mixer_width = mode->hdisplay / cstate->num_mixers;
|
||||
|
||||
if (cstate->num_mixers)
|
||||
_dpu_crtc_setup_lm_bounds(crtc, crtc_state);
|
||||
}
|
||||
|
||||
crtc_rect.x2 = mode->hdisplay;
|
||||
crtc_rect.y2 = mode->vdisplay;
|
||||
|
||||
/* get plane state for all drm planes associated with crtc state */
|
||||
/* FIXME: move this to dpu_plane_atomic_check? */
|
||||
drm_atomic_crtc_state_for_each_plane_state(plane, pstate, crtc_state) {
|
||||
struct dpu_plane_state *dpu_pstate = to_dpu_plane_state(pstate);
|
||||
struct drm_rect dst, clip = crtc_rect;
|
||||
|
||||
if (IS_ERR_OR_NULL(pstate)) {
|
||||
rc = PTR_ERR(pstate);
|
||||
DPU_ERROR("%s: failed to get plane%d state, %d\n",
|
||||
dpu_crtc->name, plane->base.id, rc);
|
||||
goto end;
|
||||
return rc;
|
||||
}
|
||||
if (cnt >= DPU_STAGE_MAX * 4)
|
||||
continue;
|
||||
|
||||
if (!pstate->visible)
|
||||
continue;
|
||||
|
||||
pstates[cnt].dpu_pstate = dpu_pstate;
|
||||
pstates[cnt].drm_pstate = pstate;
|
||||
pstates[cnt].stage = pstate->normalized_zpos;
|
||||
pstates[cnt].pipe_id = dpu_plane_pipe(plane);
|
||||
|
||||
dpu_pstate->needs_dirtyfb = needs_dirtyfb;
|
||||
|
||||
if (pipe_staged[pstates[cnt].pipe_id]) {
|
||||
multirect_plane[multirect_count].r0 =
|
||||
pipe_staged[pstates[cnt].pipe_id];
|
||||
multirect_plane[multirect_count].r1 = pstate;
|
||||
multirect_count++;
|
||||
|
||||
pipe_staged[pstates[cnt].pipe_id] = NULL;
|
||||
} else {
|
||||
pipe_staged[pstates[cnt].pipe_id] = pstate;
|
||||
}
|
||||
|
||||
cnt++;
|
||||
|
||||
dst = drm_plane_state_dest(pstate);
|
||||
if (!drm_rect_intersect(&clip, &dst)) {
|
||||
DPU_ERROR("invalid vertical/horizontal destination\n");
|
||||
DPU_ERROR("display: " DRM_RECT_FMT " plane: "
|
||||
DRM_RECT_FMT "\n", DRM_RECT_ARG(&crtc_rect),
|
||||
DRM_RECT_ARG(&dst));
|
||||
rc = -E2BIG;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < SSPP_MAX; i++) {
|
||||
if (pipe_staged[i])
|
||||
dpu_plane_clear_multirect(pipe_staged[i]);
|
||||
}
|
||||
|
||||
z_pos = -1;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
/* reset counts at every new blend stage */
|
||||
if (pstates[i].stage != z_pos) {
|
||||
left_zpos_cnt = 0;
|
||||
right_zpos_cnt = 0;
|
||||
z_pos = pstates[i].stage;
|
||||
}
|
||||
|
||||
/* verify z_pos setting before using it */
|
||||
if (z_pos >= DPU_STAGE_MAX - DPU_STAGE_0) {
|
||||
DPU_ERROR("> %d plane stages assigned\n",
|
||||
DPU_STAGE_MAX - DPU_STAGE_0);
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
} else if (pstates[i].drm_pstate->crtc_x < mixer_width) {
|
||||
if (left_zpos_cnt == 2) {
|
||||
DPU_ERROR("> 2 planes @ stage %d on left\n",
|
||||
z_pos);
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
left_zpos_cnt++;
|
||||
|
||||
} else {
|
||||
if (right_zpos_cnt == 2) {
|
||||
DPU_ERROR("> 2 planes @ stage %d on right\n",
|
||||
z_pos);
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
right_zpos_cnt++;
|
||||
}
|
||||
|
||||
pstates[i].dpu_pstate->stage = z_pos + DPU_STAGE_0;
|
||||
DRM_DEBUG_ATOMIC("%s: zpos %d\n", dpu_crtc->name, z_pos);
|
||||
}
|
||||
|
||||
for (i = 0; i < multirect_count; i++) {
|
||||
if (dpu_plane_validate_multirect_v2(&multirect_plane[i])) {
|
||||
DPU_ERROR(
|
||||
"multirect validation failed for planes (%d - %d)\n",
|
||||
multirect_plane[i].r0->plane->base.id,
|
||||
multirect_plane[i].r1->plane->base.id);
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
atomic_inc(&_dpu_crtc_get_kms(crtc)->bandwidth_ref);
|
||||
|
@ -1290,74 +1234,10 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
if (rc) {
|
||||
DPU_ERROR("crtc%d failed performance check %d\n",
|
||||
crtc->base.id, rc);
|
||||
goto end;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* validate source split:
|
||||
* use pstates sorted by stage to check planes on same stage
|
||||
* we assume that all pipes are in source split so its valid to compare
|
||||
* without taking into account left/right mixer placement
|
||||
*/
|
||||
for (i = 1; i < cnt; i++) {
|
||||
struct plane_state *prv_pstate, *cur_pstate;
|
||||
struct drm_rect left_rect, right_rect;
|
||||
int32_t left_pid, right_pid;
|
||||
int32_t stage;
|
||||
|
||||
prv_pstate = &pstates[i - 1];
|
||||
cur_pstate = &pstates[i];
|
||||
if (prv_pstate->stage != cur_pstate->stage)
|
||||
continue;
|
||||
|
||||
stage = cur_pstate->stage;
|
||||
|
||||
left_pid = prv_pstate->dpu_pstate->base.plane->base.id;
|
||||
left_rect = drm_plane_state_dest(prv_pstate->drm_pstate);
|
||||
|
||||
right_pid = cur_pstate->dpu_pstate->base.plane->base.id;
|
||||
right_rect = drm_plane_state_dest(cur_pstate->drm_pstate);
|
||||
|
||||
if (right_rect.x1 < left_rect.x1) {
|
||||
swap(left_pid, right_pid);
|
||||
swap(left_rect, right_rect);
|
||||
}
|
||||
|
||||
/**
|
||||
* - planes are enumerated in pipe-priority order such that
|
||||
* planes with lower drm_id must be left-most in a shared
|
||||
* blend-stage when using source split.
|
||||
* - planes in source split must be contiguous in width
|
||||
* - planes in source split must have same dest yoff and height
|
||||
*/
|
||||
if (right_pid < left_pid) {
|
||||
DPU_ERROR(
|
||||
"invalid src split cfg. priority mismatch. stage: %d left: %d right: %d\n",
|
||||
stage, left_pid, right_pid);
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
} else if (right_rect.x1 != drm_rect_width(&left_rect)) {
|
||||
DPU_ERROR("non-contiguous coordinates for src split. "
|
||||
"stage: %d left: " DRM_RECT_FMT " right: "
|
||||
DRM_RECT_FMT "\n", stage,
|
||||
DRM_RECT_ARG(&left_rect),
|
||||
DRM_RECT_ARG(&right_rect));
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
} else if (left_rect.y1 != right_rect.y1 ||
|
||||
drm_rect_height(&left_rect) != drm_rect_height(&right_rect)) {
|
||||
DPU_ERROR("source split at stage: %d. invalid "
|
||||
"yoff/height: left: " DRM_RECT_FMT " right: "
|
||||
DRM_RECT_FMT "\n", stage,
|
||||
DRM_RECT_ARG(&left_rect),
|
||||
DRM_RECT_ARG(&right_rect));
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
kfree(pstates);
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dpu_crtc_vblank(struct drm_crtc *crtc, bool en)
|
||||
|
@ -1474,8 +1354,16 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
|
|||
seq_printf(s, "\tdst x:%4d dst_y:%4d dst_w:%4d dst_h:%4d\n",
|
||||
state->crtc_x, state->crtc_y, state->crtc_w,
|
||||
state->crtc_h);
|
||||
seq_printf(s, "\tmultirect: mode: %d index: %d\n",
|
||||
pstate->multirect_mode, pstate->multirect_index);
|
||||
seq_printf(s, "\tsspp[0]:%s\n",
|
||||
pstate->pipe.sspp->cap->name);
|
||||
seq_printf(s, "\tmultirect[0]: mode: %d index: %d\n",
|
||||
pstate->pipe.multirect_mode, pstate->pipe.multirect_index);
|
||||
if (pstate->r_pipe.sspp) {
|
||||
seq_printf(s, "\tsspp[1]:%s\n",
|
||||
pstate->r_pipe.sspp->cap->name);
|
||||
seq_printf(s, "\tmultirect[1]: mode: %d index: %d\n",
|
||||
pstate->r_pipe.multirect_mode, pstate->r_pipe.multirect_index);
|
||||
}
|
||||
|
||||
seq_puts(s, "\n");
|
||||
}
|
||||
|
@ -1577,7 +1465,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
|
|||
{
|
||||
struct drm_crtc *crtc = NULL;
|
||||
struct dpu_crtc *dpu_crtc = NULL;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL);
|
||||
if (!dpu_crtc)
|
||||
|
@ -1614,6 +1502,13 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
|
|||
/* initialize event handling */
|
||||
spin_lock_init(&dpu_crtc->event_lock);
|
||||
|
||||
ret = drm_self_refresh_helper_init(crtc);
|
||||
if (ret) {
|
||||
DPU_ERROR("Failed to initialize %s with self-refresh helpers %d\n",
|
||||
crtc->name, ret);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("%s: successfully initialized crtc\n", dpu_crtc->name);
|
||||
return crtc;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/kthread.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_file.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
|
@ -544,7 +545,8 @@ bool dpu_encoder_use_dsc_merge(struct drm_encoder *drm_enc)
|
|||
static struct msm_display_topology dpu_encoder_get_topology(
|
||||
struct dpu_encoder_virt *dpu_enc,
|
||||
struct dpu_kms *dpu_kms,
|
||||
struct drm_display_mode *mode)
|
||||
struct drm_display_mode *mode,
|
||||
struct drm_crtc_state *crtc_state)
|
||||
{
|
||||
struct msm_display_topology topology = {0};
|
||||
int i, intf_count = 0;
|
||||
|
@ -562,8 +564,7 @@ static struct msm_display_topology dpu_encoder_get_topology(
|
|||
* 1 LM, 1 INTF
|
||||
* 2 LM, 1 INTF (stream merge to support high resolution interfaces)
|
||||
*
|
||||
* Adding color blocks only to primary interface if available in
|
||||
* sufficient number
|
||||
* Add dspps to the reservation requirements if ctm is requested
|
||||
*/
|
||||
if (intf_count == 2)
|
||||
topology.num_lm = 2;
|
||||
|
@ -572,11 +573,8 @@ static struct msm_display_topology dpu_encoder_get_topology(
|
|||
else
|
||||
topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
|
||||
|
||||
if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) {
|
||||
if (dpu_kms->catalog->dspp &&
|
||||
(dpu_kms->catalog->dspp_count >= topology.num_lm))
|
||||
topology.num_dspp = topology.num_lm;
|
||||
}
|
||||
if (crtc_state->ctm)
|
||||
topology.num_dspp = topology.num_lm;
|
||||
|
||||
topology.num_intf = intf_count;
|
||||
|
||||
|
@ -637,25 +635,22 @@ static int dpu_encoder_virt_atomic_check(
|
|||
if (ret) {
|
||||
DPU_ERROR_ENC(dpu_enc,
|
||||
"mode unsupported, phys idx %d\n", i);
|
||||
break;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode);
|
||||
topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_state);
|
||||
|
||||
/* Reserve dynamic resources now. */
|
||||
if (!ret) {
|
||||
/*
|
||||
* Release and Allocate resources on every modeset
|
||||
* Dont allocate when active is false.
|
||||
*/
|
||||
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
|
||||
dpu_rm_release(global_state, drm_enc);
|
||||
/*
|
||||
* Release and Allocate resources on every modeset
|
||||
* Dont allocate when active is false.
|
||||
*/
|
||||
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
|
||||
dpu_rm_release(global_state, drm_enc);
|
||||
|
||||
if (!crtc_state->active_changed || crtc_state->active)
|
||||
ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
|
||||
drm_enc, crtc_state, topology);
|
||||
}
|
||||
if (!crtc_state->active_changed || crtc_state->enable)
|
||||
ret = dpu_rm_reserve(&dpu_kms->rm, global_state,
|
||||
drm_enc, crtc_state, topology);
|
||||
}
|
||||
|
||||
trace_dpu_enc_atomic_check_flags(DRMID(drm_enc), adj_mode->flags);
|
||||
|
@ -1171,7 +1166,8 @@ out:
|
|||
mutex_unlock(&dpu_enc->enc_lock);
|
||||
}
|
||||
|
||||
static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc)
|
||||
static void dpu_encoder_virt_atomic_enable(struct drm_encoder *drm_enc,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct dpu_encoder_virt *dpu_enc = NULL;
|
||||
int ret = 0;
|
||||
|
@ -1207,14 +1203,28 @@ out:
|
|||
mutex_unlock(&dpu_enc->enc_lock);
|
||||
}
|
||||
|
||||
static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc)
|
||||
static void dpu_encoder_virt_atomic_disable(struct drm_encoder *drm_enc,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct dpu_encoder_virt *dpu_enc = NULL;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_state = NULL;
|
||||
int i = 0;
|
||||
|
||||
dpu_enc = to_dpu_encoder_virt(drm_enc);
|
||||
DPU_DEBUG_ENC(dpu_enc, "\n");
|
||||
|
||||
crtc = drm_atomic_get_old_crtc_for_encoder(state, drm_enc);
|
||||
if (crtc)
|
||||
old_state = drm_atomic_get_old_crtc_state(state, crtc);
|
||||
|
||||
/*
|
||||
* The encoder is already disabled if self refresh mode was set earlier,
|
||||
* in the old_state for the corresponding crtc.
|
||||
*/
|
||||
if (old_state && old_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
mutex_lock(&dpu_enc->enc_lock);
|
||||
dpu_enc->enabled = false;
|
||||
|
||||
|
@ -2078,25 +2088,6 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
|
|||
ctl->ops.clear_pending_flush(ctl);
|
||||
}
|
||||
|
||||
void dpu_encoder_prepare_commit(struct drm_encoder *drm_enc)
|
||||
{
|
||||
struct dpu_encoder_virt *dpu_enc;
|
||||
struct dpu_encoder_phys *phys;
|
||||
int i;
|
||||
|
||||
if (!drm_enc) {
|
||||
DPU_ERROR("invalid encoder\n");
|
||||
return;
|
||||
}
|
||||
dpu_enc = to_dpu_encoder_virt(drm_enc);
|
||||
|
||||
for (i = 0; i < dpu_enc->num_phys_encs; i++) {
|
||||
phys = dpu_enc->phys_encs[i];
|
||||
if (phys->ops.prepare_commit)
|
||||
phys->ops.prepare_commit(phys);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static int _dpu_encoder_status_show(struct seq_file *s, void *data)
|
||||
{
|
||||
|
@ -2388,8 +2379,8 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t)
|
|||
|
||||
static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = {
|
||||
.atomic_mode_set = dpu_encoder_virt_atomic_mode_set,
|
||||
.disable = dpu_encoder_virt_disable,
|
||||
.enable = dpu_encoder_virt_enable,
|
||||
.atomic_disable = dpu_encoder_virt_atomic_disable,
|
||||
.atomic_enable = dpu_encoder_virt_atomic_enable,
|
||||
.atomic_check = dpu_encoder_virt_atomic_check,
|
||||
};
|
||||
|
||||
|
|
|
@ -146,13 +146,6 @@ struct drm_encoder *dpu_encoder_init(
|
|||
int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc,
|
||||
struct msm_display_info *disp_info);
|
||||
|
||||
/**
|
||||
* dpu_encoder_prepare_commit - prepare encoder at the very beginning of an
|
||||
* atomic commit, before any registers are written
|
||||
* @drm_enc: Pointer to previously created drm encoder structure
|
||||
*/
|
||||
void dpu_encoder_prepare_commit(struct drm_encoder *drm_enc);
|
||||
|
||||
/**
|
||||
* dpu_encoder_set_idle_timeout - set the idle timeout for video
|
||||
* and command mode encoders.
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
|
||||
#define DPU_ENC_MAX_POLL_TIMEOUT_US 2000
|
||||
|
||||
static void dpu_encoder_phys_cmd_enable_te(struct dpu_encoder_phys *phys_enc);
|
||||
|
||||
static bool dpu_encoder_phys_cmd_is_master(struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
return (phys_enc->split_role != ENC_ROLE_SLAVE);
|
||||
|
@ -565,6 +567,8 @@ static void dpu_encoder_phys_cmd_prepare_for_kickoff(
|
|||
phys_enc->hw_pp->idx - PINGPONG_0);
|
||||
}
|
||||
|
||||
dpu_encoder_phys_cmd_enable_te(phys_enc);
|
||||
|
||||
DPU_DEBUG_CMDENC(cmd_enc, "pp:%d pending_cnt %d\n",
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(&phys_enc->pending_kickoff_cnt));
|
||||
|
@ -586,8 +590,7 @@ static bool dpu_encoder_phys_cmd_is_ongoing_pptx(
|
|||
return false;
|
||||
}
|
||||
|
||||
static void dpu_encoder_phys_cmd_prepare_commit(
|
||||
struct dpu_encoder_phys *phys_enc)
|
||||
static void dpu_encoder_phys_cmd_enable_te(struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
struct dpu_encoder_phys_cmd *cmd_enc =
|
||||
to_dpu_encoder_phys_cmd(phys_enc);
|
||||
|
@ -732,7 +735,6 @@ static void dpu_encoder_phys_cmd_trigger_start(
|
|||
static void dpu_encoder_phys_cmd_init_ops(
|
||||
struct dpu_encoder_phys_ops *ops)
|
||||
{
|
||||
ops->prepare_commit = dpu_encoder_phys_cmd_prepare_commit;
|
||||
ops->is_master = dpu_encoder_phys_cmd_is_master;
|
||||
ops->atomic_mode_set = dpu_encoder_phys_cmd_atomic_mode_set;
|
||||
ops->enable = dpu_encoder_phys_cmd_enable;
|
||||
|
|
|
@ -523,6 +523,7 @@ static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc)
|
|||
{
|
||||
unsigned long lock_flags;
|
||||
int ret;
|
||||
struct intf_status intf_status = {0};
|
||||
|
||||
if (!phys_enc->parent || !phys_enc->parent->dev) {
|
||||
DPU_ERROR("invalid encoder/device\n");
|
||||
|
@ -567,6 +568,27 @@ static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc)
|
|||
}
|
||||
}
|
||||
|
||||
if (phys_enc->hw_intf && phys_enc->hw_intf->ops.get_status)
|
||||
phys_enc->hw_intf->ops.get_status(phys_enc->hw_intf, &intf_status);
|
||||
|
||||
/*
|
||||
* Wait for a vsync if timing en status is on after timing engine
|
||||
* is disabled.
|
||||
*/
|
||||
if (intf_status.is_en && dpu_encoder_phys_vid_is_master(phys_enc)) {
|
||||
spin_lock_irqsave(phys_enc->enc_spinlock, lock_flags);
|
||||
dpu_encoder_phys_inc_pending(phys_enc);
|
||||
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
|
||||
ret = dpu_encoder_phys_vid_wait_for_vblank(phys_enc);
|
||||
if (ret) {
|
||||
atomic_set(&phys_enc->pending_kickoff_cnt, 0);
|
||||
DRM_ERROR("wait disable failed: id:%u intf:%d ret:%d\n",
|
||||
DRMID(phys_enc->parent),
|
||||
phys_enc->hw_intf->idx - INTF_0, ret);
|
||||
}
|
||||
}
|
||||
|
||||
dpu_encoder_helper_phys_cleanup(phys_enc);
|
||||
phys_enc->enable_state = DPU_ENC_DISABLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -536,6 +536,16 @@ static const struct dpu_format dpu_format_map_ubwc[] = {
|
|||
true, 4, DPU_FORMAT_FLAG_DX | DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||
|
||||
/* XRGB2101010 and ARGB2101010 purposely have the same color
|
||||
* ordering. The hardware only supports ARGB2101010 UBWC
|
||||
* natively.
|
||||
*/
|
||||
INTERLEAVED_RGB_FMT_TILED(ARGB2101010,
|
||||
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
||||
true, 4, DPU_FORMAT_FLAG_DX | DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||
|
||||
PSEUDO_YUV_FMT_TILED(NV12,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C1_B_Cb, C2_R_Cr,
|
||||
|
@ -591,6 +601,7 @@ static int _dpu_format_get_media_color_ubwc(const struct dpu_format *fmt)
|
|||
{DRM_FORMAT_XBGR8888, COLOR_FMT_RGBA8888_UBWC},
|
||||
{DRM_FORMAT_XRGB8888, COLOR_FMT_RGBA8888_UBWC},
|
||||
{DRM_FORMAT_ABGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_ARGB2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_XRGB2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_XBGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_BGR565, COLOR_FMT_RGB565_UBWC},
|
||||
|
@ -918,8 +929,7 @@ int dpu_format_populate_layout(
|
|||
struct drm_framebuffer *fb,
|
||||
struct dpu_hw_fmt_layout *layout)
|
||||
{
|
||||
uint32_t plane_addr[DPU_MAX_PLANES];
|
||||
int i, ret;
|
||||
int ret;
|
||||
|
||||
if (!fb || !layout) {
|
||||
DRM_ERROR("invalid arguments\n");
|
||||
|
@ -940,9 +950,6 @@ int dpu_format_populate_layout(
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < DPU_MAX_PLANES; ++i)
|
||||
plane_addr[i] = layout->plane_addr[i];
|
||||
|
||||
/* Populate the addresses given the fb */
|
||||
if (DPU_FORMAT_IS_UBWC(layout->format) ||
|
||||
DPU_FORMAT_IS_TILE(layout->format))
|
||||
|
@ -950,10 +957,6 @@ int dpu_format_populate_layout(
|
|||
else
|
||||
ret = _dpu_format_populate_addrs_linear(aspace, fb, layout);
|
||||
|
||||
/* check if anything changed */
|
||||
if (!ret && !memcmp(plane_addr, layout->plane_addr, sizeof(plane_addr)))
|
||||
ret = -EAGAIN;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -19,47 +19,6 @@
|
|||
*/
|
||||
#define MAX_BLOCKS 12
|
||||
|
||||
#define DPU_HW_VER(MAJOR, MINOR, STEP) (((MAJOR & 0xF) << 28) |\
|
||||
((MINOR & 0xFFF) << 16) |\
|
||||
(STEP & 0xFFFF))
|
||||
|
||||
#define DPU_HW_MAJOR(rev) ((rev) >> 28)
|
||||
#define DPU_HW_MINOR(rev) (((rev) >> 16) & 0xFFF)
|
||||
#define DPU_HW_STEP(rev) ((rev) & 0xFFFF)
|
||||
#define DPU_HW_MAJOR_MINOR(rev) ((rev) >> 16)
|
||||
|
||||
#define IS_DPU_MAJOR_MINOR_SAME(rev1, rev2) \
|
||||
(DPU_HW_MAJOR_MINOR((rev1)) == DPU_HW_MAJOR_MINOR((rev2)))
|
||||
|
||||
#define DPU_HW_VER_170 DPU_HW_VER(1, 7, 0) /* 8996 v1.0 */
|
||||
#define DPU_HW_VER_171 DPU_HW_VER(1, 7, 1) /* 8996 v2.0 */
|
||||
#define DPU_HW_VER_172 DPU_HW_VER(1, 7, 2) /* 8996 v3.0 */
|
||||
#define DPU_HW_VER_300 DPU_HW_VER(3, 0, 0) /* 8998 v1.0 */
|
||||
#define DPU_HW_VER_301 DPU_HW_VER(3, 0, 1) /* 8998 v1.1 */
|
||||
#define DPU_HW_VER_400 DPU_HW_VER(4, 0, 0) /* sdm845 v1.0 */
|
||||
#define DPU_HW_VER_401 DPU_HW_VER(4, 0, 1) /* sdm845 v2.0 */
|
||||
#define DPU_HW_VER_410 DPU_HW_VER(4, 1, 0) /* sdm670 v1.0 */
|
||||
#define DPU_HW_VER_500 DPU_HW_VER(5, 0, 0) /* sm8150 v1.0 */
|
||||
#define DPU_HW_VER_501 DPU_HW_VER(5, 0, 1) /* sm8150 v2.0 */
|
||||
#define DPU_HW_VER_510 DPU_HW_VER(5, 1, 1) /* sc8180 */
|
||||
#define DPU_HW_VER_600 DPU_HW_VER(6, 0, 0) /* sm8250 */
|
||||
#define DPU_HW_VER_620 DPU_HW_VER(6, 2, 0) /* sc7180 v1.0 */
|
||||
#define DPU_HW_VER_630 DPU_HW_VER(6, 3, 0) /* sm6115|sm4250 */
|
||||
#define DPU_HW_VER_650 DPU_HW_VER(6, 5, 0) /* qcm2290|sm4125 */
|
||||
#define DPU_HW_VER_700 DPU_HW_VER(7, 0, 0) /* sm8350 */
|
||||
#define DPU_HW_VER_720 DPU_HW_VER(7, 2, 0) /* sc7280 */
|
||||
#define DPU_HW_VER_800 DPU_HW_VER(8, 0, 0) /* sc8280xp */
|
||||
#define DPU_HW_VER_810 DPU_HW_VER(8, 1, 0) /* sm8450 */
|
||||
#define DPU_HW_VER_900 DPU_HW_VER(9, 0, 0) /* sm8550 */
|
||||
|
||||
#define IS_MSM8996_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_170)
|
||||
#define IS_MSM8998_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_300)
|
||||
#define IS_SDM845_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_400)
|
||||
#define IS_SDM670_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_410)
|
||||
#define IS_SDM855_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_500)
|
||||
#define IS_SC7180_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_620)
|
||||
#define IS_SC7280_TARGET(rev) IS_DPU_MAJOR_MINOR_SAME((rev), DPU_HW_VER_720)
|
||||
|
||||
#define DPU_HW_BLK_NAME_LEN 16
|
||||
|
||||
#define MAX_IMG_WIDTH 0x3fff
|
||||
|
@ -169,10 +128,12 @@ enum {
|
|||
* DSPP sub-blocks
|
||||
* @DPU_DSPP_PCC Panel color correction block
|
||||
* @DPU_DSPP_GC Gamma correction block
|
||||
* @DPU_DSPP_IGC Inverse gamma correction block
|
||||
*/
|
||||
enum {
|
||||
DPU_DSPP_PCC = 0x1,
|
||||
DPU_DSPP_GC,
|
||||
DPU_DSPP_IGC,
|
||||
DPU_DSPP_MAX
|
||||
};
|
||||
|
||||
|
@ -200,6 +161,7 @@ enum {
|
|||
* @DPU_CTL_FETCH_ACTIVE: Active CTL for fetch HW (SSPPs)
|
||||
* @DPU_CTL_VM_CFG: CTL config to support multiple VMs
|
||||
* @DPU_CTL_HAS_LAYER_EXT4: CTL has the CTL_LAYER_EXT4 register
|
||||
* @DPU_CTL_DSPP_BLOCK_FLUSH: CTL config to support dspp sub-block flush
|
||||
* @DPU_CTL_MAX
|
||||
*/
|
||||
enum {
|
||||
|
@ -208,22 +170,25 @@ enum {
|
|||
DPU_CTL_FETCH_ACTIVE,
|
||||
DPU_CTL_VM_CFG,
|
||||
DPU_CTL_HAS_LAYER_EXT4,
|
||||
DPU_CTL_DSPP_SUB_BLOCK_FLUSH,
|
||||
DPU_CTL_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* INTF sub-blocks
|
||||
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
|
||||
* pixel data arrives to this INTF
|
||||
* @DPU_INTF_TE INTF block has TE configuration support
|
||||
* @DPU_DATA_HCTL_EN Allows data to be transferred at different rate
|
||||
than video timing
|
||||
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
|
||||
* pixel data arrives to this INTF
|
||||
* @DPU_INTF_TE INTF block has TE configuration support
|
||||
* @DPU_DATA_HCTL_EN Allows data to be transferred at different rate
|
||||
* than video timing
|
||||
* @DPU_INTF_STATUS_SUPPORTED INTF block has INTF_STATUS register
|
||||
* @DPU_INTF_MAX
|
||||
*/
|
||||
enum {
|
||||
DPU_INTF_INPUT_CTRL = 0x1,
|
||||
DPU_INTF_TE,
|
||||
DPU_DATA_HCTL_EN,
|
||||
DPU_INTF_STATUS_SUPPORTED,
|
||||
DPU_INTF_MAX
|
||||
};
|
||||
|
||||
|
@ -393,8 +358,6 @@ struct dpu_rotation_cfg {
|
|||
* @max_mixer_blendstages max layer mixer blend stages or
|
||||
* supported z order
|
||||
* @qseed_type qseed2 or qseed3 support.
|
||||
* @smart_dma_rev Supported version of SmartDMA feature.
|
||||
* @ubwc_version UBWC feature version (0x0 for not supported)
|
||||
* @has_src_split source split feature status
|
||||
* @has_dim_layer dim layer feature status
|
||||
* @has_idle_pc indicate if idle power collapse feature is supported
|
||||
|
@ -408,8 +371,6 @@ struct dpu_caps {
|
|||
u32 max_mixer_width;
|
||||
u32 max_mixer_blendstages;
|
||||
u32 qseed_type;
|
||||
u32 smart_dma_rev;
|
||||
u32 ubwc_version;
|
||||
bool has_src_split;
|
||||
bool has_dim_layer;
|
||||
bool has_idle_pc;
|
||||
|
@ -538,15 +499,24 @@ struct dpu_clk_ctrl_reg {
|
|||
* @id: index identifying this block
|
||||
* @base: register base offset to mdss
|
||||
* @features bit mask identifying sub-blocks/features
|
||||
* @highest_bank_bit: UBWC parameter
|
||||
* @ubwc_swizzle: ubwc default swizzle setting
|
||||
* @clk_ctrls clock control register definition
|
||||
*/
|
||||
struct dpu_mdp_cfg {
|
||||
DPU_HW_BLK_INFO;
|
||||
struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_ubwc_cfg - UBWC and memory configuration
|
||||
*
|
||||
* @ubwc_version UBWC feature version (0x0 for not supported)
|
||||
* @highest_bank_bit: UBWC parameter
|
||||
* @ubwc_swizzle: ubwc default swizzle setting
|
||||
*/
|
||||
struct dpu_ubwc_cfg {
|
||||
u32 ubwc_version;
|
||||
u32 highest_bank_bit;
|
||||
u32 ubwc_swizzle;
|
||||
struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX];
|
||||
};
|
||||
|
||||
/* struct dpu_ctl_cfg : MDP CTL instance info
|
||||
|
@ -848,6 +818,8 @@ struct dpu_perf_cfg {
|
|||
struct dpu_mdss_cfg {
|
||||
const struct dpu_caps *caps;
|
||||
|
||||
const struct dpu_ubwc_cfg *ubwc;
|
||||
|
||||
u32 mdp_count;
|
||||
const struct dpu_mdp_cfg *mdp;
|
||||
|
||||
|
@ -867,7 +839,7 @@ struct dpu_mdss_cfg {
|
|||
const struct dpu_merge_3d_cfg *merge_3d;
|
||||
|
||||
u32 dsc_count;
|
||||
struct dpu_dsc_cfg *dsc;
|
||||
const struct dpu_dsc_cfg *dsc;
|
||||
|
||||
u32 intf_count;
|
||||
const struct dpu_intf_cfg *intf;
|
||||
|
@ -896,18 +868,18 @@ struct dpu_mdss_cfg {
|
|||
unsigned long mdss_irqs;
|
||||
};
|
||||
|
||||
struct dpu_mdss_hw_cfg_handler {
|
||||
u32 hw_rev;
|
||||
const struct dpu_mdss_cfg *dpu_cfg;
|
||||
};
|
||||
|
||||
/**
|
||||
* dpu_hw_catalog_init - dpu hardware catalog init API retrieves
|
||||
* hardcoded target specific catalog information in config structure
|
||||
* @hw_rev: caller needs provide the hardware revision.
|
||||
*
|
||||
* Return: dpu config structure
|
||||
*/
|
||||
const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev);
|
||||
extern const struct dpu_mdss_cfg dpu_msm8998_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sdm845_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm8150_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sc8180x_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm8250_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sc7180_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm6115_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_qcm2290_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm8350_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sc7280_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sc8280xp_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm8450_cfg;
|
||||
extern const struct dpu_mdss_cfg dpu_sm8550_cfg;
|
||||
|
||||
#endif /* _DPU_HW_CATALOG_H */
|
||||
|
|
|
@ -26,15 +26,16 @@
|
|||
#define CTL_SW_RESET 0x030
|
||||
#define CTL_LAYER_EXTN_OFFSET 0x40
|
||||
#define CTL_MERGE_3D_ACTIVE 0x0E4
|
||||
#define CTL_DSC_ACTIVE 0x0E8
|
||||
#define CTL_WB_ACTIVE 0x0EC
|
||||
#define CTL_INTF_ACTIVE 0x0F4
|
||||
#define CTL_FETCH_PIPE_ACTIVE 0x0FC
|
||||
#define CTL_MERGE_3D_FLUSH 0x100
|
||||
#define CTL_DSC_ACTIVE 0x0E8
|
||||
#define CTL_DSC_FLUSH 0x104
|
||||
#define CTL_WB_FLUSH 0x108
|
||||
#define CTL_INTF_FLUSH 0x110
|
||||
#define CTL_INTF_MASTER 0x134
|
||||
#define CTL_FETCH_PIPE_ACTIVE 0x0FC
|
||||
#define CTL_DSPP_n_FLUSH(n) ((0x13C) + ((n) * 4))
|
||||
|
||||
#define CTL_MIXER_BORDER_OUT BIT(24)
|
||||
#define CTL_FLUSH_MASK_CTL BIT(17)
|
||||
|
@ -44,6 +45,7 @@
|
|||
#define DSC_IDX 22
|
||||
#define INTF_IDX 31
|
||||
#define WB_IDX 16
|
||||
#define DSPP_IDX 29 /* From DPU hw rev 7.x.x */
|
||||
#define CTL_INVALID_BIT 0xffff
|
||||
#define CTL_DEFAULT_GROUP_ID 0xf
|
||||
|
||||
|
@ -115,6 +117,9 @@ static inline void dpu_hw_ctl_clear_pending_flush(struct dpu_hw_ctl *ctx)
|
|||
trace_dpu_hw_ctl_clear_pending_flush(ctx->pending_flush_mask,
|
||||
dpu_hw_ctl_get_flush_register(ctx));
|
||||
ctx->pending_flush_mask = 0x0;
|
||||
|
||||
memset(ctx->pending_dspp_flush_mask, 0,
|
||||
sizeof(ctx->pending_dspp_flush_mask));
|
||||
}
|
||||
|
||||
static inline void dpu_hw_ctl_update_pending_flush(struct dpu_hw_ctl *ctx,
|
||||
|
@ -132,6 +137,8 @@ static u32 dpu_hw_ctl_get_pending_flush(struct dpu_hw_ctl *ctx)
|
|||
|
||||
static inline void dpu_hw_ctl_trigger_flush_v1(struct dpu_hw_ctl *ctx)
|
||||
{
|
||||
int dspp;
|
||||
|
||||
if (ctx->pending_flush_mask & BIT(MERGE_3D_IDX))
|
||||
DPU_REG_WRITE(&ctx->hw, CTL_MERGE_3D_FLUSH,
|
||||
ctx->pending_merge_3d_flush_mask);
|
||||
|
@ -142,6 +149,13 @@ static inline void dpu_hw_ctl_trigger_flush_v1(struct dpu_hw_ctl *ctx)
|
|||
DPU_REG_WRITE(&ctx->hw, CTL_WB_FLUSH,
|
||||
ctx->pending_wb_flush_mask);
|
||||
|
||||
if (ctx->pending_flush_mask & BIT(DSPP_IDX))
|
||||
for (dspp = DSPP_0; dspp < DSPP_MAX; dspp++) {
|
||||
if (ctx->pending_dspp_flush_mask[dspp - DSPP_0])
|
||||
DPU_REG_WRITE(&ctx->hw,
|
||||
CTL_DSPP_n_FLUSH(dspp - DSPP_0),
|
||||
ctx->pending_dspp_flush_mask[dspp - DSPP_0]);
|
||||
}
|
||||
DPU_REG_WRITE(&ctx->hw, CTL_FLUSH, ctx->pending_flush_mask);
|
||||
}
|
||||
|
||||
|
@ -289,7 +303,7 @@ static void dpu_hw_ctl_update_pending_flush_merge_3d_v1(struct dpu_hw_ctl *ctx,
|
|||
}
|
||||
|
||||
static void dpu_hw_ctl_update_pending_flush_dspp(struct dpu_hw_ctl *ctx,
|
||||
enum dpu_dspp dspp)
|
||||
enum dpu_dspp dspp, u32 dspp_sub_blk)
|
||||
{
|
||||
switch (dspp) {
|
||||
case DSPP_0:
|
||||
|
@ -309,6 +323,29 @@ static void dpu_hw_ctl_update_pending_flush_dspp(struct dpu_hw_ctl *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
static void dpu_hw_ctl_update_pending_flush_dspp_sub_blocks(
|
||||
struct dpu_hw_ctl *ctx, enum dpu_dspp dspp, u32 dspp_sub_blk)
|
||||
{
|
||||
if (dspp >= DSPP_MAX)
|
||||
return;
|
||||
|
||||
switch (dspp_sub_blk) {
|
||||
case DPU_DSPP_IGC:
|
||||
ctx->pending_dspp_flush_mask[dspp - DSPP_0] |= BIT(2);
|
||||
break;
|
||||
case DPU_DSPP_PCC:
|
||||
ctx->pending_dspp_flush_mask[dspp - DSPP_0] |= BIT(4);
|
||||
break;
|
||||
case DPU_DSPP_GC:
|
||||
ctx->pending_dspp_flush_mask[dspp - DSPP_0] |= BIT(5);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->pending_flush_mask |= BIT(DSPP_IDX);
|
||||
}
|
||||
|
||||
static u32 dpu_hw_ctl_poll_reset_status(struct dpu_hw_ctl *ctx, u32 timeout_us)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c = &ctx->hw;
|
||||
|
@ -630,7 +667,11 @@ static void _setup_ctl_ops(struct dpu_hw_ctl_ops *ops,
|
|||
ops->setup_blendstage = dpu_hw_ctl_setup_blendstage;
|
||||
ops->update_pending_flush_sspp = dpu_hw_ctl_update_pending_flush_sspp;
|
||||
ops->update_pending_flush_mixer = dpu_hw_ctl_update_pending_flush_mixer;
|
||||
ops->update_pending_flush_dspp = dpu_hw_ctl_update_pending_flush_dspp;
|
||||
if (cap & BIT(DPU_CTL_DSPP_SUB_BLOCK_FLUSH))
|
||||
ops->update_pending_flush_dspp = dpu_hw_ctl_update_pending_flush_dspp_sub_blocks;
|
||||
else
|
||||
ops->update_pending_flush_dspp = dpu_hw_ctl_update_pending_flush_dspp;
|
||||
|
||||
if (cap & BIT(DPU_CTL_FETCH_ACTIVE))
|
||||
ops->set_active_pipes = dpu_hw_ctl_set_fetch_pipe_active;
|
||||
};
|
||||
|
|
|
@ -152,9 +152,11 @@ struct dpu_hw_ctl_ops {
|
|||
* No effect on hardware
|
||||
* @ctx : ctl path ctx pointer
|
||||
* @blk : DSPP block index
|
||||
* @dspp_sub_blk : DSPP sub-block index
|
||||
*/
|
||||
void (*update_pending_flush_dspp)(struct dpu_hw_ctl *ctx,
|
||||
enum dpu_dspp blk);
|
||||
enum dpu_dspp blk, u32 dspp_sub_blk);
|
||||
|
||||
/**
|
||||
* Write the value of the pending_flush_mask to hardware
|
||||
* @ctx : ctl path ctx pointer
|
||||
|
@ -242,6 +244,7 @@ struct dpu_hw_ctl {
|
|||
u32 pending_intf_flush_mask;
|
||||
u32 pending_wb_flush_mask;
|
||||
u32 pending_merge_3d_flush_mask;
|
||||
u32 pending_dspp_flush_mask[DSPP_MAX - DSPP_0];
|
||||
|
||||
/* ops */
|
||||
struct dpu_hw_ctl_ops ops;
|
||||
|
|
|
@ -175,7 +175,7 @@ static void dpu_hw_dsc_bind_pingpong_blk(
|
|||
DPU_REG_WRITE(c, dsc_ctl_offset, mux_cfg);
|
||||
}
|
||||
|
||||
static struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc,
|
||||
static const struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc,
|
||||
const struct dpu_mdss_cfg *m,
|
||||
void __iomem *addr,
|
||||
struct dpu_hw_blk_reg_map *b)
|
||||
|
@ -207,7 +207,7 @@ struct dpu_hw_dsc *dpu_hw_dsc_init(enum dpu_dsc idx, void __iomem *addr,
|
|||
const struct dpu_mdss_cfg *m)
|
||||
{
|
||||
struct dpu_hw_dsc *c;
|
||||
struct dpu_dsc_cfg *cfg;
|
||||
const struct dpu_dsc_cfg *cfg;
|
||||
|
||||
c = kzalloc(sizeof(*c), GFP_KERNEL);
|
||||
if (!c)
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#define INTF_LINE_COUNT 0x0B0
|
||||
|
||||
#define INTF_MUX 0x25C
|
||||
#define INTF_STATUS 0x26C
|
||||
|
||||
#define INTF_CFG_ACTIVE_H_EN BIT(29)
|
||||
#define INTF_CFG_ACTIVE_V_EN BIT(30)
|
||||
|
@ -297,8 +298,13 @@ static void dpu_hw_intf_get_status(
|
|||
struct intf_status *s)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c = &intf->hw;
|
||||
unsigned long cap = intf->cap->features;
|
||||
|
||||
if (cap & BIT(DPU_INTF_STATUS_SUPPORTED))
|
||||
s->is_en = DPU_REG_READ(c, INTF_STATUS) & BIT(0);
|
||||
else
|
||||
s->is_en = DPU_REG_READ(c, INTF_TIMING_ENGINE_EN);
|
||||
|
||||
s->is_en = DPU_REG_READ(c, INTF_TIMING_ENGINE_EN);
|
||||
s->is_prog_fetch_en = !!(DPU_REG_READ(c, INTF_CONFIG) & BIT(31));
|
||||
if (s->is_en) {
|
||||
s->frame_count = DPU_REG_READ(c, INTF_FRAME_COUNT);
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
#define TS_CLK 19200000
|
||||
|
||||
|
||||
static int _sspp_subblk_offset(struct dpu_hw_pipe *ctx,
|
||||
static int _sspp_subblk_offset(struct dpu_hw_sspp *ctx,
|
||||
int s_id,
|
||||
u32 *idx)
|
||||
{
|
||||
|
@ -168,17 +168,16 @@ static int _sspp_subblk_offset(struct dpu_hw_pipe *ctx,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_multirect(struct dpu_hw_pipe *ctx,
|
||||
enum dpu_sspp_multirect_index index,
|
||||
enum dpu_sspp_multirect_mode mode)
|
||||
static void dpu_hw_sspp_setup_multirect(struct dpu_sw_pipe *pipe)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
u32 mode_mask;
|
||||
u32 idx;
|
||||
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx))
|
||||
return;
|
||||
|
||||
if (index == DPU_SSPP_RECT_SOLO) {
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO) {
|
||||
/**
|
||||
* if rect index is RECT_SOLO, we cannot expect a
|
||||
* virtual plane sharing the same SSPP id. So we go
|
||||
|
@ -187,8 +186,8 @@ static void dpu_hw_sspp_setup_multirect(struct dpu_hw_pipe *ctx,
|
|||
mode_mask = 0;
|
||||
} else {
|
||||
mode_mask = DPU_REG_READ(&ctx->hw, SSPP_MULTIRECT_OPMODE + idx);
|
||||
mode_mask |= index;
|
||||
if (mode == DPU_SSPP_MULTIRECT_TIME_MX)
|
||||
mode_mask |= pipe->multirect_index;
|
||||
if (pipe->multirect_mode == DPU_SSPP_MULTIRECT_TIME_MX)
|
||||
mode_mask |= BIT(2);
|
||||
else
|
||||
mode_mask &= ~BIT(2);
|
||||
|
@ -197,7 +196,7 @@ static void dpu_hw_sspp_setup_multirect(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(&ctx->hw, SSPP_MULTIRECT_OPMODE + idx, mode_mask);
|
||||
}
|
||||
|
||||
static void _sspp_setup_opmode(struct dpu_hw_pipe *ctx,
|
||||
static void _sspp_setup_opmode(struct dpu_hw_sspp *ctx,
|
||||
u32 mask, u8 en)
|
||||
{
|
||||
u32 idx;
|
||||
|
@ -218,7 +217,7 @@ static void _sspp_setup_opmode(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(&ctx->hw, SSPP_VIG_OP_MODE + idx, opmode);
|
||||
}
|
||||
|
||||
static void _sspp_setup_csc10_opmode(struct dpu_hw_pipe *ctx,
|
||||
static void _sspp_setup_csc10_opmode(struct dpu_hw_sspp *ctx,
|
||||
u32 mask, u8 en)
|
||||
{
|
||||
u32 idx;
|
||||
|
@ -239,10 +238,10 @@ static void _sspp_setup_csc10_opmode(struct dpu_hw_pipe *ctx,
|
|||
/*
|
||||
* Setup source pixel format, flip,
|
||||
*/
|
||||
static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,
|
||||
const struct dpu_format *fmt, u32 flags,
|
||||
enum dpu_sspp_multirect_index rect_mode)
|
||||
static void dpu_hw_sspp_setup_format(struct dpu_sw_pipe *pipe,
|
||||
const struct dpu_format *fmt, u32 flags)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
u32 chroma_samp, unpack, src_format;
|
||||
u32 opmode = 0;
|
||||
|
@ -253,7 +252,8 @@ static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,
|
|||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx) || !fmt)
|
||||
return;
|
||||
|
||||
if (rect_mode == DPU_SSPP_RECT_SOLO || rect_mode == DPU_SSPP_RECT_0) {
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO ||
|
||||
pipe->multirect_index == DPU_SSPP_RECT_0) {
|
||||
op_mode_off = SSPP_SRC_OP_MODE;
|
||||
unpack_pat_off = SSPP_SRC_UNPACK_PATTERN;
|
||||
format_off = SSPP_SRC_FORMAT;
|
||||
|
@ -307,25 +307,25 @@ static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,
|
|||
src_format |= (fmt->fetch_mode & 3) << 30; /*FRAME_FORMAT */
|
||||
DPU_REG_WRITE(c, SSPP_FETCH_CONFIG,
|
||||
DPU_FETCH_CONFIG_RESET_VALUE |
|
||||
ctx->mdp->highest_bank_bit << 18);
|
||||
switch (ctx->catalog->caps->ubwc_version) {
|
||||
ctx->ubwc->highest_bank_bit << 18);
|
||||
switch (ctx->ubwc->ubwc_version) {
|
||||
case DPU_HW_UBWC_VER_10:
|
||||
fast_clear = fmt->alpha_enable ? BIT(31) : 0;
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
fast_clear | (ctx->mdp->ubwc_swizzle & 0x1) |
|
||||
fast_clear | (ctx->ubwc->ubwc_swizzle & 0x1) |
|
||||
BIT(8) |
|
||||
(ctx->mdp->highest_bank_bit << 4));
|
||||
(ctx->ubwc->highest_bank_bit << 4));
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_20:
|
||||
fast_clear = fmt->alpha_enable ? BIT(31) : 0;
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
fast_clear | (ctx->mdp->ubwc_swizzle) |
|
||||
(ctx->mdp->highest_bank_bit << 4));
|
||||
fast_clear | (ctx->ubwc->ubwc_swizzle) |
|
||||
(ctx->ubwc->highest_bank_bit << 4));
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_30:
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
BIT(30) | (ctx->mdp->ubwc_swizzle) |
|
||||
(ctx->mdp->highest_bank_bit << 4));
|
||||
BIT(30) | (ctx->ubwc->ubwc_swizzle) |
|
||||
(ctx->ubwc->highest_bank_bit << 4));
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_40:
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
|
@ -360,7 +360,7 @@ static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(c, SSPP_UBWC_ERROR_STATUS + idx, BIT(31));
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_pe_config(struct dpu_hw_pipe *ctx,
|
||||
static void dpu_hw_sspp_setup_pe_config(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_pixel_ext *pe_ext)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
|
@ -418,23 +418,22 @@ static void dpu_hw_sspp_setup_pe_config(struct dpu_hw_pipe *ctx,
|
|||
tot_req_pixels[3]);
|
||||
}
|
||||
|
||||
static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *sspp,
|
||||
void *scaler_cfg)
|
||||
static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_scaler3_cfg *scaler3_cfg,
|
||||
const struct dpu_format *format)
|
||||
{
|
||||
u32 idx;
|
||||
struct dpu_hw_scaler3_cfg *scaler3_cfg = scaler_cfg;
|
||||
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx) || !sspp
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED3, &idx)
|
||||
|| !scaler3_cfg)
|
||||
return;
|
||||
|
||||
dpu_hw_setup_scaler3(&ctx->hw, scaler3_cfg, idx,
|
||||
ctx->cap->sblk->scaler_blk.version,
|
||||
sspp->layout.format);
|
||||
format);
|
||||
}
|
||||
|
||||
static u32 _dpu_hw_sspp_get_scaler3_ver(struct dpu_hw_pipe *ctx)
|
||||
static u32 _dpu_hw_sspp_get_scaler3_ver(struct dpu_hw_sspp *ctx)
|
||||
{
|
||||
u32 idx;
|
||||
|
||||
|
@ -447,12 +446,12 @@ static u32 _dpu_hw_sspp_get_scaler3_ver(struct dpu_hw_pipe *ctx)
|
|||
/*
|
||||
* dpu_hw_sspp_setup_rects()
|
||||
*/
|
||||
static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index rect_index)
|
||||
static void dpu_hw_sspp_setup_rects(struct dpu_sw_pipe *pipe,
|
||||
struct dpu_sw_pipe_cfg *cfg)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
u32 src_size, src_xy, dst_size, dst_xy, ystride0, ystride1;
|
||||
u32 src_size, src_xy, dst_size, dst_xy;
|
||||
u32 src_size_off, src_xy_off, out_size_off, out_xy_off;
|
||||
u32 idx;
|
||||
|
||||
|
@ -461,7 +460,8 @@ static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
|
|||
|
||||
c = &ctx->hw;
|
||||
|
||||
if (rect_index == DPU_SSPP_RECT_SOLO || rect_index == DPU_SSPP_RECT_0) {
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO ||
|
||||
pipe->multirect_index == DPU_SSPP_RECT_0) {
|
||||
src_size_off = SSPP_SRC_SIZE;
|
||||
src_xy_off = SSPP_SRC_XY;
|
||||
out_size_off = SSPP_OUT_SIZE;
|
||||
|
@ -482,68 +482,69 @@ static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
|
|||
dst_size = (drm_rect_height(&cfg->dst_rect) << 16) |
|
||||
drm_rect_width(&cfg->dst_rect);
|
||||
|
||||
if (rect_index == DPU_SSPP_RECT_SOLO) {
|
||||
ystride0 = (cfg->layout.plane_pitch[0]) |
|
||||
(cfg->layout.plane_pitch[1] << 16);
|
||||
ystride1 = (cfg->layout.plane_pitch[2]) |
|
||||
(cfg->layout.plane_pitch[3] << 16);
|
||||
} else {
|
||||
ystride0 = DPU_REG_READ(c, SSPP_SRC_YSTRIDE0 + idx);
|
||||
ystride1 = DPU_REG_READ(c, SSPP_SRC_YSTRIDE1 + idx);
|
||||
|
||||
if (rect_index == DPU_SSPP_RECT_0) {
|
||||
ystride0 = (ystride0 & 0xFFFF0000) |
|
||||
(cfg->layout.plane_pitch[0] & 0x0000FFFF);
|
||||
ystride1 = (ystride1 & 0xFFFF0000)|
|
||||
(cfg->layout.plane_pitch[2] & 0x0000FFFF);
|
||||
} else {
|
||||
ystride0 = (ystride0 & 0x0000FFFF) |
|
||||
((cfg->layout.plane_pitch[0] << 16) &
|
||||
0xFFFF0000);
|
||||
ystride1 = (ystride1 & 0x0000FFFF) |
|
||||
((cfg->layout.plane_pitch[2] << 16) &
|
||||
0xFFFF0000);
|
||||
}
|
||||
}
|
||||
|
||||
/* rectangle register programming */
|
||||
DPU_REG_WRITE(c, src_size_off + idx, src_size);
|
||||
DPU_REG_WRITE(c, src_xy_off + idx, src_xy);
|
||||
DPU_REG_WRITE(c, out_size_off + idx, dst_size);
|
||||
DPU_REG_WRITE(c, out_xy_off + idx, dst_xy);
|
||||
|
||||
DPU_REG_WRITE(c, SSPP_SRC_YSTRIDE0 + idx, ystride0);
|
||||
DPU_REG_WRITE(c, SSPP_SRC_YSTRIDE1 + idx, ystride1);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_sourceaddress(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index rect_mode)
|
||||
static void dpu_hw_sspp_setup_sourceaddress(struct dpu_sw_pipe *pipe,
|
||||
struct dpu_hw_fmt_layout *layout)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
u32 ystride0, ystride1;
|
||||
int i;
|
||||
u32 idx;
|
||||
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx))
|
||||
return;
|
||||
|
||||
if (rect_mode == DPU_SSPP_RECT_SOLO) {
|
||||
for (i = 0; i < ARRAY_SIZE(cfg->layout.plane_addr); i++)
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO) {
|
||||
for (i = 0; i < ARRAY_SIZE(layout->plane_addr); i++)
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC0_ADDR + idx + i * 0x4,
|
||||
cfg->layout.plane_addr[i]);
|
||||
} else if (rect_mode == DPU_SSPP_RECT_0) {
|
||||
layout->plane_addr[i]);
|
||||
} else if (pipe->multirect_index == DPU_SSPP_RECT_0) {
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC0_ADDR + idx,
|
||||
cfg->layout.plane_addr[0]);
|
||||
layout->plane_addr[0]);
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC2_ADDR + idx,
|
||||
cfg->layout.plane_addr[2]);
|
||||
layout->plane_addr[2]);
|
||||
} else {
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC1_ADDR + idx,
|
||||
cfg->layout.plane_addr[0]);
|
||||
layout->plane_addr[0]);
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC3_ADDR + idx,
|
||||
cfg->layout.plane_addr[2]);
|
||||
layout->plane_addr[2]);
|
||||
}
|
||||
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO) {
|
||||
ystride0 = (layout->plane_pitch[0]) |
|
||||
(layout->plane_pitch[1] << 16);
|
||||
ystride1 = (layout->plane_pitch[2]) |
|
||||
(layout->plane_pitch[3] << 16);
|
||||
} else {
|
||||
ystride0 = DPU_REG_READ(&ctx->hw, SSPP_SRC_YSTRIDE0 + idx);
|
||||
ystride1 = DPU_REG_READ(&ctx->hw, SSPP_SRC_YSTRIDE1 + idx);
|
||||
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_0) {
|
||||
ystride0 = (ystride0 & 0xFFFF0000) |
|
||||
(layout->plane_pitch[0] & 0x0000FFFF);
|
||||
ystride1 = (ystride1 & 0xFFFF0000)|
|
||||
(layout->plane_pitch[2] & 0x0000FFFF);
|
||||
} else {
|
||||
ystride0 = (ystride0 & 0x0000FFFF) |
|
||||
((layout->plane_pitch[0] << 16) &
|
||||
0xFFFF0000);
|
||||
ystride1 = (ystride1 & 0x0000FFFF) |
|
||||
((layout->plane_pitch[2] << 16) &
|
||||
0xFFFF0000);
|
||||
}
|
||||
}
|
||||
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC_YSTRIDE0 + idx, ystride0);
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC_YSTRIDE1 + idx, ystride1);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_csc(struct dpu_hw_pipe *ctx,
|
||||
static void dpu_hw_sspp_setup_csc(struct dpu_hw_sspp *ctx,
|
||||
const struct dpu_csc_cfg *data)
|
||||
{
|
||||
u32 idx;
|
||||
|
@ -560,22 +561,28 @@ static void dpu_hw_sspp_setup_csc(struct dpu_hw_pipe *ctx,
|
|||
dpu_hw_csc_setup(&ctx->hw, idx, data, csc10);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_solidfill(struct dpu_hw_pipe *ctx, u32 color, enum
|
||||
dpu_sspp_multirect_index rect_index)
|
||||
static void dpu_hw_sspp_setup_solidfill(struct dpu_sw_pipe *pipe, u32 color)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
struct dpu_hw_fmt_layout cfg;
|
||||
u32 idx;
|
||||
|
||||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx))
|
||||
return;
|
||||
|
||||
if (rect_index == DPU_SSPP_RECT_SOLO || rect_index == DPU_SSPP_RECT_0)
|
||||
/* cleanup source addresses */
|
||||
memset(&cfg, 0, sizeof(cfg));
|
||||
ctx->ops.setup_sourceaddress(pipe, &cfg);
|
||||
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO ||
|
||||
pipe->multirect_index == DPU_SSPP_RECT_0)
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC_CONSTANT_COLOR + idx, color);
|
||||
else
|
||||
DPU_REG_WRITE(&ctx->hw, SSPP_SRC_CONSTANT_COLOR_REC1 + idx,
|
||||
color);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_danger_safe_lut(struct dpu_hw_pipe *ctx,
|
||||
static void dpu_hw_sspp_setup_danger_safe_lut(struct dpu_hw_sspp *ctx,
|
||||
u32 danger_lut,
|
||||
u32 safe_lut)
|
||||
{
|
||||
|
@ -588,7 +595,7 @@ static void dpu_hw_sspp_setup_danger_safe_lut(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(&ctx->hw, SSPP_SAFE_LUT + idx, safe_lut);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_creq_lut(struct dpu_hw_pipe *ctx,
|
||||
static void dpu_hw_sspp_setup_creq_lut(struct dpu_hw_sspp *ctx,
|
||||
u64 creq_lut)
|
||||
{
|
||||
u32 idx;
|
||||
|
@ -605,7 +612,7 @@ static void dpu_hw_sspp_setup_creq_lut(struct dpu_hw_pipe *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_qos_ctrl(struct dpu_hw_pipe *ctx,
|
||||
static void dpu_hw_sspp_setup_qos_ctrl(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_pipe_qos_cfg *cfg)
|
||||
{
|
||||
u32 idx;
|
||||
|
@ -630,10 +637,10 @@ static void dpu_hw_sspp_setup_qos_ctrl(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(&ctx->hw, SSPP_QOS_CTRL + idx, qos_ctrl);
|
||||
}
|
||||
|
||||
static void dpu_hw_sspp_setup_cdp(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_cdp_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index index)
|
||||
static void dpu_hw_sspp_setup_cdp(struct dpu_sw_pipe *pipe,
|
||||
struct dpu_hw_cdp_cfg *cfg)
|
||||
{
|
||||
struct dpu_hw_sspp *ctx = pipe->sspp;
|
||||
u32 idx;
|
||||
u32 cdp_cntl = 0;
|
||||
u32 cdp_cntl_offset = 0;
|
||||
|
@ -644,7 +651,8 @@ static void dpu_hw_sspp_setup_cdp(struct dpu_hw_pipe *ctx,
|
|||
if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx))
|
||||
return;
|
||||
|
||||
if (index == DPU_SSPP_RECT_SOLO || index == DPU_SSPP_RECT_0)
|
||||
if (pipe->multirect_index == DPU_SSPP_RECT_SOLO ||
|
||||
pipe->multirect_index == DPU_SSPP_RECT_0)
|
||||
cdp_cntl_offset = SSPP_CDP_CNTL;
|
||||
else
|
||||
cdp_cntl_offset = SSPP_CDP_CNTL_REC1;
|
||||
|
@ -661,7 +669,7 @@ static void dpu_hw_sspp_setup_cdp(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(&ctx->hw, cdp_cntl_offset, cdp_cntl);
|
||||
}
|
||||
|
||||
static void _setup_layer_ops(struct dpu_hw_pipe *c,
|
||||
static void _setup_layer_ops(struct dpu_hw_sspp *c,
|
||||
unsigned long features)
|
||||
{
|
||||
if (test_bit(DPU_SSPP_SRC, &features)) {
|
||||
|
@ -699,7 +707,8 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int _dpu_hw_sspp_init_debugfs(struct dpu_hw_pipe *hw_pipe, struct dpu_kms *kms, struct dentry *entry)
|
||||
int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
|
||||
struct dentry *entry)
|
||||
{
|
||||
const struct dpu_sspp_cfg *cfg = hw_pipe->cap;
|
||||
const struct dpu_sspp_sub_blks *sblk = cfg->sblk;
|
||||
|
@ -783,10 +792,10 @@ static const struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp,
|
|||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
||||
struct dpu_hw_sspp *dpu_hw_sspp_init(enum dpu_sspp idx,
|
||||
void __iomem *addr, const struct dpu_mdss_cfg *catalog)
|
||||
{
|
||||
struct dpu_hw_pipe *hw_pipe;
|
||||
struct dpu_hw_sspp *hw_pipe;
|
||||
const struct dpu_sspp_cfg *cfg;
|
||||
|
||||
if (!addr || !catalog)
|
||||
|
@ -804,7 +813,7 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
|||
|
||||
/* Assign ops */
|
||||
hw_pipe->catalog = catalog;
|
||||
hw_pipe->mdp = &catalog->mdp[0];
|
||||
hw_pipe->ubwc = catalog->ubwc;
|
||||
hw_pipe->idx = idx;
|
||||
hw_pipe->cap = cfg;
|
||||
_setup_layer_ops(hw_pipe, hw_pipe->cap->features);
|
||||
|
@ -812,7 +821,7 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
|||
return hw_pipe;
|
||||
}
|
||||
|
||||
void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx)
|
||||
void dpu_hw_sspp_destroy(struct dpu_hw_sspp *ctx)
|
||||
{
|
||||
kfree(ctx);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "dpu_hw_util.h"
|
||||
#include "dpu_formats.h"
|
||||
|
||||
struct dpu_hw_pipe;
|
||||
struct dpu_hw_sspp;
|
||||
|
||||
/**
|
||||
* Flags
|
||||
|
@ -153,20 +153,14 @@ struct dpu_hw_pixel_ext {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct dpu_hw_pipe_cfg : Pipe description
|
||||
* @layout: format layout information for programming buffer to hardware
|
||||
* struct dpu_sw_pipe_cfg : software pipe configuration
|
||||
* @src_rect: src ROI, caller takes into account the different operations
|
||||
* such as decimation, flip etc to program this field
|
||||
* @dest_rect: destination ROI.
|
||||
* @index: index of the rectangle of SSPP
|
||||
* @mode: parallel or time multiplex multirect mode
|
||||
*/
|
||||
struct dpu_hw_pipe_cfg {
|
||||
struct dpu_hw_fmt_layout layout;
|
||||
struct dpu_sw_pipe_cfg {
|
||||
struct drm_rect src_rect;
|
||||
struct drm_rect dst_rect;
|
||||
enum dpu_sspp_multirect_index index;
|
||||
enum dpu_sspp_multirect_mode mode;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -201,6 +195,18 @@ struct dpu_hw_pipe_ts_cfg {
|
|||
u64 time;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_sw_pipe - software pipe description
|
||||
* @sspp: backing SSPP pipe
|
||||
* @index: index of the rectangle of SSPP
|
||||
* @mode: parallel or time multiplex multirect mode
|
||||
*/
|
||||
struct dpu_sw_pipe {
|
||||
struct dpu_hw_sspp *sspp;
|
||||
enum dpu_sspp_multirect_index multirect_index;
|
||||
enum dpu_sspp_multirect_mode multirect_mode;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_hw_sspp_ops - interface to the SSPP Hw driver functions
|
||||
* Caller must call the init function to get the pipe context for each pipe
|
||||
|
@ -209,77 +215,65 @@ struct dpu_hw_pipe_ts_cfg {
|
|||
struct dpu_hw_sspp_ops {
|
||||
/**
|
||||
* setup_format - setup pixel format cropping rectangle, flip
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pipe: Pointer to software pipe context
|
||||
* @cfg: Pointer to pipe config structure
|
||||
* @flags: Extra flags for format config
|
||||
* @index: rectangle index in multirect
|
||||
*/
|
||||
void (*setup_format)(struct dpu_hw_pipe *ctx,
|
||||
const struct dpu_format *fmt, u32 flags,
|
||||
enum dpu_sspp_multirect_index index);
|
||||
void (*setup_format)(struct dpu_sw_pipe *pipe,
|
||||
const struct dpu_format *fmt, u32 flags);
|
||||
|
||||
/**
|
||||
* setup_rects - setup pipe ROI rectangles
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pipe: Pointer to software pipe context
|
||||
* @cfg: Pointer to pipe config structure
|
||||
* @index: rectangle index in multirect
|
||||
*/
|
||||
void (*setup_rects)(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index index);
|
||||
void (*setup_rects)(struct dpu_sw_pipe *pipe,
|
||||
struct dpu_sw_pipe_cfg *cfg);
|
||||
|
||||
/**
|
||||
* setup_pe - setup pipe pixel extension
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pe_ext: Pointer to pixel ext settings
|
||||
*/
|
||||
void (*setup_pe)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_pe)(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_pixel_ext *pe_ext);
|
||||
|
||||
/**
|
||||
* setup_sourceaddress - setup pipe source addresses
|
||||
* @ctx: Pointer to pipe context
|
||||
* @cfg: Pointer to pipe config structure
|
||||
* @index: rectangle index in multirect
|
||||
* @pipe: Pointer to software pipe context
|
||||
* @layout: format layout information for programming buffer to hardware
|
||||
*/
|
||||
void (*setup_sourceaddress)(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index index);
|
||||
void (*setup_sourceaddress)(struct dpu_sw_pipe *ctx,
|
||||
struct dpu_hw_fmt_layout *layout);
|
||||
|
||||
/**
|
||||
* setup_csc - setup color space coversion
|
||||
* @ctx: Pointer to pipe context
|
||||
* @data: Pointer to config structure
|
||||
*/
|
||||
void (*setup_csc)(struct dpu_hw_pipe *ctx, const struct dpu_csc_cfg *data);
|
||||
void (*setup_csc)(struct dpu_hw_sspp *ctx, const struct dpu_csc_cfg *data);
|
||||
|
||||
/**
|
||||
* setup_solidfill - enable/disable colorfill
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pipe: Pointer to software pipe context
|
||||
* @const_color: Fill color value
|
||||
* @flags: Pipe flags
|
||||
* @index: rectangle index in multirect
|
||||
*/
|
||||
void (*setup_solidfill)(struct dpu_hw_pipe *ctx, u32 color,
|
||||
enum dpu_sspp_multirect_index index);
|
||||
void (*setup_solidfill)(struct dpu_sw_pipe *pipe, u32 color);
|
||||
|
||||
/**
|
||||
* setup_multirect - setup multirect configuration
|
||||
* @ctx: Pointer to pipe context
|
||||
* @index: rectangle index in multirect
|
||||
* @mode: parallel fetch / time multiplex multirect mode
|
||||
* @pipe: Pointer to software pipe context
|
||||
*/
|
||||
|
||||
void (*setup_multirect)(struct dpu_hw_pipe *ctx,
|
||||
enum dpu_sspp_multirect_index index,
|
||||
enum dpu_sspp_multirect_mode mode);
|
||||
void (*setup_multirect)(struct dpu_sw_pipe *pipe);
|
||||
|
||||
/**
|
||||
* setup_sharpening - setup sharpening
|
||||
* @ctx: Pointer to pipe context
|
||||
* @cfg: Pointer to config structure
|
||||
*/
|
||||
void (*setup_sharpening)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_sharpening)(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_sharp_cfg *cfg);
|
||||
|
||||
/**
|
||||
|
@ -289,7 +283,7 @@ struct dpu_hw_sspp_ops {
|
|||
* @safe_lut: LUT for generate safe level based on fill level
|
||||
*
|
||||
*/
|
||||
void (*setup_danger_safe_lut)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_danger_safe_lut)(struct dpu_hw_sspp *ctx,
|
||||
u32 danger_lut,
|
||||
u32 safe_lut);
|
||||
|
||||
|
@ -299,7 +293,7 @@ struct dpu_hw_sspp_ops {
|
|||
* @creq_lut: LUT for generate creq level based on fill level
|
||||
*
|
||||
*/
|
||||
void (*setup_creq_lut)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_creq_lut)(struct dpu_hw_sspp *ctx,
|
||||
u64 creq_lut);
|
||||
|
||||
/**
|
||||
|
@ -308,7 +302,7 @@ struct dpu_hw_sspp_ops {
|
|||
* @cfg: Pointer to pipe QoS configuration
|
||||
*
|
||||
*/
|
||||
void (*setup_qos_ctrl)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_qos_ctrl)(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_pipe_qos_cfg *cfg);
|
||||
|
||||
/**
|
||||
|
@ -316,51 +310,48 @@ struct dpu_hw_sspp_ops {
|
|||
* @ctx: Pointer to pipe context
|
||||
* @cfg: Pointer to histogram configuration
|
||||
*/
|
||||
void (*setup_histogram)(struct dpu_hw_pipe *ctx,
|
||||
void (*setup_histogram)(struct dpu_hw_sspp *ctx,
|
||||
void *cfg);
|
||||
|
||||
/**
|
||||
* setup_scaler - setup scaler
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pipe_cfg: Pointer to pipe configuration
|
||||
* @scaler_cfg: Pointer to scaler configuration
|
||||
* @scaler3_cfg: Pointer to scaler configuration
|
||||
* @format: pixel format parameters
|
||||
*/
|
||||
void (*setup_scaler)(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_pipe_cfg *pipe_cfg,
|
||||
void *scaler_cfg);
|
||||
void (*setup_scaler)(struct dpu_hw_sspp *ctx,
|
||||
struct dpu_hw_scaler3_cfg *scaler3_cfg,
|
||||
const struct dpu_format *format);
|
||||
|
||||
/**
|
||||
* get_scaler_ver - get scaler h/w version
|
||||
* @ctx: Pointer to pipe context
|
||||
*/
|
||||
u32 (*get_scaler_ver)(struct dpu_hw_pipe *ctx);
|
||||
u32 (*get_scaler_ver)(struct dpu_hw_sspp *ctx);
|
||||
|
||||
/**
|
||||
* setup_cdp - setup client driven prefetch
|
||||
* @ctx: Pointer to pipe context
|
||||
* @pipe: Pointer to software pipe context
|
||||
* @cfg: Pointer to cdp configuration
|
||||
* @index: rectangle index in multirect
|
||||
*/
|
||||
void (*setup_cdp)(struct dpu_hw_pipe *ctx,
|
||||
struct dpu_hw_cdp_cfg *cfg,
|
||||
enum dpu_sspp_multirect_index index);
|
||||
void (*setup_cdp)(struct dpu_sw_pipe *pipe,
|
||||
struct dpu_hw_cdp_cfg *cfg);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_hw_pipe - pipe description
|
||||
* struct dpu_hw_sspp - pipe description
|
||||
* @base: hardware block base structure
|
||||
* @hw: block hardware details
|
||||
* @catalog: back pointer to catalog
|
||||
* @mdp: pointer to associated mdp portion of the catalog
|
||||
* @ubwc: ubwc configuration data
|
||||
* @idx: pipe index
|
||||
* @cap: pointer to layer_cfg
|
||||
* @ops: pointer to operations possible for this pipe
|
||||
*/
|
||||
struct dpu_hw_pipe {
|
||||
struct dpu_hw_sspp {
|
||||
struct dpu_hw_blk base;
|
||||
struct dpu_hw_blk_reg_map hw;
|
||||
const struct dpu_mdss_cfg *catalog;
|
||||
const struct dpu_mdp_cfg *mdp;
|
||||
const struct dpu_ubwc_cfg *ubwc;
|
||||
|
||||
/* Pipe */
|
||||
enum dpu_sspp idx;
|
||||
|
@ -378,7 +369,7 @@ struct dpu_kms;
|
|||
* @addr: Mapped register io address of MDP
|
||||
* @catalog : Pointer to mdss catalog data
|
||||
*/
|
||||
struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
||||
struct dpu_hw_sspp *dpu_hw_sspp_init(enum dpu_sspp idx,
|
||||
void __iomem *addr, const struct dpu_mdss_cfg *catalog);
|
||||
|
||||
/**
|
||||
|
@ -386,10 +377,10 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
|||
* should be called during Hw pipe cleanup.
|
||||
* @ctx: Pointer to SSPP driver context returned by dpu_hw_sspp_init
|
||||
*/
|
||||
void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx);
|
||||
void dpu_hw_sspp_destroy(struct dpu_hw_sspp *ctx);
|
||||
|
||||
void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root);
|
||||
int _dpu_hw_sspp_init_debugfs(struct dpu_hw_pipe *hw_pipe, struct dpu_kms *kms, struct dentry *entry);
|
||||
int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms,
|
||||
struct dentry *entry);
|
||||
|
||||
#endif /*_DPU_HW_SSPP_H */
|
||||
|
||||
|
|
|
@ -250,6 +250,24 @@ void dpu_debugfs_create_regset32(const char *name, umode_t mode,
|
|||
debugfs_create_file(name, mode, parent, regset, &dpu_regset32_fops);
|
||||
}
|
||||
|
||||
static void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root)
|
||||
{
|
||||
struct dentry *entry = debugfs_create_dir("sspp", debugfs_root);
|
||||
int i;
|
||||
|
||||
if (IS_ERR(entry))
|
||||
return;
|
||||
|
||||
for (i = SSPP_NONE; i < SSPP_MAX; i++) {
|
||||
struct dpu_hw_sspp *hw = dpu_rm_get_sspp(&dpu_kms->rm, i);
|
||||
|
||||
if (!hw)
|
||||
continue;
|
||||
|
||||
_dpu_hw_sspp_init_debugfs(hw, dpu_kms, entry);
|
||||
}
|
||||
}
|
||||
|
||||
static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor)
|
||||
{
|
||||
struct dpu_kms *dpu_kms = to_dpu_kms(kms);
|
||||
|
@ -411,40 +429,6 @@ static void dpu_kms_disable_commit(struct msm_kms *kms)
|
|||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
}
|
||||
|
||||
static ktime_t dpu_kms_vsync_time(struct msm_kms *kms, struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_encoder *encoder;
|
||||
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask) {
|
||||
ktime_t vsync_time;
|
||||
|
||||
if (dpu_encoder_vsync_time(encoder, &vsync_time) == 0)
|
||||
return vsync_time;
|
||||
}
|
||||
|
||||
return ktime_get();
|
||||
}
|
||||
|
||||
static void dpu_kms_prepare_commit(struct msm_kms *kms,
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
struct drm_encoder *encoder;
|
||||
int i;
|
||||
|
||||
if (!kms)
|
||||
return;
|
||||
|
||||
/* Call prepare_commit for all affected encoders */
|
||||
for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev,
|
||||
crtc_state->encoder_mask) {
|
||||
dpu_encoder_prepare_commit(encoder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void dpu_kms_flush_commit(struct msm_kms *kms, unsigned crtc_mask)
|
||||
{
|
||||
struct dpu_kms *dpu_kms = to_dpu_kms(kms);
|
||||
|
@ -491,7 +475,7 @@ static void dpu_kms_wait_for_commit_done(struct msm_kms *kms,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!crtc->state->active) {
|
||||
if (!drm_atomic_crtc_effectively_active(crtc->state)) {
|
||||
DPU_DEBUG("[crtc:%d] not active\n", crtc->base.id);
|
||||
return;
|
||||
}
|
||||
|
@ -953,8 +937,6 @@ static const struct msm_kms_funcs kms_funcs = {
|
|||
.irq = dpu_core_irq,
|
||||
.enable_commit = dpu_kms_enable_commit,
|
||||
.disable_commit = dpu_kms_disable_commit,
|
||||
.vsync_time = dpu_kms_vsync_time,
|
||||
.prepare_commit = dpu_kms_prepare_commit,
|
||||
.flush_commit = dpu_kms_flush_commit,
|
||||
.wait_flush = dpu_kms_wait_flush,
|
||||
.complete_commit = dpu_kms_complete_commit,
|
||||
|
@ -1013,6 +995,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
|||
struct dpu_kms *dpu_kms;
|
||||
struct drm_device *dev;
|
||||
int i, rc = -EINVAL;
|
||||
u32 core_rev;
|
||||
|
||||
if (!kms) {
|
||||
DPU_ERROR("invalid kms\n");
|
||||
|
@ -1062,17 +1045,14 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
|||
if (rc < 0)
|
||||
goto error;
|
||||
|
||||
dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
|
||||
core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
|
||||
|
||||
pr_info("dpu hardware revision:0x%x\n", dpu_kms->core_rev);
|
||||
pr_info("dpu hardware revision:0x%x\n", core_rev);
|
||||
|
||||
dpu_kms->catalog = dpu_hw_catalog_init(dpu_kms->core_rev);
|
||||
if (IS_ERR_OR_NULL(dpu_kms->catalog)) {
|
||||
rc = PTR_ERR(dpu_kms->catalog);
|
||||
if (!dpu_kms->catalog)
|
||||
rc = -EINVAL;
|
||||
DPU_ERROR("catalog init failed: %d\n", rc);
|
||||
dpu_kms->catalog = NULL;
|
||||
dpu_kms->catalog = of_device_get_match_data(dev->dev);
|
||||
if (!dpu_kms->catalog) {
|
||||
DPU_ERROR("device config not known!\n");
|
||||
rc = -EINVAL;
|
||||
goto power_error;
|
||||
}
|
||||
|
||||
|
@ -1298,19 +1278,19 @@ static const struct dev_pm_ops dpu_pm_ops = {
|
|||
};
|
||||
|
||||
static const struct of_device_id dpu_dt_match[] = {
|
||||
{ .compatible = "qcom,msm8998-dpu", },
|
||||
{ .compatible = "qcom,qcm2290-dpu", },
|
||||
{ .compatible = "qcom,sdm845-dpu", },
|
||||
{ .compatible = "qcom,sc7180-dpu", },
|
||||
{ .compatible = "qcom,sc7280-dpu", },
|
||||
{ .compatible = "qcom,sc8180x-dpu", },
|
||||
{ .compatible = "qcom,sc8280xp-dpu", },
|
||||
{ .compatible = "qcom,sm6115-dpu", },
|
||||
{ .compatible = "qcom,sm8150-dpu", },
|
||||
{ .compatible = "qcom,sm8250-dpu", },
|
||||
{ .compatible = "qcom,sm8350-dpu", },
|
||||
{ .compatible = "qcom,sm8450-dpu", },
|
||||
{ .compatible = "qcom,sm8550-dpu", },
|
||||
{ .compatible = "qcom,msm8998-dpu", .data = &dpu_msm8998_cfg, },
|
||||
{ .compatible = "qcom,qcm2290-dpu", .data = &dpu_qcm2290_cfg, },
|
||||
{ .compatible = "qcom,sdm845-dpu", .data = &dpu_sdm845_cfg, },
|
||||
{ .compatible = "qcom,sc7180-dpu", .data = &dpu_sc7180_cfg, },
|
||||
{ .compatible = "qcom,sc7280-dpu", .data = &dpu_sc7280_cfg, },
|
||||
{ .compatible = "qcom,sc8180x-dpu", .data = &dpu_sc8180x_cfg, },
|
||||
{ .compatible = "qcom,sc8280xp-dpu", .data = &dpu_sc8280xp_cfg, },
|
||||
{ .compatible = "qcom,sm6115-dpu", .data = &dpu_sm6115_cfg, },
|
||||
{ .compatible = "qcom,sm8150-dpu", .data = &dpu_sm8150_cfg, },
|
||||
{ .compatible = "qcom,sm8250-dpu", .data = &dpu_sm8250_cfg, },
|
||||
{ .compatible = "qcom,sm8350-dpu", .data = &dpu_sm8350_cfg, },
|
||||
{ .compatible = "qcom,sm8450-dpu", .data = &dpu_sm8450_cfg, },
|
||||
{ .compatible = "qcom,sm8550-dpu", .data = &dpu_sm8550_cfg, },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dpu_dt_match);
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
struct dpu_kms {
|
||||
struct msm_kms base;
|
||||
struct drm_device *dev;
|
||||
int core_rev;
|
||||
const struct dpu_mdss_cfg *catalog;
|
||||
|
||||
/* io/register spaces: */
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -18,6 +18,10 @@
|
|||
* struct dpu_plane_state: Define dpu extension of drm plane state object
|
||||
* @base: base drm plane state object
|
||||
* @aspace: pointer to address space for input/output buffers
|
||||
* @pipe: software pipe description
|
||||
* @r_pipe: software pipe description of the second pipe
|
||||
* @pipe_cfg: software pipe configuration
|
||||
* @r_pipe_cfg: software pipe configuration for the second pipe
|
||||
* @stage: assigned by crtc blender
|
||||
* @needs_qos_remap: qos remap settings need to be updated
|
||||
* @multirect_index: index of the rectangle of SSPP
|
||||
|
@ -31,10 +35,12 @@
|
|||
struct dpu_plane_state {
|
||||
struct drm_plane_state base;
|
||||
struct msm_gem_address_space *aspace;
|
||||
struct dpu_sw_pipe pipe;
|
||||
struct dpu_sw_pipe r_pipe;
|
||||
struct dpu_sw_pipe_cfg pipe_cfg;
|
||||
struct dpu_sw_pipe_cfg r_pipe_cfg;
|
||||
enum dpu_stage stage;
|
||||
bool needs_qos_remap;
|
||||
uint32_t multirect_index;
|
||||
uint32_t multirect_mode;
|
||||
bool pending;
|
||||
|
||||
u64 plane_fetch_bw;
|
||||
|
@ -44,26 +50,9 @@ struct dpu_plane_state {
|
|||
unsigned int rotation;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_multirect_plane_states: Defines multirect pair of drm plane states
|
||||
* @r0: drm plane configured on rect 0
|
||||
* @r1: drm plane configured on rect 1
|
||||
*/
|
||||
struct dpu_multirect_plane_states {
|
||||
const struct drm_plane_state *r0;
|
||||
const struct drm_plane_state *r1;
|
||||
};
|
||||
|
||||
#define to_dpu_plane_state(x) \
|
||||
container_of(x, struct dpu_plane_state, base)
|
||||
|
||||
/**
|
||||
* dpu_plane_pipe - return sspp identifier for the given plane
|
||||
* @plane: Pointer to DRM plane object
|
||||
* Returns: sspp identifier of the given plane
|
||||
*/
|
||||
enum dpu_sspp dpu_plane_pipe(struct drm_plane *plane);
|
||||
|
||||
/**
|
||||
* dpu_plane_flush - final plane operations before commit flush
|
||||
* @plane: Pointer to drm plane structure
|
||||
|
@ -88,19 +77,6 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
|
|||
uint32_t pipe, enum drm_plane_type type,
|
||||
unsigned long possible_crtcs);
|
||||
|
||||
/**
|
||||
* dpu_plane_validate_multirecti_v2 - validate the multirect planes
|
||||
* against hw limitations
|
||||
* @plane: drm plate states of the multirect pair
|
||||
*/
|
||||
int dpu_plane_validate_multirect_v2(struct dpu_multirect_plane_states *plane);
|
||||
|
||||
/**
|
||||
* dpu_plane_clear_multirect - clear multirect bits for the given pipe
|
||||
* @drm_state: Pointer to DRM plane state
|
||||
*/
|
||||
void dpu_plane_clear_multirect(const struct drm_plane_state *drm_state);
|
||||
|
||||
/**
|
||||
* dpu_plane_color_fill - enables color fill on plane
|
||||
* @plane: Pointer to DRM plane object
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "dpu_hw_lm.h"
|
||||
#include "dpu_hw_ctl.h"
|
||||
#include "dpu_hw_pingpong.h"
|
||||
#include "dpu_hw_sspp.h"
|
||||
#include "dpu_hw_intf.h"
|
||||
#include "dpu_hw_wb.h"
|
||||
#include "dpu_hw_dspp.h"
|
||||
|
@ -91,6 +92,9 @@ int dpu_rm_destroy(struct dpu_rm *rm)
|
|||
for (i = 0; i < ARRAY_SIZE(rm->hw_wb); i++)
|
||||
dpu_hw_wb_destroy(rm->hw_wb[i]);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rm->hw_sspp); i++)
|
||||
dpu_hw_sspp_destroy(rm->hw_sspp[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -255,6 +259,24 @@ int dpu_rm_init(struct dpu_rm *rm,
|
|||
rm->dsc_blks[dsc->id - DSC_0] = &hw->base;
|
||||
}
|
||||
|
||||
for (i = 0; i < cat->sspp_count; i++) {
|
||||
struct dpu_hw_sspp *hw;
|
||||
const struct dpu_sspp_cfg *sspp = &cat->sspp[i];
|
||||
|
||||
if (sspp->id < SSPP_NONE || sspp->id >= SSPP_MAX) {
|
||||
DPU_ERROR("skip intf %d with invalid id\n", sspp->id);
|
||||
continue;
|
||||
}
|
||||
|
||||
hw = dpu_hw_sspp_init(sspp->id, mmio, cat);
|
||||
if (IS_ERR(hw)) {
|
||||
rc = PTR_ERR(hw);
|
||||
DPU_ERROR("failed sspp object creation: err %d\n", rc);
|
||||
goto fail;
|
||||
}
|
||||
rm->hw_sspp[sspp->id - SSPP_NONE] = hw;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
|
@ -21,6 +21,7 @@ struct dpu_global_state;
|
|||
* @hw_intf: array of intf hardware resources
|
||||
* @hw_wb: array of wb hardware resources
|
||||
* @dspp_blks: array of dspp hardware resources
|
||||
* @hw_sspp: array of sspp hardware resources
|
||||
*/
|
||||
struct dpu_rm {
|
||||
struct dpu_hw_blk *pingpong_blks[PINGPONG_MAX - PINGPONG_0];
|
||||
|
@ -31,6 +32,7 @@ struct dpu_rm {
|
|||
struct dpu_hw_blk *dspp_blks[DSPP_MAX - DSPP_0];
|
||||
struct dpu_hw_blk *merge_3d_blks[MERGE_3D_MAX - MERGE_3D_0];
|
||||
struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0];
|
||||
struct dpu_hw_sspp *hw_sspp[SSPP_MAX - SSPP_NONE];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -108,5 +110,15 @@ static inline struct dpu_hw_wb *dpu_rm_get_wb(struct dpu_rm *rm, enum dpu_wb wb_
|
|||
return rm->hw_wb[wb_idx - WB_0];
|
||||
}
|
||||
|
||||
/**
|
||||
* dpu_rm_get_sspp - Return a struct dpu_hw_sspp instance given it's index.
|
||||
* @rm: DPU Resource Manager handle
|
||||
* @sspp_idx: SSPP index
|
||||
*/
|
||||
static inline struct dpu_hw_sspp *dpu_rm_get_sspp(struct dpu_rm *rm, enum dpu_sspp sspp_idx)
|
||||
{
|
||||
return rm->hw_sspp[sspp_idx - SSPP_NONE];
|
||||
}
|
||||
|
||||
#endif /* __DPU_RM_H__ */
|
||||
|
||||
|
|
|
@ -633,9 +633,9 @@ TRACE_EVENT(dpu_enc_phys_vid_irq_ctrl,
|
|||
TRACE_EVENT(dpu_crtc_setup_mixer,
|
||||
TP_PROTO(uint32_t crtc_id, uint32_t plane_id,
|
||||
struct drm_plane_state *state, struct dpu_plane_state *pstate,
|
||||
uint32_t stage_idx, enum dpu_sspp sspp, uint32_t pixel_format,
|
||||
uint32_t stage_idx, uint32_t pixel_format,
|
||||
uint64_t modifier),
|
||||
TP_ARGS(crtc_id, plane_id, state, pstate, stage_idx, sspp,
|
||||
TP_ARGS(crtc_id, plane_id, state, pstate, stage_idx,
|
||||
pixel_format, modifier),
|
||||
TP_STRUCT__entry(
|
||||
__field( uint32_t, crtc_id )
|
||||
|
@ -659,9 +659,9 @@ TRACE_EVENT(dpu_crtc_setup_mixer,
|
|||
__entry->dst_rect = drm_plane_state_dest(state);
|
||||
__entry->stage_idx = stage_idx;
|
||||
__entry->stage = pstate->stage;
|
||||
__entry->sspp = sspp;
|
||||
__entry->multirect_idx = pstate->multirect_index;
|
||||
__entry->multirect_mode = pstate->multirect_mode;
|
||||
__entry->sspp = pstate->pipe.sspp->idx;
|
||||
__entry->multirect_idx = pstate->pipe.multirect_index;
|
||||
__entry->multirect_mode = pstate->pipe.multirect_mode;
|
||||
__entry->pixel_format = pixel_format;
|
||||
__entry->modifier = modifier;
|
||||
),
|
||||
|
@ -762,18 +762,17 @@ TRACE_EVENT(dpu_crtc_disable_frame_pending,
|
|||
);
|
||||
|
||||
TRACE_EVENT(dpu_plane_set_scanout,
|
||||
TP_PROTO(enum dpu_sspp index, struct dpu_hw_fmt_layout *layout,
|
||||
enum dpu_sspp_multirect_index multirect_index),
|
||||
TP_ARGS(index, layout, multirect_index),
|
||||
TP_PROTO(struct dpu_sw_pipe *pipe, struct dpu_hw_fmt_layout *layout),
|
||||
TP_ARGS(pipe, layout),
|
||||
TP_STRUCT__entry(
|
||||
__field( enum dpu_sspp, index )
|
||||
__field_struct( struct dpu_hw_fmt_layout, layout )
|
||||
__field( enum dpu_sspp_multirect_index, multirect_index)
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->index = index;
|
||||
__entry->index = pipe->sspp->idx;
|
||||
__entry->layout = *layout;
|
||||
__entry->multirect_index = multirect_index;
|
||||
__entry->multirect_index = pipe->multirect_index;
|
||||
),
|
||||
TP_printk("index:%d layout:{%ux%u @ [%u/%u, %u/%u, %u/%u, %u/%u]} "
|
||||
"multirect_index:%d", __entry->index, __entry->layout.width,
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -84,10 +84,6 @@ static void mdp4_disable_commit(struct msm_kms *kms)
|
|||
mdp4_disable(mdp4_kms);
|
||||
}
|
||||
|
||||
static void mdp4_prepare_commit(struct msm_kms *kms, struct drm_atomic_state *state)
|
||||
{
|
||||
}
|
||||
|
||||
static void mdp4_flush_commit(struct msm_kms *kms, unsigned crtc_mask)
|
||||
{
|
||||
/* TODO */
|
||||
|
@ -154,7 +150,6 @@ static const struct mdp_kms_funcs kms_funcs = {
|
|||
.disable_vblank = mdp4_disable_vblank,
|
||||
.enable_commit = mdp4_enable_commit,
|
||||
.disable_commit = mdp4_disable_commit,
|
||||
.prepare_commit = mdp4_prepare_commit,
|
||||
.flush_commit = mdp4_flush_commit,
|
||||
.wait_flush = mdp4_wait_flush,
|
||||
.complete_commit = mdp4_complete_commit,
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -655,7 +655,7 @@ static const struct mdp5_cfg_hw msm8x96_config = {
|
|||
.max_clk = 412500000,
|
||||
};
|
||||
|
||||
const struct mdp5_cfg_hw msm8x76_config = {
|
||||
static const struct mdp5_cfg_hw msm8x76_config = {
|
||||
.name = "msm8x76",
|
||||
.mdp = {
|
||||
.count = 1,
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -129,9 +129,6 @@ void msm_disp_snapshot_destroy(struct drm_device *drm_dev)
|
|||
}
|
||||
|
||||
priv = drm_dev->dev_private;
|
||||
if (!priv->kms)
|
||||
return;
|
||||
|
||||
kms = priv->kms;
|
||||
|
||||
if (kms->dump_worker)
|
||||
|
|
|
@ -162,47 +162,6 @@ static ssize_t dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
|
|||
return i;
|
||||
}
|
||||
|
||||
static void dp_aux_native_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
if (isr & DP_INTR_AUX_I2C_DONE)
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
else if (isr & DP_INTR_WRONG_ADDR)
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
else if (isr & DP_INTR_TIMEOUT)
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
if (isr & DP_INTR_NACK_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_aux_i2c_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
if (isr & DP_INTR_AUX_I2C_DONE) {
|
||||
if (isr & (DP_INTR_I2C_NACK | DP_INTR_I2C_DEFER))
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
else
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
} else {
|
||||
if (isr & DP_INTR_WRONG_ADDR)
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
else if (isr & DP_INTR_TIMEOUT)
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
if (isr & DP_INTR_NACK_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK_DEFER;
|
||||
if (isr & DP_INTR_I2C_NACK)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
if (isr & DP_INTR_I2C_DEFER)
|
||||
aux->aux_error_num = DP_AUX_ERR_DEFER;
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_aux_update_offset_and_segment(struct dp_aux_private *aux,
|
||||
struct drm_dp_aux_msg *input_msg)
|
||||
{
|
||||
|
@ -409,14 +368,14 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void dp_aux_isr(struct drm_dp_aux *dp_aux)
|
||||
irqreturn_t dp_aux_isr(struct drm_dp_aux *dp_aux)
|
||||
{
|
||||
u32 isr;
|
||||
struct dp_aux_private *aux;
|
||||
|
||||
if (!dp_aux) {
|
||||
DRM_ERROR("invalid input\n");
|
||||
return;
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
|
||||
|
@ -425,17 +384,48 @@ void dp_aux_isr(struct drm_dp_aux *dp_aux)
|
|||
|
||||
/* no interrupts pending, return immediately */
|
||||
if (!isr)
|
||||
return;
|
||||
return IRQ_NONE;
|
||||
|
||||
if (!aux->cmd_busy)
|
||||
return;
|
||||
if (!aux->cmd_busy) {
|
||||
DRM_ERROR("Unexpected DP AUX IRQ %#010x when not busy\n", isr);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
if (aux->native)
|
||||
dp_aux_native_handler(aux, isr);
|
||||
else
|
||||
dp_aux_i2c_handler(aux, isr);
|
||||
/*
|
||||
* The logic below assumes only one error bit is set (other than "done"
|
||||
* which can apparently be set at the same time as some of the other
|
||||
* bits). Warn if more than one get set so we know we need to improve
|
||||
* the logic.
|
||||
*/
|
||||
if (hweight32(isr & ~DP_INTR_AUX_XFER_DONE) > 1)
|
||||
DRM_WARN("Some DP AUX interrupts unhandled: %#010x\n", isr);
|
||||
|
||||
if (isr & DP_INTR_AUX_ERROR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
} else if (isr & DP_INTR_NACK_DEFER) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK_DEFER;
|
||||
} else if (isr & DP_INTR_WRONG_ADDR) {
|
||||
aux->aux_error_num = DP_AUX_ERR_ADDR;
|
||||
} else if (isr & DP_INTR_TIMEOUT) {
|
||||
aux->aux_error_num = DP_AUX_ERR_TOUT;
|
||||
} else if (!aux->native && (isr & DP_INTR_I2C_NACK)) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
} else if (!aux->native && (isr & DP_INTR_I2C_DEFER)) {
|
||||
if (isr & DP_INTR_AUX_XFER_DONE)
|
||||
aux->aux_error_num = DP_AUX_ERR_NACK;
|
||||
else
|
||||
aux->aux_error_num = DP_AUX_ERR_DEFER;
|
||||
} else if (isr & DP_INTR_AUX_XFER_DONE) {
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
} else {
|
||||
DRM_WARN("Unexpected interrupt: %#010x\n", isr);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
complete(&aux->comp);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void dp_aux_reconfig(struct drm_dp_aux *dp_aux)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
int dp_aux_register(struct drm_dp_aux *dp_aux);
|
||||
void dp_aux_unregister(struct drm_dp_aux *dp_aux);
|
||||
void dp_aux_isr(struct drm_dp_aux *dp_aux);
|
||||
irqreturn_t dp_aux_isr(struct drm_dp_aux *dp_aux);
|
||||
void dp_aux_init(struct drm_dp_aux *dp_aux);
|
||||
void dp_aux_deinit(struct drm_dp_aux *dp_aux);
|
||||
void dp_aux_reconfig(struct drm_dp_aux *dp_aux);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define DP_INTF_CONFIG_DATABUS_WIDEN BIT(4)
|
||||
|
||||
#define DP_INTERRUPT_STATUS1 \
|
||||
(DP_INTR_AUX_I2C_DONE| \
|
||||
(DP_INTR_AUX_XFER_DONE| \
|
||||
DP_INTR_WRONG_ADDR | DP_INTR_TIMEOUT | \
|
||||
DP_INTR_NACK_DEFER | DP_INTR_WRONG_DATA_CNT | \
|
||||
DP_INTR_I2C_NACK | DP_INTR_I2C_DEFER | \
|
||||
|
@ -47,6 +47,14 @@
|
|||
#define DP_INTERRUPT_STATUS2_MASK \
|
||||
(DP_INTERRUPT_STATUS2 << DP_INTERRUPT_STATUS_MASK_SHIFT)
|
||||
|
||||
#define DP_INTERRUPT_STATUS4 \
|
||||
(PSR_UPDATE_INT | PSR_CAPTURE_INT | PSR_EXIT_INT | \
|
||||
PSR_UPDATE_ERROR_INT | PSR_WAKE_ERROR_INT)
|
||||
|
||||
#define DP_INTERRUPT_MASK4 \
|
||||
(PSR_UPDATE_MASK | PSR_CAPTURE_MASK | PSR_EXIT_MASK | \
|
||||
PSR_UPDATE_ERROR_MASK | PSR_WAKE_ERROR_MASK)
|
||||
|
||||
struct dp_catalog_private {
|
||||
struct device *dev;
|
||||
struct drm_device *drm_dev;
|
||||
|
@ -359,6 +367,23 @@ void dp_catalog_ctrl_lane_mapping(struct dp_catalog *dp_catalog)
|
|||
ln_mapping);
|
||||
}
|
||||
|
||||
void dp_catalog_ctrl_psr_mainlink_enable(struct dp_catalog *dp_catalog,
|
||||
bool enable)
|
||||
{
|
||||
u32 val;
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
|
||||
val = dp_read_link(catalog, REG_DP_MAINLINK_CTRL);
|
||||
|
||||
if (enable)
|
||||
val |= DP_MAINLINK_CTRL_ENABLE;
|
||||
else
|
||||
val &= ~DP_MAINLINK_CTRL_ENABLE;
|
||||
|
||||
dp_write_link(catalog, REG_DP_MAINLINK_CTRL, val);
|
||||
}
|
||||
|
||||
void dp_catalog_ctrl_mainlink_ctrl(struct dp_catalog *dp_catalog,
|
||||
bool enable)
|
||||
{
|
||||
|
@ -610,6 +635,47 @@ void dp_catalog_ctrl_hpd_config(struct dp_catalog *dp_catalog)
|
|||
dp_write_aux(catalog, REG_DP_DP_HPD_CTRL, DP_DP_HPD_CTRL_HPD_EN);
|
||||
}
|
||||
|
||||
static void dp_catalog_enable_sdp(struct dp_catalog_private *catalog)
|
||||
{
|
||||
/* trigger sdp */
|
||||
dp_write_link(catalog, MMSS_DP_SDP_CFG3, UPDATE_SDP);
|
||||
dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x0);
|
||||
}
|
||||
|
||||
void dp_catalog_ctrl_config_psr(struct dp_catalog *dp_catalog)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
u32 config;
|
||||
|
||||
/* enable PSR1 function */
|
||||
config = dp_read_link(catalog, REG_PSR_CONFIG);
|
||||
config |= PSR1_SUPPORTED;
|
||||
dp_write_link(catalog, REG_PSR_CONFIG, config);
|
||||
|
||||
dp_write_ahb(catalog, REG_DP_INTR_MASK4, DP_INTERRUPT_MASK4);
|
||||
dp_catalog_enable_sdp(catalog);
|
||||
}
|
||||
|
||||
void dp_catalog_ctrl_set_psr(struct dp_catalog *dp_catalog, bool enter)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
u32 cmd;
|
||||
|
||||
cmd = dp_read_link(catalog, REG_PSR_CMD);
|
||||
|
||||
cmd &= ~(PSR_ENTER | PSR_EXIT);
|
||||
|
||||
if (enter)
|
||||
cmd |= PSR_ENTER;
|
||||
else
|
||||
cmd |= PSR_EXIT;
|
||||
|
||||
dp_catalog_enable_sdp(catalog);
|
||||
dp_write_link(catalog, REG_PSR_CMD, cmd);
|
||||
}
|
||||
|
||||
u32 dp_catalog_link_is_connected(struct dp_catalog *dp_catalog)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
|
@ -645,6 +711,20 @@ u32 dp_catalog_hpd_get_intr_status(struct dp_catalog *dp_catalog)
|
|||
return isr & (mask | ~DP_DP_HPD_INT_MASK);
|
||||
}
|
||||
|
||||
u32 dp_catalog_ctrl_read_psr_interrupt_status(struct dp_catalog *dp_catalog)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
u32 intr, intr_ack;
|
||||
|
||||
intr = dp_read_ahb(catalog, REG_DP_INTR_STATUS4);
|
||||
intr_ack = (intr & DP_INTERRUPT_STATUS4)
|
||||
<< DP_INTERRUPT_STATUS_ACK_SHIFT;
|
||||
dp_write_ahb(catalog, REG_DP_INTR_STATUS4, intr_ack);
|
||||
|
||||
return intr;
|
||||
}
|
||||
|
||||
int dp_catalog_ctrl_get_interrupt(struct dp_catalog *dp_catalog)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
/* interrupts */
|
||||
#define DP_INTR_HPD BIT(0)
|
||||
#define DP_INTR_AUX_I2C_DONE BIT(3)
|
||||
#define DP_INTR_AUX_XFER_DONE BIT(3)
|
||||
#define DP_INTR_WRONG_ADDR BIT(6)
|
||||
#define DP_INTR_TIMEOUT BIT(9)
|
||||
#define DP_INTR_NACK_DEFER BIT(12)
|
||||
|
@ -93,6 +93,7 @@ void dp_catalog_ctrl_state_ctrl(struct dp_catalog *dp_catalog, u32 state);
|
|||
void dp_catalog_ctrl_config_ctrl(struct dp_catalog *dp_catalog, u32 config);
|
||||
void dp_catalog_ctrl_lane_mapping(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_ctrl_mainlink_ctrl(struct dp_catalog *dp_catalog, bool enable);
|
||||
void dp_catalog_ctrl_psr_mainlink_enable(struct dp_catalog *dp_catalog, bool enable);
|
||||
void dp_catalog_ctrl_config_misc(struct dp_catalog *dp_catalog, u32 cc, u32 tb);
|
||||
void dp_catalog_ctrl_config_msa(struct dp_catalog *dp_catalog, u32 rate,
|
||||
u32 stream_rate_khz, bool fixed_nvid);
|
||||
|
@ -104,12 +105,15 @@ void dp_catalog_ctrl_enable_irq(struct dp_catalog *dp_catalog, bool enable);
|
|||
void dp_catalog_hpd_config_intr(struct dp_catalog *dp_catalog,
|
||||
u32 intr_mask, bool en);
|
||||
void dp_catalog_ctrl_hpd_config(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_ctrl_config_psr(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_ctrl_set_psr(struct dp_catalog *dp_catalog, bool enter);
|
||||
u32 dp_catalog_link_is_connected(struct dp_catalog *dp_catalog);
|
||||
u32 dp_catalog_hpd_get_intr_status(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_ctrl_phy_reset(struct dp_catalog *dp_catalog);
|
||||
int dp_catalog_ctrl_update_vx_px(struct dp_catalog *dp_catalog, u8 v_level,
|
||||
u8 p_level);
|
||||
int dp_catalog_ctrl_get_interrupt(struct dp_catalog *dp_catalog);
|
||||
u32 dp_catalog_ctrl_read_psr_interrupt_status(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_ctrl_update_transfer_unit(struct dp_catalog *dp_catalog,
|
||||
u32 dp_tu, u32 valid_boundary,
|
||||
u32 valid_boundary2);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#define DP_KHZ_TO_HZ 1000
|
||||
#define IDLE_PATTERN_COMPLETION_TIMEOUT_JIFFIES (30 * HZ / 1000) /* 30 ms */
|
||||
#define PSR_OPERATION_COMPLETION_TIMEOUT_JIFFIES (300 * HZ / 1000) /* 300 ms */
|
||||
#define WAIT_FOR_VIDEO_READY_TIMEOUT_JIFFIES (HZ / 2)
|
||||
|
||||
#define DP_CTRL_INTR_READY_FOR_VIDEO BIT(0)
|
||||
|
@ -80,6 +81,7 @@ struct dp_ctrl_private {
|
|||
struct dp_catalog *catalog;
|
||||
|
||||
struct completion idle_comp;
|
||||
struct completion psr_op_comp;
|
||||
struct completion video_comp;
|
||||
};
|
||||
|
||||
|
@ -153,6 +155,9 @@ static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl)
|
|||
config |= DP_CONFIGURATION_CTRL_STATIC_DYNAMIC_CN;
|
||||
config |= DP_CONFIGURATION_CTRL_SYNC_ASYNC_CLK;
|
||||
|
||||
if (ctrl->panel->psr_cap.version)
|
||||
config |= DP_CONFIGURATION_CTRL_SEND_VSC;
|
||||
|
||||
dp_catalog_ctrl_config_ctrl(ctrl->catalog, config);
|
||||
}
|
||||
|
||||
|
@ -1375,6 +1380,64 @@ void dp_ctrl_reset_irq_ctrl(struct dp_ctrl *dp_ctrl, bool enable)
|
|||
dp_catalog_ctrl_enable_irq(ctrl->catalog, enable);
|
||||
}
|
||||
|
||||
void dp_ctrl_config_psr(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
u8 cfg;
|
||||
struct dp_ctrl_private *ctrl = container_of(dp_ctrl,
|
||||
struct dp_ctrl_private, dp_ctrl);
|
||||
|
||||
if (!ctrl->panel->psr_cap.version)
|
||||
return;
|
||||
|
||||
dp_catalog_ctrl_config_psr(ctrl->catalog);
|
||||
|
||||
cfg = DP_PSR_ENABLE;
|
||||
drm_dp_dpcd_write(ctrl->aux, DP_PSR_EN_CFG, &cfg, 1);
|
||||
}
|
||||
|
||||
void dp_ctrl_set_psr(struct dp_ctrl *dp_ctrl, bool enter)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl = container_of(dp_ctrl,
|
||||
struct dp_ctrl_private, dp_ctrl);
|
||||
|
||||
if (!ctrl->panel->psr_cap.version)
|
||||
return;
|
||||
|
||||
/*
|
||||
* When entering PSR,
|
||||
* 1. Send PSR enter SDP and wait for the PSR_UPDATE_INT
|
||||
* 2. Turn off video
|
||||
* 3. Disable the mainlink
|
||||
*
|
||||
* When exiting PSR,
|
||||
* 1. Enable the mainlink
|
||||
* 2. Send the PSR exit SDP
|
||||
*/
|
||||
if (enter) {
|
||||
reinit_completion(&ctrl->psr_op_comp);
|
||||
dp_catalog_ctrl_set_psr(ctrl->catalog, true);
|
||||
|
||||
if (!wait_for_completion_timeout(&ctrl->psr_op_comp,
|
||||
PSR_OPERATION_COMPLETION_TIMEOUT_JIFFIES)) {
|
||||
DRM_ERROR("PSR_ENTRY timedout\n");
|
||||
dp_catalog_ctrl_set_psr(ctrl->catalog, false);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_ctrl_push_idle(dp_ctrl);
|
||||
dp_catalog_ctrl_state_ctrl(ctrl->catalog, 0);
|
||||
|
||||
dp_catalog_ctrl_psr_mainlink_enable(ctrl->catalog, false);
|
||||
} else {
|
||||
dp_catalog_ctrl_psr_mainlink_enable(ctrl->catalog, true);
|
||||
|
||||
dp_catalog_ctrl_set_psr(ctrl->catalog, false);
|
||||
dp_catalog_ctrl_state_ctrl(ctrl->catalog, DP_STATE_CTRL_SEND_VIDEO);
|
||||
dp_ctrl_wait4video_ready(ctrl);
|
||||
dp_catalog_ctrl_state_ctrl(ctrl->catalog, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void dp_ctrl_phy_init(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
|
@ -1979,27 +2042,49 @@ int dp_ctrl_off(struct dp_ctrl *dp_ctrl)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void dp_ctrl_isr(struct dp_ctrl *dp_ctrl)
|
||||
irqreturn_t dp_ctrl_isr(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
u32 isr;
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
|
||||
if (!dp_ctrl)
|
||||
return;
|
||||
return IRQ_NONE;
|
||||
|
||||
ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);
|
||||
|
||||
if (ctrl->panel->psr_cap.version) {
|
||||
isr = dp_catalog_ctrl_read_psr_interrupt_status(ctrl->catalog);
|
||||
|
||||
if (isr)
|
||||
complete(&ctrl->psr_op_comp);
|
||||
|
||||
if (isr & PSR_EXIT_INT)
|
||||
drm_dbg_dp(ctrl->drm_dev, "PSR exit done\n");
|
||||
|
||||
if (isr & PSR_UPDATE_INT)
|
||||
drm_dbg_dp(ctrl->drm_dev, "PSR frame update done\n");
|
||||
|
||||
if (isr & PSR_CAPTURE_INT)
|
||||
drm_dbg_dp(ctrl->drm_dev, "PSR frame capture done\n");
|
||||
}
|
||||
|
||||
isr = dp_catalog_ctrl_get_interrupt(ctrl->catalog);
|
||||
|
||||
|
||||
if (isr & DP_CTRL_INTR_READY_FOR_VIDEO) {
|
||||
drm_dbg_dp(ctrl->drm_dev, "dp_video_ready\n");
|
||||
complete(&ctrl->video_comp);
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
if (isr & DP_CTRL_INTR_IDLE_PATTERN_SENT) {
|
||||
drm_dbg_dp(ctrl->drm_dev, "idle_patterns_sent\n");
|
||||
complete(&ctrl->idle_comp);
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
||||
|
@ -2035,6 +2120,7 @@ struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
|||
dev_err(dev, "failed to add DP OPP table\n");
|
||||
|
||||
init_completion(&ctrl->idle_comp);
|
||||
init_completion(&ctrl->psr_op_comp);
|
||||
init_completion(&ctrl->video_comp);
|
||||
|
||||
/* in parameters */
|
||||
|
|
|
@ -25,7 +25,7 @@ int dp_ctrl_off_link_stream(struct dp_ctrl *dp_ctrl);
|
|||
int dp_ctrl_off_link(struct dp_ctrl *dp_ctrl);
|
||||
int dp_ctrl_off(struct dp_ctrl *dp_ctrl);
|
||||
void dp_ctrl_push_idle(struct dp_ctrl *dp_ctrl);
|
||||
void dp_ctrl_isr(struct dp_ctrl *dp_ctrl);
|
||||
irqreturn_t dp_ctrl_isr(struct dp_ctrl *dp_ctrl);
|
||||
void dp_ctrl_handle_sink_request(struct dp_ctrl *dp_ctrl);
|
||||
struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
||||
struct dp_panel *panel, struct drm_dp_aux *aux,
|
||||
|
@ -37,4 +37,7 @@ void dp_ctrl_phy_init(struct dp_ctrl *dp_ctrl);
|
|||
void dp_ctrl_phy_exit(struct dp_ctrl *dp_ctrl);
|
||||
void dp_ctrl_irq_phy_exit(struct dp_ctrl *dp_ctrl);
|
||||
|
||||
void dp_ctrl_set_psr(struct dp_ctrl *dp_ctrl, bool enable);
|
||||
void dp_ctrl_config_psr(struct dp_ctrl *dp_ctrl);
|
||||
|
||||
#endif /* _DP_CTRL_H_ */
|
||||
|
|
|
@ -406,6 +406,8 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
|
|||
|
||||
edid = dp->panel->edid;
|
||||
|
||||
dp->dp_display.psr_supported = dp->panel->psr_cap.version;
|
||||
|
||||
dp->audio_supported = drm_detect_monitor_audio(edid);
|
||||
dp_panel_handle_sink_request(dp->panel);
|
||||
|
||||
|
@ -910,6 +912,10 @@ static int dp_display_post_enable(struct msm_dp *dp_display)
|
|||
|
||||
/* signal the connect event late to synchronize video and display */
|
||||
dp_display_handle_plugged_change(dp_display, true);
|
||||
|
||||
if (dp_display->psr_supported)
|
||||
dp_ctrl_config_psr(dp->ctrl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -990,14 +996,6 @@ enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* The eDP controller currently does not have a reliable way of
|
||||
* enabling panel power to read sink capabilities. So, we rely
|
||||
* on the panel driver to populate only supported modes for now.
|
||||
*/
|
||||
if (dp->is_edp)
|
||||
return MODE_OK;
|
||||
|
||||
if (mode->clock > DP_MAX_PIXEL_CLK_KHZ)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
|
@ -1104,6 +1102,19 @@ static void dp_display_config_hpd(struct dp_display_private *dp)
|
|||
enable_irq(dp->irq);
|
||||
}
|
||||
|
||||
void dp_display_set_psr(struct msm_dp *dp_display, bool enter)
|
||||
{
|
||||
struct dp_display_private *dp;
|
||||
|
||||
if (!dp_display) {
|
||||
DRM_ERROR("invalid params\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dp = container_of(dp_display, struct dp_display_private, dp_display);
|
||||
dp_ctrl_set_psr(dp->ctrl, enter);
|
||||
}
|
||||
|
||||
static int hpd_event_thread(void *data)
|
||||
{
|
||||
struct dp_display_private *dp_priv;
|
||||
|
@ -1204,7 +1215,7 @@ static int dp_hpd_event_thread_start(struct dp_display_private *dp_priv)
|
|||
static irqreturn_t dp_display_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
struct dp_display_private *dp = dev_id;
|
||||
irqreturn_t ret = IRQ_HANDLED;
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
u32 hpd_isr_status;
|
||||
|
||||
if (!dp) {
|
||||
|
@ -1232,13 +1243,15 @@ static irqreturn_t dp_display_irq_handler(int irq, void *dev_id)
|
|||
|
||||
if (hpd_isr_status & DP_DP_HPD_UNPLUG_INT_MASK)
|
||||
dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0);
|
||||
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/* DP controller isr */
|
||||
dp_ctrl_isr(dp->ctrl);
|
||||
ret |= dp_ctrl_isr(dp->ctrl);
|
||||
|
||||
/* DP aux isr */
|
||||
dp_aux_isr(dp->aux);
|
||||
ret |= dp_aux_isr(dp->aux);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1652,7 +1665,8 @@ int msm_dp_modeset_init(struct msm_dp *dp_display, struct drm_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void dp_bridge_enable(struct drm_bridge *drm_bridge)
|
||||
void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
|
||||
struct msm_dp *dp = dp_bridge->dp_display;
|
||||
|
@ -1707,7 +1721,8 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge)
|
|||
mutex_unlock(&dp_display->event_mutex);
|
||||
}
|
||||
|
||||
void dp_bridge_disable(struct drm_bridge *drm_bridge)
|
||||
void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
|
||||
struct msm_dp *dp = dp_bridge->dp_display;
|
||||
|
@ -1718,7 +1733,8 @@ void dp_bridge_disable(struct drm_bridge *drm_bridge)
|
|||
dp_ctrl_push_idle(dp_display->ctrl);
|
||||
}
|
||||
|
||||
void dp_bridge_post_disable(struct drm_bridge *drm_bridge)
|
||||
void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
|
||||
struct msm_dp *dp = dp_bridge->dp_display;
|
||||
|
|
|
@ -29,6 +29,7 @@ struct msm_dp {
|
|||
|
||||
u32 max_dp_lanes;
|
||||
struct dp_audio *dp_audio;
|
||||
bool psr_supported;
|
||||
};
|
||||
|
||||
int dp_display_set_plugged_cb(struct msm_dp *dp_display,
|
||||
|
@ -39,5 +40,6 @@ bool dp_display_check_video_test(struct msm_dp *dp_display);
|
|||
int dp_display_get_test_bpp(struct msm_dp *dp_display);
|
||||
void dp_display_signal_audio_start(struct msm_dp *dp_display);
|
||||
void dp_display_signal_audio_complete(struct msm_dp *dp_display);
|
||||
void dp_display_set_psr(struct msm_dp *dp, bool enter);
|
||||
|
||||
#endif /* _DP_DISPLAY_H_ */
|
||||
|
|
|
@ -94,9 +94,9 @@ static const struct drm_bridge_funcs dp_bridge_ops = {
|
|||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.enable = dp_bridge_enable,
|
||||
.disable = dp_bridge_disable,
|
||||
.post_disable = dp_bridge_post_disable,
|
||||
.atomic_enable = dp_bridge_atomic_enable,
|
||||
.atomic_disable = dp_bridge_atomic_disable,
|
||||
.atomic_post_disable = dp_bridge_atomic_post_disable,
|
||||
.mode_set = dp_bridge_mode_set,
|
||||
.mode_valid = dp_bridge_mode_valid,
|
||||
.get_modes = dp_bridge_get_modes,
|
||||
|
@ -107,6 +107,171 @@ static const struct drm_bridge_funcs dp_bridge_ops = {
|
|||
.hpd_notify = dp_bridge_hpd_notify,
|
||||
};
|
||||
|
||||
static int edp_bridge_atomic_check(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *bridge_state,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct msm_dp *dp = to_dp_bridge(drm_bridge)->dp_display;
|
||||
|
||||
if (WARN_ON(!conn_state))
|
||||
return -ENODEV;
|
||||
|
||||
conn_state->self_refresh_aware = dp->psr_supported;
|
||||
|
||||
if (!conn_state->crtc || !crtc_state)
|
||||
return 0;
|
||||
|
||||
if (crtc_state->self_refresh_active && !dp->psr_supported)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void edp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
|
||||
struct msm_dp *dp = dp_bridge->dp_display;
|
||||
|
||||
/*
|
||||
* Check the old state of the crtc to determine if the panel
|
||||
* was put into psr state previously by the edp_bridge_atomic_disable.
|
||||
* If the panel is in psr, just exit psr state and skip the full
|
||||
* bridge enable sequence.
|
||||
*/
|
||||
crtc = drm_atomic_get_new_crtc_for_encoder(atomic_state,
|
||||
drm_bridge->encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
|
||||
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active) {
|
||||
dp_display_set_psr(dp, false);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_bridge_atomic_enable(drm_bridge, old_bridge_state);
|
||||
}
|
||||
|
||||
static void edp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state = NULL, *old_crtc_state = NULL;
|
||||
struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge);
|
||||
struct msm_dp *dp = dp_bridge->dp_display;
|
||||
|
||||
crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state,
|
||||
drm_bridge->encoder);
|
||||
if (!crtc)
|
||||
goto out;
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
|
||||
if (!new_crtc_state)
|
||||
goto out;
|
||||
|
||||
old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
|
||||
if (!old_crtc_state)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Set self refresh mode if current crtc state is active.
|
||||
*
|
||||
* If old crtc state is active, then this is a display disable
|
||||
* call while the sink is in psr state. So, exit psr here.
|
||||
* The eDP controller will be disabled in the
|
||||
* edp_bridge_atomic_post_disable function.
|
||||
*
|
||||
* We observed sink is stuck in self refresh if psr exit is skipped
|
||||
* when display disable occurs while the sink is in psr state.
|
||||
*/
|
||||
if (new_crtc_state->self_refresh_active) {
|
||||
dp_display_set_psr(dp, true);
|
||||
return;
|
||||
} else if (old_crtc_state->self_refresh_active) {
|
||||
dp_display_set_psr(dp, false);
|
||||
return;
|
||||
}
|
||||
|
||||
out:
|
||||
dp_bridge_atomic_disable(drm_bridge, old_bridge_state);
|
||||
}
|
||||
|
||||
static void edp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state)
|
||||
{
|
||||
struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *new_crtc_state = NULL;
|
||||
|
||||
crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state,
|
||||
drm_bridge->encoder);
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
|
||||
if (!new_crtc_state)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Self refresh mode is already set in edp_bridge_atomic_disable.
|
||||
*/
|
||||
if (new_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
dp_bridge_atomic_post_disable(drm_bridge, old_bridge_state);
|
||||
}
|
||||
|
||||
/**
|
||||
* edp_bridge_mode_valid - callback to determine if specified mode is valid
|
||||
* @bridge: Pointer to drm bridge structure
|
||||
* @info: display info
|
||||
* @mode: Pointer to drm mode structure
|
||||
* Returns: Validity status for specified mode
|
||||
*/
|
||||
static enum drm_mode_status edp_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
const struct drm_display_info *info,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct msm_dp *dp;
|
||||
int mode_pclk_khz = mode->clock;
|
||||
|
||||
dp = to_dp_bridge(bridge)->dp_display;
|
||||
|
||||
if (!dp || !mode_pclk_khz || !dp->connector) {
|
||||
DRM_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mode->clock > DP_MAX_PIXEL_CLK_KHZ)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
/*
|
||||
* The eDP controller currently does not have a reliable way of
|
||||
* enabling panel power to read sink capabilities. So, we rely
|
||||
* on the panel driver to populate only supported modes for now.
|
||||
*/
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
static const struct drm_bridge_funcs edp_bridge_ops = {
|
||||
.atomic_enable = edp_bridge_atomic_enable,
|
||||
.atomic_disable = edp_bridge_atomic_disable,
|
||||
.atomic_post_disable = edp_bridge_atomic_post_disable,
|
||||
.mode_set = dp_bridge_mode_set,
|
||||
.mode_valid = edp_bridge_mode_valid,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_check = edp_bridge_atomic_check,
|
||||
};
|
||||
|
||||
struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
|
||||
struct drm_encoder *encoder)
|
||||
{
|
||||
|
@ -121,7 +286,7 @@ struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *
|
|||
dp_bridge->dp_display = dp_display;
|
||||
|
||||
bridge = &dp_bridge->bridge;
|
||||
bridge->funcs = &dp_bridge_ops;
|
||||
bridge->funcs = dp_display->is_edp ? &edp_bridge_ops : &dp_bridge_ops;
|
||||
bridge->type = dp_display->connector_type;
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,9 +23,12 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct dr
|
|||
struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
|
||||
struct drm_encoder *encoder);
|
||||
|
||||
void dp_bridge_enable(struct drm_bridge *drm_bridge);
|
||||
void dp_bridge_disable(struct drm_bridge *drm_bridge);
|
||||
void dp_bridge_post_disable(struct drm_bridge *drm_bridge);
|
||||
void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state);
|
||||
void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state);
|
||||
void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
|
||||
struct drm_bridge_state *old_bridge_state);
|
||||
enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
const struct drm_display_info *info,
|
||||
const struct drm_display_mode *mode);
|
||||
|
|
|
@ -937,6 +937,38 @@ static int dp_link_process_phy_test_pattern_request(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool dp_link_read_psr_error_status(struct dp_link_private *link)
|
||||
{
|
||||
u8 status;
|
||||
|
||||
drm_dp_dpcd_read(link->aux, DP_PSR_ERROR_STATUS, &status, 1);
|
||||
|
||||
if (status & DP_PSR_LINK_CRC_ERROR)
|
||||
DRM_ERROR("PSR LINK CRC ERROR\n");
|
||||
else if (status & DP_PSR_RFB_STORAGE_ERROR)
|
||||
DRM_ERROR("PSR RFB STORAGE ERROR\n");
|
||||
else if (status & DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR)
|
||||
DRM_ERROR("PSR VSC SDP UNCORRECTABLE ERROR\n");
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dp_link_psr_capability_changed(struct dp_link_private *link)
|
||||
{
|
||||
u8 status;
|
||||
|
||||
drm_dp_dpcd_read(link->aux, DP_PSR_ESI, &status, 1);
|
||||
|
||||
if (status & DP_PSR_CAPS_CHANGE) {
|
||||
drm_dbg_dp(link->drm_dev, "PSR Capability Change\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static u8 get_link_status(const u8 link_status[DP_LINK_STATUS_SIZE], int r)
|
||||
{
|
||||
return link_status[r - DP_LANE0_1_STATUS];
|
||||
|
@ -1055,6 +1087,10 @@ int dp_link_process_request(struct dp_link *dp_link)
|
|||
dp_link->sink_request |= DP_TEST_LINK_TRAINING;
|
||||
} else if (!dp_link_process_phy_test_pattern_request(link)) {
|
||||
dp_link->sink_request |= DP_TEST_LINK_PHY_TEST_PATTERN;
|
||||
} else if (dp_link_read_psr_error_status(link)) {
|
||||
DRM_ERROR("PSR IRQ_HPD received\n");
|
||||
} else if (dp_link_psr_capability_changed(link)) {
|
||||
drm_dbg_dp(link->drm_dev, "PSR Capability changed");
|
||||
} else {
|
||||
ret = dp_link_process_link_status_update(link);
|
||||
if (!ret) {
|
||||
|
|
|
@ -20,6 +20,27 @@ struct dp_panel_private {
|
|||
bool aux_cfg_update_done;
|
||||
};
|
||||
|
||||
static void dp_panel_read_psr_cap(struct dp_panel_private *panel)
|
||||
{
|
||||
ssize_t rlen;
|
||||
struct dp_panel *dp_panel;
|
||||
|
||||
dp_panel = &panel->dp_panel;
|
||||
|
||||
/* edp sink */
|
||||
if (dp_panel->dpcd[DP_EDP_CONFIGURATION_CAP]) {
|
||||
rlen = drm_dp_dpcd_read(panel->aux, DP_PSR_SUPPORT,
|
||||
&dp_panel->psr_cap, sizeof(dp_panel->psr_cap));
|
||||
if (rlen == sizeof(dp_panel->psr_cap)) {
|
||||
drm_dbg_dp(panel->drm_dev,
|
||||
"psr version: 0x%x, psr_cap: 0x%x\n",
|
||||
dp_panel->psr_cap.version,
|
||||
dp_panel->psr_cap.capabilities);
|
||||
} else
|
||||
DRM_ERROR("failed to read psr info, rlen=%zd\n", rlen);
|
||||
}
|
||||
}
|
||||
|
||||
static int dp_panel_read_dpcd(struct dp_panel *dp_panel)
|
||||
{
|
||||
int rc = 0;
|
||||
|
@ -107,6 +128,7 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel)
|
|||
}
|
||||
}
|
||||
|
||||
dp_panel_read_psr_cap(panel);
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,11 @@ struct dp_panel_in {
|
|||
struct dp_catalog *catalog;
|
||||
};
|
||||
|
||||
struct dp_panel_psr {
|
||||
u8 version;
|
||||
u8 capabilities;
|
||||
};
|
||||
|
||||
struct dp_panel {
|
||||
/* dpcd raw data */
|
||||
u8 dpcd[DP_RECEIVER_CAP_SIZE + 1];
|
||||
|
@ -46,6 +51,7 @@ struct dp_panel {
|
|||
struct edid *edid;
|
||||
struct drm_connector *connector;
|
||||
struct dp_display_mode dp_mode;
|
||||
struct dp_panel_psr psr_cap;
|
||||
bool video_test;
|
||||
|
||||
u32 vic;
|
||||
|
|
|
@ -22,6 +22,20 @@
|
|||
#define REG_DP_INTR_STATUS2 (0x00000024)
|
||||
#define REG_DP_INTR_STATUS3 (0x00000028)
|
||||
|
||||
#define REG_DP_INTR_STATUS4 (0x0000002C)
|
||||
#define PSR_UPDATE_INT (0x00000001)
|
||||
#define PSR_CAPTURE_INT (0x00000004)
|
||||
#define PSR_EXIT_INT (0x00000010)
|
||||
#define PSR_UPDATE_ERROR_INT (0x00000040)
|
||||
#define PSR_WAKE_ERROR_INT (0x00000100)
|
||||
|
||||
#define REG_DP_INTR_MASK4 (0x00000030)
|
||||
#define PSR_UPDATE_MASK (0x00000001)
|
||||
#define PSR_CAPTURE_MASK (0x00000002)
|
||||
#define PSR_EXIT_MASK (0x00000004)
|
||||
#define PSR_UPDATE_ERROR_MASK (0x00000008)
|
||||
#define PSR_WAKE_ERROR_MASK (0x00000010)
|
||||
|
||||
#define REG_DP_DP_HPD_CTRL (0x00000000)
|
||||
#define DP_DP_HPD_CTRL_HPD_EN (0x00000001)
|
||||
|
||||
|
@ -164,6 +178,16 @@
|
|||
#define MMSS_DP_AUDIO_TIMING_RBR_48 (0x00000094)
|
||||
#define MMSS_DP_AUDIO_TIMING_HBR_48 (0x00000098)
|
||||
|
||||
#define REG_PSR_CONFIG (0x00000100)
|
||||
#define DISABLE_PSR (0x00000000)
|
||||
#define PSR1_SUPPORTED (0x00000001)
|
||||
#define PSR2_WITHOUT_FRAMESYNC (0x00000002)
|
||||
#define PSR2_WITH_FRAMESYNC (0x00000003)
|
||||
|
||||
#define REG_PSR_CMD (0x00000110)
|
||||
#define PSR_ENTER (0x00000001)
|
||||
#define PSR_EXIT (0x00000002)
|
||||
|
||||
#define MMSS_DP_PSR_CRC_RG (0x00000154)
|
||||
#define MMSS_DP_PSR_CRC_B (0x00000158)
|
||||
|
||||
|
@ -184,6 +208,9 @@
|
|||
#define MMSS_DP_AUDIO_STREAM_0 (0x00000240)
|
||||
#define MMSS_DP_AUDIO_STREAM_1 (0x00000244)
|
||||
|
||||
#define MMSS_DP_SDP_CFG3 (0x0000024c)
|
||||
#define UPDATE_SDP (0x00000001)
|
||||
|
||||
#define MMSS_DP_EXTENSION_0 (0x00000250)
|
||||
#define MMSS_DP_EXTENSION_1 (0x00000254)
|
||||
#define MMSS_DP_EXTENSION_2 (0x00000258)
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include "dsi.h"
|
||||
#include "dsi_cfg.h"
|
||||
|
||||
bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)
|
||||
{
|
||||
|
@ -173,8 +172,10 @@ static int dsi_dev_remove(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
static const struct of_device_id dt_match[] = {
|
||||
{ .compatible = "qcom,mdss-dsi-ctrl", .data = NULL /* autodetect cfg */ },
|
||||
{ .compatible = "qcom,dsi-ctrl-6g-qcm2290", .data = &qcm2290_dsi_cfg_handler },
|
||||
{ .compatible = "qcom,mdss-dsi-ctrl" },
|
||||
|
||||
/* Deprecated, don't use */
|
||||
{ .compatible = "qcom,dsi-ctrl-6g-qcm2290" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -785,4 +785,5 @@ static inline uint32_t DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH(ui
|
|||
return ((val) << DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH__SHIFT) & DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH__MASK;
|
||||
}
|
||||
|
||||
|
||||
#endif /* DSI_XML */
|
||||
|
|
|
@ -21,8 +21,9 @@ static const struct msm_dsi_config apq8064_dsi_cfg = {
|
|||
.num_regulators = ARRAY_SIZE(apq8064_dsi_regulators),
|
||||
.bus_clk_names = dsi_v2_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v2_bus_clk_names),
|
||||
.io_start = { 0x4700000, 0x5800000 },
|
||||
.num_dsi = 2,
|
||||
.io_start = {
|
||||
{ 0x4700000, 0x5800000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const dsi_6g_bus_clk_names[] = {
|
||||
|
@ -41,46 +42,40 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = {
|
|||
.num_regulators = ARRAY_SIZE(msm8974_apq8084_regulators),
|
||||
.bus_clk_names = dsi_6g_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
|
||||
.io_start = { 0xfd922800, 0xfd922b00 },
|
||||
.num_dsi = 2,
|
||||
.io_start = {
|
||||
{ 0xfd922800, 0xfd922b00 },
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const dsi_8916_bus_clk_names[] = {
|
||||
static const char * const dsi_v1_3_1_clk_names[] = {
|
||||
"mdp_core", "iface", "bus",
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data msm8916_dsi_regulators[] = {
|
||||
static const struct regulator_bulk_data dsi_v1_3_1_regulators[] = {
|
||||
{ .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */
|
||||
{ .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config msm8916_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = msm8916_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(msm8916_dsi_regulators),
|
||||
.bus_clk_names = dsi_8916_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names),
|
||||
.io_start = { 0x1a98000 },
|
||||
.num_dsi = 1,
|
||||
};
|
||||
|
||||
static const char * const dsi_8976_bus_clk_names[] = {
|
||||
"mdp_core", "iface", "bus",
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data msm8976_dsi_regulators[] = {
|
||||
{ .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */
|
||||
{ .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */
|
||||
.regulator_data = dsi_v1_3_1_regulators,
|
||||
.num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
|
||||
.bus_clk_names = dsi_v1_3_1_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
|
||||
.io_start = {
|
||||
{ 0x1a98000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config msm8976_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = msm8976_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(msm8976_dsi_regulators),
|
||||
.bus_clk_names = dsi_8976_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names),
|
||||
.io_start = { 0x1a94000, 0x1a96000 },
|
||||
.num_dsi = 2,
|
||||
.regulator_data = dsi_v1_3_1_regulators,
|
||||
.num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators),
|
||||
.bus_clk_names = dsi_v1_3_1_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names),
|
||||
.io_start = {
|
||||
{ 0x1a94000, 0x1a96000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data msm8994_dsi_regulators[] = {
|
||||
|
@ -98,12 +93,9 @@ static const struct msm_dsi_config msm8994_dsi_cfg = {
|
|||
.num_regulators = ARRAY_SIZE(msm8994_dsi_regulators),
|
||||
.bus_clk_names = dsi_6g_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
|
||||
.io_start = { 0xfd998000, 0xfd9a0000 },
|
||||
.num_dsi = 2,
|
||||
};
|
||||
|
||||
static const char * const dsi_8996_bus_clk_names[] = {
|
||||
"mdp_core", "iface", "bus", "core_mmss",
|
||||
.io_start = {
|
||||
{ 0xfd998000, 0xfd9a0000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data msm8996_dsi_regulators[] = {
|
||||
|
@ -116,10 +108,11 @@ static const struct msm_dsi_config msm8996_dsi_cfg = {
|
|||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = msm8996_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(msm8996_dsi_regulators),
|
||||
.bus_clk_names = dsi_8996_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names),
|
||||
.io_start = { 0x994000, 0x996000 },
|
||||
.num_dsi = 2,
|
||||
.bus_clk_names = dsi_6g_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names),
|
||||
.io_start = {
|
||||
{ 0x994000, 0x996000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const dsi_msm8998_bus_clk_names[] = {
|
||||
|
@ -137,8 +130,9 @@ static const struct msm_dsi_config msm8998_dsi_cfg = {
|
|||
.num_regulators = ARRAY_SIZE(msm8998_dsi_regulators),
|
||||
.bus_clk_names = dsi_msm8998_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names),
|
||||
.io_start = { 0xc994000, 0xc996000 },
|
||||
.num_dsi = 2,
|
||||
.io_start = {
|
||||
{ 0xc994000, 0xc996000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const dsi_sdm660_bus_clk_names[] = {
|
||||
|
@ -155,30 +149,29 @@ static const struct msm_dsi_config sdm660_dsi_cfg = {
|
|||
.num_regulators = ARRAY_SIZE(sdm660_dsi_regulators),
|
||||
.bus_clk_names = dsi_sdm660_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names),
|
||||
.io_start = { 0xc994000, 0xc996000 },
|
||||
.num_dsi = 2,
|
||||
.io_start = {
|
||||
{ 0xc994000, 0xc996000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const char * const dsi_sdm845_bus_clk_names[] = {
|
||||
static const char * const dsi_v2_4_clk_names[] = {
|
||||
"iface", "bus",
|
||||
};
|
||||
|
||||
static const char * const dsi_sc7180_bus_clk_names[] = {
|
||||
"iface", "bus",
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data sdm845_dsi_regulators[] = {
|
||||
static const struct regulator_bulk_data dsi_v2_4_regulators[] = {
|
||||
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config sdm845_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = sdm845_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(sdm845_dsi_regulators),
|
||||
.bus_clk_names = dsi_sdm845_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names),
|
||||
.io_start = { 0xae94000, 0xae96000 },
|
||||
.num_dsi = 2,
|
||||
.regulator_data = dsi_v2_4_regulators,
|
||||
.num_regulators = ARRAY_SIZE(dsi_v2_4_regulators),
|
||||
.bus_clk_names = dsi_v2_4_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
|
||||
.io_start = {
|
||||
{ 0xae94000, 0xae96000 }, /* SDM845 / SDM670 */
|
||||
{ 0x5e94000 }, /* QCM2290 / SM6115 / SM6125 / SM6375 */
|
||||
},
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data sm8550_dsi_regulators[] = {
|
||||
|
@ -189,28 +182,11 @@ static const struct msm_dsi_config sm8550_dsi_cfg = {
|
|||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = sm8550_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(sm8550_dsi_regulators),
|
||||
.bus_clk_names = dsi_sdm845_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names),
|
||||
.io_start = { 0xae94000, 0xae96000 },
|
||||
.num_dsi = 2,
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data sc7180_dsi_regulators[] = {
|
||||
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config sc7180_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = sc7180_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(sc7180_dsi_regulators),
|
||||
.bus_clk_names = dsi_sc7180_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names),
|
||||
.io_start = { 0xae94000 },
|
||||
.num_dsi = 1,
|
||||
};
|
||||
|
||||
static const char * const dsi_sc7280_bus_clk_names[] = {
|
||||
"iface", "bus",
|
||||
.bus_clk_names = dsi_v2_4_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
|
||||
.io_start = {
|
||||
{ 0xae94000, 0xae96000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data sc7280_dsi_regulators[] = {
|
||||
|
@ -221,28 +197,11 @@ static const struct msm_dsi_config sc7280_dsi_cfg = {
|
|||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = sc7280_dsi_regulators,
|
||||
.num_regulators = ARRAY_SIZE(sc7280_dsi_regulators),
|
||||
.bus_clk_names = dsi_sc7280_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names),
|
||||
.io_start = { 0xae94000, 0xae96000 },
|
||||
.num_dsi = 2,
|
||||
};
|
||||
|
||||
static const char * const dsi_qcm2290_bus_clk_names[] = {
|
||||
"iface", "bus",
|
||||
};
|
||||
|
||||
static const struct regulator_bulk_data qcm2290_dsi_cfg_regulators[] = {
|
||||
{ .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config qcm2290_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.regulator_data = qcm2290_dsi_cfg_regulators,
|
||||
.num_regulators = ARRAY_SIZE(qcm2290_dsi_cfg_regulators),
|
||||
.bus_clk_names = dsi_qcm2290_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_qcm2290_bus_clk_names),
|
||||
.io_start = { 0x5e94000 },
|
||||
.num_dsi = 1,
|
||||
.bus_clk_names = dsi_v2_4_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names),
|
||||
.io_start = {
|
||||
{ 0xae94000, 0xae96000 },
|
||||
},
|
||||
};
|
||||
|
||||
static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = {
|
||||
|
@ -311,7 +270,7 @@ static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = {
|
|||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0,
|
||||
&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1,
|
||||
&sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
&sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_5_0,
|
||||
&sc7280_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_6_0,
|
||||
|
@ -335,9 +294,3 @@ const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor)
|
|||
|
||||
return cfg_hnd;
|
||||
}
|
||||
|
||||
/* Non autodetect configs */
|
||||
const struct msm_dsi_cfg_handler qcm2290_dsi_cfg_handler = {
|
||||
.cfg = &qcm2290_dsi_cfg,
|
||||
.ops = &msm_dsi_6g_v2_host_ops,
|
||||
};
|
||||
|
|
|
@ -32,14 +32,16 @@
|
|||
|
||||
#define DSI_6G_REG_SHIFT 4
|
||||
|
||||
/* Maximum number of configurations matched against the same hw revision */
|
||||
#define VARIANTS_MAX 2
|
||||
|
||||
struct msm_dsi_config {
|
||||
u32 io_offset;
|
||||
const struct regulator_bulk_data *regulator_data;
|
||||
int num_regulators;
|
||||
const char * const *bus_clk_names;
|
||||
const int num_bus_clks;
|
||||
const resource_size_t io_start[DSI_MAX];
|
||||
const int num_dsi;
|
||||
const resource_size_t io_start[VARIANTS_MAX][DSI_MAX];
|
||||
};
|
||||
|
||||
struct msm_dsi_host_cfg_ops {
|
||||
|
@ -63,8 +65,5 @@ struct msm_dsi_cfg_handler {
|
|||
|
||||
const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor);
|
||||
|
||||
/* Non autodetect configs */
|
||||
extern const struct msm_dsi_cfg_handler qcm2290_dsi_cfg_handler;
|
||||
|
||||
#endif /* __MSM_DSI_CFG_H__ */
|
||||
|
||||
|
|
|
@ -214,10 +214,6 @@ static const struct msm_dsi_cfg_handler *dsi_get_config(
|
|||
int ret;
|
||||
u32 major = 0, minor = 0;
|
||||
|
||||
cfg_hnd = device_get_match_data(dev);
|
||||
if (cfg_hnd)
|
||||
return cfg_hnd;
|
||||
|
||||
ahb_clk = msm_clk_get(msm_host->pdev, "iface");
|
||||
if (IS_ERR(ahb_clk)) {
|
||||
pr_err("%s: cannot get interface clock\n", __func__);
|
||||
|
@ -1862,16 +1858,16 @@ static int dsi_host_get_id(struct msm_dsi_host *msm_host)
|
|||
struct platform_device *pdev = msm_host->pdev;
|
||||
const struct msm_dsi_config *cfg = msm_host->cfg_hnd->cfg;
|
||||
struct resource *res;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dsi_ctrl");
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < cfg->num_dsi; i++) {
|
||||
if (cfg->io_start[i] == res->start)
|
||||
return i;
|
||||
}
|
||||
for (i = 0; i < VARIANTS_MAX; i++)
|
||||
for (j = 0; j < DSI_MAX; j++)
|
||||
if (cfg->io_start[i][j] == res->start)
|
||||
return j;
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,24 +8,24 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -776,10 +776,28 @@ static inline uint32_t HDMI_8x60_PHY_REG1_OUTVOL_SWING_CTRL(uint32_t val)
|
|||
|
||||
#define REG_HDMI_8x74_ANA_CFG1 0x00000004
|
||||
|
||||
#define REG_HDMI_8x74_ANA_CFG2 0x00000008
|
||||
|
||||
#define REG_HDMI_8x74_ANA_CFG3 0x0000000c
|
||||
|
||||
#define REG_HDMI_8x74_PD_CTRL0 0x00000010
|
||||
|
||||
#define REG_HDMI_8x74_PD_CTRL1 0x00000014
|
||||
|
||||
#define REG_HDMI_8x74_GLB_CFG 0x00000018
|
||||
|
||||
#define REG_HDMI_8x74_DCC_CFG0 0x0000001c
|
||||
|
||||
#define REG_HDMI_8x74_DCC_CFG1 0x00000020
|
||||
|
||||
#define REG_HDMI_8x74_TXCAL_CFG0 0x00000024
|
||||
|
||||
#define REG_HDMI_8x74_TXCAL_CFG1 0x00000028
|
||||
|
||||
#define REG_HDMI_8x74_TXCAL_CFG2 0x0000002c
|
||||
|
||||
#define REG_HDMI_8x74_TXCAL_CFG3 0x00000030
|
||||
|
||||
#define REG_HDMI_8x74_BIST_CFG0 0x00000034
|
||||
|
||||
#define REG_HDMI_8x74_BIST_PATN0 0x0000003c
|
||||
|
@ -790,6 +808,8 @@ static inline uint32_t HDMI_8x60_PHY_REG1_OUTVOL_SWING_CTRL(uint32_t val)
|
|||
|
||||
#define REG_HDMI_8x74_BIST_PATN3 0x00000048
|
||||
|
||||
#define REG_HDMI_8x74_STATUS 0x0000005c
|
||||
|
||||
#define REG_HDMI_28nm_PHY_PLL_REFCLK_CFG 0x00000000
|
||||
|
||||
#define REG_HDMI_28nm_PHY_PLL_POSTDIV1_CFG 0x00000004
|
||||
|
@ -877,6 +897,8 @@ static inline uint32_t HDMI_8x60_PHY_REG1_OUTVOL_SWING_CTRL(uint32_t val)
|
|||
|
||||
#define REG_HDMI_28nm_PHY_PLL_DEBUG_BUS_SEL 0x000000a0
|
||||
|
||||
#define REG_HDMI_28nm_PHY_PLL_STATUS 0x000000c0
|
||||
|
||||
#define REG_HDMI_8996_PHY_CFG 0x00000000
|
||||
|
||||
#define REG_HDMI_8996_PHY_PD_CTL 0x00000004
|
||||
|
|
|
@ -8,26 +8,26 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2020-12-31 19:26:32)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi.xml ( 17560 bytes, from 2021-09-16 22:37:02)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-07-22 15:21:56)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-03 01:18:13)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/tmp/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-01-30 18:25:22)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 944 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2022-07-23 20:21:46)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 18746 bytes, from 2022-04-28 17:29:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 11007 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2022-03-08 17:40:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 42350 bytes, from 2022-09-20 17:45:56)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2022-03-08 17:40:42)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
Copyright (C) 2013-2022 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -179,6 +179,24 @@ static unsigned get_crtc_mask(struct drm_atomic_state *state)
|
|||
return mask;
|
||||
}
|
||||
|
||||
int msm_atomic_check(struct drm_device *dev, struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
|
||||
struct drm_crtc *crtc;
|
||||
int i;
|
||||
|
||||
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
|
||||
new_crtc_state, i) {
|
||||
if ((old_crtc_state->ctm && !new_crtc_state->ctm) ||
|
||||
(!old_crtc_state->ctm && new_crtc_state->ctm)) {
|
||||
new_crtc_state->mode_changed = true;
|
||||
state->allow_modeset = true;
|
||||
}
|
||||
}
|
||||
|
||||
return drm_atomic_helper_check(dev, state);
|
||||
}
|
||||
|
||||
void msm_atomic_commit_tail(struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *dev = state->dev;
|
||||
|
@ -186,8 +204,7 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
|
|||
struct msm_kms *kms = priv->kms;
|
||||
struct drm_crtc *async_crtc = NULL;
|
||||
unsigned crtc_mask = get_crtc_mask(state);
|
||||
bool async = kms->funcs->vsync_time &&
|
||||
can_do_async(state, &async_crtc);
|
||||
bool async = can_do_async(state, &async_crtc);
|
||||
|
||||
trace_msm_atomic_commit_tail_start(async, crtc_mask);
|
||||
|
||||
|
@ -206,7 +223,8 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
|
|||
* Now that there is no in-progress flush, prepare the
|
||||
* current update:
|
||||
*/
|
||||
kms->funcs->prepare_commit(kms, state);
|
||||
if (kms->funcs->prepare_commit)
|
||||
kms->funcs->prepare_commit(kms, state);
|
||||
|
||||
/*
|
||||
* Push atomic updates down to hardware:
|
||||
|
@ -231,7 +249,9 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
|
|||
|
||||
kms->pending_crtc_mask |= crtc_mask;
|
||||
|
||||
vsync_time = kms->funcs->vsync_time(kms, async_crtc);
|
||||
if (drm_crtc_next_vblank_start(async_crtc, &vsync_time))
|
||||
goto fallback;
|
||||
|
||||
wakeup_time = ktime_sub(vsync_time, ms_to_ktime(1));
|
||||
|
||||
msm_hrtimer_queue_work(&timer->work, wakeup_time,
|
||||
|
@ -253,6 +273,7 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
|
|||
return;
|
||||
}
|
||||
|
||||
fallback:
|
||||
/*
|
||||
* If there is any async flush pending on updated crtcs, fold
|
||||
* them into the current flush.
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/fault-inject.h>
|
||||
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_file.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
|
||||
|
@ -241,12 +242,11 @@ static int msm_fb_show(struct seq_file *m, void *arg)
|
|||
{
|
||||
struct drm_info_node *node = (struct drm_info_node *) m->private;
|
||||
struct drm_device *dev = node->minor->dev;
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct drm_framebuffer *fb, *fbdev_fb = NULL;
|
||||
|
||||
if (priv->fbdev) {
|
||||
if (dev->fb_helper && dev->fb_helper->fb) {
|
||||
seq_printf(m, "fbcon ");
|
||||
fbdev_fb = priv->fbdev->fb;
|
||||
fbdev_fb = dev->fb_helper->fb;
|
||||
msm_framebuffer_describe(fbdev_fb, m);
|
||||
}
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче