Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next
* devcoredump support for display errors * dpu: irq cleanup/refactor * dpu: dt bindings conversion to yaml * dsi: dt bindings conversion to yaml * mdp5: alpha/blend_mode/zpos support * a6xx: cached coherent buffer support * a660 support * gpu iova fault improvements: - info about which block triggered the fault, etc - generation of gpu devcoredump on fault * assortment of other cleanups and fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGs4=qsGBBbyn-4JWqW4-YUSTKh67X3DsPQ=T2D9aXKqNA@mail.gmail.com
This commit is contained in:
commit
334200bf52
|
@ -0,0 +1,146 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dp-controller.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: MSM Display Port Controller
|
||||
|
||||
maintainers:
|
||||
- Kuogee Hsieh <khsieh@codeaurora.org>
|
||||
|
||||
description: |
|
||||
Device tree bindings for DisplayPort host controller for MSM targets
|
||||
that are compatible with VESA DisplayPort interface specification.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,sc7180-dp
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: AHB clock to enable register access
|
||||
- description: Display Port AUX clock
|
||||
- description: Display Port Link clock
|
||||
- description: Link interface clock between DP and PHY
|
||||
- description: Display Port Pixel clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: core_iface
|
||||
- const: core_aux
|
||||
- const: ctrl_link
|
||||
- const: ctrl_link_iface
|
||||
- const: stream_pixel
|
||||
|
||||
assigned-clocks:
|
||||
items:
|
||||
- description: link clock source
|
||||
- description: pixel clock source
|
||||
|
||||
assigned-clock-parents:
|
||||
items:
|
||||
- description: phy 0 parent
|
||||
- description: phy 1 parent
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
|
||||
phy-names:
|
||||
items:
|
||||
- const: dp
|
||||
|
||||
operating-points-v2:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
"#sound-dai-cells":
|
||||
const: 0
|
||||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Input endpoint of the controller
|
||||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: Output endpoint of the controller
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- phys
|
||||
- phy-names
|
||||
- "#sound-dai-cells"
|
||||
- power-domains
|
||||
- ports
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/qcom,dispcc-sc7180.h>
|
||||
#include <dt-bindings/power/qcom-aoss-qmp.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
displayport-controller@ae90000 {
|
||||
compatible = "qcom,sc7180-dp";
|
||||
reg = <0xae90000 0x1400>;
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <12>;
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
|
||||
clock-names = "core_iface", "core_aux",
|
||||
"ctrl_link",
|
||||
"ctrl_link_iface", "stream_pixel";
|
||||
|
||||
assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
|
||||
<&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
|
||||
|
||||
assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
|
||||
|
||||
phys = <&dp_phy>;
|
||||
phy-names = "dp";
|
||||
|
||||
#sound-dai-cells = <0>;
|
||||
|
||||
power-domains = <&rpmhpd SC7180_CX>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
endpoint {
|
||||
remote-endpoint = <&dpu_intf0_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
endpoint {
|
||||
remote-endpoint = <&typec>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,228 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dpu-sc7180.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DPU dt properties for SC7180 target
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
description: |
|
||||
Device tree bindings for MSM Mobile Display Subsystem(MDSS) that encapsulates
|
||||
sub-blocks like DPU display controller, DSI and DP interfaces etc. Device tree
|
||||
bindings of MDSS and DPU are mentioned for SC7180 target.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,sc7180-mdss
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
reg-names:
|
||||
const: mdss
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display AHB clock from gcc
|
||||
- description: Display AHB clock from dispcc
|
||||
- description: Display core clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: iface
|
||||
- const: ahb
|
||||
- const: core
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
"#address-cells": true
|
||||
|
||||
"#size-cells": true
|
||||
|
||||
"#interrupt-cells":
|
||||
const: 1
|
||||
|
||||
iommus:
|
||||
items:
|
||||
- description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
|
||||
|
||||
ranges: true
|
||||
|
||||
interconnects:
|
||||
items:
|
||||
- description: Interconnect path specifying the port ids for data bus
|
||||
|
||||
interconnect-names:
|
||||
const: mdp0-mem
|
||||
|
||||
patternProperties:
|
||||
"^display-controller@[0-9a-f]+$":
|
||||
type: object
|
||||
description: Node containing the properties of DPU.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,sc7180-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 hf axi clock
|
||||
- description: Display ahb clock
|
||||
- description: Display rotator clock
|
||||
- description: Display lut clock
|
||||
- description: Display core clock
|
||||
- description: Display vsync clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: bus
|
||||
- const: iface
|
||||
- const: rot
|
||||
- const: lut
|
||||
- const: core
|
||||
- const: vsync
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
operating-points-v2: true
|
||||
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
description: |
|
||||
Contains the list of output ports from DPU device. These ports
|
||||
connect to interfaces that are external to the DPU hardware,
|
||||
such as DSI, DP etc. Each output port contains an endpoint that
|
||||
describes how it is connected to an external interface.
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DPU_INTF1 (DSI1)
|
||||
|
||||
port@2:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DPU_INTF0 (DP)
|
||||
|
||||
required:
|
||||
- port@0
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- clocks
|
||||
- interrupts
|
||||
- power-domains
|
||||
- operating-points-v2
|
||||
- ports
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- power-domains
|
||||
- clocks
|
||||
- interrupts
|
||||
- interrupt-controller
|
||||
- iommus
|
||||
- ranges
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sc7180.h>
|
||||
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/interconnect/qcom,sdm845.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
display-subsystem@ae00000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "qcom,sc7180-mdss";
|
||||
reg = <0xae00000 0x1000>;
|
||||
reg-names = "mdss";
|
||||
power-domains = <&dispcc MDSS_GDSC>;
|
||||
clocks = <&gcc GCC_DISP_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>;
|
||||
clock-names = "iface", "ahb", "core";
|
||||
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
interconnects = <&mmss_noc MASTER_MDP0 &mc_virt SLAVE_EBI1>;
|
||||
interconnect-names = "mdp0-mem";
|
||||
|
||||
iommus = <&apps_smmu 0x800 0x2>;
|
||||
ranges;
|
||||
|
||||
display-controller@ae01000 {
|
||||
compatible = "qcom,sc7180-dpu";
|
||||
reg = <0x0ae01000 0x8f000>,
|
||||
<0x0aeb0000 0x2008>;
|
||||
|
||||
reg-names = "mdp", "vbif";
|
||||
|
||||
clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_ROT_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
clock-names = "bus", "iface", "rot", "lut", "core",
|
||||
"vsync";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <0>;
|
||||
power-domains = <&rpmhpd SC7180_CX>;
|
||||
operating-points-v2 = <&mdp_opp_table>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dpu_intf1_out: endpoint {
|
||||
remote-endpoint = <&dsi0_in>;
|
||||
};
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
dpu_intf0_out: endpoint {
|
||||
remote-endpoint = <&dp_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,212 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dpu-sdm845.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DPU dt properties for SDM845 target
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
description: |
|
||||
Device tree bindings for MSM Mobile Display Subsystem(MDSS) that encapsulates
|
||||
sub-blocks like DPU display controller, DSI and DP interfaces etc. Device tree
|
||||
bindings of MDSS and DPU are mentioned for SDM845 target.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,sdm845-mdss
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
reg-names:
|
||||
const: mdss
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display AHB clock from gcc
|
||||
- description: Display AXI clock
|
||||
- description: Display core clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: iface
|
||||
- const: bus
|
||||
- const: core
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
"#address-cells": true
|
||||
|
||||
"#size-cells": true
|
||||
|
||||
"#interrupt-cells":
|
||||
const: 1
|
||||
|
||||
iommus:
|
||||
items:
|
||||
- description: Phandle to apps_smmu node with SID mask for Hard-Fail port0
|
||||
- description: Phandle to apps_smmu node with SID mask for Hard-Fail port1
|
||||
|
||||
ranges: true
|
||||
|
||||
patternProperties:
|
||||
"^display-controller@[0-9a-f]+$":
|
||||
type: object
|
||||
description: Node containing the properties of DPU.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,sdm845-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 clock
|
||||
- description: Display axi clock
|
||||
- description: Display core clock
|
||||
- description: Display vsync clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: iface
|
||||
- const: bus
|
||||
- const: core
|
||||
- const: vsync
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
operating-points-v2: true
|
||||
ports:
|
||||
$ref: /schemas/graph.yaml#/properties/ports
|
||||
description: |
|
||||
Contains the list of output ports from DPU device. These ports
|
||||
connect to interfaces that are external to the DPU hardware,
|
||||
such as DSI, DP etc. Each output port contains an endpoint that
|
||||
describes how it is connected to an external interface.
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DPU_INTF1 (DSI1)
|
||||
|
||||
port@1:
|
||||
$ref: /schemas/graph.yaml#/properties/port
|
||||
description: DPU_INTF2 (DSI2)
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- clocks
|
||||
- interrupts
|
||||
- power-domains
|
||||
- operating-points-v2
|
||||
- ports
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- power-domains
|
||||
- clocks
|
||||
- interrupts
|
||||
- interrupt-controller
|
||||
- iommus
|
||||
- ranges
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
display-subsystem@ae00000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "qcom,sdm845-mdss";
|
||||
reg = <0x0ae00000 0x1000>;
|
||||
reg-names = "mdss";
|
||||
power-domains = <&dispcc MDSS_GDSC>;
|
||||
|
||||
clocks = <&gcc GCC_DISP_AHB_CLK>,
|
||||
<&gcc GCC_DISP_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>;
|
||||
clock-names = "iface", "bus", "core";
|
||||
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
iommus = <&apps_smmu 0x880 0x8>,
|
||||
<&apps_smmu 0xc80 0x8>;
|
||||
ranges;
|
||||
|
||||
display-controller@ae01000 {
|
||||
compatible = "qcom,sdm845-dpu";
|
||||
reg = <0x0ae01000 0x8f000>,
|
||||
<0x0aeb0000 0x2008>;
|
||||
reg-names = "mdp", "vbif";
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_AXI_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
clock-names = "iface", "bus", "core", "vsync";
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <0>;
|
||||
power-domains = <&rpmhpd SDM845_CX>;
|
||||
operating-points-v2 = <&mdp_opp_table>;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
|
@ -1,141 +0,0 @@
|
|||
Qualcomm Technologies, Inc. DPU KMS
|
||||
|
||||
Description:
|
||||
|
||||
Device tree bindings for MSM Mobile Display Subsystem(MDSS) that encapsulates
|
||||
sub-blocks like DPU display controller, DSI and DP interfaces etc.
|
||||
The DPU display controller is found in SDM845 SoC.
|
||||
|
||||
MDSS:
|
||||
Required properties:
|
||||
- compatible: "qcom,sdm845-mdss", "qcom,sc7180-mdss"
|
||||
- reg: physical base address and length of controller's registers.
|
||||
- reg-names: register region names. The following region is required:
|
||||
* "mdss"
|
||||
- power-domains: a power domain consumer specifier according to
|
||||
Documentation/devicetree/bindings/power/power_domain.txt
|
||||
- clocks: list of clock specifiers for clocks needed by the device.
|
||||
- clock-names: device clock names, must be in same order as clocks property.
|
||||
The following clocks are required:
|
||||
* "iface"
|
||||
* "bus"
|
||||
* "core"
|
||||
- interrupts: interrupt signal from MDSS.
|
||||
- interrupt-controller: identifies the node as an interrupt controller.
|
||||
- #interrupt-cells: specifies the number of cells needed to encode an interrupt
|
||||
source, should be 1.
|
||||
- iommus: phandle of iommu device node.
|
||||
- #address-cells: number of address cells for the MDSS children. Should be 1.
|
||||
- #size-cells: Should be 1.
|
||||
- ranges: parent bus address space is the same as the child bus address space.
|
||||
- interconnects : interconnect path specifier for MDSS according to
|
||||
Documentation/devicetree/bindings/interconnect/interconnect.txt. Should be
|
||||
2 paths corresponding to 2 AXI ports.
|
||||
- interconnect-names : MDSS will have 2 port names to differentiate between the
|
||||
2 interconnect paths defined with interconnect specifier.
|
||||
|
||||
Optional properties:
|
||||
- assigned-clocks: list of clock specifiers for clocks needing rate assignment
|
||||
- assigned-clock-rates: list of clock frequencies sorted in the same order as
|
||||
the assigned-clocks property.
|
||||
|
||||
MDP:
|
||||
Required properties:
|
||||
- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu"
|
||||
- reg: physical base address and length of controller's registers.
|
||||
- reg-names : register region names. The following region is required:
|
||||
* "mdp"
|
||||
* "vbif"
|
||||
- clocks: list of clock specifiers for clocks needed by the device.
|
||||
- clock-names: device clock names, must be in same order as clocks property.
|
||||
The following clocks are required.
|
||||
* "bus"
|
||||
* "iface"
|
||||
* "core"
|
||||
* "vsync"
|
||||
- interrupts: interrupt line from DPU to MDSS.
|
||||
- ports: contains the list of output ports from DPU device. These ports connect
|
||||
to interfaces that are external to the DPU hardware, such as DSI, DP etc.
|
||||
|
||||
Each output port contains an endpoint that describes how it is connected to an
|
||||
external interface. These are described by the standard properties documented
|
||||
here:
|
||||
Documentation/devicetree/bindings/graph.txt
|
||||
Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
|
||||
Port 0 -> DPU_INTF1 (DSI1)
|
||||
Port 1 -> DPU_INTF2 (DSI2)
|
||||
|
||||
Optional properties:
|
||||
- assigned-clocks: list of clock specifiers for clocks needing rate assignment
|
||||
- assigned-clock-rates: list of clock frequencies sorted in the same order as
|
||||
the assigned-clocks property.
|
||||
|
||||
Example:
|
||||
|
||||
mdss: mdss@ae00000 {
|
||||
compatible = "qcom,sdm845-mdss";
|
||||
reg = <0xae00000 0x1000>;
|
||||
reg-names = "mdss";
|
||||
|
||||
power-domains = <&clock_dispcc 0>;
|
||||
|
||||
clocks = <&gcc GCC_DISP_AHB_CLK>, <&gcc GCC_DISP_AXI_CLK>,
|
||||
<&clock_dispcc DISP_CC_MDSS_MDP_CLK>;
|
||||
clock-names = "iface", "bus", "core";
|
||||
|
||||
assigned-clocks = <&clock_dispcc DISP_CC_MDSS_MDP_CLK>;
|
||||
assigned-clock-rates = <300000000>;
|
||||
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
interconnects = <&rsc_hlos MASTER_MDP0 &rsc_hlos SLAVE_EBI1>,
|
||||
<&rsc_hlos MASTER_MDP1 &rsc_hlos SLAVE_EBI1>;
|
||||
|
||||
interconnect-names = "mdp0-mem", "mdp1-mem";
|
||||
|
||||
iommus = <&apps_iommu 0>;
|
||||
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0xae00000 0xb2008>;
|
||||
|
||||
mdss_mdp: mdp@ae01000 {
|
||||
compatible = "qcom,sdm845-dpu";
|
||||
reg = <0 0x1000 0x8f000>, <0 0xb0000 0x2008>;
|
||||
reg-names = "mdp", "vbif";
|
||||
|
||||
clocks = <&clock_dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&clock_dispcc DISP_CC_MDSS_AXI_CLK>,
|
||||
<&clock_dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&clock_dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
clock-names = "iface", "bus", "core", "vsync";
|
||||
|
||||
assigned-clocks = <&clock_dispcc DISP_CC_MDSS_MDP_CLK>,
|
||||
<&clock_dispcc DISP_CC_MDSS_VSYNC_CLK>;
|
||||
assigned-clock-rates = <0 0 300000000 19200000>;
|
||||
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
|
@ -0,0 +1,185 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-controller-main.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DSI controller
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
allOf:
|
||||
- $ref: "../dsi-controller.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: qcom,mdss-dsi-ctrl
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
reg-names:
|
||||
const: dsi_ctrl
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display byte clock
|
||||
- description: Display byte interface clock
|
||||
- description: Display pixel clock
|
||||
- description: Display escape clock
|
||||
- description: Display AHB clock
|
||||
- description: Display AXI clock
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: byte
|
||||
- const: byte_intf
|
||||
- const: pixel
|
||||
- const: core
|
||||
- const: iface
|
||||
- const: bus
|
||||
|
||||
phys:
|
||||
maxItems: 1
|
||||
|
||||
phy-names:
|
||||
const: dsi
|
||||
|
||||
"#address-cells": true
|
||||
|
||||
"#size-cells": true
|
||||
|
||||
syscon-sfpb:
|
||||
description: A phandle to mmss_sfpb syscon node (only for DSIv2).
|
||||
$ref: "/schemas/types.yaml#/definitions/phandle"
|
||||
|
||||
qcom,dual-dsi-mode:
|
||||
type: boolean
|
||||
description: |
|
||||
Indicates if the DSI controller is driving a panel which needs
|
||||
2 DSI links.
|
||||
|
||||
power-domains:
|
||||
maxItems: 1
|
||||
|
||||
operating-points-v2: true
|
||||
|
||||
ports:
|
||||
$ref: "/schemas/graph.yaml#/properties/ports"
|
||||
description: |
|
||||
Contains DSI controller input and output ports as children, each
|
||||
containing one endpoint subnode.
|
||||
|
||||
properties:
|
||||
port@0:
|
||||
$ref: "/schemas/graph.yaml#/properties/port"
|
||||
description: |
|
||||
Input endpoints of the controller.
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: /schemas/media/video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
properties:
|
||||
data-lanes:
|
||||
maxItems: 4
|
||||
minItems: 4
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
|
||||
port@1:
|
||||
$ref: "/schemas/graph.yaml#/properties/port"
|
||||
description: |
|
||||
Output endpoints of the controller.
|
||||
properties:
|
||||
endpoint:
|
||||
$ref: /schemas/media/video-interfaces.yaml#
|
||||
unevaluatedProperties: false
|
||||
properties:
|
||||
data-lanes:
|
||||
maxItems: 4
|
||||
minItems: 4
|
||||
items:
|
||||
enum: [ 0, 1, 2, 3 ]
|
||||
|
||||
required:
|
||||
- port@0
|
||||
- port@1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- interrupts
|
||||
- clocks
|
||||
- clock-names
|
||||
- phys
|
||||
- phy-names
|
||||
- power-domains
|
||||
- operating-points-v2
|
||||
- ports
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,gcc-sdm845.h>
|
||||
#include <dt-bindings/power/qcom-rpmpd.h>
|
||||
|
||||
dsi@ae94000 {
|
||||
compatible = "qcom,mdss-dsi-ctrl";
|
||||
reg = <0x0ae94000 0x400>;
|
||||
reg-names = "dsi_ctrl";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
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>,
|
||||
<&dispcc DISP_CC_MDSS_AXI_CLK>;
|
||||
clock-names = "byte",
|
||||
"byte_intf",
|
||||
"pixel",
|
||||
"core",
|
||||
"iface",
|
||||
"bus";
|
||||
|
||||
phys = <&dsi0_phy>;
|
||||
phy-names = "dsi";
|
||||
|
||||
power-domains = <&rpmhpd SC7180_CX>;
|
||||
operating-points-v2 = <&dsi_opp_table>;
|
||||
|
||||
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 {
|
||||
remote-endpoint = <&sn65dsi86_in>;
|
||||
data-lanes = <0 1 2 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
|
@ -0,0 +1,68 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-phy-10nm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DSI 10nm PHY
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
allOf:
|
||||
- $ref: dsi-phy-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: qcom,dsi-phy-10nm
|
||||
- const: qcom,dsi-phy-10nm-8998
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: dsi phy register set
|
||||
- description: dsi phy lane register set
|
||||
- description: dsi pll register set
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: dsi_phy
|
||||
- const: dsi_phy_lane
|
||||
- const: dsi_pll
|
||||
|
||||
vdds-supply:
|
||||
description: |
|
||||
Connected to DSI0_MIPI_DSI_PLL_VDDA0P9 pin for sc7180 target and
|
||||
connected to VDDA_MIPI_DSI_0_PLL_0P9 pin for sdm845 target
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- vdds-supply
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
|
||||
dsi-phy@ae94400 {
|
||||
compatible = "qcom,dsi-phy-10nm";
|
||||
reg = <0x0ae94400 0x200>,
|
||||
<0x0ae94600 0x280>,
|
||||
<0x0ae94a00 0x1e0>;
|
||||
reg-names = "dsi_phy",
|
||||
"dsi_phy_lane",
|
||||
"dsi_pll";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
vdds-supply = <&vdda_mipi_dsi0_pll>;
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
...
|
|
@ -0,0 +1,66 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-phy-14nm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DSI 14nm PHY
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
allOf:
|
||||
- $ref: dsi-phy-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: qcom,dsi-phy-14nm
|
||||
- const: qcom,dsi-phy-14nm-660
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: dsi phy register set
|
||||
- description: dsi phy lane register set
|
||||
- description: dsi pll register set
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: dsi_phy
|
||||
- const: dsi_phy_lane
|
||||
- const: dsi_pll
|
||||
|
||||
vcca-supply:
|
||||
description: Phandle to vcca regulator device node.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- vcca-supply
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
|
||||
dsi-phy@ae94400 {
|
||||
compatible = "qcom,dsi-phy-14nm";
|
||||
reg = <0x0ae94400 0x200>,
|
||||
<0x0ae94600 0x280>,
|
||||
<0x0ae94a00 0x1e0>;
|
||||
reg-names = "dsi_phy",
|
||||
"dsi_phy_lane",
|
||||
"dsi_pll";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
vcca-supply = <&vcca_reg>;
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
...
|
|
@ -0,0 +1,71 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-phy-20nm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DSI 20nm PHY
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
allOf:
|
||||
- $ref: dsi-phy-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: qcom,dsi-phy-20nm
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: dsi pll register set
|
||||
- description: dsi phy register set
|
||||
- description: dsi phy regulator register set
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: dsi_pll
|
||||
- const: dsi_phy
|
||||
- const: dsi_phy_regulator
|
||||
|
||||
vcca-supply:
|
||||
description: Phandle to vcca regulator device node.
|
||||
|
||||
vddio-supply:
|
||||
description: Phandle to vdd-io regulator device node.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- vddio-supply
|
||||
- vcca-supply
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
|
||||
dsi-phy@fd922a00 {
|
||||
compatible = "qcom,dsi-phy-20nm";
|
||||
reg = <0xfd922a00 0xd4>,
|
||||
<0xfd922b00 0x2b0>,
|
||||
<0xfd922d80 0x7b>;
|
||||
reg-names = "dsi_pll",
|
||||
"dsi_phy",
|
||||
"dsi_phy_regulator";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
vcca-supply = <&vcca_reg>;
|
||||
vddio-supply = <&vddio_reg>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
...
|
|
@ -0,0 +1,68 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-phy-28nm.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Qualcomm Display DSI 28nm PHY
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
allOf:
|
||||
- $ref: dsi-phy-common.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: qcom,dsi-phy-28nm-hpm
|
||||
- const: qcom,dsi-phy-28nm-lp
|
||||
- const: qcom,dsi-phy-28nm-8960
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: dsi pll register set
|
||||
- description: dsi phy register set
|
||||
- description: dsi phy regulator register set
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: dsi_pll
|
||||
- const: dsi_phy
|
||||
- const: dsi_phy_regulator
|
||||
|
||||
vddio-supply:
|
||||
description: Phandle to vdd-io regulator device node.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- vddio-supply
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/qcom,dispcc-sdm845.h>
|
||||
#include <dt-bindings/clock/qcom,rpmh.h>
|
||||
|
||||
dsi-phy@fd922a00 {
|
||||
compatible = "qcom,dsi-phy-28nm-lp";
|
||||
reg = <0xfd922a00 0xd4>,
|
||||
<0xfd922b00 0x2b0>,
|
||||
<0xfd922d80 0x7b>;
|
||||
reg-names = "dsi_pll",
|
||||
"dsi_phy",
|
||||
"dsi_phy_regulator";
|
||||
|
||||
#clock-cells = <1>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
vddio-supply = <&vddio_reg>;
|
||||
|
||||
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
|
||||
<&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "iface", "ref";
|
||||
};
|
||||
...
|
|
@ -0,0 +1,40 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/msm/dsi-phy-common.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Description of Qualcomm Display DSI PHY common dt properties
|
||||
|
||||
maintainers:
|
||||
- Krishna Manikandan <mkrishn@codeaurora.org>
|
||||
|
||||
description: |
|
||||
This defines the DSI PHY dt properties which are common for all
|
||||
dsi phy versions.
|
||||
|
||||
properties:
|
||||
"#clock-cells":
|
||||
const: 1
|
||||
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: Display AHB clock
|
||||
- description: Board XO source
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: iface
|
||||
- const: ref
|
||||
|
||||
required:
|
||||
- clocks
|
||||
- clock-names
|
||||
- "#clock-cells"
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: true
|
||||
...
|
|
@ -1,249 +0,0 @@
|
|||
Qualcomm Technologies Inc. adreno/snapdragon DSI output
|
||||
|
||||
DSI Controller:
|
||||
Required properties:
|
||||
- compatible:
|
||||
* "qcom,mdss-dsi-ctrl"
|
||||
- reg: Physical base address and length of the registers of controller
|
||||
- reg-names: The names of register regions. The following regions are required:
|
||||
* "dsi_ctrl"
|
||||
- interrupts: The interrupt signal from the DSI block.
|
||||
- power-domains: Should be <&mmcc MDSS_GDSC>.
|
||||
- clocks: Phandles to device clocks.
|
||||
- clock-names: the following clocks are required:
|
||||
* "mdp_core"
|
||||
* "iface"
|
||||
* "bus"
|
||||
* "core_mmss"
|
||||
* "byte"
|
||||
* "pixel"
|
||||
* "core"
|
||||
For DSIv2, we need an additional clock:
|
||||
* "src"
|
||||
For DSI6G v2.0 onwards, we need also need the clock:
|
||||
* "byte_intf"
|
||||
- assigned-clocks: Parents of "byte" and "pixel" for the given platform.
|
||||
- assigned-clock-parents: The Byte clock and Pixel clock PLL outputs provided
|
||||
by a DSI PHY block. See [1] for details on clock bindings.
|
||||
- vdd-supply: phandle to vdd regulator device node
|
||||
- vddio-supply: phandle to vdd-io regulator device node
|
||||
- vdda-supply: phandle to vdda regulator device node
|
||||
- phys: phandle to DSI PHY device node
|
||||
- phy-names: the name of the corresponding PHY device
|
||||
- syscon-sfpb: A phandle to mmss_sfpb syscon node (only for DSIv2)
|
||||
- ports: Contains 2 DSI controller ports as child nodes. Each port contains
|
||||
an endpoint subnode as defined in [2] and [3].
|
||||
|
||||
Optional properties:
|
||||
- panel@0: Node of panel connected to this DSI controller.
|
||||
See files in [4] for each supported panel.
|
||||
- qcom,dual-dsi-mode: Boolean value indicating if the DSI controller is
|
||||
driving a panel which needs 2 DSI links.
|
||||
- qcom,master-dsi: Boolean value indicating if the DSI controller is driving
|
||||
the master link of the 2-DSI panel.
|
||||
- qcom,sync-dual-dsi: Boolean value indicating if the DSI controller is
|
||||
driving a 2-DSI panel whose 2 links need receive command simultaneously.
|
||||
- pinctrl-names: the pin control state names; should contain "default"
|
||||
- pinctrl-0: the default pinctrl state (active)
|
||||
- pinctrl-n: the "sleep" pinctrl state
|
||||
- ports: contains DSI controller input and output ports as children, each
|
||||
containing one endpoint subnode.
|
||||
|
||||
DSI Endpoint properties:
|
||||
- remote-endpoint: For port@0, set to phandle of the connected panel/bridge's
|
||||
input endpoint. For port@1, set to the MDP interface output. See [2] for
|
||||
device graph info.
|
||||
|
||||
- data-lanes: this describes how the physical DSI data lanes are mapped
|
||||
to the logical lanes on the given platform. The value contained in
|
||||
index n describes what physical lane is mapped to the logical lane n
|
||||
(DATAn, where n lies between 0 and 3). The clock lane position is fixed
|
||||
and can't be changed. Hence, they aren't a part of the DT bindings. See
|
||||
[3] for more info on the data-lanes property.
|
||||
|
||||
For example:
|
||||
|
||||
data-lanes = <3 0 1 2>;
|
||||
|
||||
The above mapping describes that the logical data lane DATA0 is mapped to
|
||||
the physical data lane DATA3, logical DATA1 to physical DATA0, logic DATA2
|
||||
to phys DATA1 and logic DATA3 to phys DATA2.
|
||||
|
||||
There are only a limited number of physical to logical mappings possible:
|
||||
<0 1 2 3>
|
||||
<1 2 3 0>
|
||||
<2 3 0 1>
|
||||
<3 0 1 2>
|
||||
<0 3 2 1>
|
||||
<1 0 3 2>
|
||||
<2 1 0 3>
|
||||
<3 2 1 0>
|
||||
|
||||
DSI PHY:
|
||||
Required properties:
|
||||
- compatible: Could be the following
|
||||
* "qcom,dsi-phy-28nm-hpm"
|
||||
* "qcom,dsi-phy-28nm-lp"
|
||||
* "qcom,dsi-phy-20nm"
|
||||
* "qcom,dsi-phy-28nm-8960"
|
||||
* "qcom,dsi-phy-14nm"
|
||||
* "qcom,dsi-phy-14nm-660"
|
||||
* "qcom,dsi-phy-10nm"
|
||||
* "qcom,dsi-phy-10nm-8998"
|
||||
* "qcom,dsi-phy-7nm"
|
||||
* "qcom,dsi-phy-7nm-8150"
|
||||
- reg: Physical base address and length of the registers of PLL, PHY. Some
|
||||
revisions require the PHY regulator base address, whereas others require the
|
||||
PHY lane base address. See below for each PHY revision.
|
||||
- reg-names: The names of register regions. The following regions are required:
|
||||
For DSI 28nm HPM/LP/8960 PHYs and 20nm PHY:
|
||||
* "dsi_pll"
|
||||
* "dsi_phy"
|
||||
* "dsi_phy_regulator"
|
||||
For DSI 14nm, 10nm and 7nm PHYs:
|
||||
* "dsi_pll"
|
||||
* "dsi_phy"
|
||||
* "dsi_phy_lane"
|
||||
- clock-cells: Must be 1. The DSI PHY block acts as a clock provider, creating
|
||||
2 clocks: A byte clock (index 0), and a pixel clock (index 1).
|
||||
- power-domains: Should be <&mmcc MDSS_GDSC>.
|
||||
- clocks: Phandles to device clocks. See [1] for details on clock bindings.
|
||||
- clock-names: the following clocks are required:
|
||||
* "iface"
|
||||
* "ref" (only required for new DTS files/entries)
|
||||
For 28nm HPM/LP, 28nm 8960 PHYs:
|
||||
- vddio-supply: phandle to vdd-io regulator device node
|
||||
For 20nm PHY:
|
||||
- vddio-supply: phandle to vdd-io regulator device node
|
||||
- vcca-supply: phandle to vcca regulator device node
|
||||
For 14nm PHY:
|
||||
- vcca-supply: phandle to vcca regulator device node
|
||||
For 10nm and 7nm PHY:
|
||||
- vdds-supply: phandle to vdds regulator device node
|
||||
|
||||
Optional properties:
|
||||
- qcom,dsi-phy-regulator-ldo-mode: Boolean value indicating if the LDO mode PHY
|
||||
regulator is wanted.
|
||||
- qcom,mdss-mdp-transfer-time-us: Specifies the dsi transfer time for command mode
|
||||
panels in microseconds. Driver uses this number to adjust
|
||||
the clock rate according to the expected transfer time.
|
||||
Increasing this value would slow down the mdp processing
|
||||
and can result in slower performance.
|
||||
Decreasing this value can speed up the mdp processing,
|
||||
but this can also impact power consumption.
|
||||
As a rule this time should not be higher than the time
|
||||
that would be expected with the processing at the
|
||||
dsi link rate since anyways this would be the maximum
|
||||
transfer time that could be achieved.
|
||||
If ping pong split is enabled, this time should not be higher
|
||||
than two times the dsi link rate time.
|
||||
If the property is not specified, then the default value is 14000 us.
|
||||
|
||||
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
[2] Documentation/devicetree/bindings/graph.txt
|
||||
[3] Documentation/devicetree/bindings/media/video-interfaces.txt
|
||||
[4] Documentation/devicetree/bindings/display/panel/
|
||||
|
||||
Example:
|
||||
dsi0: dsi@fd922800 {
|
||||
compatible = "qcom,mdss-dsi-ctrl";
|
||||
qcom,dsi-host-index = <0>;
|
||||
interrupt-parent = <&mdp>;
|
||||
interrupts = <4 0>;
|
||||
reg-names = "dsi_ctrl";
|
||||
reg = <0xfd922800 0x200>;
|
||||
power-domains = <&mmcc MDSS_GDSC>;
|
||||
clock-names =
|
||||
"bus",
|
||||
"byte",
|
||||
"core",
|
||||
"core_mmss",
|
||||
"iface",
|
||||
"mdp_core",
|
||||
"pixel";
|
||||
clocks =
|
||||
<&mmcc MDSS_AXI_CLK>,
|
||||
<&mmcc MDSS_BYTE0_CLK>,
|
||||
<&mmcc MDSS_ESC0_CLK>,
|
||||
<&mmcc MMSS_MISC_AHB_CLK>,
|
||||
<&mmcc MDSS_AHB_CLK>,
|
||||
<&mmcc MDSS_MDP_CLK>,
|
||||
<&mmcc MDSS_PCLK0_CLK>;
|
||||
|
||||
assigned-clocks =
|
||||
<&mmcc BYTE0_CLK_SRC>,
|
||||
<&mmcc PCLK0_CLK_SRC>;
|
||||
assigned-clock-parents =
|
||||
<&dsi_phy0 0>,
|
||||
<&dsi_phy0 1>;
|
||||
|
||||
vdda-supply = <&pma8084_l2>;
|
||||
vdd-supply = <&pma8084_l22>;
|
||||
vddio-supply = <&pma8084_l12>;
|
||||
|
||||
phys = <&dsi_phy0>;
|
||||
phy-names ="dsi-phy";
|
||||
|
||||
qcom,dual-dsi-mode;
|
||||
qcom,master-dsi;
|
||||
qcom,sync-dual-dsi;
|
||||
|
||||
qcom,mdss-mdp-transfer-time-us = <12000>;
|
||||
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&dsi_active>;
|
||||
pinctrl-1 = <&dsi_suspend>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
dsi0_in: endpoint {
|
||||
remote-endpoint = <&mdp_intf1_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
dsi0_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
data-lanes = <0 1 2 3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
panel: panel@0 {
|
||||
compatible = "sharp,lq101r1sx01";
|
||||
reg = <0>;
|
||||
link2 = <&secondary>;
|
||||
|
||||
power-supply = <...>;
|
||||
backlight = <...>;
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dsi0_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dsi_phy0: dsi-phy@fd922a00 {
|
||||
compatible = "qcom,dsi-phy-28nm-hpm";
|
||||
qcom,dsi-phy-index = <0>;
|
||||
reg-names =
|
||||
"dsi_pll",
|
||||
"dsi_phy",
|
||||
"dsi_phy_regulator";
|
||||
reg = <0xfd922a00 0xd4>,
|
||||
<0xfd922b00 0x2b0>,
|
||||
<0xfd922d80 0x7b>;
|
||||
clock-names = "iface";
|
||||
clocks = <&mmcc MDSS_AHB_CLK>;
|
||||
#clock-cells = <1>;
|
||||
vddio-supply = <&pma8084_l12>;
|
||||
|
||||
qcom,dsi-phy-regulator-ldo-mode;
|
||||
};
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2014 Red Hat
|
||||
* Copyright (C) 2014 Intel Corp.
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -1609,9 +1610,20 @@ commit:
|
|||
}
|
||||
EXPORT_SYMBOL(__drm_atomic_helper_set_config);
|
||||
|
||||
void drm_atomic_print_state(const struct drm_atomic_state *state)
|
||||
/**
|
||||
* drm_atomic_print_new_state - prints drm atomic state
|
||||
* @state: atomic configuration to check
|
||||
* @p: drm printer
|
||||
*
|
||||
* This functions prints the drm atomic state snapshot using the drm printer
|
||||
* which is passed to it. This snapshot can be used for debugging purposes.
|
||||
*
|
||||
* Note that this function looks into the new state objects and hence its not
|
||||
* safe to be used after the call to drm_atomic_helper_commit_hw_done().
|
||||
*/
|
||||
void drm_atomic_print_new_state(const struct drm_atomic_state *state,
|
||||
struct drm_printer *p)
|
||||
{
|
||||
struct drm_printer p = drm_info_printer(state->dev->dev);
|
||||
struct drm_plane *plane;
|
||||
struct drm_plane_state *plane_state;
|
||||
struct drm_crtc *crtc;
|
||||
|
@ -1620,17 +1632,23 @@ void drm_atomic_print_state(const struct drm_atomic_state *state)
|
|||
struct drm_connector_state *connector_state;
|
||||
int i;
|
||||
|
||||
if (!p) {
|
||||
DRM_ERROR("invalid drm printer\n");
|
||||
return;
|
||||
}
|
||||
|
||||
DRM_DEBUG_ATOMIC("checking %p\n", state);
|
||||
|
||||
for_each_new_plane_in_state(state, plane, plane_state, i)
|
||||
drm_atomic_plane_print_state(&p, plane_state);
|
||||
drm_atomic_plane_print_state(p, plane_state);
|
||||
|
||||
for_each_new_crtc_in_state(state, crtc, crtc_state, i)
|
||||
drm_atomic_crtc_print_state(&p, crtc_state);
|
||||
drm_atomic_crtc_print_state(p, crtc_state);
|
||||
|
||||
for_each_new_connector_in_state(state, connector, connector_state, i)
|
||||
drm_atomic_connector_print_state(&p, connector_state);
|
||||
drm_atomic_connector_print_state(p, connector_state);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_print_new_state);
|
||||
|
||||
static void __drm_state_dump(struct drm_device *dev, struct drm_printer *p,
|
||||
bool take_locks)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (C) 2014 Red Hat
|
||||
* Copyright (C) 2014 Intel Corp.
|
||||
* Copyright (C) 2018 Intel Corp.
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -1321,6 +1322,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
|
|||
struct drm_out_fence_state *fence_state;
|
||||
int ret = 0;
|
||||
unsigned int i, j, num_fences;
|
||||
struct drm_printer p = drm_info_printer(dev->dev);
|
||||
|
||||
/* disallow for drivers not supporting atomic: */
|
||||
if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
|
||||
|
@ -1453,7 +1455,7 @@ retry:
|
|||
ret = drm_atomic_nonblocking_commit(state);
|
||||
} else {
|
||||
if (drm_debug_enabled(DRM_UT_STATE))
|
||||
drm_atomic_print_state(state);
|
||||
drm_atomic_print_new_state(state, &p);
|
||||
|
||||
ret = drm_atomic_commit(state);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Jesse Barnes <jesse.barnes@intel.com>
|
||||
* Copyright © 2014 Intel Corporation
|
||||
* Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
@ -236,7 +237,8 @@ int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
|
|||
int __drm_atomic_helper_set_config(struct drm_mode_set *set,
|
||||
struct drm_atomic_state *state);
|
||||
|
||||
void drm_atomic_print_state(const struct drm_atomic_state *state);
|
||||
void drm_atomic_print_new_state(const struct drm_atomic_state *state,
|
||||
struct drm_printer *p);
|
||||
|
||||
/* drm_atomic_uapi.c */
|
||||
int drm_atomic_connector_commit_dpms(struct drm_atomic_state *state,
|
||||
|
|
|
@ -58,7 +58,6 @@ msm-y := \
|
|||
disp/dpu1/dpu_encoder_phys_cmd.o \
|
||||
disp/dpu1/dpu_encoder_phys_vid.o \
|
||||
disp/dpu1/dpu_formats.o \
|
||||
disp/dpu1/dpu_hw_blk.o \
|
||||
disp/dpu1/dpu_hw_catalog.o \
|
||||
disp/dpu1/dpu_hw_ctl.o \
|
||||
disp/dpu1/dpu_hw_interrupts.o \
|
||||
|
@ -77,6 +76,8 @@ msm-y := \
|
|||
disp/dpu1/dpu_plane.o \
|
||||
disp/dpu1/dpu_rm.o \
|
||||
disp/dpu1/dpu_vbif.o \
|
||||
disp/msm_disp_snapshot.o \
|
||||
disp/msm_disp_snapshot_util.o \
|
||||
msm_atomic.o \
|
||||
msm_atomic_tracepoints.o \
|
||||
msm_debugfs.o \
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -1258,11 +1258,17 @@ static inline uint32_t A2XX_MH_MMU_VA_RANGE_VA_BASE(uint32_t val)
|
|||
|
||||
#define REG_A2XX_NQWAIT_UNTIL 0x00000394
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_SELECT 0x00000395
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER0_SELECT 0x00000395
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_LO 0x00000397
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_SELECT 0x00000396
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_HI 0x00000398
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER0_LO 0x00000397
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER0_HI 0x00000398
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_LO 0x00000399
|
||||
|
||||
#define REG_A2XX_RBBM_PERFCOUNTER1_HI 0x0000039a
|
||||
|
||||
#define REG_A2XX_RBBM_DEBUG 0x0000039b
|
||||
|
||||
|
@ -2922,10 +2928,28 @@ static inline uint32_t A2XX_RB_COPY_DEST_OFFSET_Y(uint32_t val)
|
|||
|
||||
#define REG_A2XX_RB_PERFCOUNTER0_SELECT 0x00000f04
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER1_SELECT 0x00000f05
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER2_SELECT 0x00000f06
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER3_SELECT 0x00000f07
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER0_LOW 0x00000f08
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER0_HI 0x00000f09
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER1_LOW 0x00000f0a
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER1_HI 0x00000f0b
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER2_LOW 0x00000f0c
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER2_HI 0x00000f0d
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER3_LOW 0x00000f0e
|
||||
|
||||
#define REG_A2XX_RB_PERFCOUNTER3_HI 0x00000f0f
|
||||
|
||||
#define REG_A2XX_SQ_TEX_0 0x00000000
|
||||
#define A2XX_SQ_TEX_0_TYPE__MASK 0x00000003
|
||||
#define A2XX_SQ_TEX_0_TYPE__SHIFT 0
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -1215,7 +1215,7 @@ static inline uint32_t A3XX_RB_ALPHA_REF_UINT(uint32_t val)
|
|||
#define A3XX_RB_ALPHA_REF_FLOAT__SHIFT 16
|
||||
static inline uint32_t A3XX_RB_ALPHA_REF_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A3XX_RB_ALPHA_REF_FLOAT__SHIFT) & A3XX_RB_ALPHA_REF_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A3XX_RB_ALPHA_REF_FLOAT__SHIFT) & A3XX_RB_ALPHA_REF_FLOAT__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_A3XX_RB_MRT(uint32_t i0) { return 0x000020c4 + 0x4*i0; }
|
||||
|
@ -1328,7 +1328,7 @@ static inline uint32_t A3XX_RB_BLEND_RED_UINT(uint32_t val)
|
|||
#define A3XX_RB_BLEND_RED_FLOAT__SHIFT 16
|
||||
static inline uint32_t A3XX_RB_BLEND_RED_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A3XX_RB_BLEND_RED_FLOAT__SHIFT) & A3XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A3XX_RB_BLEND_RED_FLOAT__SHIFT) & A3XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_RB_BLEND_GREEN 0x000020e5
|
||||
|
@ -1342,7 +1342,7 @@ static inline uint32_t A3XX_RB_BLEND_GREEN_UINT(uint32_t val)
|
|||
#define A3XX_RB_BLEND_GREEN_FLOAT__SHIFT 16
|
||||
static inline uint32_t A3XX_RB_BLEND_GREEN_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A3XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A3XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A3XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A3XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_RB_BLEND_BLUE 0x000020e6
|
||||
|
@ -1356,7 +1356,7 @@ static inline uint32_t A3XX_RB_BLEND_BLUE_UINT(uint32_t val)
|
|||
#define A3XX_RB_BLEND_BLUE_FLOAT__SHIFT 16
|
||||
static inline uint32_t A3XX_RB_BLEND_BLUE_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A3XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A3XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A3XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A3XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_RB_BLEND_ALPHA 0x000020e7
|
||||
|
@ -1370,7 +1370,7 @@ static inline uint32_t A3XX_RB_BLEND_ALPHA_UINT(uint32_t val)
|
|||
#define A3XX_RB_BLEND_ALPHA_FLOAT__SHIFT 16
|
||||
static inline uint32_t A3XX_RB_BLEND_ALPHA_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A3XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A3XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A3XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A3XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_RB_CLEAR_COLOR_DW0 0x000020e8
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ static inline uint32_t A4XX_RB_BLEND_RED_SINT(uint32_t val)
|
|||
#define A4XX_RB_BLEND_RED_FLOAT__SHIFT 16
|
||||
static inline uint32_t A4XX_RB_BLEND_RED_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A4XX_RB_BLEND_RED_FLOAT__SHIFT) & A4XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A4XX_RB_BLEND_RED_FLOAT__SHIFT) & A4XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_RB_BLEND_RED_F32 0x000020f1
|
||||
|
@ -1113,7 +1113,7 @@ static inline uint32_t A4XX_RB_BLEND_GREEN_SINT(uint32_t val)
|
|||
#define A4XX_RB_BLEND_GREEN_FLOAT__SHIFT 16
|
||||
static inline uint32_t A4XX_RB_BLEND_GREEN_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A4XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A4XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A4XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A4XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_RB_BLEND_GREEN_F32 0x000020f3
|
||||
|
@ -1141,7 +1141,7 @@ static inline uint32_t A4XX_RB_BLEND_BLUE_SINT(uint32_t val)
|
|||
#define A4XX_RB_BLEND_BLUE_FLOAT__SHIFT 16
|
||||
static inline uint32_t A4XX_RB_BLEND_BLUE_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A4XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A4XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A4XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A4XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_RB_BLEND_BLUE_F32 0x000020f5
|
||||
|
@ -1169,7 +1169,7 @@ static inline uint32_t A4XX_RB_BLEND_ALPHA_SINT(uint32_t val)
|
|||
#define A4XX_RB_BLEND_ALPHA_FLOAT__SHIFT 16
|
||||
static inline uint32_t A4XX_RB_BLEND_ALPHA_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A4XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A4XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A4XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A4XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_RB_BLEND_ALPHA_F32 0x000020f7
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -2021,6 +2021,7 @@ static inline uint32_t A5XX_RBBM_STATUS_CP_ME_BUSY(uint32_t val)
|
|||
#define A5XX_RBBM_STATUS_HI_BUSY 0x00000001
|
||||
|
||||
#define REG_A5XX_RBBM_STATUS3 0x00000530
|
||||
#define A5XX_RBBM_STATUS3_SMMU_STALLED_ON_FAULT 0x01000000
|
||||
|
||||
#define REG_A5XX_RBBM_INT_0_STATUS 0x000004e1
|
||||
|
||||
|
@ -2351,6 +2352,7 @@ static inline uint32_t A5XX_VSC_RESOLVE_CNTL_Y(uint32_t val)
|
|||
#define REG_A5XX_VFD_PERFCTR_VFD_SEL_7 0x00000e57
|
||||
|
||||
#define REG_A5XX_VPC_DBG_ECO_CNTL 0x00000e60
|
||||
#define A5XX_VPC_DBG_ECO_CNTL_ALLFLATOPTDIS 0x00000400
|
||||
|
||||
#define REG_A5XX_VPC_ADDR_MODE_CNTL 0x00000e61
|
||||
|
||||
|
@ -2808,7 +2810,19 @@ static inline uint32_t A5XX_VSC_RESOLVE_CNTL_Y(uint32_t val)
|
|||
#define REG_A5XX_GRAS_CL_CNTL 0x0000e000
|
||||
#define A5XX_GRAS_CL_CNTL_ZERO_GB_SCALE_Z 0x00000040
|
||||
|
||||
#define REG_A5XX_UNKNOWN_E001 0x0000e001
|
||||
#define REG_A5XX_GRAS_VS_CL_CNTL 0x0000e001
|
||||
#define A5XX_GRAS_VS_CL_CNTL_CLIP_MASK__MASK 0x000000ff
|
||||
#define A5XX_GRAS_VS_CL_CNTL_CLIP_MASK__SHIFT 0
|
||||
static inline uint32_t A5XX_GRAS_VS_CL_CNTL_CLIP_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_GRAS_VS_CL_CNTL_CLIP_MASK__SHIFT) & A5XX_GRAS_VS_CL_CNTL_CLIP_MASK__MASK;
|
||||
}
|
||||
#define A5XX_GRAS_VS_CL_CNTL_CULL_MASK__MASK 0x0000ff00
|
||||
#define A5XX_GRAS_VS_CL_CNTL_CULL_MASK__SHIFT 8
|
||||
static inline uint32_t A5XX_GRAS_VS_CL_CNTL_CULL_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_GRAS_VS_CL_CNTL_CULL_MASK__SHIFT) & A5XX_GRAS_VS_CL_CNTL_CULL_MASK__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_UNKNOWN_E004 0x0000e004
|
||||
|
||||
|
@ -3345,7 +3359,7 @@ static inline uint32_t A5XX_RB_BLEND_RED_SINT(uint32_t val)
|
|||
#define A5XX_RB_BLEND_RED_FLOAT__SHIFT 16
|
||||
static inline uint32_t A5XX_RB_BLEND_RED_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A5XX_RB_BLEND_RED_FLOAT__SHIFT) & A5XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A5XX_RB_BLEND_RED_FLOAT__SHIFT) & A5XX_RB_BLEND_RED_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_BLEND_RED_F32 0x0000e1a1
|
||||
|
@ -3373,7 +3387,7 @@ static inline uint32_t A5XX_RB_BLEND_GREEN_SINT(uint32_t val)
|
|||
#define A5XX_RB_BLEND_GREEN_FLOAT__SHIFT 16
|
||||
static inline uint32_t A5XX_RB_BLEND_GREEN_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A5XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A5XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A5XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A5XX_RB_BLEND_GREEN_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_BLEND_GREEN_F32 0x0000e1a3
|
||||
|
@ -3401,7 +3415,7 @@ static inline uint32_t A5XX_RB_BLEND_BLUE_SINT(uint32_t val)
|
|||
#define A5XX_RB_BLEND_BLUE_FLOAT__SHIFT 16
|
||||
static inline uint32_t A5XX_RB_BLEND_BLUE_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A5XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A5XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A5XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A5XX_RB_BLEND_BLUE_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_BLEND_BLUE_F32 0x0000e1a5
|
||||
|
@ -3429,7 +3443,7 @@ static inline uint32_t A5XX_RB_BLEND_ALPHA_SINT(uint32_t val)
|
|||
#define A5XX_RB_BLEND_ALPHA_FLOAT__SHIFT 16
|
||||
static inline uint32_t A5XX_RB_BLEND_ALPHA_FLOAT(float val)
|
||||
{
|
||||
return ((util_float_to_half(val)) << A5XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A5XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
return ((_mesa_float_to_half(val)) << A5XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A5XX_RB_BLEND_ALPHA_FLOAT__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_BLEND_ALPHA_F32 0x0000e1a7
|
||||
|
@ -3806,7 +3820,25 @@ static inline uint32_t REG_A5XX_VPC_VAR_DISABLE(uint32_t i0) { return 0x0000e294
|
|||
|
||||
#define REG_A5XX_VPC_GS_SIV_CNTL 0x0000e298
|
||||
|
||||
#define REG_A5XX_UNKNOWN_E29A 0x0000e29a
|
||||
#define REG_A5XX_VPC_CLIP_CNTL 0x0000e29a
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_MASK__MASK 0x000000ff
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_MASK__SHIFT 0
|
||||
static inline uint32_t A5XX_VPC_CLIP_CNTL_CLIP_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_VPC_CLIP_CNTL_CLIP_MASK__SHIFT) & A5XX_VPC_CLIP_CNTL_CLIP_MASK__MASK;
|
||||
}
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_DIST_03_LOC__MASK 0x0000ff00
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_DIST_03_LOC__SHIFT 8
|
||||
static inline uint32_t A5XX_VPC_CLIP_CNTL_CLIP_DIST_03_LOC(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_VPC_CLIP_CNTL_CLIP_DIST_03_LOC__SHIFT) & A5XX_VPC_CLIP_CNTL_CLIP_DIST_03_LOC__MASK;
|
||||
}
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_DIST_47_LOC__MASK 0x00ff0000
|
||||
#define A5XX_VPC_CLIP_CNTL_CLIP_DIST_47_LOC__SHIFT 16
|
||||
static inline uint32_t A5XX_VPC_CLIP_CNTL_CLIP_DIST_47_LOC(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_VPC_CLIP_CNTL_CLIP_DIST_47_LOC__SHIFT) & A5XX_VPC_CLIP_CNTL_CLIP_DIST_47_LOC__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_VPC_PACK 0x0000e29d
|
||||
#define A5XX_VPC_PACK_NUMNONPOSVAR__MASK 0x000000ff
|
||||
|
@ -3910,7 +3942,13 @@ static inline uint32_t A5XX_PC_RASTER_CNTL_POLYMODE_BACK_PTYPE(enum adreno_pa_su
|
|||
}
|
||||
#define A5XX_PC_RASTER_CNTL_POLYMODE_ENABLE 0x00000040
|
||||
|
||||
#define REG_A5XX_UNKNOWN_E389 0x0000e389
|
||||
#define REG_A5XX_PC_CLIP_CNTL 0x0000e389
|
||||
#define A5XX_PC_CLIP_CNTL_CLIP_MASK__MASK 0x000000ff
|
||||
#define A5XX_PC_CLIP_CNTL_CLIP_MASK__SHIFT 0
|
||||
static inline uint32_t A5XX_PC_CLIP_CNTL_CLIP_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_PC_CLIP_CNTL_CLIP_MASK__SHIFT) & A5XX_PC_CLIP_CNTL_CLIP_MASK__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_PC_RESTART_INDEX 0x0000e38c
|
||||
|
||||
|
@ -4302,7 +4340,12 @@ static inline uint32_t A5XX_SP_FS_CTRL_REG0_BRANCHSTACK(uint32_t val)
|
|||
#define REG_A5XX_SP_FS_OBJ_START_HI 0x0000e5c4
|
||||
|
||||
#define REG_A5XX_SP_BLEND_CNTL 0x0000e5c9
|
||||
#define A5XX_SP_BLEND_CNTL_ENABLED 0x00000001
|
||||
#define A5XX_SP_BLEND_CNTL_ENABLE_BLEND__MASK 0x000000ff
|
||||
#define A5XX_SP_BLEND_CNTL_ENABLE_BLEND__SHIFT 0
|
||||
static inline uint32_t A5XX_SP_BLEND_CNTL_ENABLE_BLEND(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_SP_BLEND_CNTL_ENABLE_BLEND__SHIFT) & A5XX_SP_BLEND_CNTL_ENABLE_BLEND__MASK;
|
||||
}
|
||||
#define A5XX_SP_BLEND_CNTL_UNK8 0x00000100
|
||||
#define A5XX_SP_BLEND_CNTL_ALPHA_TO_COVERAGE 0x00000400
|
||||
|
||||
|
@ -5192,8 +5235,8 @@ static inline uint32_t A5XX_TEX_SAMP_1_MIN_LOD(float val)
|
|||
}
|
||||
|
||||
#define REG_A5XX_TEX_SAMP_2 0x00000002
|
||||
#define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK 0xfffffff0
|
||||
#define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT 4
|
||||
#define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK 0xffffff80
|
||||
#define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT 7
|
||||
static inline uint32_t A5XX_TEX_SAMP_2_BCOLOR_OFFSET(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT) & A5XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK;
|
||||
|
@ -5273,6 +5316,7 @@ static inline uint32_t A5XX_TEX_CONST_1_HEIGHT(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A5XX_TEX_CONST_2 0x00000002
|
||||
#define A5XX_TEX_CONST_2_UNK4 0x00000010
|
||||
#define A5XX_TEX_CONST_2_PITCHALIGN__MASK 0x0000000f
|
||||
#define A5XX_TEX_CONST_2_PITCHALIGN__SHIFT 0
|
||||
static inline uint32_t A5XX_TEX_CONST_2_PITCHALIGN(uint32_t val)
|
||||
|
@ -5291,6 +5335,7 @@ static inline uint32_t A5XX_TEX_CONST_2_TYPE(enum a5xx_tex_type val)
|
|||
{
|
||||
return ((val) << A5XX_TEX_CONST_2_TYPE__SHIFT) & A5XX_TEX_CONST_2_TYPE__MASK;
|
||||
}
|
||||
#define A5XX_TEX_CONST_2_UNK31 0x80000000
|
||||
|
||||
#define REG_A5XX_TEX_CONST_3 0x00000003
|
||||
#define A5XX_TEX_CONST_3_ARRAY_PITCH__MASK 0x00003fff
|
||||
|
|
|
@ -902,7 +902,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
|
|||
if (!a5xx_gpu->shadow_bo) {
|
||||
a5xx_gpu->shadow = msm_gem_kernel_new(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_UNCACHED | MSM_BO_MAP_PRIV,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a5xx_gpu->shadow_bo,
|
||||
&a5xx_gpu->shadow_iova);
|
||||
|
||||
|
@ -1075,7 +1075,7 @@ bool a5xx_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
|
|||
return true;
|
||||
}
|
||||
|
||||
static int a5xx_fault_handler(void *arg, unsigned long iova, int flags)
|
||||
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",
|
||||
|
@ -1085,7 +1085,7 @@ static int a5xx_fault_handler(void *arg, unsigned long iova, int flags)
|
|||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(6)),
|
||||
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(7)));
|
||||
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void a5xx_cp_err_irq(struct msm_gpu *gpu)
|
||||
|
@ -1200,6 +1200,15 @@ static void a5xx_fault_detect_irq(struct msm_gpu *gpu)
|
|||
struct drm_device *dev = gpu->dev;
|
||||
struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu);
|
||||
|
||||
/*
|
||||
* If stalled on SMMU fault, we could trip the GPU's hang detection,
|
||||
* but the fault handler will trigger the devcore dump, and we want
|
||||
* to otherwise resume normally rather than killing the submit, so
|
||||
* just bail.
|
||||
*/
|
||||
if (gpu_read(gpu, REG_A5XX_RBBM_STATUS3) & BIT(24))
|
||||
return;
|
||||
|
||||
DRM_DEV_ERROR(dev->dev, "gpu fault ring %d fence %x status %8.8X rb %4.4x/%4.4x ib1 %16.16llX/%4.4x ib2 %16.16llX/%4.4x\n",
|
||||
ring ? ring->id : -1, ring ? ring->seqno : 0,
|
||||
gpu_read(gpu, REG_A5XX_RBBM_STATUS),
|
||||
|
@ -1407,7 +1416,7 @@ static int a5xx_crashdumper_init(struct msm_gpu *gpu,
|
|||
struct a5xx_crashdumper *dumper)
|
||||
{
|
||||
dumper->ptr = msm_gem_kernel_new_locked(gpu->dev,
|
||||
SZ_1M, MSM_BO_UNCACHED, gpu->aspace,
|
||||
SZ_1M, MSM_BO_WC, gpu->aspace,
|
||||
&dumper->bo, &dumper->iova);
|
||||
|
||||
if (!IS_ERR(dumper->ptr))
|
||||
|
@ -1523,6 +1532,7 @@ static struct msm_gpu_state *a5xx_gpu_state_get(struct msm_gpu *gpu)
|
|||
{
|
||||
struct a5xx_gpu_state *a5xx_state = kzalloc(sizeof(*a5xx_state),
|
||||
GFP_KERNEL);
|
||||
bool stalled = !!(gpu_read(gpu, REG_A5XX_RBBM_STATUS3) & BIT(24));
|
||||
|
||||
if (!a5xx_state)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -1535,8 +1545,13 @@ static struct msm_gpu_state *a5xx_gpu_state_get(struct msm_gpu *gpu)
|
|||
|
||||
a5xx_state->base.rbbm_status = gpu_read(gpu, REG_A5XX_RBBM_STATUS);
|
||||
|
||||
/* Get the HLSQ regs with the help of the crashdumper */
|
||||
a5xx_gpu_state_get_hlsq_regs(gpu, a5xx_state);
|
||||
/*
|
||||
* Get the HLSQ regs with the help of the crashdumper, but only if
|
||||
* we are not stalled in an iommu fault (in which case the crashdumper
|
||||
* would not have access to memory)
|
||||
*/
|
||||
if (!stalled)
|
||||
a5xx_gpu_state_get_hlsq_regs(gpu, a5xx_state);
|
||||
|
||||
a5xx_set_hwcg(gpu, true);
|
||||
|
||||
|
@ -1705,7 +1720,7 @@ static void check_speed_bin(struct device *dev)
|
|||
nvmem_cell_put(cell);
|
||||
}
|
||||
|
||||
dev_pm_opp_set_supported_hw(dev, &val, 1);
|
||||
devm_pm_opp_set_supported_hw(dev, &val, 1);
|
||||
}
|
||||
|
||||
struct msm_gpu *a5xx_gpu_init(struct drm_device *dev)
|
||||
|
|
|
@ -363,7 +363,7 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
|
|||
bosize = (cmds_size + (cmds_size / TYPE4_MAX_PAYLOAD) + 1) << 2;
|
||||
|
||||
ptr = msm_gem_kernel_new_locked(drm, bosize,
|
||||
MSM_BO_UNCACHED | MSM_BO_GPU_READONLY, gpu->aspace,
|
||||
MSM_BO_WC | MSM_BO_GPU_READONLY, gpu->aspace,
|
||||
&a5xx_gpu->gpmu_bo, &a5xx_gpu->gpmu_iova);
|
||||
if (IS_ERR(ptr))
|
||||
return;
|
||||
|
|
|
@ -230,7 +230,7 @@ static int preempt_init_ring(struct a5xx_gpu *a5xx_gpu,
|
|||
|
||||
ptr = msm_gem_kernel_new(gpu->dev,
|
||||
A5XX_PREEMPT_RECORD_SIZE + A5XX_PREEMPT_COUNTER_SIZE,
|
||||
MSM_BO_UNCACHED | MSM_BO_MAP_PRIV, gpu->aspace, &bo, &iova);
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV, gpu->aspace, &bo, &iova);
|
||||
|
||||
if (IS_ERR(ptr))
|
||||
return PTR_ERR(ptr);
|
||||
|
@ -238,7 +238,7 @@ static int preempt_init_ring(struct a5xx_gpu *a5xx_gpu,
|
|||
/* The buffer to store counters needs to be unprivileged */
|
||||
counters = msm_gem_kernel_new(gpu->dev,
|
||||
A5XX_PREEMPT_COUNTER_SIZE,
|
||||
MSM_BO_UNCACHED, gpu->aspace, &counters_bo, &counters_iova);
|
||||
MSM_BO_WC, gpu->aspace, &counters_bo, &counters_iova);
|
||||
if (IS_ERR(counters)) {
|
||||
msm_gem_kernel_put(bo, gpu->aspace, true);
|
||||
return PTR_ERR(counters);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -512,19 +512,26 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
|
|||
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
|
||||
struct platform_device *pdev = to_platform_device(gmu->dev);
|
||||
void __iomem *pdcptr = a6xx_gmu_get_mmio(pdev, "gmu_pdc");
|
||||
void __iomem *seqptr = a6xx_gmu_get_mmio(pdev, "gmu_pdc_seq");
|
||||
void __iomem *seqptr;
|
||||
uint32_t pdc_address_offset;
|
||||
bool pdc_in_aop = false;
|
||||
|
||||
if (!pdcptr || !seqptr)
|
||||
if (!pdcptr)
|
||||
goto err;
|
||||
|
||||
if (adreno_is_a618(adreno_gpu) || adreno_is_a640(adreno_gpu))
|
||||
if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu))
|
||||
pdc_in_aop = true;
|
||||
else if (adreno_is_a618(adreno_gpu) || adreno_is_a640(adreno_gpu))
|
||||
pdc_address_offset = 0x30090;
|
||||
else if (adreno_is_a650(adreno_gpu))
|
||||
pdc_address_offset = 0x300a0;
|
||||
else
|
||||
pdc_address_offset = 0x30080;
|
||||
|
||||
if (!pdc_in_aop) {
|
||||
seqptr = a6xx_gmu_get_mmio(pdev, "gmu_pdc_seq");
|
||||
if (!seqptr)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Disable SDE clock gating */
|
||||
gmu_write_rscc(gmu, REG_A6XX_GPU_RSCC_RSC_STATUS0_DRV0, BIT(24));
|
||||
|
||||
|
@ -542,7 +549,7 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
|
|||
gmu_write_rscc(gmu, REG_A6XX_RSCC_PDC_MATCH_VALUE_HI, 0x4514);
|
||||
|
||||
/* Load RSC sequencer uCode for sleep and wakeup */
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
gmu_write_rscc(gmu, REG_A6XX_RSCC_SEQ_MEM_0_DRV0, 0xeaaae5a0);
|
||||
gmu_write_rscc(gmu, REG_A6XX_RSCC_SEQ_MEM_0_DRV0 + 1, 0xe1a1ebab);
|
||||
gmu_write_rscc(gmu, REG_A6XX_RSCC_SEQ_MEM_0_DRV0 + 2, 0xa2e0a581);
|
||||
|
@ -556,6 +563,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
|
|||
gmu_write_rscc(gmu, REG_A6XX_RSCC_SEQ_MEM_0_DRV0 + 4, 0x0020e8a8);
|
||||
}
|
||||
|
||||
if (pdc_in_aop)
|
||||
goto setup_pdc;
|
||||
|
||||
/* Load PDC sequencer uCode for power up and power down sequence */
|
||||
pdc_write(seqptr, REG_A6XX_PDC_GPU_SEQ_MEM_0, 0xfebea1e1);
|
||||
pdc_write(seqptr, REG_A6XX_PDC_GPU_SEQ_MEM_0 + 1, 0xa5a4a3a2);
|
||||
|
@ -587,7 +597,7 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
|
|||
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_TCS3_CMD0_MSGID + 4, 0x10108);
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_TCS3_CMD0_ADDR + 4, 0x30000);
|
||||
if (adreno_is_a618(adreno_gpu) || adreno_is_a650(adreno_gpu))
|
||||
if (adreno_is_a618(adreno_gpu) || adreno_is_a650_family(adreno_gpu))
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_TCS3_CMD0_DATA + 4, 0x2);
|
||||
else
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_TCS3_CMD0_DATA + 4, 0x3);
|
||||
|
@ -596,6 +606,7 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
|
|||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_TCS3_CMD0_DATA + 8, 0x3);
|
||||
|
||||
/* Setup GPU PDC */
|
||||
setup_pdc:
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_SEQ_START_ADDR, 0);
|
||||
pdc_write(pdcptr, REG_A6XX_PDC_GPU_ENABLE_PDC, 0x80000001);
|
||||
|
||||
|
@ -687,7 +698,7 @@ static int a6xx_gmu_fw_load(struct a6xx_gmu *gmu)
|
|||
u32 itcm_base = 0x00000000;
|
||||
u32 dtcm_base = 0x00040000;
|
||||
|
||||
if (adreno_is_a650(adreno_gpu))
|
||||
if (adreno_is_a650_family(adreno_gpu))
|
||||
dtcm_base = 0x10004000;
|
||||
|
||||
if (gmu->legacy) {
|
||||
|
@ -740,8 +751,10 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
|
|||
int ret;
|
||||
u32 chipid;
|
||||
|
||||
if (adreno_is_a650(adreno_gpu))
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
gmu_write(gmu, REG_A6XX_GPU_GMU_CX_GMU_CX_FALNEXT_INTF, 1);
|
||||
gmu_write(gmu, REG_A6XX_GPU_GMU_CX_GMU_CX_FAL_INTF, 1);
|
||||
}
|
||||
|
||||
if (state == GMU_WARM_BOOT) {
|
||||
ret = a6xx_rpmh_start(gmu);
|
||||
|
@ -1346,7 +1359,7 @@ static int a6xx_gmu_pwrlevels_probe(struct a6xx_gmu *gmu)
|
|||
* The GMU handles its own frequency switching so build a list of
|
||||
* available frequencies to send during initialization
|
||||
*/
|
||||
ret = dev_pm_opp_of_add_table(gmu->dev);
|
||||
ret = devm_pm_opp_of_add_table(gmu->dev);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(gmu->dev, "Unable to set the OPP table for the GMU\n");
|
||||
return ret;
|
||||
|
@ -1483,12 +1496,28 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
|||
if (ret)
|
||||
goto err_put_device;
|
||||
|
||||
|
||||
/* A660 now requires handling "prealloc requests" in GMU firmware
|
||||
* For now just hardcode allocations based on the known firmware.
|
||||
* note: there is no indication that these correspond to "dummy" or
|
||||
* "debug" regions, but this "guess" allows reusing these BOs which
|
||||
* are otherwise unused by a660.
|
||||
*/
|
||||
gmu->dummy.size = SZ_4K;
|
||||
if (adreno_is_a660(adreno_gpu)) {
|
||||
ret = a6xx_gmu_memory_alloc(gmu, &gmu->debug, SZ_4K * 7, 0x60400000);
|
||||
if (ret)
|
||||
goto err_memory;
|
||||
|
||||
gmu->dummy.size = SZ_8K;
|
||||
}
|
||||
|
||||
/* Allocate memory for the GMU dummy page */
|
||||
ret = a6xx_gmu_memory_alloc(gmu, &gmu->dummy, SZ_4K, 0x60000000);
|
||||
ret = a6xx_gmu_memory_alloc(gmu, &gmu->dummy, gmu->dummy.size, 0x60000000);
|
||||
if (ret)
|
||||
goto err_memory;
|
||||
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
ret = a6xx_gmu_memory_alloc(gmu, &gmu->icache,
|
||||
SZ_16M - SZ_16K, 0x04000);
|
||||
if (ret)
|
||||
|
@ -1530,7 +1559,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
|
|||
goto err_memory;
|
||||
}
|
||||
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
gmu->rscc = a6xx_gmu_get_mmio(pdev, "rscc");
|
||||
if (IS_ERR(gmu->rscc))
|
||||
goto err_mmio;
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -292,6 +292,8 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val)
|
|||
|
||||
#define REG_A6XX_GPU_GMU_CX_GMU_CX_FAL_INTF 0x000050f0
|
||||
|
||||
#define REG_A6XX_GPU_GMU_CX_GMU_CX_FALNEXT_INTF 0x000050f1
|
||||
|
||||
#define REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_MSG 0x00005100
|
||||
|
||||
#define REG_A6XX_GPU_GMU_CX_GMU_PWR_COL_CP_RESP 0x00005101
|
||||
|
@ -439,6 +441,8 @@ static inline uint32_t A6XX_GMU_GPU_NAP_CTRL_SID(uint32_t val)
|
|||
|
||||
#define REG_A6XX_GPU_CC_GX_DOMAIN_MISC 0x00009d42
|
||||
|
||||
#define REG_A6XX_GPU_CPR_FSM_CTL 0x0000c001
|
||||
|
||||
#define REG_A6XX_GPU_RSCC_RSC_STATUS0_DRV0 0x00000004
|
||||
|
||||
#define REG_A6XX_RSCC_PDC_SEQ_START_ADDR 0x00000008
|
||||
|
|
|
@ -149,7 +149,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
|
|||
|
||||
a6xx_set_pagetable(a6xx_gpu, ring, submit->queue->ctx);
|
||||
|
||||
get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP_0_LO,
|
||||
get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP(0),
|
||||
rbmemptr_stats(ring, index, cpcycles_start));
|
||||
|
||||
/*
|
||||
|
@ -185,7 +185,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
|
|||
}
|
||||
}
|
||||
|
||||
get_stats_counter(ring, REG_A6XX_RBBM_PERFCTR_CP_0_LO,
|
||||
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,
|
||||
rbmemptr_stats(ring, index, alwayson_end));
|
||||
|
@ -427,6 +427,59 @@ const struct adreno_reglist a650_hwcg[] = {
|
|||
{},
|
||||
};
|
||||
|
||||
const struct adreno_reglist a660_hwcg[] = {
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_SP0, 0x02222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL2_SP0, 0x02222220},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_SP0, 0x00000080},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_SP0, 0x0000F3CF},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_TP0, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL2_TP0, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL3_TP0, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL4_TP0, 0x00022222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_TP0, 0x11111111},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY2_TP0, 0x11111111},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY3_TP0, 0x11111111},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY4_TP0, 0x00011111},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_TP0, 0x77777777},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST2_TP0, 0x77777777},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST3_TP0, 0x77777777},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST4_TP0, 0x00077777},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_RB0, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL2_RB0, 0x01002222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_CCU0, 0x00002220},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_RB_CCU0, 0x00040F00},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_RAC, 0x25222022},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL2_RAC, 0x00005555},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_RAC, 0x00000011},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_RAC, 0x00445044},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_TSE_RAS_RBBM, 0x04222222},
|
||||
{REG_A6XX_RBBM_CLOCK_MODE_VFD, 0x00002222},
|
||||
{REG_A6XX_RBBM_CLOCK_MODE_GPC, 0x00222222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_HLSQ_2, 0x00000002},
|
||||
{REG_A6XX_RBBM_CLOCK_MODE_HLSQ, 0x00002222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_TSE_RAS_RBBM, 0x00004000},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_VFD, 0x00002222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_GPC, 0x00000200},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_HLSQ, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_TSE_RAS_RBBM, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_VFD, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_GPC, 0x04104004},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_HLSQ, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_TEX_FCHE, 0x00000222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_TEX_FCHE, 0x00000111},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_TEX_FCHE, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_UCHE, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_UCHE, 0x00000004},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_UCHE, 0x00000002},
|
||||
{REG_A6XX_RBBM_ISDB_CNT, 0x00000182},
|
||||
{REG_A6XX_RBBM_RAC_THRESHOLD_CNT, 0x00000000},
|
||||
{REG_A6XX_RBBM_SP_HYST_CNT, 0x00000000},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX, 0x00000222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX, 0x00000111},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555},
|
||||
{},
|
||||
};
|
||||
|
||||
static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
|
@ -541,6 +594,51 @@ static const u32 a650_protect[] = {
|
|||
A6XX_PROTECT_NORDWR(0x1f8c0, 0x0000), /* note: infinite range */
|
||||
};
|
||||
|
||||
/* These are for a635 and a660 */
|
||||
static const u32 a660_protect[] = {
|
||||
A6XX_PROTECT_RDONLY(0x00000, 0x04ff),
|
||||
A6XX_PROTECT_RDONLY(0x00501, 0x0005),
|
||||
A6XX_PROTECT_RDONLY(0x0050b, 0x02f4),
|
||||
A6XX_PROTECT_NORDWR(0x0050e, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x00510, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x00534, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x00800, 0x0082),
|
||||
A6XX_PROTECT_NORDWR(0x008a0, 0x0008),
|
||||
A6XX_PROTECT_NORDWR(0x008ab, 0x0024),
|
||||
A6XX_PROTECT_RDONLY(0x008de, 0x00ae),
|
||||
A6XX_PROTECT_NORDWR(0x00900, 0x004d),
|
||||
A6XX_PROTECT_NORDWR(0x0098d, 0x0272),
|
||||
A6XX_PROTECT_NORDWR(0x00e00, 0x0001),
|
||||
A6XX_PROTECT_NORDWR(0x00e03, 0x000c),
|
||||
A6XX_PROTECT_NORDWR(0x03c00, 0x00c3),
|
||||
A6XX_PROTECT_RDONLY(0x03cc4, 0x1fff),
|
||||
A6XX_PROTECT_NORDWR(0x08630, 0x01cf),
|
||||
A6XX_PROTECT_NORDWR(0x08e00, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x08e08, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x08e50, 0x001f),
|
||||
A6XX_PROTECT_NORDWR(0x08e80, 0x027f),
|
||||
A6XX_PROTECT_NORDWR(0x09624, 0x01db),
|
||||
A6XX_PROTECT_NORDWR(0x09e60, 0x0011),
|
||||
A6XX_PROTECT_NORDWR(0x09e78, 0x0187),
|
||||
A6XX_PROTECT_NORDWR(0x0a630, 0x01cf),
|
||||
A6XX_PROTECT_NORDWR(0x0ae02, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x0ae50, 0x012f),
|
||||
A6XX_PROTECT_NORDWR(0x0b604, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x0b608, 0x0006),
|
||||
A6XX_PROTECT_NORDWR(0x0be02, 0x0001),
|
||||
A6XX_PROTECT_NORDWR(0x0be20, 0x015f),
|
||||
A6XX_PROTECT_NORDWR(0x0d000, 0x05ff),
|
||||
A6XX_PROTECT_NORDWR(0x0f000, 0x0bff),
|
||||
A6XX_PROTECT_RDONLY(0x0fc00, 0x1fff),
|
||||
A6XX_PROTECT_NORDWR(0x18400, 0x1fff),
|
||||
A6XX_PROTECT_NORDWR(0x1a400, 0x1fff),
|
||||
A6XX_PROTECT_NORDWR(0x1f400, 0x0443),
|
||||
A6XX_PROTECT_RDONLY(0x1f844, 0x007b),
|
||||
A6XX_PROTECT_NORDWR(0x1f860, 0x0000),
|
||||
A6XX_PROTECT_NORDWR(0x1f887, 0x001b),
|
||||
A6XX_PROTECT_NORDWR(0x1f8c0, 0x0000), /* note: infinite range */
|
||||
};
|
||||
|
||||
static void a6xx_set_cp_protect(struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
|
@ -554,6 +652,10 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu)
|
|||
regs = a650_protect;
|
||||
count = ARRAY_SIZE(a650_protect);
|
||||
count_max = 48;
|
||||
} else if (adreno_is_a660(adreno_gpu)) {
|
||||
regs = a660_protect;
|
||||
count = ARRAY_SIZE(a660_protect);
|
||||
count_max = 48;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -584,7 +686,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
|
|||
if (adreno_is_a640(adreno_gpu))
|
||||
amsbc = 1;
|
||||
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu)) {
|
||||
/* TODO: get ddr type from bootloader and use 2 for LPDDR4 */
|
||||
lower_bit = 3;
|
||||
amsbc = 1;
|
||||
|
@ -648,6 +750,11 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
|
|||
* Targets up to a640 (a618, a630 and a640) need to check for a
|
||||
* microcode version that is patched to support the whereami opcode or
|
||||
* one that is new enough to include it by default.
|
||||
*
|
||||
* a650 tier targets don't need whereami but still need to be
|
||||
* equal to or newer than 0.95 for other security fixes
|
||||
*
|
||||
* a660 targets have all the critical security fixes from the start
|
||||
*/
|
||||
if (adreno_is_a618(adreno_gpu) || adreno_is_a630(adreno_gpu) ||
|
||||
adreno_is_a640(adreno_gpu)) {
|
||||
|
@ -671,27 +778,20 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
|
|||
DRM_DEV_ERROR(&gpu->pdev->dev,
|
||||
"a630 SQE ucode is too old. Have version %x need at least %x\n",
|
||||
buf[0] & 0xfff, 0x190);
|
||||
} else {
|
||||
/*
|
||||
* a650 tier targets don't need whereami but still need to be
|
||||
* equal to or newer than 0.95 for other security fixes
|
||||
*/
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if ((buf[0] & 0xfff) >= 0x095) {
|
||||
ret = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
DRM_DEV_ERROR(&gpu->pdev->dev,
|
||||
"a650 SQE ucode is too old. Have version %x need at least %x\n",
|
||||
buf[0] & 0xfff, 0x095);
|
||||
} else if (adreno_is_a650(adreno_gpu)) {
|
||||
if ((buf[0] & 0xfff) >= 0x095) {
|
||||
ret = true;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* When a660 is added those targets should return true here
|
||||
* since those have all the critical security fixes built in
|
||||
* from the start
|
||||
*/
|
||||
DRM_DEV_ERROR(&gpu->pdev->dev,
|
||||
"a650 SQE ucode is too old. Have version %x need at least %x\n",
|
||||
buf[0] & 0xfff, 0x095);
|
||||
} else if (adreno_is_a660(adreno_gpu)) {
|
||||
ret = true;
|
||||
} else {
|
||||
DRM_DEV_ERROR(&gpu->pdev->dev,
|
||||
"unknown GPU, add it to a6xx_ucode_check_version()!!\n");
|
||||
}
|
||||
out:
|
||||
msm_gem_put_vaddr(obj);
|
||||
|
@ -727,8 +827,8 @@ static int a6xx_ucode_init(struct msm_gpu *gpu)
|
|||
}
|
||||
}
|
||||
|
||||
gpu_write64(gpu, REG_A6XX_CP_SQE_INSTR_BASE_LO,
|
||||
REG_A6XX_CP_SQE_INSTR_BASE_HI, a6xx_gpu->sqe_iova);
|
||||
gpu_write64(gpu, REG_A6XX_CP_SQE_INSTR_BASE,
|
||||
REG_A6XX_CP_SQE_INSTR_BASE+1, a6xx_gpu->sqe_iova);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -797,7 +897,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
a6xx_set_hwcg(gpu, true);
|
||||
|
||||
/* VBIF/GBIF start*/
|
||||
if (adreno_is_a640(adreno_gpu) || adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a640(adreno_gpu) || adreno_is_a650_family(adreno_gpu)) {
|
||||
gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE0, 0x00071620);
|
||||
gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE1, 0x00071620);
|
||||
gpu_write(gpu, REG_A6XX_GBIF_QSB_SIDE2, 0x00071620);
|
||||
|
@ -822,7 +922,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_THRU_BASE_LO, 0xfffff000);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_WRITE_THRU_BASE_HI, 0x0001ffff);
|
||||
|
||||
if (!adreno_is_a650(adreno_gpu)) {
|
||||
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,
|
||||
REG_A6XX_UCHE_GMEM_RANGE_MIN_HI, 0x00100000);
|
||||
|
@ -835,22 +935,27 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_UCHE_FILTER_CNTL, 0x804);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_CACHE_WAYS, 0x4);
|
||||
|
||||
if (adreno_is_a640(adreno_gpu) || adreno_is_a650(adreno_gpu))
|
||||
if (adreno_is_a640(adreno_gpu) || adreno_is_a650_family(adreno_gpu))
|
||||
gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_2, 0x02000140);
|
||||
else
|
||||
gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_2, 0x010000c0);
|
||||
gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_1, 0x8040362c);
|
||||
|
||||
if (adreno_is_a660(adreno_gpu))
|
||||
gpu_write(gpu, REG_A6XX_CP_LPAC_PROG_FIFO_SIZE, 0x00000020);
|
||||
|
||||
/* Setting the mem pool size */
|
||||
gpu_write(gpu, REG_A6XX_CP_MEM_POOL_SIZE, 128);
|
||||
|
||||
/* Setting the primFifo thresholds default values */
|
||||
if (adreno_is_a650(adreno_gpu))
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00300000);
|
||||
/* Setting the primFifo thresholds default values,
|
||||
* and vccCacheSkipDis=1 bit (0x200) for A640 and newer
|
||||
*/
|
||||
if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu))
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00300200);
|
||||
else if (adreno_is_a640(adreno_gpu))
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00200000);
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00200200);
|
||||
else
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, (0x300 << 11));
|
||||
gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00180000);
|
||||
|
||||
/* Set the AHB default slave response to "ERROR" */
|
||||
gpu_write(gpu, REG_A6XX_CP_AHB_CNTL, 0x1);
|
||||
|
@ -859,7 +964,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_RBBM_PERFCTR_CNTL, 0x1);
|
||||
|
||||
/* Select CP0 to always count cycles */
|
||||
gpu_write(gpu, REG_A6XX_CP_PERFCTR_CP_SEL_0, PERF_CP_ALWAYS_COUNT);
|
||||
gpu_write(gpu, REG_A6XX_CP_PERFCTR_CP_SEL(0), PERF_CP_ALWAYS_COUNT);
|
||||
|
||||
a6xx_set_ubwc_config(gpu);
|
||||
|
||||
|
@ -870,7 +975,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_UCHE_CLIENT_PF, 1);
|
||||
|
||||
/* Set weights for bicubic filtering */
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
if (adreno_is_a650_family(adreno_gpu)) {
|
||||
gpu_write(gpu, REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_0, 0);
|
||||
gpu_write(gpu, REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_1,
|
||||
0x3fe05ff4);
|
||||
|
@ -885,6 +990,13 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
/* Protect registers from the CP */
|
||||
a6xx_set_cp_protect(gpu);
|
||||
|
||||
if (adreno_is_a660(adreno_gpu)) {
|
||||
gpu_write(gpu, REG_A6XX_CP_CHICKEN_DBG, 0x1);
|
||||
gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x0);
|
||||
/* Set dualQ + disable afull for A660 GPU but not for A635 */
|
||||
gpu_write(gpu, REG_A6XX_UCHE_CMDQ_CONFIG, 0x66906);
|
||||
}
|
||||
|
||||
/* Enable expanded apriv for targets that support it */
|
||||
if (gpu->hw_apriv) {
|
||||
gpu_write(gpu, REG_A6XX_CP_APRIV_CNTL,
|
||||
|
@ -925,7 +1037,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
if (!a6xx_gpu->shadow_bo) {
|
||||
a6xx_gpu->shadow = msm_gem_kernel_new_locked(gpu->dev,
|
||||
sizeof(u32) * gpu->nr_rings,
|
||||
MSM_BO_UNCACHED | MSM_BO_MAP_PRIV,
|
||||
MSM_BO_WC | MSM_BO_MAP_PRIV,
|
||||
gpu->aspace, &a6xx_gpu->shadow_bo,
|
||||
&a6xx_gpu->shadow_iova);
|
||||
|
||||
|
@ -1032,18 +1144,113 @@ static void a6xx_recover(struct msm_gpu *gpu)
|
|||
msm_gpu_hw_init(gpu);
|
||||
}
|
||||
|
||||
static int a6xx_fault_handler(void *arg, unsigned long iova, int flags)
|
||||
static const char *a6xx_uche_fault_block(struct msm_gpu *gpu, u32 mid)
|
||||
{
|
||||
static const char *uche_clients[7] = {
|
||||
"VFD", "SP", "VSC", "VPC", "HLSQ", "PC", "LRZ",
|
||||
};
|
||||
u32 val;
|
||||
|
||||
if (mid < 1 || mid > 3)
|
||||
return "UNKNOWN";
|
||||
|
||||
/*
|
||||
* The source of the data depends on the mid ID read from FSYNR1.
|
||||
* and the client ID read from the UCHE block
|
||||
*/
|
||||
val = gpu_read(gpu, REG_A6XX_UCHE_CLIENT_PF);
|
||||
|
||||
/* mid = 3 is most precise and refers to only one block per client */
|
||||
if (mid == 3)
|
||||
return uche_clients[val & 7];
|
||||
|
||||
/* For mid=2 the source is TP or VFD except when the client id is 0 */
|
||||
if (mid == 2)
|
||||
return ((val & 7) == 0) ? "TP" : "TP|VFD";
|
||||
|
||||
/* For mid=1 just return "UCHE" as a catchall for everything else */
|
||||
return "UCHE";
|
||||
}
|
||||
|
||||
static const char *a6xx_fault_block(struct msm_gpu *gpu, u32 id)
|
||||
{
|
||||
if (id == 0)
|
||||
return "CP";
|
||||
else if (id == 4)
|
||||
return "CCU";
|
||||
else if (id == 6)
|
||||
return "CDP Prefetch";
|
||||
|
||||
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);
|
||||
|
||||
pr_warn_ratelimited("*** gpu fault: iova=%08lx, flags=%d (%u,%u,%u,%u)\n",
|
||||
/*
|
||||
* 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,
|
||||
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)));
|
||||
|
||||
return -EFAULT;
|
||||
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";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static void a6xx_cp_hw_err_irq(struct msm_gpu *gpu)
|
||||
|
@ -1094,6 +1301,15 @@ static void a6xx_fault_detect_irq(struct msm_gpu *gpu)
|
|||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu);
|
||||
|
||||
/*
|
||||
* If stalled on SMMU fault, we could trip the GPU's hang detection,
|
||||
* but the fault handler will trigger the devcore dump, and we want
|
||||
* to otherwise resume normally rather than killing the submit, so
|
||||
* just bail.
|
||||
*/
|
||||
if (gpu_read(gpu, REG_A6XX_RBBM_STATUS3) & A6XX_RBBM_STATUS3_SMMU_STALLED_ON_FAULT)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Force the GPU to stay on until after we finish
|
||||
* collecting information
|
||||
|
@ -1339,9 +1555,6 @@ static void a6xx_destroy(struct msm_gpu *gpu)
|
|||
|
||||
adreno_gpu_cleanup(adreno_gpu);
|
||||
|
||||
if (a6xx_gpu->opp_table)
|
||||
dev_pm_opp_put_supported_hw(a6xx_gpu->opp_table);
|
||||
|
||||
kfree(a6xx_gpu);
|
||||
}
|
||||
|
||||
|
@ -1474,7 +1687,6 @@ static u32 fuse_to_supp_hw(struct device *dev, u32 revn, u32 fuse)
|
|||
static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu,
|
||||
u32 revn)
|
||||
{
|
||||
struct opp_table *opp_table;
|
||||
u32 supp_hw = UINT_MAX;
|
||||
u16 speedbin;
|
||||
int ret;
|
||||
|
@ -1497,11 +1709,10 @@ static int a6xx_set_supported_hw(struct device *dev, struct a6xx_gpu *a6xx_gpu,
|
|||
supp_hw = fuse_to_supp_hw(dev, revn, speedbin);
|
||||
|
||||
done:
|
||||
opp_table = dev_pm_opp_set_supported_hw(dev, &supp_hw, 1);
|
||||
if (IS_ERR(opp_table))
|
||||
return PTR_ERR(opp_table);
|
||||
ret = devm_pm_opp_set_supported_hw(dev, &supp_hw, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
a6xx_gpu->opp_table = opp_table;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1561,7 +1772,7 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
|
|||
*/
|
||||
info = adreno_info(config->rev);
|
||||
|
||||
if (info && info->revn == 650)
|
||||
if (info && (info->revn == 650 || info->revn == 660))
|
||||
adreno_gpu->base.hw_apriv = true;
|
||||
|
||||
a6xx_llc_slices_init(pdev, a6xx_gpu);
|
||||
|
|
|
@ -33,8 +33,6 @@ struct a6xx_gpu {
|
|||
void *llc_slice;
|
||||
void *htw_llc_slice;
|
||||
bool have_mmu500;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
};
|
||||
|
||||
#define to_a6xx_gpu(x) container_of(x, struct a6xx_gpu, base)
|
||||
|
|
|
@ -113,7 +113,7 @@ static int a6xx_crashdumper_init(struct msm_gpu *gpu,
|
|||
struct a6xx_crashdumper *dumper)
|
||||
{
|
||||
dumper->ptr = msm_gem_kernel_new_locked(gpu->dev,
|
||||
SZ_1M, MSM_BO_UNCACHED, gpu->aspace,
|
||||
SZ_1M, MSM_BO_WC, gpu->aspace,
|
||||
&dumper->bo, &dumper->iova);
|
||||
|
||||
if (!IS_ERR(dumper->ptr))
|
||||
|
@ -832,6 +832,20 @@ static void a6xx_get_registers(struct msm_gpu *gpu,
|
|||
a6xx_get_ahb_gpu_registers(gpu,
|
||||
a6xx_state, &a6xx_vbif_reglist,
|
||||
&a6xx_state->registers[index++]);
|
||||
if (!dumper) {
|
||||
/*
|
||||
* We can't use the crashdumper when the SMMU is stalled,
|
||||
* because the GPU has no memory access until we resume
|
||||
* translation (but we don't want to do that until after
|
||||
* we have captured as much useful GPU state as possible).
|
||||
* So instead collect registers via the CPU:
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(a6xx_reglist); i++)
|
||||
a6xx_get_ahb_gpu_registers(gpu,
|
||||
a6xx_state, &a6xx_reglist[i],
|
||||
&a6xx_state->registers[index++]);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(a6xx_reglist); i++)
|
||||
a6xx_get_crashdumper_registers(gpu,
|
||||
|
@ -905,11 +919,13 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu,
|
|||
|
||||
struct msm_gpu_state *a6xx_gpu_state_get(struct msm_gpu *gpu)
|
||||
{
|
||||
struct a6xx_crashdumper dumper = { 0 };
|
||||
struct a6xx_crashdumper _dumper = { 0 }, *dumper = NULL;
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct a6xx_gpu_state *a6xx_state = kzalloc(sizeof(*a6xx_state),
|
||||
GFP_KERNEL);
|
||||
bool stalled = !!(gpu_read(gpu, REG_A6XX_RBBM_STATUS3) &
|
||||
A6XX_RBBM_STATUS3_SMMU_STALLED_ON_FAULT);
|
||||
|
||||
if (!a6xx_state)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -928,14 +944,24 @@ struct msm_gpu_state *a6xx_gpu_state_get(struct msm_gpu *gpu)
|
|||
/* Get the banks of indexed registers */
|
||||
a6xx_get_indexed_registers(gpu, a6xx_state);
|
||||
|
||||
/* Try to initialize the crashdumper */
|
||||
if (!a6xx_crashdumper_init(gpu, &dumper)) {
|
||||
a6xx_get_registers(gpu, a6xx_state, &dumper);
|
||||
a6xx_get_shaders(gpu, a6xx_state, &dumper);
|
||||
a6xx_get_clusters(gpu, a6xx_state, &dumper);
|
||||
a6xx_get_dbgahb_clusters(gpu, a6xx_state, &dumper);
|
||||
/*
|
||||
* Try to initialize the crashdumper, if we are not dumping state
|
||||
* with the SMMU stalled. The crashdumper needs memory access to
|
||||
* write out GPU state, so we need to skip this when the SMMU is
|
||||
* stalled in response to an iova fault
|
||||
*/
|
||||
if (!stalled && !a6xx_crashdumper_init(gpu, &_dumper)) {
|
||||
dumper = &_dumper;
|
||||
}
|
||||
|
||||
msm_gem_kernel_put(dumper.bo, gpu->aspace, true);
|
||||
a6xx_get_registers(gpu, a6xx_state, dumper);
|
||||
|
||||
if (dumper) {
|
||||
a6xx_get_shaders(gpu, a6xx_state, dumper);
|
||||
a6xx_get_clusters(gpu, a6xx_state, dumper);
|
||||
a6xx_get_dbgahb_clusters(gpu, a6xx_state, dumper);
|
||||
|
||||
msm_gem_kernel_put(dumper->bo, gpu->aspace, true);
|
||||
}
|
||||
|
||||
if (snapshot_debugbus)
|
||||
|
|
|
@ -351,6 +351,37 @@ static void a650_build_bw_table(struct a6xx_hfi_msg_bw_table *msg)
|
|||
msg->cnoc_cmds_data[1][0] = 0x60000001;
|
||||
}
|
||||
|
||||
static void a660_build_bw_table(struct a6xx_hfi_msg_bw_table *msg)
|
||||
{
|
||||
/*
|
||||
* Send a single "off" entry just to get things running
|
||||
* TODO: bus scaling
|
||||
*/
|
||||
msg->bw_level_num = 1;
|
||||
|
||||
msg->ddr_cmds_num = 3;
|
||||
msg->ddr_wait_bitmask = 0x01;
|
||||
|
||||
msg->ddr_cmds_addrs[0] = 0x50004;
|
||||
msg->ddr_cmds_addrs[1] = 0x500a0;
|
||||
msg->ddr_cmds_addrs[2] = 0x50000;
|
||||
|
||||
msg->ddr_cmds_data[0][0] = 0x40000000;
|
||||
msg->ddr_cmds_data[0][1] = 0x40000000;
|
||||
msg->ddr_cmds_data[0][2] = 0x40000000;
|
||||
|
||||
/*
|
||||
* These are the CX (CNOC) votes - these are used by the GMU but the
|
||||
* votes are known and fixed for the target
|
||||
*/
|
||||
msg->cnoc_cmds_num = 1;
|
||||
msg->cnoc_wait_bitmask = 0x01;
|
||||
|
||||
msg->cnoc_cmds_addrs[0] = 0x50070;
|
||||
msg->cnoc_cmds_data[0][0] = 0x40000000;
|
||||
msg->cnoc_cmds_data[1][0] = 0x60000001;
|
||||
}
|
||||
|
||||
static void a6xx_build_bw_table(struct a6xx_hfi_msg_bw_table *msg)
|
||||
{
|
||||
/* Send a single "off" entry since the 630 GMU doesn't do bus scaling */
|
||||
|
@ -401,6 +432,8 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)
|
|||
a640_build_bw_table(&msg);
|
||||
else if (adreno_is_a650(adreno_gpu))
|
||||
a650_build_bw_table(&msg);
|
||||
else if (adreno_is_a660(adreno_gpu))
|
||||
a660_build_bw_table(&msg);
|
||||
else
|
||||
a6xx_build_bw_table(&msg);
|
||||
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -287,6 +287,19 @@ static const struct adreno_info gpulist[] = {
|
|||
.init = a6xx_gpu_init,
|
||||
.zapfw = "a650_zap.mdt",
|
||||
.hwcg = a650_hwcg,
|
||||
}, {
|
||||
.rev = ADRENO_REV(6, 6, 0, ANY_ID),
|
||||
.revn = 660,
|
||||
.name = "A660",
|
||||
.fw = {
|
||||
[ADRENO_FW_SQE] = "a660_sqe.fw",
|
||||
[ADRENO_FW_GMU] = "a660_gmu.bin",
|
||||
},
|
||||
.gmem = SZ_1M + SZ_512K,
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a6xx_gpu_init,
|
||||
.zapfw = "a660_zap.mdt",
|
||||
.hwcg = a660_hwcg,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -466,6 +479,7 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
|
|||
config.rev.minor, config.rev.patchid);
|
||||
|
||||
priv->is_a2xx = config.rev.core == 2;
|
||||
priv->has_cached_coherent = config.rev.core >= 6;
|
||||
|
||||
gpu = info->init(drm);
|
||||
if (IS_ERR(gpu)) {
|
||||
|
|
|
@ -239,7 +239,7 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
|
|||
*value = adreno_gpu->gmem;
|
||||
return 0;
|
||||
case MSM_PARAM_GMEM_BASE:
|
||||
*value = !adreno_is_a650(adreno_gpu) ? 0x100000 : 0;
|
||||
*value = !adreno_is_a650_family(adreno_gpu) ? 0x100000 : 0;
|
||||
return 0;
|
||||
case MSM_PARAM_CHIP_ID:
|
||||
*value = adreno_gpu->rev.patchid |
|
||||
|
@ -391,7 +391,7 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu,
|
|||
void *ptr;
|
||||
|
||||
ptr = msm_gem_kernel_new_locked(gpu->dev, fw->size - 4,
|
||||
MSM_BO_UNCACHED | MSM_BO_GPU_READONLY, gpu->aspace, &bo, iova);
|
||||
MSM_BO_WC | MSM_BO_GPU_READONLY, gpu->aspace, &bo, iova);
|
||||
|
||||
if (IS_ERR(ptr))
|
||||
return ERR_CAST(ptr);
|
||||
|
@ -408,7 +408,7 @@ int adreno_hw_init(struct msm_gpu *gpu)
|
|||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
int ret, i;
|
||||
|
||||
DBG("%s", gpu->name);
|
||||
VERB("%s", gpu->name);
|
||||
|
||||
ret = adreno_load_fw(adreno_gpu);
|
||||
if (ret)
|
||||
|
@ -684,6 +684,21 @@ void adreno_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
|
|||
adreno_gpu->info->revn, adreno_gpu->rev.core,
|
||||
adreno_gpu->rev.major, adreno_gpu->rev.minor,
|
||||
adreno_gpu->rev.patchid);
|
||||
/*
|
||||
* If this is state collected due to iova fault, so fault related info
|
||||
*
|
||||
* TTBR0 would not be zero, so this is a good way to distinguish
|
||||
*/
|
||||
if (state->fault_info.ttbr0) {
|
||||
const struct msm_gpu_fault_info *info = &state->fault_info;
|
||||
|
||||
drm_puts(p, "fault-info:\n");
|
||||
drm_printf(p, " - ttbr0=%.16llx\n", info->ttbr0);
|
||||
drm_printf(p, " - iova=%.16lx\n", info->iova);
|
||||
drm_printf(p, " - dir=%s\n", info->flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ");
|
||||
drm_printf(p, " - type=%s\n", info->type);
|
||||
drm_printf(p, " - source=%s\n", info->block);
|
||||
}
|
||||
|
||||
drm_printf(p, "rbbm-status: 0x%08x\n", state->rbbm_status);
|
||||
|
||||
|
@ -841,7 +856,7 @@ static void adreno_get_pwrlevels(struct device *dev,
|
|||
if (!of_find_property(dev->of_node, "operating-points-v2", NULL))
|
||||
ret = adreno_get_legacy_pwrlevels(dev);
|
||||
else {
|
||||
ret = dev_pm_opp_of_add_table(dev);
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret)
|
||||
DRM_DEV_ERROR(dev, "Unable to set the OPP table\n");
|
||||
}
|
||||
|
@ -946,7 +961,4 @@ void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)
|
|||
pm_runtime_disable(&priv->gpu_pdev->dev);
|
||||
|
||||
msm_gpu_cleanup(&adreno_gpu->base);
|
||||
|
||||
icc_put(gpu->icc_path);
|
||||
icc_put(gpu->ocmem_icc_path);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ struct adreno_reglist {
|
|||
u32 value;
|
||||
};
|
||||
|
||||
extern const struct adreno_reglist a630_hwcg[], a640_hwcg[], a650_hwcg[];
|
||||
extern const struct adreno_reglist a630_hwcg[], a640_hwcg[], a650_hwcg[], a660_hwcg[];
|
||||
|
||||
struct adreno_info {
|
||||
struct adreno_rev rev;
|
||||
|
@ -247,6 +247,17 @@ static inline int adreno_is_a650(struct adreno_gpu *gpu)
|
|||
return gpu->revn == 650;
|
||||
}
|
||||
|
||||
static inline int adreno_is_a660(struct adreno_gpu *gpu)
|
||||
{
|
||||
return gpu->revn == 660;
|
||||
}
|
||||
|
||||
/* check for a650, a660, or any derivatives */
|
||||
static inline int adreno_is_a650_family(struct adreno_gpu *gpu)
|
||||
{
|
||||
return gpu->revn == 650 || gpu->revn == 620 || gpu->revn == 660;
|
||||
}
|
||||
|
||||
int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value);
|
||||
const struct firmware *adreno_request_fw(struct adreno_gpu *adreno_gpu,
|
||||
const char *fwname);
|
||||
|
|
|
@ -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/src/envytools/rnndb/adreno.xml ( 594 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 90159 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14386 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 65048 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 84226 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112556 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 149461 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 184695 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 11218 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_control_regs.xml ( 4559 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pipe_regs.xml ( 2872 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno.xml ( 594 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a2xx.xml ( 90810 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_common.xml ( 14386 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pm4.xml ( 67699 bytes, from 2021-05-31 20:21:57)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a3xx.xml ( 84226 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a4xx.xml ( 112551 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a5xx.xml ( 150713 bytes, from 2021-06-10 22:34:02)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx.xml ( 180049 bytes, from 2021-06-02 21:44:19)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/a6xx_gmu.xml ( 11331 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/ocmem.xml ( 1773 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_control_regs.xml ( 6038 bytes, from 2021-05-27 20:22:36)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/adreno/adreno_pipe_regs.xml ( 2924 bytes, from 2021-05-27 20:18:13)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -247,9 +247,9 @@ enum adreno_pm4_type3_packets {
|
|||
CP_DRAW_INDX_INDIRECT = 41,
|
||||
CP_DRAW_INDIRECT_MULTI = 42,
|
||||
CP_DRAW_AUTO = 36,
|
||||
CP_UNKNOWN_19 = 25,
|
||||
CP_UNKNOWN_1A = 26,
|
||||
CP_UNKNOWN_4E = 78,
|
||||
CP_DRAW_PRED_ENABLE_GLOBAL = 25,
|
||||
CP_DRAW_PRED_ENABLE_LOCAL = 26,
|
||||
CP_DRAW_PRED_SET = 78,
|
||||
CP_WIDE_REG_WRITE = 116,
|
||||
CP_SCRATCH_TO_REG = 77,
|
||||
CP_REG_TO_SCRATCH = 74,
|
||||
|
@ -267,6 +267,7 @@ enum adreno_pm4_type3_packets {
|
|||
CP_SKIP_IB2_ENABLE_GLOBAL = 29,
|
||||
CP_SKIP_IB2_ENABLE_LOCAL = 35,
|
||||
CP_SET_SUBDRAW_SIZE = 53,
|
||||
CP_WHERE_AM_I = 98,
|
||||
CP_SET_VISIBILITY_OVERRIDE = 100,
|
||||
CP_PREEMPT_ENABLE_GLOBAL = 105,
|
||||
CP_PREEMPT_ENABLE_LOCAL = 106,
|
||||
|
@ -298,7 +299,6 @@ enum adreno_pm4_type3_packets {
|
|||
CP_SET_BIN_DATA5_OFFSET = 46,
|
||||
CP_SET_CTXSWITCH_IB = 85,
|
||||
CP_REG_WRITE = 109,
|
||||
CP_WHERE_AM_I = 98,
|
||||
};
|
||||
|
||||
enum adreno_state_block {
|
||||
|
@ -400,6 +400,17 @@ enum a6xx_patch_type {
|
|||
enum a6xx_draw_indirect_opcode {
|
||||
INDIRECT_OP_NORMAL = 2,
|
||||
INDIRECT_OP_INDEXED = 4,
|
||||
INDIRECT_OP_INDIRECT_COUNT = 6,
|
||||
INDIRECT_OP_INDIRECT_COUNT_INDEXED = 7,
|
||||
};
|
||||
|
||||
enum cp_draw_pred_src {
|
||||
PRED_SRC_MEM = 5,
|
||||
};
|
||||
|
||||
enum cp_draw_pred_test {
|
||||
NE_0_PASS = 0,
|
||||
EQ_0_PASS = 1,
|
||||
};
|
||||
|
||||
enum cp_cond_function {
|
||||
|
@ -1040,33 +1051,61 @@ static inline uint32_t A6XX_CP_DRAW_INDIRECT_MULTI_1_DST_OFF(uint32_t val)
|
|||
return ((val) << A6XX_CP_DRAW_INDIRECT_MULTI_1_DST_OFF__SHIFT) & A6XX_CP_DRAW_INDIRECT_MULTI_1_DST_OFF__MASK;
|
||||
}
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_2 0x00000002
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_2_DRAW_COUNT__MASK 0xffffffff
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_2_DRAW_COUNT__SHIFT 0
|
||||
static inline uint32_t A6XX_CP_DRAW_INDIRECT_MULTI_2_DRAW_COUNT(uint32_t val)
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_DRAW_COUNT 0x00000002
|
||||
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_INDIRECT 0x00000003
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_STRIDE 0x00000005
|
||||
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDEX_INDEXED 0x00000003
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_MAX_INDICES_INDEXED 0x00000005
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDIRECT_INDEXED 0x00000006
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_STRIDE_INDEXED 0x00000008
|
||||
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDIRECT_INDIRECT 0x00000003
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDIRECT_COUNT_INDIRECT 0x00000005
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_STRIDE_INDIRECT 0x00000007
|
||||
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDEX_INDIRECT_INDEXED 0x00000003
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_MAX_INDICES_INDIRECT_INDEXED 0x00000005
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDIRECT_INDIRECT_INDEXED 0x00000006
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_INDIRECT_COUNT_INDIRECT_INDEXED 0x00000008
|
||||
|
||||
#define REG_CP_DRAW_INDIRECT_MULTI_STRIDE_INDIRECT_INDEXED 0x0000000a
|
||||
|
||||
#define REG_CP_DRAW_PRED_ENABLE_GLOBAL_0 0x00000000
|
||||
#define CP_DRAW_PRED_ENABLE_GLOBAL_0_ENABLE 0x00000001
|
||||
|
||||
#define REG_CP_DRAW_PRED_ENABLE_LOCAL_0 0x00000000
|
||||
#define CP_DRAW_PRED_ENABLE_LOCAL_0_ENABLE 0x00000001
|
||||
|
||||
#define REG_CP_DRAW_PRED_SET_0 0x00000000
|
||||
#define CP_DRAW_PRED_SET_0_SRC__MASK 0x000000f0
|
||||
#define CP_DRAW_PRED_SET_0_SRC__SHIFT 4
|
||||
static inline uint32_t CP_DRAW_PRED_SET_0_SRC(enum cp_draw_pred_src val)
|
||||
{
|
||||
return ((val) << A6XX_CP_DRAW_INDIRECT_MULTI_2_DRAW_COUNT__SHIFT) & A6XX_CP_DRAW_INDIRECT_MULTI_2_DRAW_COUNT__MASK;
|
||||
return ((val) << CP_DRAW_PRED_SET_0_SRC__SHIFT) & CP_DRAW_PRED_SET_0_SRC__MASK;
|
||||
}
|
||||
#define CP_DRAW_PRED_SET_0_TEST__MASK 0x00000100
|
||||
#define CP_DRAW_PRED_SET_0_TEST__SHIFT 8
|
||||
static inline uint32_t CP_DRAW_PRED_SET_0_TEST(enum cp_draw_pred_test val)
|
||||
{
|
||||
return ((val) << CP_DRAW_PRED_SET_0_TEST__SHIFT) & CP_DRAW_PRED_SET_0_TEST__MASK;
|
||||
}
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_ADDRESS_0 0x00000003
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_5 0x00000005
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_5_PARAM_0__MASK 0xffffffff
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_5_PARAM_0__SHIFT 0
|
||||
static inline uint32_t A6XX_CP_DRAW_INDIRECT_MULTI_5_PARAM_0(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_CP_DRAW_INDIRECT_MULTI_5_PARAM_0__SHIFT) & A6XX_CP_DRAW_INDIRECT_MULTI_5_PARAM_0__MASK;
|
||||
}
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_INDIRECT 0x00000006
|
||||
|
||||
#define REG_A6XX_CP_DRAW_INDIRECT_MULTI_8 0x00000008
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_8_STRIDE__MASK 0xffffffff
|
||||
#define A6XX_CP_DRAW_INDIRECT_MULTI_8_STRIDE__SHIFT 0
|
||||
static inline uint32_t A6XX_CP_DRAW_INDIRECT_MULTI_8_STRIDE(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_CP_DRAW_INDIRECT_MULTI_8_STRIDE__SHIFT) & A6XX_CP_DRAW_INDIRECT_MULTI_8_STRIDE__MASK;
|
||||
}
|
||||
#define REG_CP_DRAW_PRED_SET_MEM_ADDR 0x00000001
|
||||
|
||||
static inline uint32_t REG_CP_SET_DRAW_STATE_(uint32_t i0) { return 0x00000000 + 0x3*i0; }
|
||||
|
||||
|
|
|
@ -22,165 +22,20 @@ static void dpu_core_irq_callback_handler(void *arg, int irq_idx)
|
|||
struct dpu_kms *dpu_kms = arg;
|
||||
struct dpu_irq *irq_obj = &dpu_kms->irq_obj;
|
||||
struct dpu_irq_callback *cb;
|
||||
unsigned long irq_flags;
|
||||
|
||||
pr_debug("irq_idx=%d\n", irq_idx);
|
||||
VERB("irq_idx=%d\n", irq_idx);
|
||||
|
||||
if (list_empty(&irq_obj->irq_cb_tbl[irq_idx])) {
|
||||
DRM_ERROR("no registered cb, idx:%d enable_count:%d\n", irq_idx,
|
||||
atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idx]));
|
||||
}
|
||||
if (list_empty(&irq_obj->irq_cb_tbl[irq_idx]))
|
||||
DRM_ERROR("no registered cb, idx:%d\n", irq_idx);
|
||||
|
||||
atomic_inc(&irq_obj->irq_counts[irq_idx]);
|
||||
|
||||
/*
|
||||
* Perform registered function callback
|
||||
*/
|
||||
spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
list_for_each_entry(cb, &irq_obj->irq_cb_tbl[irq_idx], list)
|
||||
if (cb->func)
|
||||
cb->func(cb->arg, irq_idx);
|
||||
spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
|
||||
/*
|
||||
* Clear pending interrupt status in HW.
|
||||
* NOTE: dpu_core_irq_callback_handler is protected by top-level
|
||||
* spinlock, so it is safe to clear any interrupt status here.
|
||||
*/
|
||||
dpu_kms->hw_intr->ops.clear_intr_status_nolock(
|
||||
dpu_kms->hw_intr,
|
||||
irq_idx);
|
||||
}
|
||||
|
||||
int dpu_core_irq_idx_lookup(struct dpu_kms *dpu_kms,
|
||||
enum dpu_intr_type intr_type, u32 instance_idx)
|
||||
{
|
||||
if (!dpu_kms->hw_intr || !dpu_kms->hw_intr->ops.irq_idx_lookup)
|
||||
return -EINVAL;
|
||||
|
||||
return dpu_kms->hw_intr->ops.irq_idx_lookup(dpu_kms->hw_intr,
|
||||
intr_type, instance_idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* _dpu_core_irq_enable - enable core interrupt given by the index
|
||||
* @dpu_kms: Pointer to dpu kms context
|
||||
* @irq_idx: interrupt index
|
||||
*/
|
||||
static int _dpu_core_irq_enable(struct dpu_kms *dpu_kms, int irq_idx)
|
||||
{
|
||||
unsigned long irq_flags;
|
||||
int ret = 0, enable_count;
|
||||
|
||||
if (!dpu_kms->hw_intr ||
|
||||
!dpu_kms->irq_obj.enable_counts ||
|
||||
!dpu_kms->irq_obj.irq_counts) {
|
||||
DPU_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
|
||||
DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
enable_count = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idx]);
|
||||
DRM_DEBUG_KMS("irq_idx=%d enable_count=%d\n", irq_idx, enable_count);
|
||||
trace_dpu_core_irq_enable_idx(irq_idx, enable_count);
|
||||
|
||||
if (atomic_inc_return(&dpu_kms->irq_obj.enable_counts[irq_idx]) == 1) {
|
||||
ret = dpu_kms->hw_intr->ops.enable_irq(
|
||||
dpu_kms->hw_intr,
|
||||
irq_idx);
|
||||
if (ret)
|
||||
DPU_ERROR("Fail to enable IRQ for irq_idx:%d\n",
|
||||
irq_idx);
|
||||
|
||||
DPU_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
|
||||
|
||||
spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
/* empty callback list but interrupt is enabled */
|
||||
if (list_empty(&dpu_kms->irq_obj.irq_cb_tbl[irq_idx]))
|
||||
DPU_ERROR("irq_idx=%d enabled with no callback\n",
|
||||
irq_idx);
|
||||
spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dpu_core_irq_enable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
|
||||
{
|
||||
int i, ret = 0, counts;
|
||||
|
||||
if (!irq_idxs || !irq_count) {
|
||||
DPU_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
counts = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idxs[0]]);
|
||||
if (counts)
|
||||
DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts);
|
||||
|
||||
for (i = 0; (i < irq_count) && !ret; i++)
|
||||
ret = _dpu_core_irq_enable(dpu_kms, irq_idxs[i]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* _dpu_core_irq_disable - disable core interrupt given by the index
|
||||
* @dpu_kms: Pointer to dpu kms context
|
||||
* @irq_idx: interrupt index
|
||||
*/
|
||||
static int _dpu_core_irq_disable(struct dpu_kms *dpu_kms, int irq_idx)
|
||||
{
|
||||
int ret = 0, enable_count;
|
||||
|
||||
if (!dpu_kms->hw_intr || !dpu_kms->irq_obj.enable_counts) {
|
||||
DPU_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
|
||||
DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
enable_count = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idx]);
|
||||
DRM_DEBUG_KMS("irq_idx=%d enable_count=%d\n", irq_idx, enable_count);
|
||||
trace_dpu_core_irq_disable_idx(irq_idx, enable_count);
|
||||
|
||||
if (atomic_dec_return(&dpu_kms->irq_obj.enable_counts[irq_idx]) == 0) {
|
||||
ret = dpu_kms->hw_intr->ops.disable_irq(
|
||||
dpu_kms->hw_intr,
|
||||
irq_idx);
|
||||
if (ret)
|
||||
DPU_ERROR("Fail to disable IRQ for irq_idx:%d\n",
|
||||
irq_idx);
|
||||
DPU_DEBUG("irq_idx=%d ret=%d\n", irq_idx, ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dpu_core_irq_disable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
|
||||
{
|
||||
int i, ret = 0, counts;
|
||||
|
||||
if (!irq_idxs || !irq_count) {
|
||||
DPU_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
counts = atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idxs[0]]);
|
||||
if (counts == 2)
|
||||
DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts);
|
||||
|
||||
for (i = 0; (i < irq_count) && !ret; i++)
|
||||
ret = _dpu_core_irq_disable(dpu_kms, irq_idxs[i]);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 dpu_core_irq_read(struct dpu_kms *dpu_kms, int irq_idx, bool clear)
|
||||
|
@ -217,19 +72,28 @@ int dpu_core_irq_register_callback(struct dpu_kms *dpu_kms, int irq_idx,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->total_irqs) {
|
||||
DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
DPU_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
|
||||
VERB("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
|
||||
|
||||
spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
irq_flags = dpu_kms->hw_intr->ops.lock(dpu_kms->hw_intr);
|
||||
trace_dpu_core_irq_register_callback(irq_idx, register_irq_cb);
|
||||
list_del_init(®ister_irq_cb->list);
|
||||
list_add_tail(®ister_irq_cb->list,
|
||||
&dpu_kms->irq_obj.irq_cb_tbl[irq_idx]);
|
||||
spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
if (list_is_first(®ister_irq_cb->list,
|
||||
&dpu_kms->irq_obj.irq_cb_tbl[irq_idx])) {
|
||||
int ret = dpu_kms->hw_intr->ops.enable_irq_locked(
|
||||
dpu_kms->hw_intr,
|
||||
irq_idx);
|
||||
if (ret)
|
||||
DPU_ERROR("Fail to enable IRQ for irq_idx:%d\n",
|
||||
irq_idx);
|
||||
}
|
||||
dpu_kms->hw_intr->ops.unlock(dpu_kms->hw_intr, irq_flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -252,21 +116,27 @@ int dpu_core_irq_unregister_callback(struct dpu_kms *dpu_kms, int irq_idx,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->irq_idx_tbl_size) {
|
||||
if (irq_idx < 0 || irq_idx >= dpu_kms->hw_intr->total_irqs) {
|
||||
DPU_ERROR("invalid IRQ index: [%d]\n", irq_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
DPU_DEBUG("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
|
||||
VERB("[%pS] irq_idx=%d\n", __builtin_return_address(0), irq_idx);
|
||||
|
||||
spin_lock_irqsave(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
irq_flags = dpu_kms->hw_intr->ops.lock(dpu_kms->hw_intr);
|
||||
trace_dpu_core_irq_unregister_callback(irq_idx, register_irq_cb);
|
||||
list_del_init(®ister_irq_cb->list);
|
||||
/* empty callback list but interrupt is still enabled */
|
||||
if (list_empty(&dpu_kms->irq_obj.irq_cb_tbl[irq_idx]) &&
|
||||
atomic_read(&dpu_kms->irq_obj.enable_counts[irq_idx]))
|
||||
DPU_ERROR("irq_idx=%d enabled with no callback\n", irq_idx);
|
||||
spin_unlock_irqrestore(&dpu_kms->irq_obj.cb_lock, irq_flags);
|
||||
if (list_empty(&dpu_kms->irq_obj.irq_cb_tbl[irq_idx])) {
|
||||
int ret = dpu_kms->hw_intr->ops.disable_irq_locked(
|
||||
dpu_kms->hw_intr,
|
||||
irq_idx);
|
||||
if (ret)
|
||||
DPU_ERROR("Fail to disable IRQ for irq_idx:%d\n",
|
||||
irq_idx);
|
||||
VERB("irq_idx=%d ret=%d\n", irq_idx, ret);
|
||||
}
|
||||
dpu_kms->hw_intr->ops.unlock(dpu_kms->hw_intr, irq_flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -290,26 +160,26 @@ static void dpu_disable_all_irqs(struct dpu_kms *dpu_kms)
|
|||
#ifdef CONFIG_DEBUG_FS
|
||||
static int dpu_debugfs_core_irq_show(struct seq_file *s, void *v)
|
||||
{
|
||||
struct dpu_irq *irq_obj = s->private;
|
||||
struct dpu_kms *dpu_kms = s->private;
|
||||
struct dpu_irq *irq_obj = &dpu_kms->irq_obj;
|
||||
struct dpu_irq_callback *cb;
|
||||
unsigned long irq_flags;
|
||||
int i, irq_count, enable_count, cb_count;
|
||||
int i, irq_count, cb_count;
|
||||
|
||||
if (WARN_ON(!irq_obj->enable_counts || !irq_obj->irq_cb_tbl))
|
||||
if (WARN_ON(!irq_obj->irq_cb_tbl))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < irq_obj->total_irqs; i++) {
|
||||
spin_lock_irqsave(&irq_obj->cb_lock, irq_flags);
|
||||
irq_flags = dpu_kms->hw_intr->ops.lock(dpu_kms->hw_intr);
|
||||
cb_count = 0;
|
||||
irq_count = atomic_read(&irq_obj->irq_counts[i]);
|
||||
enable_count = atomic_read(&irq_obj->enable_counts[i]);
|
||||
list_for_each_entry(cb, &irq_obj->irq_cb_tbl[i], list)
|
||||
cb_count++;
|
||||
spin_unlock_irqrestore(&irq_obj->cb_lock, irq_flags);
|
||||
dpu_kms->hw_intr->ops.unlock(dpu_kms->hw_intr, irq_flags);
|
||||
|
||||
if (irq_count || enable_count || cb_count)
|
||||
seq_printf(s, "idx:%d irq:%d enable:%d cb:%d\n",
|
||||
i, irq_count, enable_count, cb_count);
|
||||
if (irq_count || cb_count)
|
||||
seq_printf(s, "idx:%d irq:%d cb:%d\n",
|
||||
i, irq_count, cb_count);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -320,7 +190,7 @@ DEFINE_SHOW_ATTRIBUTE(dpu_debugfs_core_irq);
|
|||
void dpu_debugfs_core_irq_init(struct dpu_kms *dpu_kms,
|
||||
struct dentry *parent)
|
||||
{
|
||||
debugfs_create_file("core_irq", 0600, parent, &dpu_kms->irq_obj,
|
||||
debugfs_create_file("core_irq", 0600, parent, dpu_kms,
|
||||
&dpu_debugfs_core_irq_fops);
|
||||
}
|
||||
#endif
|
||||
|
@ -334,19 +204,14 @@ void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms)
|
|||
dpu_disable_all_irqs(dpu_kms);
|
||||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
|
||||
spin_lock_init(&dpu_kms->irq_obj.cb_lock);
|
||||
|
||||
/* Create irq callbacks for all possible irq_idx */
|
||||
dpu_kms->irq_obj.total_irqs = dpu_kms->hw_intr->irq_idx_tbl_size;
|
||||
dpu_kms->irq_obj.total_irqs = dpu_kms->hw_intr->total_irqs;
|
||||
dpu_kms->irq_obj.irq_cb_tbl = kcalloc(dpu_kms->irq_obj.total_irqs,
|
||||
sizeof(struct list_head), GFP_KERNEL);
|
||||
dpu_kms->irq_obj.enable_counts = kcalloc(dpu_kms->irq_obj.total_irqs,
|
||||
sizeof(atomic_t), GFP_KERNEL);
|
||||
dpu_kms->irq_obj.irq_counts = kcalloc(dpu_kms->irq_obj.total_irqs,
|
||||
sizeof(atomic_t), GFP_KERNEL);
|
||||
for (i = 0; i < dpu_kms->irq_obj.total_irqs; i++) {
|
||||
INIT_LIST_HEAD(&dpu_kms->irq_obj.irq_cb_tbl[i]);
|
||||
atomic_set(&dpu_kms->irq_obj.enable_counts[i], 0);
|
||||
atomic_set(&dpu_kms->irq_obj.irq_counts[i], 0);
|
||||
}
|
||||
}
|
||||
|
@ -357,8 +222,7 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
|
|||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
for (i = 0; i < dpu_kms->irq_obj.total_irqs; i++)
|
||||
if (atomic_read(&dpu_kms->irq_obj.enable_counts[i]) ||
|
||||
!list_empty(&dpu_kms->irq_obj.irq_cb_tbl[i]))
|
||||
if (!list_empty(&dpu_kms->irq_obj.irq_cb_tbl[i]))
|
||||
DPU_ERROR("irq_idx=%d still enabled/registered\n", i);
|
||||
|
||||
dpu_clear_all_irqs(dpu_kms);
|
||||
|
@ -366,25 +230,14 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
|
|||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
|
||||
kfree(dpu_kms->irq_obj.irq_cb_tbl);
|
||||
kfree(dpu_kms->irq_obj.enable_counts);
|
||||
kfree(dpu_kms->irq_obj.irq_counts);
|
||||
dpu_kms->irq_obj.irq_cb_tbl = NULL;
|
||||
dpu_kms->irq_obj.enable_counts = NULL;
|
||||
dpu_kms->irq_obj.irq_counts = NULL;
|
||||
dpu_kms->irq_obj.total_irqs = 0;
|
||||
}
|
||||
|
||||
irqreturn_t dpu_core_irq(struct dpu_kms *dpu_kms)
|
||||
{
|
||||
/*
|
||||
* Read interrupt status from all sources. Interrupt status are
|
||||
* stored within hw_intr.
|
||||
* Function will also clear the interrupt status after reading.
|
||||
* Individual interrupt status bit will only get stored if it
|
||||
* is enabled.
|
||||
*/
|
||||
dpu_kms->hw_intr->ops.get_interrupt_statuses(dpu_kms->hw_intr);
|
||||
|
||||
/*
|
||||
* Dispatch to HW driver to handle interrupt lookup that is being
|
||||
* fired. When matching interrupt is located, HW driver will call to
|
||||
|
@ -392,6 +245,7 @@ irqreturn_t dpu_core_irq(struct dpu_kms *dpu_kms)
|
|||
* dpu_core_irq_callback_handler will perform the registered function
|
||||
* callback, and do the interrupt status clearing once the registered
|
||||
* callback is finished.
|
||||
* Function will also clear the interrupt status after reading.
|
||||
*/
|
||||
dpu_kms->hw_intr->ops.dispatch_irqs(
|
||||
dpu_kms->hw_intr,
|
||||
|
|
|
@ -29,49 +29,6 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms);
|
|||
*/
|
||||
irqreturn_t dpu_core_irq(struct dpu_kms *dpu_kms);
|
||||
|
||||
/**
|
||||
* dpu_core_irq_idx_lookup - IRQ helper function for lookup irq_idx from HW
|
||||
* interrupt mapping table.
|
||||
* @dpu_kms: DPU handle
|
||||
* @intr_type: DPU HW interrupt type for lookup
|
||||
* @instance_idx: DPU HW block instance defined in dpu_hw_mdss.h
|
||||
* @return: irq_idx or -EINVAL when fail to lookup
|
||||
*/
|
||||
int dpu_core_irq_idx_lookup(
|
||||
struct dpu_kms *dpu_kms,
|
||||
enum dpu_intr_type intr_type,
|
||||
uint32_t instance_idx);
|
||||
|
||||
/**
|
||||
* dpu_core_irq_enable - IRQ helper function for enabling one or more IRQs
|
||||
* @dpu_kms: DPU handle
|
||||
* @irq_idxs: Array of irq index
|
||||
* @irq_count: Number of irq_idx provided in the array
|
||||
* @return: 0 for success enabling IRQ, otherwise failure
|
||||
*
|
||||
* This function increments count on each enable and decrements on each
|
||||
* disable. Interrupts is enabled if count is 0 before increment.
|
||||
*/
|
||||
int dpu_core_irq_enable(
|
||||
struct dpu_kms *dpu_kms,
|
||||
int *irq_idxs,
|
||||
uint32_t irq_count);
|
||||
|
||||
/**
|
||||
* dpu_core_irq_disable - IRQ helper function for disabling one of more IRQs
|
||||
* @dpu_kms: DPU handle
|
||||
* @irq_idxs: Array of irq index
|
||||
* @irq_count: Number of irq_idx provided in the array
|
||||
* @return: 0 for success disabling IRQ, otherwise failure
|
||||
*
|
||||
* This function increments count on each enable and decrements on each
|
||||
* disable. Interrupts is disabled if count is 0 after decrement.
|
||||
*/
|
||||
int dpu_core_irq_disable(
|
||||
struct dpu_kms *dpu_kms,
|
||||
int *irq_idxs,
|
||||
uint32_t irq_count);
|
||||
|
||||
/**
|
||||
* dpu_core_irq_read - IRQ helper function for reading IRQ status
|
||||
* @dpu_kms: DPU handle
|
||||
|
|
|
@ -132,7 +132,7 @@ static void _dpu_core_perf_calc_crtc(struct dpu_kms *kms,
|
|||
perf->core_clk_rate = _dpu_core_perf_calc_clk(kms, crtc, state);
|
||||
}
|
||||
|
||||
DPU_DEBUG(
|
||||
DRM_DEBUG_ATOMIC(
|
||||
"crtc=%d clk_rate=%llu core_ib=%llu core_ab=%llu\n",
|
||||
crtc->base.id, perf->core_clk_rate,
|
||||
perf->max_per_pipe_ib, perf->bw_ctl);
|
||||
|
@ -178,7 +178,7 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
|
|||
struct dpu_crtc_state *tmp_cstate =
|
||||
to_dpu_crtc_state(tmp_crtc->state);
|
||||
|
||||
DPU_DEBUG("crtc:%d bw:%llu ctrl:%d\n",
|
||||
DRM_DEBUG_ATOMIC("crtc:%d bw:%llu ctrl:%d\n",
|
||||
tmp_crtc->base.id, tmp_cstate->new_perf.bw_ctl,
|
||||
tmp_cstate->bw_control);
|
||||
|
||||
|
@ -187,11 +187,11 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
|
|||
|
||||
/* convert bandwidth to kb */
|
||||
bw = DIV_ROUND_UP_ULL(bw_sum_of_intfs, 1000);
|
||||
DPU_DEBUG("calculated bandwidth=%uk\n", bw);
|
||||
DRM_DEBUG_ATOMIC("calculated bandwidth=%uk\n", bw);
|
||||
|
||||
threshold = kms->catalog->perf.max_bw_high;
|
||||
|
||||
DPU_DEBUG("final threshold bw limit = %d\n", threshold);
|
||||
DRM_DEBUG_ATOMIC("final threshold bw limit = %d\n", threshold);
|
||||
|
||||
if (!threshold) {
|
||||
DPU_ERROR("no bandwidth limits specified\n");
|
||||
|
@ -228,7 +228,7 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
|
|||
|
||||
perf.bw_ctl += dpu_cstate->new_perf.bw_ctl;
|
||||
|
||||
DPU_DEBUG("crtc=%d bw=%llu paths:%d\n",
|
||||
DRM_DEBUG_ATOMIC("crtc=%d bw=%llu paths:%d\n",
|
||||
tmp_crtc->base.id,
|
||||
dpu_cstate->new_perf.bw_ctl, kms->num_paths);
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc)
|
|||
/* Release the bandwidth */
|
||||
if (kms->perf.enable_bw_release) {
|
||||
trace_dpu_cmd_release_bw(crtc->base.id);
|
||||
DPU_DEBUG("Release BW crtc=%d\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("Release BW crtc=%d\n", crtc->base.id);
|
||||
dpu_crtc->cur_perf.bw_ctl = 0;
|
||||
_dpu_core_perf_crtc_update_bus(kms, crtc);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
|
|||
if (kms->perf.perf_tune.mode == DPU_PERF_MODE_FIXED)
|
||||
clk_rate = kms->perf.fix_core_clk_rate;
|
||||
|
||||
DPU_DEBUG("clk:%llu\n", clk_rate);
|
||||
DRM_DEBUG_ATOMIC("clk:%llu\n", clk_rate);
|
||||
|
||||
return clk_rate;
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
|||
dpu_crtc = to_dpu_crtc(crtc);
|
||||
dpu_cstate = to_dpu_crtc_state(crtc->state);
|
||||
|
||||
DPU_DEBUG("crtc:%d stop_req:%d core_clk:%llu\n",
|
||||
DRM_DEBUG_ATOMIC("crtc:%d stop_req:%d core_clk:%llu\n",
|
||||
crtc->base.id, stop_req, kms->perf.core_clk_rate);
|
||||
|
||||
old = &dpu_crtc->cur_perf;
|
||||
|
@ -362,7 +362,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
|||
(new->max_per_pipe_ib > old->max_per_pipe_ib))) ||
|
||||
(!params_changed && ((new->bw_ctl < old->bw_ctl) ||
|
||||
(new->max_per_pipe_ib < old->max_per_pipe_ib)))) {
|
||||
DPU_DEBUG("crtc=%d p=%d new_bw=%llu,old_bw=%llu\n",
|
||||
DRM_DEBUG_ATOMIC("crtc=%d p=%d new_bw=%llu,old_bw=%llu\n",
|
||||
crtc->base.id, params_changed,
|
||||
new->bw_ctl, old->bw_ctl);
|
||||
old->bw_ctl = new->bw_ctl;
|
||||
|
@ -378,7 +378,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
|||
update_clk = true;
|
||||
}
|
||||
} else {
|
||||
DPU_DEBUG("crtc=%d disable\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc=%d disable\n", crtc->base.id);
|
||||
memset(old, 0, sizeof(*old));
|
||||
update_bus = true;
|
||||
update_clk = true;
|
||||
|
@ -413,7 +413,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
|
|||
}
|
||||
|
||||
kms->perf.core_clk_rate = clk_rate;
|
||||
DPU_DEBUG("update clk rate = %lld HZ\n", clk_rate);
|
||||
DRM_DEBUG_ATOMIC("update clk rate = %lld HZ\n", clk_rate);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -57,8 +57,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
|
|||
{
|
||||
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
|
||||
|
||||
DPU_DEBUG("\n");
|
||||
|
||||
if (!crtc)
|
||||
return;
|
||||
|
||||
|
@ -163,7 +161,7 @@ static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
|
|||
lm->ops.setup_blend_config(lm, pstate->stage,
|
||||
0xFF, 0, blend_op);
|
||||
|
||||
DPU_DEBUG("format:%p4cc, alpha_en:%u blend_op:0x%x\n",
|
||||
DRM_DEBUG_ATOMIC("format:%p4cc, alpha_en:%u blend_op:0x%x\n",
|
||||
&format->base.pixel_format, format->alpha_enable, blend_op);
|
||||
}
|
||||
|
||||
|
@ -220,7 +218,8 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
|
|||
|
||||
dpu_plane_get_ctl_flush(plane, ctl, &flush_mask);
|
||||
set_bit(dpu_plane_pipe(plane), fetch_active);
|
||||
DPU_DEBUG("crtc %d stage:%d - plane %d sspp %d fb %d\n",
|
||||
|
||||
DRM_DEBUG_ATOMIC("crtc %d stage:%d - plane %d sspp %d fb %d\n",
|
||||
crtc->base.id,
|
||||
pstate->stage,
|
||||
plane->base.id,
|
||||
|
@ -278,7 +277,7 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
|
|||
struct dpu_hw_mixer *lm;
|
||||
int i;
|
||||
|
||||
DPU_DEBUG("%s\n", dpu_crtc->name);
|
||||
DRM_DEBUG_ATOMIC("%s\n", dpu_crtc->name);
|
||||
|
||||
for (i = 0; i < cstate->num_mixers; i++) {
|
||||
mixer[i].mixer_op_mode = 0;
|
||||
|
@ -305,7 +304,7 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
|
|||
/* stage config flush mask */
|
||||
ctl->ops.update_pending_flush(ctl, mixer[i].flush_mask);
|
||||
|
||||
DPU_DEBUG("lm %d, op_mode 0x%X, ctl %d, flush mask 0x%x\n",
|
||||
DRM_DEBUG_ATOMIC("lm %d, op_mode 0x%X, ctl %d, flush mask 0x%x\n",
|
||||
mixer[i].hw_lm->idx - LM_0,
|
||||
mixer[i].mixer_op_mode,
|
||||
ctl->idx - CTL_0,
|
||||
|
@ -388,7 +387,7 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work)
|
|||
|
||||
DPU_ATRACE_BEGIN("crtc_frame_event");
|
||||
|
||||
DRM_DEBUG_KMS("crtc%d event:%u ts:%lld\n", crtc->base.id, fevent->event,
|
||||
DRM_DEBUG_ATOMIC("crtc%d event:%u ts:%lld\n", crtc->base.id, fevent->event,
|
||||
ktime_to_ns(fevent->ts));
|
||||
|
||||
if (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE
|
||||
|
@ -407,9 +406,6 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work)
|
|||
fevent->event);
|
||||
}
|
||||
|
||||
if (fevent->event & DPU_ENCODER_FRAME_EVENT_DONE)
|
||||
dpu_core_perf_crtc_update(crtc, 0, false);
|
||||
|
||||
if (fevent->event & (DPU_ENCODER_FRAME_EVENT_DONE
|
||||
| DPU_ENCODER_FRAME_EVENT_ERROR))
|
||||
frame_done = true;
|
||||
|
@ -477,6 +473,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
|
|||
void dpu_crtc_complete_commit(struct drm_crtc *crtc)
|
||||
{
|
||||
trace_dpu_crtc_complete_commit(DRMID(crtc));
|
||||
dpu_core_perf_crtc_update(crtc, 0, false);
|
||||
_dpu_crtc_complete_flip(crtc);
|
||||
}
|
||||
|
||||
|
@ -558,7 +555,7 @@ static void _dpu_crtc_setup_cp_blocks(struct drm_crtc *crtc)
|
|||
/* stage config flush mask */
|
||||
ctl->ops.update_pending_flush(ctl, mixer[i].flush_mask);
|
||||
|
||||
DPU_DEBUG("lm %d, ctl %d, flush mask 0x%x\n",
|
||||
DRM_DEBUG_ATOMIC("lm %d, ctl %d, flush mask 0x%x\n",
|
||||
mixer[i].hw_lm->idx - DSPP_0,
|
||||
ctl->idx - CTL_0,
|
||||
mixer[i].flush_mask);
|
||||
|
@ -572,12 +569,12 @@ static void dpu_crtc_atomic_begin(struct drm_crtc *crtc,
|
|||
struct drm_encoder *encoder;
|
||||
|
||||
if (!crtc->state->enable) {
|
||||
DPU_DEBUG("crtc%d -> enable %d, skip atomic_begin\n",
|
||||
DRM_DEBUG_ATOMIC("crtc%d -> enable %d, skip atomic_begin\n",
|
||||
crtc->base.id, crtc->state->enable);
|
||||
return;
|
||||
}
|
||||
|
||||
DPU_DEBUG("crtc%d\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc%d\n", crtc->base.id);
|
||||
|
||||
_dpu_crtc_setup_lm_bounds(crtc, crtc->state);
|
||||
|
||||
|
@ -617,12 +614,12 @@ static void dpu_crtc_atomic_flush(struct drm_crtc *crtc,
|
|||
struct dpu_crtc_state *cstate;
|
||||
|
||||
if (!crtc->state->enable) {
|
||||
DPU_DEBUG("crtc%d -> enable %d, skip atomic_flush\n",
|
||||
DRM_DEBUG_ATOMIC("crtc%d -> enable %d, skip atomic_flush\n",
|
||||
crtc->base.id, crtc->state->enable);
|
||||
return;
|
||||
}
|
||||
|
||||
DPU_DEBUG("crtc%d\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc%d\n", crtc->base.id);
|
||||
|
||||
dpu_crtc = to_dpu_crtc(crtc);
|
||||
cstate = to_dpu_crtc_state(crtc->state);
|
||||
|
@ -675,7 +672,7 @@ static void dpu_crtc_destroy_state(struct drm_crtc *crtc,
|
|||
{
|
||||
struct dpu_crtc_state *cstate = to_dpu_crtc_state(state);
|
||||
|
||||
DPU_DEBUG("crtc%d\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc%d\n", crtc->base.id);
|
||||
|
||||
__drm_atomic_helper_crtc_destroy_state(state);
|
||||
|
||||
|
@ -688,7 +685,7 @@ static int _dpu_crtc_wait_for_frame_done(struct drm_crtc *crtc)
|
|||
int ret, rc = 0;
|
||||
|
||||
if (!atomic_read(&dpu_crtc->frame_pending)) {
|
||||
DPU_DEBUG("no frames pending\n");
|
||||
DRM_DEBUG_ATOMIC("no frames pending\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -731,9 +728,9 @@ void dpu_crtc_commit_kickoff(struct drm_crtc *crtc)
|
|||
|
||||
if (atomic_inc_return(&dpu_crtc->frame_pending) == 1) {
|
||||
/* acquire bandwidth and other resources */
|
||||
DPU_DEBUG("crtc%d first commit\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc%d first commit\n", crtc->base.id);
|
||||
} else
|
||||
DPU_DEBUG("crtc%d commit\n", crtc->base.id);
|
||||
DRM_DEBUG_ATOMIC("crtc%d commit\n", crtc->base.id);
|
||||
|
||||
dpu_crtc->play_count++;
|
||||
|
||||
|
@ -908,7 +905,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
pstates = kzalloc(sizeof(*pstates) * DPU_STAGE_MAX * 4, GFP_KERNEL);
|
||||
|
||||
if (!crtc_state->enable || !crtc_state->active) {
|
||||
DPU_DEBUG("crtc%d -> enable %d, active %d, skip atomic_check\n",
|
||||
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));
|
||||
|
@ -916,7 +913,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
}
|
||||
|
||||
mode = &crtc_state->adjusted_mode;
|
||||
DPU_DEBUG("%s: check\n", dpu_crtc->name);
|
||||
DRM_DEBUG_ATOMIC("%s: check\n", dpu_crtc->name);
|
||||
|
||||
/* force a full mode set if active state changed */
|
||||
if (crtc_state->active_changed)
|
||||
|
@ -1024,7 +1021,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
}
|
||||
|
||||
pstates[i].dpu_pstate->stage = z_pos + DPU_STAGE_0;
|
||||
DPU_DEBUG("%s: zpos %d\n", dpu_crtc->name, z_pos);
|
||||
DRM_DEBUG_ATOMIC("%s: zpos %d\n", dpu_crtc->name, z_pos);
|
||||
}
|
||||
|
||||
for (i = 0; i < multirect_count; i++) {
|
||||
|
@ -1376,6 +1373,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
|
|||
/* initialize event handling */
|
||||
spin_lock_init(&dpu_crtc->event_lock);
|
||||
|
||||
DPU_DEBUG("%s: successfully initialized crtc\n", dpu_crtc->name);
|
||||
DRM_DEBUG_KMS("%s: successfully initialized crtc\n", dpu_crtc->name);
|
||||
return crtc;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2013 Red Hat
|
||||
* Author: Rob Clark <robdclark@gmail.com>
|
||||
*/
|
||||
|
@ -26,14 +26,15 @@
|
|||
#include "dpu_crtc.h"
|
||||
#include "dpu_trace.h"
|
||||
#include "dpu_core_irq.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
#define DPU_DEBUG_ENC(e, fmt, ...) DPU_DEBUG("enc%d " fmt,\
|
||||
#define DPU_DEBUG_ENC(e, fmt, ...) DRM_DEBUG_ATOMIC("enc%d " fmt,\
|
||||
(e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
|
||||
|
||||
#define DPU_ERROR_ENC(e, fmt, ...) DPU_ERROR("enc%d " fmt,\
|
||||
(e) ? (e)->base.base.id : -1, ##__VA_ARGS__)
|
||||
|
||||
#define DPU_DEBUG_PHYS(p, fmt, ...) DPU_DEBUG("enc%d intf%d pp%d " fmt,\
|
||||
#define DPU_DEBUG_PHYS(p, fmt, ...) DRM_DEBUG_ATOMIC("enc%d intf%d pp%d " fmt,\
|
||||
(p) ? (p)->parent->base.id : -1, \
|
||||
(p) ? (p)->intf_idx - INTF_0 : -1, \
|
||||
(p) ? ((p)->hw_pp ? (p)->hw_pp->idx - PINGPONG_0 : -1) : -1, \
|
||||
|
@ -253,7 +254,7 @@ void dpu_encoder_helper_report_irq_timeout(struct dpu_encoder_phys *phys_enc,
|
|||
}
|
||||
|
||||
static int dpu_encoder_helper_wait_event_timeout(int32_t drm_id,
|
||||
int32_t hw_id, struct dpu_encoder_wait_info *info);
|
||||
u32 irq_idx, struct dpu_encoder_wait_info *info);
|
||||
|
||||
int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
|
||||
enum dpu_intr_idx intr_idx,
|
||||
|
@ -273,27 +274,27 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
|
|||
|
||||
/* return EWOULDBLOCK since we know the wait isn't necessary */
|
||||
if (phys_enc->enable_state == DPU_ENC_DISABLED) {
|
||||
DRM_ERROR("encoder is disabled id=%u, intr=%d, hw=%d, irq=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
DRM_ERROR("encoder is disabled id=%u, intr=%d, irq=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->irq_idx);
|
||||
return -EWOULDBLOCK;
|
||||
}
|
||||
|
||||
if (irq->irq_idx < 0) {
|
||||
DRM_DEBUG_KMS("skip irq wait id=%u, intr=%d, hw=%d, irq=%s",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
DRM_DEBUG_KMS("skip irq wait id=%u, intr=%d, irq=%s",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("id=%u, intr=%d, hw=%d, irq=%d, pp=%d, pending_cnt=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
DRM_DEBUG_KMS("id=%u, intr=%d, irq=%d, pp=%d, pending_cnt=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->irq_idx, phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(wait_info->atomic_cnt));
|
||||
|
||||
ret = dpu_encoder_helper_wait_event_timeout(
|
||||
DRMID(phys_enc->parent),
|
||||
irq->hw_idx,
|
||||
irq->irq_idx,
|
||||
wait_info);
|
||||
|
||||
if (ret <= 0) {
|
||||
|
@ -303,9 +304,9 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
|
|||
unsigned long flags;
|
||||
|
||||
DRM_DEBUG_KMS("irq not triggered id=%u, intr=%d, "
|
||||
"hw=%d, irq=%d, pp=%d, atomic_cnt=%d",
|
||||
"irq=%d, pp=%d, atomic_cnt=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->hw_idx, irq->irq_idx,
|
||||
irq->irq_idx,
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(wait_info->atomic_cnt));
|
||||
local_irq_save(flags);
|
||||
|
@ -315,16 +316,16 @@ int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc,
|
|||
} else {
|
||||
ret = -ETIMEDOUT;
|
||||
DRM_DEBUG_KMS("irq timeout id=%u, intr=%d, "
|
||||
"hw=%d, irq=%d, pp=%d, atomic_cnt=%d",
|
||||
"irq=%d, pp=%d, atomic_cnt=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->hw_idx, irq->irq_idx,
|
||||
irq->irq_idx,
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(wait_info->atomic_cnt));
|
||||
}
|
||||
} else {
|
||||
ret = 0;
|
||||
trace_dpu_enc_irq_wait_success(DRMID(phys_enc->parent),
|
||||
intr_idx, irq->hw_idx, irq->irq_idx,
|
||||
intr_idx, irq->irq_idx,
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
atomic_read(wait_info->atomic_cnt));
|
||||
}
|
||||
|
@ -344,19 +345,9 @@ int dpu_encoder_helper_register_irq(struct dpu_encoder_phys *phys_enc,
|
|||
}
|
||||
irq = &phys_enc->irq[intr_idx];
|
||||
|
||||
if (irq->irq_idx >= 0) {
|
||||
DPU_DEBUG_PHYS(phys_enc,
|
||||
"skipping already registered irq %s type %d\n",
|
||||
irq->name, irq->intr_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
irq->irq_idx = dpu_core_irq_idx_lookup(phys_enc->dpu_kms,
|
||||
irq->intr_type, irq->hw_idx);
|
||||
if (irq->irq_idx < 0) {
|
||||
DPU_ERROR_PHYS(phys_enc,
|
||||
"failed to lookup IRQ index for %s type:%d\n",
|
||||
irq->name, irq->intr_type);
|
||||
"invalid IRQ index:%d\n", irq->irq_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -370,19 +361,8 @@ int dpu_encoder_helper_register_irq(struct dpu_encoder_phys *phys_enc,
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = dpu_core_irq_enable(phys_enc->dpu_kms, &irq->irq_idx, 1);
|
||||
if (ret) {
|
||||
DRM_ERROR("enable failed id=%u, intr=%d, hw=%d, irq=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
irq->irq_idx);
|
||||
dpu_core_irq_unregister_callback(phys_enc->dpu_kms,
|
||||
irq->irq_idx, &irq->cb);
|
||||
irq->irq_idx = -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
trace_dpu_enc_irq_register_success(DRMID(phys_enc->parent), intr_idx,
|
||||
irq->hw_idx, irq->irq_idx);
|
||||
irq->irq_idx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -397,31 +377,22 @@ int dpu_encoder_helper_unregister_irq(struct dpu_encoder_phys *phys_enc,
|
|||
|
||||
/* silently skip irqs that weren't registered */
|
||||
if (irq->irq_idx < 0) {
|
||||
DRM_ERROR("duplicate unregister id=%u, intr=%d, hw=%d, irq=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
DRM_ERROR("duplicate unregister id=%u, intr=%d, irq=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->irq_idx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = dpu_core_irq_disable(phys_enc->dpu_kms, &irq->irq_idx, 1);
|
||||
if (ret) {
|
||||
DRM_ERROR("disable failed id=%u, intr=%d, hw=%d, irq=%d ret=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
irq->irq_idx, ret);
|
||||
}
|
||||
|
||||
ret = dpu_core_irq_unregister_callback(phys_enc->dpu_kms, irq->irq_idx,
|
||||
&irq->cb);
|
||||
if (ret) {
|
||||
DRM_ERROR("unreg cb fail id=%u, intr=%d, hw=%d, irq=%d ret=%d",
|
||||
DRMID(phys_enc->parent), intr_idx, irq->hw_idx,
|
||||
DRM_ERROR("unreg cb fail id=%u, intr=%d, irq=%d ret=%d",
|
||||
DRMID(phys_enc->parent), intr_idx,
|
||||
irq->irq_idx, ret);
|
||||
}
|
||||
|
||||
trace_dpu_enc_irq_unregister_success(DRMID(phys_enc->parent), intr_idx,
|
||||
irq->hw_idx, irq->irq_idx);
|
||||
|
||||
irq->irq_idx = -EINVAL;
|
||||
irq->irq_idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -820,13 +791,13 @@ static int dpu_encoder_resource_control(struct drm_encoder *drm_enc,
|
|||
|
||||
/* return if the resource control is already in ON state */
|
||||
if (dpu_enc->rc_state == DPU_ENC_RC_STATE_ON) {
|
||||
DRM_DEBUG_KMS("id;%u, sw_event:%d, rc in ON state\n",
|
||||
DRM_DEBUG_ATOMIC("id;%u, sw_event:%d, rc in ON state\n",
|
||||
DRMID(drm_enc), sw_event);
|
||||
mutex_unlock(&dpu_enc->rc_lock);
|
||||
return 0;
|
||||
} else if (dpu_enc->rc_state != DPU_ENC_RC_STATE_OFF &&
|
||||
dpu_enc->rc_state != DPU_ENC_RC_STATE_IDLE) {
|
||||
DRM_DEBUG_KMS("id;%u, sw_event:%d, rc in state %d\n",
|
||||
DRM_DEBUG_ATOMIC("id;%u, sw_event:%d, rc in state %d\n",
|
||||
DRMID(drm_enc), sw_event,
|
||||
dpu_enc->rc_state);
|
||||
mutex_unlock(&dpu_enc->rc_lock);
|
||||
|
@ -1336,6 +1307,11 @@ static void dpu_encoder_underrun_callback(struct drm_encoder *drm_enc,
|
|||
|
||||
DPU_ATRACE_BEGIN("encoder_underrun_callback");
|
||||
atomic_inc(&phy_enc->underrun_cnt);
|
||||
|
||||
/* trigger dump only on the first underrun */
|
||||
if (atomic_read(&phy_enc->underrun_cnt) == 1)
|
||||
msm_disp_snapshot_state(drm_enc->dev);
|
||||
|
||||
trace_dpu_enc_underrun_cb(DRMID(drm_enc),
|
||||
atomic_read(&phy_enc->underrun_cnt));
|
||||
DPU_ATRACE_END("encoder_underrun_callback");
|
||||
|
@ -1453,11 +1429,6 @@ static void dpu_encoder_off_work(struct work_struct *work)
|
|||
struct dpu_encoder_virt *dpu_enc = container_of(work,
|
||||
struct dpu_encoder_virt, delayed_off_work.work);
|
||||
|
||||
if (!dpu_enc) {
|
||||
DPU_ERROR("invalid dpu encoder\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dpu_encoder_resource_control(&dpu_enc->base,
|
||||
DPU_ENC_RC_EVENT_ENTER_IDLE);
|
||||
|
||||
|
@ -1537,7 +1508,7 @@ void dpu_encoder_helper_trigger_start(struct dpu_encoder_phys *phys_enc)
|
|||
|
||||
static int dpu_encoder_helper_wait_event_timeout(
|
||||
int32_t drm_id,
|
||||
int32_t hw_id,
|
||||
u32 irq_idx,
|
||||
struct dpu_encoder_wait_info *info)
|
||||
{
|
||||
int rc = 0;
|
||||
|
@ -1550,7 +1521,7 @@ static int dpu_encoder_helper_wait_event_timeout(
|
|||
atomic_read(info->atomic_cnt) == 0, jiffies);
|
||||
time = ktime_to_ms(ktime_get());
|
||||
|
||||
trace_dpu_enc_wait_event_timeout(drm_id, hw_id, rc, time,
|
||||
trace_dpu_enc_wait_event_timeout(drm_id, irq_idx, rc, time,
|
||||
expected_time,
|
||||
atomic_read(info->atomic_cnt));
|
||||
/* If we timed out, counter is valid and time is less, wait again */
|
||||
|
@ -1565,19 +1536,23 @@ static void dpu_encoder_helper_hw_reset(struct dpu_encoder_phys *phys_enc)
|
|||
struct dpu_encoder_virt *dpu_enc;
|
||||
struct dpu_hw_ctl *ctl;
|
||||
int rc;
|
||||
struct drm_encoder *drm_enc;
|
||||
|
||||
dpu_enc = to_dpu_encoder_virt(phys_enc->parent);
|
||||
ctl = phys_enc->hw_ctl;
|
||||
drm_enc = phys_enc->parent;
|
||||
|
||||
if (!ctl->ops.reset)
|
||||
return;
|
||||
|
||||
DRM_DEBUG_KMS("id:%u ctl %d reset\n", DRMID(phys_enc->parent),
|
||||
DRM_DEBUG_KMS("id:%u ctl %d reset\n", DRMID(drm_enc),
|
||||
ctl->idx);
|
||||
|
||||
rc = ctl->ops.reset(ctl);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
DPU_ERROR_ENC(dpu_enc, "ctl %d reset failure\n", ctl->idx);
|
||||
msm_disp_snapshot_state(drm_enc->dev);
|
||||
}
|
||||
|
||||
phys_enc->enable_state = DPU_ENC_ENABLED;
|
||||
}
|
||||
|
@ -1797,11 +1772,6 @@ static void dpu_encoder_vsync_event_work_handler(struct kthread_work *work)
|
|||
struct dpu_encoder_virt, vsync_event_work);
|
||||
ktime_t wakeup_time;
|
||||
|
||||
if (!dpu_enc) {
|
||||
DPU_ERROR("invalid dpu encoder\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (dpu_encoder_vsync_time(&dpu_enc->base, &wakeup_time))
|
||||
return;
|
||||
|
||||
|
@ -2068,8 +2038,6 @@ static int dpu_encoder_setup_display(struct dpu_encoder_virt *dpu_enc,
|
|||
phys_params.parent_ops = &dpu_encoder_parent_ops;
|
||||
phys_params.enc_spinlock = &dpu_enc->enc_spinlock;
|
||||
|
||||
DPU_DEBUG("\n");
|
||||
|
||||
switch (disp_info->intf_type) {
|
||||
case DRM_MODE_ENCODER_DSI:
|
||||
intf_type = INTF_DSI;
|
||||
|
|
|
@ -165,18 +165,14 @@ enum dpu_intr_idx {
|
|||
/**
|
||||
* dpu_encoder_irq - tracking structure for interrupts
|
||||
* @name: string name of interrupt
|
||||
* @intr_type: Encoder interrupt type
|
||||
* @intr_idx: Encoder interrupt enumeration
|
||||
* @hw_idx: HW Block ID
|
||||
* @irq_idx: IRQ interface lookup index from DPU IRQ framework
|
||||
* will be -EINVAL if IRQ is not registered
|
||||
* @irq_cb: interrupt callback
|
||||
*/
|
||||
struct dpu_encoder_irq {
|
||||
const char *name;
|
||||
enum dpu_intr_type intr_type;
|
||||
enum dpu_intr_idx intr_idx;
|
||||
int hw_idx;
|
||||
int irq_idx;
|
||||
struct dpu_irq_callback cb;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
@ -11,6 +11,7 @@
|
|||
#include "dpu_core_irq.h"
|
||||
#include "dpu_formats.h"
|
||||
#include "dpu_trace.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
#define DPU_DEBUG_CMDENC(e, fmt, ...) DPU_DEBUG("enc%d intf%d " fmt, \
|
||||
(e) && (e)->base.parent ? \
|
||||
|
@ -143,28 +144,6 @@ static void dpu_encoder_phys_cmd_underrun_irq(void *arg, int irq_idx)
|
|||
phys_enc);
|
||||
}
|
||||
|
||||
static void _dpu_encoder_phys_cmd_setup_irq_hw_idx(
|
||||
struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
struct dpu_encoder_irq *irq;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_CTL_START];
|
||||
irq->hw_idx = phys_enc->hw_ctl->idx;
|
||||
irq->irq_idx = -EINVAL;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_PINGPONG];
|
||||
irq->hw_idx = phys_enc->hw_pp->idx;
|
||||
irq->irq_idx = -EINVAL;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_RDPTR];
|
||||
irq->hw_idx = phys_enc->hw_pp->idx;
|
||||
irq->irq_idx = -EINVAL;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
irq->hw_idx = phys_enc->intf_idx;
|
||||
irq->irq_idx = -EINVAL;
|
||||
}
|
||||
|
||||
static void dpu_encoder_phys_cmd_mode_set(
|
||||
struct dpu_encoder_phys *phys_enc,
|
||||
struct drm_display_mode *mode,
|
||||
|
@ -172,6 +151,7 @@ static void dpu_encoder_phys_cmd_mode_set(
|
|||
{
|
||||
struct dpu_encoder_phys_cmd *cmd_enc =
|
||||
to_dpu_encoder_phys_cmd(phys_enc);
|
||||
struct dpu_encoder_irq *irq;
|
||||
|
||||
if (!mode || !adj_mode) {
|
||||
DPU_ERROR("invalid args\n");
|
||||
|
@ -181,7 +161,17 @@ static void dpu_encoder_phys_cmd_mode_set(
|
|||
DPU_DEBUG_CMDENC(cmd_enc, "caching mode:\n");
|
||||
drm_mode_debug_printmodeline(adj_mode);
|
||||
|
||||
_dpu_encoder_phys_cmd_setup_irq_hw_idx(phys_enc);
|
||||
irq = &phys_enc->irq[INTR_IDX_CTL_START];
|
||||
irq->irq_idx = phys_enc->hw_ctl->caps->intr_start;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_PINGPONG];
|
||||
irq->irq_idx = phys_enc->hw_pp->caps->intr_done;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_RDPTR];
|
||||
irq->irq_idx = phys_enc->hw_pp->caps->intr_rdptr;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
irq->irq_idx = phys_enc->hw_intf->cap->intr_underrun;
|
||||
}
|
||||
|
||||
static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
|
||||
|
@ -191,10 +181,13 @@ static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
|
|||
to_dpu_encoder_phys_cmd(phys_enc);
|
||||
u32 frame_event = DPU_ENCODER_FRAME_EVENT_ERROR;
|
||||
bool do_log = false;
|
||||
struct drm_encoder *drm_enc;
|
||||
|
||||
if (!phys_enc->hw_pp)
|
||||
return -EINVAL;
|
||||
|
||||
drm_enc = phys_enc->parent;
|
||||
|
||||
cmd_enc->pp_timeout_report_cnt++;
|
||||
if (cmd_enc->pp_timeout_report_cnt == PP_TIMEOUT_MAX_TRIALS) {
|
||||
frame_event |= DPU_ENCODER_FRAME_EVENT_PANEL_DEAD;
|
||||
|
@ -203,7 +196,7 @@ static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
|
|||
do_log = true;
|
||||
}
|
||||
|
||||
trace_dpu_enc_phys_cmd_pdone_timeout(DRMID(phys_enc->parent),
|
||||
trace_dpu_enc_phys_cmd_pdone_timeout(DRMID(drm_enc),
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
cmd_enc->pp_timeout_report_cnt,
|
||||
atomic_read(&phys_enc->pending_kickoff_cnt),
|
||||
|
@ -212,12 +205,12 @@ static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
|
|||
/* to avoid flooding, only log first time, and "dead" time */
|
||||
if (do_log) {
|
||||
DRM_ERROR("id:%d pp:%d kickoff timeout %d cnt %d koff_cnt %d\n",
|
||||
DRMID(phys_enc->parent),
|
||||
DRMID(drm_enc),
|
||||
phys_enc->hw_pp->idx - PINGPONG_0,
|
||||
phys_enc->hw_ctl->idx - CTL_0,
|
||||
cmd_enc->pp_timeout_report_cnt,
|
||||
atomic_read(&phys_enc->pending_kickoff_cnt));
|
||||
|
||||
msm_disp_snapshot_state(drm_enc->dev);
|
||||
dpu_encoder_helper_unregister_irq(phys_enc, INTR_IDX_RDPTR);
|
||||
}
|
||||
|
||||
|
@ -228,7 +221,7 @@ static int _dpu_encoder_phys_cmd_handle_ppdone_timeout(
|
|||
|
||||
if (phys_enc->parent_ops->handle_frame_done)
|
||||
phys_enc->parent_ops->handle_frame_done(
|
||||
phys_enc->parent, phys_enc, frame_event);
|
||||
drm_enc, phys_enc, frame_event);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
@ -685,10 +678,6 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete(
|
|||
static int dpu_encoder_phys_cmd_wait_for_commit_done(
|
||||
struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
struct dpu_encoder_phys_cmd *cmd_enc;
|
||||
|
||||
cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
|
||||
|
||||
/* only required for master controller */
|
||||
if (!dpu_encoder_phys_cmd_is_master(phys_enc))
|
||||
return 0;
|
||||
|
@ -795,31 +784,26 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
|
|||
irq = &phys_enc->irq[i];
|
||||
INIT_LIST_HEAD(&irq->cb.list);
|
||||
irq->irq_idx = -EINVAL;
|
||||
irq->hw_idx = -EINVAL;
|
||||
irq->cb.arg = phys_enc;
|
||||
}
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_CTL_START];
|
||||
irq->name = "ctl_start";
|
||||
irq->intr_type = DPU_IRQ_TYPE_CTL_START;
|
||||
irq->intr_idx = INTR_IDX_CTL_START;
|
||||
irq->cb.func = dpu_encoder_phys_cmd_ctl_start_irq;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_PINGPONG];
|
||||
irq->name = "pp_done";
|
||||
irq->intr_type = DPU_IRQ_TYPE_PING_PONG_COMP;
|
||||
irq->intr_idx = INTR_IDX_PINGPONG;
|
||||
irq->cb.func = dpu_encoder_phys_cmd_pp_tx_done_irq;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_RDPTR];
|
||||
irq->name = "pp_rd_ptr";
|
||||
irq->intr_type = DPU_IRQ_TYPE_PING_PONG_RD_PTR;
|
||||
irq->intr_idx = INTR_IDX_RDPTR;
|
||||
irq->cb.func = dpu_encoder_phys_cmd_pp_rd_ptr_irq;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
irq->name = "underrun";
|
||||
irq->intr_type = DPU_IRQ_TYPE_INTF_UNDER_RUN;
|
||||
irq->intr_idx = INTR_IDX_UNDERRUN;
|
||||
irq->cb.func = dpu_encoder_phys_cmd_underrun_irq;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2015-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
@ -9,6 +9,7 @@
|
|||
#include "dpu_core_irq.h"
|
||||
#include "dpu_formats.h"
|
||||
#include "dpu_trace.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
#define DPU_DEBUG_VIDENC(e, fmt, ...) DPU_DEBUG("enc%d intf%d " fmt, \
|
||||
(e) && (e)->parent ? \
|
||||
|
@ -284,7 +285,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
|
|||
intf_cfg.stream_sel = 0; /* Don't care value for video mode */
|
||||
intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc);
|
||||
if (phys_enc->hw_pp->merge_3d)
|
||||
intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->id;
|
||||
intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx;
|
||||
|
||||
spin_lock_irqsave(phys_enc->enc_spinlock, lock_flags);
|
||||
phys_enc->hw_intf->ops.setup_timing_gen(phys_enc->hw_intf,
|
||||
|
@ -298,11 +299,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
|
|||
true,
|
||||
phys_enc->hw_pp->idx);
|
||||
|
||||
if (phys_enc->hw_pp->merge_3d) {
|
||||
struct dpu_hw_merge_3d *merge_3d = to_dpu_hw_merge_3d(phys_enc->hw_pp->merge_3d);
|
||||
|
||||
merge_3d->ops.setup_3d_mode(merge_3d, intf_cfg.mode_3d);
|
||||
}
|
||||
if (phys_enc->hw_pp->merge_3d)
|
||||
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d, intf_cfg.mode_3d);
|
||||
|
||||
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
|
||||
|
||||
|
@ -363,38 +361,24 @@ static bool dpu_encoder_phys_vid_needs_single_flush(
|
|||
return phys_enc->split_role != ENC_ROLE_SOLO;
|
||||
}
|
||||
|
||||
static void _dpu_encoder_phys_vid_setup_irq_hw_idx(
|
||||
struct dpu_encoder_phys *phys_enc)
|
||||
{
|
||||
struct dpu_encoder_irq *irq;
|
||||
|
||||
/*
|
||||
* Initialize irq->hw_idx only when irq is not registered.
|
||||
* Prevent invalidating irq->irq_idx as modeset may be
|
||||
* called many times during dfps.
|
||||
*/
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_VSYNC];
|
||||
if (irq->irq_idx < 0)
|
||||
irq->hw_idx = phys_enc->intf_idx;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
if (irq->irq_idx < 0)
|
||||
irq->hw_idx = phys_enc->intf_idx;
|
||||
}
|
||||
|
||||
static void dpu_encoder_phys_vid_mode_set(
|
||||
struct dpu_encoder_phys *phys_enc,
|
||||
struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adj_mode)
|
||||
{
|
||||
struct dpu_encoder_irq *irq;
|
||||
|
||||
if (adj_mode) {
|
||||
phys_enc->cached_mode = *adj_mode;
|
||||
drm_mode_debug_printmodeline(adj_mode);
|
||||
DPU_DEBUG_VIDENC(phys_enc, "caching mode:\n");
|
||||
}
|
||||
|
||||
_dpu_encoder_phys_vid_setup_irq_hw_idx(phys_enc);
|
||||
irq = &phys_enc->irq[INTR_IDX_VSYNC];
|
||||
irq->irq_idx = phys_enc->hw_intf->cap->intr_vsync;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
irq->irq_idx = phys_enc->hw_intf->cap->intr_underrun;
|
||||
}
|
||||
|
||||
static int dpu_encoder_phys_vid_control_vblank_irq(
|
||||
|
@ -416,7 +400,7 @@ static int dpu_encoder_phys_vid_control_vblank_irq(
|
|||
goto end;
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("id:%u enable=%d/%d\n", DRMID(phys_enc->parent), enable,
|
||||
DRM_DEBUG_VBL("id:%u enable=%d/%d\n", DRMID(phys_enc->parent), enable,
|
||||
atomic_read(&phys_enc->vblank_refcount));
|
||||
|
||||
if (enable && atomic_inc_return(&phys_enc->vblank_refcount) == 1)
|
||||
|
@ -461,13 +445,14 @@ static void dpu_encoder_phys_vid_enable(struct dpu_encoder_phys *phys_enc)
|
|||
|
||||
ctl->ops.update_pending_flush_intf(ctl, phys_enc->hw_intf->idx);
|
||||
if (ctl->ops.update_pending_flush_merge_3d && phys_enc->hw_pp->merge_3d)
|
||||
ctl->ops.update_pending_flush_merge_3d(ctl, phys_enc->hw_pp->merge_3d->id);
|
||||
ctl->ops.update_pending_flush_merge_3d(ctl, phys_enc->hw_pp->merge_3d->idx);
|
||||
|
||||
skip_flush:
|
||||
DPU_DEBUG_VIDENC(phys_enc,
|
||||
"update pending flush ctl %d intf %d\n",
|
||||
ctl->idx - CTL_0, phys_enc->hw_intf->idx);
|
||||
|
||||
atomic_set(&phys_enc->underrun_cnt, 0);
|
||||
|
||||
/* ctl_flush & timing engine enable will be triggered by framework */
|
||||
if (phys_enc->enable_state == DPU_ENC_DISABLED)
|
||||
|
@ -537,6 +522,9 @@ static void dpu_encoder_phys_vid_prepare_for_kickoff(
|
|||
{
|
||||
struct dpu_hw_ctl *ctl;
|
||||
int rc;
|
||||
struct drm_encoder *drm_enc;
|
||||
|
||||
drm_enc = phys_enc->parent;
|
||||
|
||||
ctl = phys_enc->hw_ctl;
|
||||
if (!ctl->ops.wait_reset_status)
|
||||
|
@ -550,6 +538,7 @@ static void dpu_encoder_phys_vid_prepare_for_kickoff(
|
|||
if (rc) {
|
||||
DPU_ERROR_VIDENC(phys_enc, "ctl %d reset failure: %d\n",
|
||||
ctl->idx, rc);
|
||||
msm_disp_snapshot_state(drm_enc->dev);
|
||||
dpu_encoder_helper_unregister_irq(phys_enc, INTR_IDX_VSYNC);
|
||||
}
|
||||
}
|
||||
|
@ -636,7 +625,7 @@ static void dpu_encoder_phys_vid_irq_control(struct dpu_encoder_phys *phys_enc,
|
|||
|
||||
if (enable) {
|
||||
ret = dpu_encoder_phys_vid_control_vblank_irq(phys_enc, true);
|
||||
if (ret)
|
||||
if (WARN_ON(ret))
|
||||
return;
|
||||
|
||||
dpu_encoder_helper_register_irq(phys_enc, INTR_IDX_UNDERRUN);
|
||||
|
@ -738,19 +727,16 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
|
|||
irq = &phys_enc->irq[i];
|
||||
INIT_LIST_HEAD(&irq->cb.list);
|
||||
irq->irq_idx = -EINVAL;
|
||||
irq->hw_idx = -EINVAL;
|
||||
irq->cb.arg = phys_enc;
|
||||
}
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_VSYNC];
|
||||
irq->name = "vsync_irq";
|
||||
irq->intr_type = DPU_IRQ_TYPE_INTF_VSYNC;
|
||||
irq->intr_idx = INTR_IDX_VSYNC;
|
||||
irq->cb.func = dpu_encoder_phys_vid_vblank_irq;
|
||||
|
||||
irq = &phys_enc->irq[INTR_IDX_UNDERRUN];
|
||||
irq->name = "underrun";
|
||||
irq->intr_type = DPU_IRQ_TYPE_INTF_UNDER_RUN;
|
||||
irq->intr_idx = INTR_IDX_UNDERRUN;
|
||||
irq->cb.func = dpu_encoder_phys_vid_underrun_irq;
|
||||
|
||||
|
|
|
@ -992,7 +992,7 @@ const struct dpu_format *dpu_get_dpu_format_ext(
|
|||
* Currently only support exactly zero or one modifier.
|
||||
* All planes use the same modifier.
|
||||
*/
|
||||
DPU_DEBUG("plane format modifier 0x%llX\n", modifier);
|
||||
DRM_DEBUG_ATOMIC("plane format modifier 0x%llX\n", modifier);
|
||||
|
||||
switch (modifier) {
|
||||
case 0:
|
||||
|
@ -1002,7 +1002,7 @@ const struct dpu_format *dpu_get_dpu_format_ext(
|
|||
case DRM_FORMAT_MOD_QCOM_COMPRESSED:
|
||||
map = dpu_format_map_ubwc;
|
||||
map_size = ARRAY_SIZE(dpu_format_map_ubwc);
|
||||
DPU_DEBUG("found fmt: %4.4s DRM_FORMAT_MOD_QCOM_COMPRESSED\n",
|
||||
DRM_DEBUG_ATOMIC("found fmt: %4.4s DRM_FORMAT_MOD_QCOM_COMPRESSED\n",
|
||||
(char *)&format);
|
||||
break;
|
||||
default:
|
||||
|
@ -1021,7 +1021,7 @@ const struct dpu_format *dpu_get_dpu_format_ext(
|
|||
DPU_ERROR("unsupported fmt: %4.4s modifier 0x%llX\n",
|
||||
(char *)&format, modifier);
|
||||
else
|
||||
DPU_DEBUG("fmt %4.4s mod 0x%llX ubwc %d yuv %d\n",
|
||||
DRM_DEBUG_ATOMIC("fmt %4.4s mod 0x%llX ubwc %d yuv %d\n",
|
||||
(char *)&format, modifier,
|
||||
DPU_FORMAT_IS_UBWC(fmt),
|
||||
DPU_FORMAT_IS_YUV(fmt));
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "dpu_hw_mdss.h"
|
||||
#include "dpu_hw_blk.h"
|
||||
|
||||
/* Serialization lock for dpu_hw_blk_list */
|
||||
static DEFINE_MUTEX(dpu_hw_blk_lock);
|
||||
|
||||
/* List of all hw block objects */
|
||||
static LIST_HEAD(dpu_hw_blk_list);
|
||||
|
||||
/**
|
||||
* dpu_hw_blk_init - initialize hw block object
|
||||
* @hw_blk: pointer to hw block object
|
||||
* @type: hw block type - enum dpu_hw_blk_type
|
||||
* @id: instance id of the hw block
|
||||
* @ops: Pointer to block operations
|
||||
*/
|
||||
void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id,
|
||||
struct dpu_hw_blk_ops *ops)
|
||||
{
|
||||
INIT_LIST_HEAD(&hw_blk->list);
|
||||
hw_blk->type = type;
|
||||
hw_blk->id = id;
|
||||
atomic_set(&hw_blk->refcount, 0);
|
||||
|
||||
if (ops)
|
||||
hw_blk->ops = *ops;
|
||||
|
||||
mutex_lock(&dpu_hw_blk_lock);
|
||||
list_add(&hw_blk->list, &dpu_hw_blk_list);
|
||||
mutex_unlock(&dpu_hw_blk_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* dpu_hw_blk_destroy - destroy hw block object.
|
||||
* @hw_blk: pointer to hw block object
|
||||
* return: none
|
||||
*/
|
||||
void dpu_hw_blk_destroy(struct dpu_hw_blk *hw_blk)
|
||||
{
|
||||
if (!hw_blk) {
|
||||
pr_err("invalid parameters\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (atomic_read(&hw_blk->refcount))
|
||||
pr_err("hw_blk:%d.%d invalid refcount\n", hw_blk->type,
|
||||
hw_blk->id);
|
||||
|
||||
mutex_lock(&dpu_hw_blk_lock);
|
||||
list_del(&hw_blk->list);
|
||||
mutex_unlock(&dpu_hw_blk_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* dpu_hw_blk_get - get hw_blk from free pool
|
||||
* @hw_blk: if specified, increment reference count only
|
||||
* @type: if hw_blk is not specified, allocate the next available of this type
|
||||
* @id: if specified (>= 0), allocate the given instance of the above type
|
||||
* return: pointer to hw block object
|
||||
*/
|
||||
struct dpu_hw_blk *dpu_hw_blk_get(struct dpu_hw_blk *hw_blk, u32 type, int id)
|
||||
{
|
||||
struct dpu_hw_blk *curr;
|
||||
int rc, refcount;
|
||||
|
||||
if (!hw_blk) {
|
||||
mutex_lock(&dpu_hw_blk_lock);
|
||||
list_for_each_entry(curr, &dpu_hw_blk_list, list) {
|
||||
if ((curr->type != type) ||
|
||||
(id >= 0 && curr->id != id) ||
|
||||
(id < 0 &&
|
||||
atomic_read(&curr->refcount)))
|
||||
continue;
|
||||
|
||||
hw_blk = curr;
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&dpu_hw_blk_lock);
|
||||
}
|
||||
|
||||
if (!hw_blk) {
|
||||
pr_debug("no hw_blk:%d\n", type);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
refcount = atomic_inc_return(&hw_blk->refcount);
|
||||
|
||||
if (refcount == 1 && hw_blk->ops.start) {
|
||||
rc = hw_blk->ops.start(hw_blk);
|
||||
if (rc) {
|
||||
pr_err("failed to start hw_blk:%d rc:%d\n", type, rc);
|
||||
goto error_start;
|
||||
}
|
||||
}
|
||||
|
||||
pr_debug("hw_blk:%d.%d refcount:%d\n", hw_blk->type,
|
||||
hw_blk->id, refcount);
|
||||
return hw_blk;
|
||||
|
||||
error_start:
|
||||
dpu_hw_blk_put(hw_blk);
|
||||
return ERR_PTR(rc);
|
||||
}
|
||||
|
||||
/**
|
||||
* dpu_hw_blk_put - put hw_blk to free pool if decremented refcount is zero
|
||||
* @hw_blk: hw block to be freed
|
||||
*/
|
||||
void dpu_hw_blk_put(struct dpu_hw_blk *hw_blk)
|
||||
{
|
||||
if (!hw_blk) {
|
||||
pr_err("invalid parameters\n");
|
||||
return;
|
||||
}
|
||||
|
||||
pr_debug("hw_blk:%d.%d refcount:%d\n", hw_blk->type, hw_blk->id,
|
||||
atomic_read(&hw_blk->refcount));
|
||||
|
||||
if (!atomic_read(&hw_blk->refcount)) {
|
||||
pr_err("hw_blk:%d.%d invalid put\n", hw_blk->type, hw_blk->id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (atomic_dec_return(&hw_blk->refcount))
|
||||
return;
|
||||
|
||||
if (hw_blk->ops.stop)
|
||||
hw_blk->ops.stop(hw_blk);
|
||||
}
|
|
@ -7,19 +7,9 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/atomic.h>
|
||||
|
||||
struct dpu_hw_blk;
|
||||
|
||||
/**
|
||||
* struct dpu_hw_blk_ops - common hardware block operations
|
||||
* @start: start operation on first get
|
||||
* @stop: stop operation on last put
|
||||
*/
|
||||
struct dpu_hw_blk_ops {
|
||||
int (*start)(struct dpu_hw_blk *);
|
||||
void (*stop)(struct dpu_hw_blk *);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_hw_blk - definition of hardware block object
|
||||
|
@ -29,17 +19,7 @@ struct dpu_hw_blk_ops {
|
|||
* @refcount: reference/usage count
|
||||
*/
|
||||
struct dpu_hw_blk {
|
||||
struct list_head list;
|
||||
u32 type;
|
||||
int id;
|
||||
atomic_t refcount;
|
||||
struct dpu_hw_blk_ops ops;
|
||||
/* opaque */
|
||||
};
|
||||
|
||||
void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id,
|
||||
struct dpu_hw_blk_ops *ops);
|
||||
void dpu_hw_blk_destroy(struct dpu_hw_blk *hw_blk);
|
||||
|
||||
struct dpu_hw_blk *dpu_hw_blk_get(struct dpu_hw_blk *hw_blk, u32 type, int id);
|
||||
void dpu_hw_blk_put(struct dpu_hw_blk *hw_blk);
|
||||
#endif /*_DPU_HW_BLK_H */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/of_address.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include "dpu_hw_mdss.h"
|
||||
#include "dpu_hw_interrupts.h"
|
||||
#include "dpu_hw_catalog.h"
|
||||
#include "dpu_kms.h"
|
||||
|
||||
|
@ -56,12 +57,39 @@
|
|||
|
||||
#define INTF_SC7280_MASK INTF_SC7180_MASK | BIT(DPU_DATA_HCTL_EN)
|
||||
|
||||
#define INTR_SC7180_MASK \
|
||||
(BIT(DPU_IRQ_TYPE_PING_PONG_RD_PTR) |\
|
||||
BIT(DPU_IRQ_TYPE_PING_PONG_WR_PTR) |\
|
||||
BIT(DPU_IRQ_TYPE_PING_PONG_AUTO_REF) |\
|
||||
BIT(DPU_IRQ_TYPE_PING_PONG_TEAR_CHECK) |\
|
||||
BIT(DPU_IRQ_TYPE_PING_PONG_TE_CHECK))
|
||||
#define IRQ_SDM845_MASK (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_AD4_0_INTR) | \
|
||||
BIT(MDP_AD4_1_INTR))
|
||||
|
||||
#define IRQ_SC7180_MASK (BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
BIT(MDP_SSPP_TOP0_HIST_INTR) | \
|
||||
BIT(MDP_INTF0_INTR) | \
|
||||
BIT(MDP_INTF1_INTR))
|
||||
|
||||
#define IRQ_SC7280_MASK (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))
|
||||
|
||||
#define IRQ_SM8250_MASK (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))
|
||||
|
||||
|
||||
#define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)
|
||||
#define DEFAULT_DPU_LINE_WIDTH 2048
|
||||
|
@ -315,27 +343,32 @@ static const struct dpu_ctl_cfg sdm845_ctl[] = {
|
|||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0xE4,
|
||||
.features = BIT(DPU_CTL_SPLIT_DISPLAY)
|
||||
.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)
|
||||
.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
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0xE4,
|
||||
.features = 0
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0xE4,
|
||||
.features = 0
|
||||
.features = 0,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -343,17 +376,20 @@ static const struct dpu_ctl_cfg sc7180_ctl[] = {
|
|||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x1000, .len = 0xE4,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
.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 = 0xE4,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
.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 = 0xE4,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -361,32 +397,38 @@ 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)
|
||||
.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)
|
||||
.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)
|
||||
.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)
|
||||
.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)
|
||||
.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)
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG),
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -394,22 +436,26 @@ static const struct dpu_ctl_cfg sc7280_ctl[] = {
|
|||
{
|
||||
.name = "ctl_0", .id = CTL_0,
|
||||
.base = 0x15000, .len = 0x1E8,
|
||||
.features = CTL_SC7280_MASK
|
||||
.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
|
||||
.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
|
||||
.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
|
||||
.features = CTL_SC7280_MASK,
|
||||
.intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -690,42 +736,66 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {
|
|||
.len = 0x20, .version = 0x20000},
|
||||
};
|
||||
|
||||
#define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk) \
|
||||
#define PP_BLK_TE(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = 0xd4, \
|
||||
.features = PINGPONG_SDM845_SPLIT_MASK, \
|
||||
.merge_3d = _merge_3d, \
|
||||
.sblk = &_sblk \
|
||||
.sblk = &_sblk, \
|
||||
.intr_done = _done, \
|
||||
.intr_rdptr = _rdptr, \
|
||||
}
|
||||
#define PP_BLK(_name, _id, _base, _merge_3d, _sblk) \
|
||||
#define PP_BLK(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = 0xd4, \
|
||||
.features = PINGPONG_SDM845_MASK, \
|
||||
.merge_3d = _merge_3d, \
|
||||
.sblk = &_sblk \
|
||||
.sblk = &_sblk, \
|
||||
.intr_done = _done, \
|
||||
.intr_rdptr = _rdptr, \
|
||||
}
|
||||
|
||||
static const struct dpu_pingpong_cfg sdm845_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk_te),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, 0, sdm845_pp_sblk),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, 0, sdm845_pp_sblk),
|
||||
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 struct dpu_pingpong_cfg sc7180_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, 0, sdm845_pp_sblk_te),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, 0, sdm845_pp_sblk_te),
|
||||
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_pingpong_cfg sm8150_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800, MERGE_3D_0, sdm845_pp_sblk_te),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000, MERGE_3D_1, sdm845_pp_sblk),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800, MERGE_3D_1, sdm845_pp_sblk),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x72000, MERGE_3D_2, sdm845_pp_sblk),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x72800, MERGE_3D_2, sdm845_pp_sblk),
|
||||
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, 30),
|
||||
-1),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
|
@ -746,47 +816,49 @@ static const struct dpu_merge_3d_cfg sm8150_merge_3d[] = {
|
|||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sc7280_pp[] = {
|
||||
PP_BLK("pingpong_0", PINGPONG_0, 0x59000, 0, sc7280_pp_sblk),
|
||||
PP_BLK("pingpong_1", PINGPONG_1, 0x6a000, 0, sc7280_pp_sblk),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x6b000, 0, sc7280_pp_sblk),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x6c000, 0, sc7280_pp_sblk),
|
||||
PP_BLK("pingpong_0", PINGPONG_0, 0x59000, 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),
|
||||
};
|
||||
/*************************************************************
|
||||
* INTF sub blocks config
|
||||
*************************************************************/
|
||||
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id, _progfetch, _features) \
|
||||
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id, _progfetch, _features, _reg, _underrun_bit, _vsync_bit) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = 0x280, \
|
||||
.features = _features, \
|
||||
.type = _type, \
|
||||
.controller_id = _ctrl_id, \
|
||||
.prog_fetch_lines_worst_case = _progfetch \
|
||||
.prog_fetch_lines_worst_case = _progfetch, \
|
||||
.intr_underrun = DPU_IRQ_IDX(_reg, _underrun_bit), \
|
||||
.intr_vsync = DPU_IRQ_IDX(_reg, _vsync_bit), \
|
||||
}
|
||||
|
||||
static const struct dpu_intf_cfg sdm845_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, 24, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, 24, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, 24, INTF_SDM845_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc7180_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8150_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, 24, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 28, 29),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, 24, INTF_SC7180_MASK, MDP_SSPP_TOP0_INTR, 30, 31),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc7280_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, 0, 24, INTF_SC7280_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK),
|
||||
INTF_BLK("intf_5", INTF_5, 0x39000, INTF_EDP, 0, 24, INTF_SC7280_MASK),
|
||||
INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25),
|
||||
INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27),
|
||||
INTF_BLK("intf_5", INTF_5, 0x39000, INTF_EDP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
|
@ -1060,7 +1132,7 @@ static void sdm845_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
.reg_dma_count = 1,
|
||||
.dma_cfg = sdm845_regdma,
|
||||
.perf = sdm845_perf_data,
|
||||
.mdss_irqs = 0x3ff,
|
||||
.mdss_irqs = IRQ_SDM845_MASK,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1091,8 +1163,7 @@ static void sc7180_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
.reg_dma_count = 1,
|
||||
.dma_cfg = sdm845_regdma,
|
||||
.perf = sc7180_perf_data,
|
||||
.mdss_irqs = 0x3f,
|
||||
.obsolete_irq = INTR_SC7180_MASK,
|
||||
.mdss_irqs = IRQ_SC7180_MASK,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1125,7 +1196,7 @@ static void sm8150_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
.reg_dma_count = 1,
|
||||
.dma_cfg = sm8150_regdma,
|
||||
.perf = sm8150_perf_data,
|
||||
.mdss_irqs = 0x3ff,
|
||||
.mdss_irqs = IRQ_SDM845_MASK,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1158,7 +1229,7 @@ static void sm8250_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
.reg_dma_count = 1,
|
||||
.dma_cfg = sm8250_regdma,
|
||||
.perf = sm8250_perf_data,
|
||||
.mdss_irqs = 0xff,
|
||||
.mdss_irqs = IRQ_SM8250_MASK,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1181,8 +1252,7 @@ static void sc7280_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.perf = sc7280_perf_data,
|
||||
.mdss_irqs = 0x1c07,
|
||||
.obsolete_irq = INTR_SC7180_MASK,
|
||||
.mdss_irqs = IRQ_SC7280_MASK,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2015-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DPU_HW_CATALOG_H
|
||||
|
@ -464,13 +464,15 @@ struct dpu_mdp_cfg {
|
|||
struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX];
|
||||
};
|
||||
|
||||
/* struct dpu_mdp_cfg : MDP TOP-BLK instance info
|
||||
/* struct dpu_ctl_cfg : MDP CTL instance info
|
||||
* @id: index identifying this block
|
||||
* @base: register base offset to mdss
|
||||
* @features bit mask identifying sub-blocks/features
|
||||
* @intr_start: interrupt index for CTL_START
|
||||
*/
|
||||
struct dpu_ctl_cfg {
|
||||
DPU_HW_BLK_INFO;
|
||||
s32 intr_start;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -526,11 +528,15 @@ struct dpu_dspp_cfg {
|
|||
* @id enum identifying this block
|
||||
* @base register offset of this block
|
||||
* @features bit mask identifying sub-blocks/features
|
||||
* @intr_done: index for PINGPONG done interrupt
|
||||
* @intr_rdptr: index for PINGPONG readpointer done interrupt
|
||||
* @sblk sub-blocks information
|
||||
*/
|
||||
struct dpu_pingpong_cfg {
|
||||
DPU_HW_BLK_INFO;
|
||||
u32 merge_3d;
|
||||
s32 intr_done;
|
||||
s32 intr_rdptr;
|
||||
const struct dpu_pingpong_sub_blks *sblk;
|
||||
};
|
||||
|
||||
|
@ -555,12 +561,16 @@ struct dpu_merge_3d_cfg {
|
|||
* @type: Interface type(DSI, DP, HDMI)
|
||||
* @controller_id: Controller Instance ID in case of multiple of intf type
|
||||
* @prog_fetch_lines_worst_case Worst case latency num lines needed to prefetch
|
||||
* @intr_underrun: index for INTF underrun interrupt
|
||||
* @intr_vsync: index for INTF VSYNC interrupt
|
||||
*/
|
||||
struct dpu_intf_cfg {
|
||||
DPU_HW_BLK_INFO;
|
||||
u32 type; /* interface type*/
|
||||
u32 controller_id;
|
||||
u32 prog_fetch_lines_worst_case;
|
||||
s32 intr_underrun;
|
||||
s32 intr_vsync;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -723,7 +733,6 @@ struct dpu_perf_cfg {
|
|||
* @cursor_formats Supported formats for cursor pipe
|
||||
* @vig_formats Supported formats for vig pipe
|
||||
* @mdss_irqs: Bitmap with the irqs supported by the target
|
||||
* @obsolete_irq: Irq types that are obsolete for a particular target
|
||||
*/
|
||||
struct dpu_mdss_cfg {
|
||||
u32 hwversion;
|
||||
|
@ -770,7 +779,6 @@ struct dpu_mdss_cfg {
|
|||
const struct dpu_format_extended *vig_formats;
|
||||
|
||||
unsigned long mdss_irqs;
|
||||
unsigned long obsolete_irq;
|
||||
};
|
||||
|
||||
struct dpu_mdss_hw_cfg_handler {
|
||||
|
|
|
@ -589,8 +589,6 @@ static void _setup_ctl_ops(struct dpu_hw_ctl_ops *ops,
|
|||
ops->set_active_pipes = dpu_hw_ctl_set_fetch_pipe_active;
|
||||
};
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -615,14 +613,10 @@ struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx,
|
|||
c->mixer_count = m->mixer_count;
|
||||
c->mixer_hw_caps = m->mixer;
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_CTL, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_ctl_destroy(struct dpu_hw_ctl *ctx)
|
||||
{
|
||||
if (ctx)
|
||||
dpu_hw_blk_destroy(&ctx->base);
|
||||
kfree(ctx);
|
||||
}
|
||||
|
|
|
@ -85,8 +85,6 @@ static const struct dpu_dspp_cfg *_dspp_offset(enum dpu_dspp dspp,
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -112,16 +110,11 @@ struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx,
|
|||
c->cap = cfg;
|
||||
_setup_dspp_ops(c, c->cap->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_DSPP, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp)
|
||||
{
|
||||
if (dspp)
|
||||
dpu_hw_blk_destroy(&dspp->base);
|
||||
|
||||
kfree(dspp);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,85 +12,32 @@
|
|||
#include "dpu_hw_util.h"
|
||||
#include "dpu_hw_mdss.h"
|
||||
|
||||
/**
|
||||
* dpu_intr_type - HW Interrupt Type
|
||||
* @DPU_IRQ_TYPE_WB_ROT_COMP: WB rotator done
|
||||
* @DPU_IRQ_TYPE_WB_WFD_COMP: WB WFD done
|
||||
* @DPU_IRQ_TYPE_PING_PONG_COMP: PingPong done
|
||||
* @DPU_IRQ_TYPE_PING_PONG_RD_PTR: PingPong read pointer
|
||||
* @DPU_IRQ_TYPE_PING_PONG_WR_PTR: PingPong write pointer
|
||||
* @DPU_IRQ_TYPE_PING_PONG_AUTO_REF: PingPong auto refresh
|
||||
* @DPU_IRQ_TYPE_PING_PONG_TEAR_CHECK: PingPong Tear check
|
||||
* @DPU_IRQ_TYPE_PING_PONG_TE_CHECK: PingPong TE detection
|
||||
* @DPU_IRQ_TYPE_INTF_UNDER_RUN: INTF underrun
|
||||
* @DPU_IRQ_TYPE_INTF_VSYNC: INTF VSYNC
|
||||
* @DPU_IRQ_TYPE_CWB_OVERFLOW: Concurrent WB overflow
|
||||
* @DPU_IRQ_TYPE_HIST_VIG_DONE: VIG Histogram done
|
||||
* @DPU_IRQ_TYPE_HIST_VIG_RSTSEQ: VIG Histogram reset
|
||||
* @DPU_IRQ_TYPE_HIST_DSPP_DONE: DSPP Histogram done
|
||||
* @DPU_IRQ_TYPE_HIST_DSPP_RSTSEQ: DSPP Histogram reset
|
||||
* @DPU_IRQ_TYPE_WD_TIMER: Watchdog timer
|
||||
* @DPU_IRQ_TYPE_SFI_VIDEO_IN: Video static frame INTR into static
|
||||
* @DPU_IRQ_TYPE_SFI_VIDEO_OUT: Video static frame INTR out-of static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_0_IN: DSI CMD0 static frame INTR into static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_0_OUT: DSI CMD0 static frame INTR out-of static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_1_IN: DSI CMD1 static frame INTR into static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_1_OUT: DSI CMD1 static frame INTR out-of static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_2_IN: DSI CMD2 static frame INTR into static
|
||||
* @DPU_IRQ_TYPE_SFI_CMD_2_OUT: DSI CMD2 static frame INTR out-of static
|
||||
* @DPU_IRQ_TYPE_PROG_LINE: Programmable Line interrupt
|
||||
* @DPU_IRQ_TYPE_AD4_BL_DONE: AD4 backlight
|
||||
* @DPU_IRQ_TYPE_CTL_START: Control start
|
||||
* @DPU_IRQ_TYPE_RESERVED: Reserved for expansion
|
||||
*/
|
||||
enum dpu_intr_type {
|
||||
DPU_IRQ_TYPE_WB_ROT_COMP,
|
||||
DPU_IRQ_TYPE_WB_WFD_COMP,
|
||||
DPU_IRQ_TYPE_PING_PONG_COMP,
|
||||
DPU_IRQ_TYPE_PING_PONG_RD_PTR,
|
||||
DPU_IRQ_TYPE_PING_PONG_WR_PTR,
|
||||
DPU_IRQ_TYPE_PING_PONG_AUTO_REF,
|
||||
DPU_IRQ_TYPE_PING_PONG_TEAR_CHECK,
|
||||
DPU_IRQ_TYPE_PING_PONG_TE_CHECK,
|
||||
DPU_IRQ_TYPE_INTF_UNDER_RUN,
|
||||
DPU_IRQ_TYPE_INTF_VSYNC,
|
||||
DPU_IRQ_TYPE_CWB_OVERFLOW,
|
||||
DPU_IRQ_TYPE_HIST_VIG_DONE,
|
||||
DPU_IRQ_TYPE_HIST_VIG_RSTSEQ,
|
||||
DPU_IRQ_TYPE_HIST_DSPP_DONE,
|
||||
DPU_IRQ_TYPE_HIST_DSPP_RSTSEQ,
|
||||
DPU_IRQ_TYPE_WD_TIMER,
|
||||
DPU_IRQ_TYPE_SFI_VIDEO_IN,
|
||||
DPU_IRQ_TYPE_SFI_VIDEO_OUT,
|
||||
DPU_IRQ_TYPE_SFI_CMD_0_IN,
|
||||
DPU_IRQ_TYPE_SFI_CMD_0_OUT,
|
||||
DPU_IRQ_TYPE_SFI_CMD_1_IN,
|
||||
DPU_IRQ_TYPE_SFI_CMD_1_OUT,
|
||||
DPU_IRQ_TYPE_SFI_CMD_2_IN,
|
||||
DPU_IRQ_TYPE_SFI_CMD_2_OUT,
|
||||
DPU_IRQ_TYPE_PROG_LINE,
|
||||
DPU_IRQ_TYPE_AD4_BL_DONE,
|
||||
DPU_IRQ_TYPE_CTL_START,
|
||||
DPU_IRQ_TYPE_RESERVED,
|
||||
/* When making changes be sure to sync with dpu_intr_set */
|
||||
enum dpu_hw_intr_reg {
|
||||
MDP_SSPP_TOP0_INTR,
|
||||
MDP_SSPP_TOP0_INTR2,
|
||||
MDP_SSPP_TOP0_HIST_INTR,
|
||||
MDP_INTF0_INTR,
|
||||
MDP_INTF1_INTR,
|
||||
MDP_INTF2_INTR,
|
||||
MDP_INTF3_INTR,
|
||||
MDP_INTF4_INTR,
|
||||
MDP_AD4_0_INTR,
|
||||
MDP_AD4_1_INTR,
|
||||
MDP_INTF0_7xxx_INTR,
|
||||
MDP_INTF1_7xxx_INTR,
|
||||
MDP_INTF5_7xxx_INTR,
|
||||
MDP_INTR_MAX,
|
||||
};
|
||||
|
||||
#define DPU_IRQ_IDX(reg_idx, offset) (reg_idx * 32 + offset)
|
||||
|
||||
struct dpu_hw_intr;
|
||||
|
||||
/**
|
||||
* Interrupt operations.
|
||||
*/
|
||||
struct dpu_hw_intr_ops {
|
||||
/**
|
||||
* irq_idx_lookup - Lookup IRQ index on the HW interrupt type
|
||||
* Used for all irq related ops
|
||||
* @intr: HW interrupt handle
|
||||
* @intr_type: Interrupt type defined in dpu_intr_type
|
||||
* @instance_idx: HW interrupt block instance
|
||||
* @return: irq_idx or -EINVAL for lookup fail
|
||||
*/
|
||||
int (*irq_idx_lookup)(struct dpu_hw_intr *intr,
|
||||
enum dpu_intr_type intr_type,
|
||||
u32 instance_idx);
|
||||
|
||||
/**
|
||||
* enable_irq - Enable IRQ based on lookup IRQ index
|
||||
|
@ -98,7 +45,7 @@ struct dpu_hw_intr_ops {
|
|||
* @irq_idx: Lookup irq index return from irq_idx_lookup
|
||||
* @return: 0 for success, otherwise failure
|
||||
*/
|
||||
int (*enable_irq)(
|
||||
int (*enable_irq_locked)(
|
||||
struct dpu_hw_intr *intr,
|
||||
int irq_idx);
|
||||
|
||||
|
@ -108,7 +55,7 @@ struct dpu_hw_intr_ops {
|
|||
* @irq_idx: Lookup irq index return from irq_idx_lookup
|
||||
* @return: 0 for success, otherwise failure
|
||||
*/
|
||||
int (*disable_irq)(
|
||||
int (*disable_irq_locked)(
|
||||
struct dpu_hw_intr *intr,
|
||||
int irq_idx);
|
||||
|
||||
|
@ -142,23 +89,6 @@ struct dpu_hw_intr_ops {
|
|||
void (*cbfunc)(void *arg, int irq_idx),
|
||||
void *arg);
|
||||
|
||||
/**
|
||||
* get_interrupt_statuses - Gets and store value from all interrupt
|
||||
* status registers that are currently fired.
|
||||
* @intr: HW interrupt handle
|
||||
*/
|
||||
void (*get_interrupt_statuses)(
|
||||
struct dpu_hw_intr *intr);
|
||||
|
||||
/**
|
||||
* clear_intr_status_nolock() - clears the HW interrupts without lock
|
||||
* @intr: HW interrupt handle
|
||||
* @irq_idx: Lookup irq index return from irq_idx_lookup
|
||||
*/
|
||||
void (*clear_intr_status_nolock)(
|
||||
struct dpu_hw_intr *intr,
|
||||
int irq_idx);
|
||||
|
||||
/**
|
||||
* get_interrupt_status - Gets HW interrupt status, and clear if set,
|
||||
* based on given lookup IRQ index.
|
||||
|
@ -170,6 +100,22 @@ struct dpu_hw_intr_ops {
|
|||
struct dpu_hw_intr *intr,
|
||||
int irq_idx,
|
||||
bool clear);
|
||||
|
||||
/**
|
||||
* lock - take the IRQ lock
|
||||
* @intr: HW interrupt handle
|
||||
* @return: irq_flags for the taken spinlock
|
||||
*/
|
||||
unsigned long (*lock)(
|
||||
struct dpu_hw_intr *intr);
|
||||
|
||||
/**
|
||||
* unlock - take the IRQ lock
|
||||
* @intr: HW interrupt handle
|
||||
* @irq_flags: the irq_flags returned from lock
|
||||
*/
|
||||
void (*unlock)(
|
||||
struct dpu_hw_intr *intr, unsigned long irq_flags);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -178,19 +124,17 @@ struct dpu_hw_intr_ops {
|
|||
* @ops: function pointer mapping for IRQ handling
|
||||
* @cache_irq_mask: array of IRQ enable masks reg storage created during init
|
||||
* @save_irq_status: array of IRQ status reg storage created during init
|
||||
* @irq_idx_tbl_size: total number of irq_idx mapped in the hw_interrupts
|
||||
* @total_irqs: total number of irq_idx mapped in the hw_interrupts
|
||||
* @irq_lock: spinlock for accessing IRQ resources
|
||||
* @obsolete_irq: irq types that are obsolete for a particular target
|
||||
*/
|
||||
struct dpu_hw_intr {
|
||||
struct dpu_hw_blk_reg_map hw;
|
||||
struct dpu_hw_intr_ops ops;
|
||||
u32 *cache_irq_mask;
|
||||
u32 *save_irq_status;
|
||||
u32 irq_idx_tbl_size;
|
||||
u32 total_irqs;
|
||||
spinlock_t irq_lock;
|
||||
unsigned long irq_mask;
|
||||
unsigned long obsolete_irq;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -299,8 +299,6 @@ static void _setup_intf_ops(struct dpu_hw_intf_ops *ops,
|
|||
ops->bind_pingpong_blk = dpu_hw_intf_bind_pingpong_blk;
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_intf *dpu_hw_intf_init(enum dpu_intf idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -327,15 +325,11 @@ struct dpu_hw_intf *dpu_hw_intf_init(enum dpu_intf idx,
|
|||
c->mdss = m;
|
||||
_setup_intf_ops(&c->ops, c->cap->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_INTF, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_intf_destroy(struct dpu_hw_intf *intf)
|
||||
{
|
||||
if (intf)
|
||||
dpu_hw_blk_destroy(&intf->base);
|
||||
kfree(intf);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,8 +160,6 @@ static void _setup_mixer_ops(const struct dpu_mdss_cfg *m,
|
|||
ops->setup_border_color = dpu_hw_lm_setup_border_color;
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_mixer *dpu_hw_lm_init(enum dpu_lm idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -184,14 +182,10 @@ struct dpu_hw_mixer *dpu_hw_lm_init(enum dpu_lm idx,
|
|||
c->cap = cfg;
|
||||
_setup_mixer_ops(m, &c->ops, c->cap->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_LM, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_lm_destroy(struct dpu_hw_mixer *lm)
|
||||
{
|
||||
if (lm)
|
||||
dpu_hw_blk_destroy(&lm->base);
|
||||
kfree(lm);
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ enum dpu_3d_blend_mode {
|
|||
|
||||
/** struct dpu_format - defines the format configuration which
|
||||
* allows DPU HW to correctly fetch and decode the format
|
||||
* @base: base msm_format struture containing fourcc code
|
||||
* @base: base msm_format structure containing fourcc code
|
||||
* @fetch_planes: how the color components are packed in pixel format
|
||||
* @element: element color ordering
|
||||
* @bits: element bit widths
|
||||
|
|
|
@ -58,8 +58,6 @@ static void _setup_merge_3d_ops(struct dpu_hw_merge_3d *c,
|
|||
c->ops.setup_3d_mode = dpu_hw_merge_3d_setup_3d_mode;
|
||||
};
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(enum dpu_merge_3d idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -81,14 +79,10 @@ struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(enum dpu_merge_3d idx,
|
|||
c->caps = cfg;
|
||||
_setup_merge_3d_ops(c, c->caps->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_MERGE_3D, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_merge_3d_destroy(struct dpu_hw_merge_3d *hw)
|
||||
{
|
||||
if (hw)
|
||||
dpu_hw_blk_destroy(&hw->base);
|
||||
kfree(hw);
|
||||
}
|
||||
|
|
|
@ -261,8 +261,6 @@ static void _setup_pingpong_ops(struct dpu_hw_pingpong *c,
|
|||
c->ops.setup_dither = dpu_hw_pp_setup_dither;
|
||||
};
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -284,14 +282,10 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
|
|||
c->caps = cfg;
|
||||
_setup_pingpong_ops(c, c->caps->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_PINGPONG, idx, &dpu_hw_ops);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void dpu_hw_pingpong_destroy(struct dpu_hw_pingpong *pp)
|
||||
{
|
||||
if (pp)
|
||||
dpu_hw_blk_destroy(&pp->base);
|
||||
kfree(pp);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,8 @@ struct dpu_hw_pingpong_ops {
|
|||
struct dpu_hw_dither_cfg *cfg);
|
||||
};
|
||||
|
||||
struct dpu_hw_merge_3d;
|
||||
|
||||
struct dpu_hw_pingpong {
|
||||
struct dpu_hw_blk base;
|
||||
struct dpu_hw_blk_reg_map hw;
|
||||
|
@ -133,7 +135,7 @@ struct dpu_hw_pingpong {
|
|||
/* pingpong */
|
||||
enum dpu_pingpong idx;
|
||||
const struct dpu_pingpong_cfg *caps;
|
||||
struct dpu_hw_blk *merge_3d;
|
||||
struct dpu_hw_merge_3d *merge_3d;
|
||||
|
||||
/* ops */
|
||||
struct dpu_hw_pingpong_ops ops;
|
||||
|
|
|
@ -706,8 +706,6 @@ static const struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp,
|
|||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
||||
void __iomem *addr, struct dpu_mdss_cfg *catalog,
|
||||
bool is_virtual_pipe)
|
||||
|
@ -735,15 +733,11 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
|
|||
hw_pipe->cap = cfg;
|
||||
_setup_layer_ops(hw_pipe, hw_pipe->cap->features);
|
||||
|
||||
dpu_hw_blk_init(&hw_pipe->base, DPU_HW_BLK_SSPP, idx, &dpu_hw_ops);
|
||||
|
||||
return hw_pipe;
|
||||
}
|
||||
|
||||
void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx)
|
||||
{
|
||||
if (ctx)
|
||||
dpu_hw_blk_destroy(&ctx->base);
|
||||
kfree(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -295,8 +295,6 @@ static const struct dpu_mdp_cfg *_top_offset(enum dpu_mdp mdp,
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx,
|
||||
void __iomem *addr,
|
||||
const struct dpu_mdss_cfg *m)
|
||||
|
@ -324,15 +322,11 @@ struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx,
|
|||
mdp->caps = cfg;
|
||||
_setup_mdp_ops(&mdp->ops, mdp->caps->features);
|
||||
|
||||
dpu_hw_blk_init(&mdp->base, DPU_HW_BLK_TOP, idx, &dpu_hw_ops);
|
||||
|
||||
return mdp;
|
||||
}
|
||||
|
||||
void dpu_hw_mdp_destroy(struct dpu_hw_mdp *mdp)
|
||||
{
|
||||
if (mdp)
|
||||
dpu_hw_blk_destroy(&mdp->base);
|
||||
kfree(mdp);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "msm_drv.h"
|
||||
#include "msm_mmu.h"
|
||||
#include "msm_gem.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
#include "dpu_kms.h"
|
||||
#include "dpu_core_irq.h"
|
||||
|
@ -798,6 +799,51 @@ static void dpu_irq_uninstall(struct msm_kms *kms)
|
|||
dpu_core_irq_uninstall(dpu_kms);
|
||||
}
|
||||
|
||||
static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_kms *kms)
|
||||
{
|
||||
int i;
|
||||
struct dpu_kms *dpu_kms;
|
||||
struct dpu_mdss_cfg *cat;
|
||||
struct dpu_hw_mdp *top;
|
||||
|
||||
dpu_kms = to_dpu_kms(kms);
|
||||
|
||||
cat = dpu_kms->catalog;
|
||||
top = dpu_kms->hw_mdp;
|
||||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
|
||||
/* dump CTL sub-blocks HW regs info */
|
||||
for (i = 0; i < cat->ctl_count; i++)
|
||||
msm_disp_snapshot_add_block(disp_state, cat->ctl[i].len,
|
||||
dpu_kms->mmio + cat->ctl[i].base, "ctl_%d", i);
|
||||
|
||||
/* dump DSPP sub-blocks HW regs info */
|
||||
for (i = 0; i < cat->dspp_count; i++)
|
||||
msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len,
|
||||
dpu_kms->mmio + cat->dspp[i].base, "dspp_%d", i);
|
||||
|
||||
/* dump INTF sub-blocks HW regs info */
|
||||
for (i = 0; i < cat->intf_count; i++)
|
||||
msm_disp_snapshot_add_block(disp_state, cat->intf[i].len,
|
||||
dpu_kms->mmio + cat->intf[i].base, "intf_%d", i);
|
||||
|
||||
/* dump PP sub-blocks HW regs info */
|
||||
for (i = 0; i < cat->pingpong_count; i++)
|
||||
msm_disp_snapshot_add_block(disp_state, cat->pingpong[i].len,
|
||||
dpu_kms->mmio + cat->pingpong[i].base, "pingpong_%d", i);
|
||||
|
||||
/* dump SSPP sub-blocks HW regs info */
|
||||
for (i = 0; i < cat->sspp_count; i++)
|
||||
msm_disp_snapshot_add_block(disp_state, cat->sspp[i].len,
|
||||
dpu_kms->mmio + cat->sspp[i].base, "sspp_%d", i);
|
||||
|
||||
msm_disp_snapshot_add_block(disp_state, top->hw.length,
|
||||
dpu_kms->mmio + top->hw.blk_off, "top");
|
||||
|
||||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
}
|
||||
|
||||
static const struct msm_kms_funcs kms_funcs = {
|
||||
.hw_init = dpu_kms_hw_init,
|
||||
.irq_preinstall = dpu_irq_preinstall,
|
||||
|
@ -818,6 +864,7 @@ static const struct msm_kms_funcs kms_funcs = {
|
|||
.round_pixclk = dpu_kms_round_pixclk,
|
||||
.destroy = dpu_kms_destroy,
|
||||
.set_encoder_mode = _dpu_kms_set_encoder_mode,
|
||||
.snapshot = dpu_kms_mdp_snapshot,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.debugfs_init = dpu_kms_debugfs_init,
|
||||
#endif
|
||||
|
@ -1089,21 +1136,21 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
|
|||
if (!dpu_kms)
|
||||
return -ENOMEM;
|
||||
|
||||
dpu_kms->opp_table = dev_pm_opp_set_clkname(dev, "core");
|
||||
if (IS_ERR(dpu_kms->opp_table))
|
||||
return PTR_ERR(dpu_kms->opp_table);
|
||||
ret = devm_pm_opp_set_clkname(dev, "core");
|
||||
if (ret)
|
||||
return ret;
|
||||
/* OPP table is optional */
|
||||
ret = dev_pm_opp_of_add_table(dev);
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret && ret != -ENODEV) {
|
||||
dev_err(dev, "invalid OPP table in device tree\n");
|
||||
goto put_clkname;
|
||||
return ret;
|
||||
}
|
||||
|
||||
mp = &dpu_kms->mp;
|
||||
ret = msm_dss_parse_clock(pdev, mp);
|
||||
if (ret) {
|
||||
DPU_ERROR("failed to parse clocks, ret=%d\n", ret);
|
||||
goto err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, dpu_kms);
|
||||
|
@ -1111,7 +1158,7 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
|
|||
ret = msm_kms_init(&dpu_kms->base, &kms_funcs);
|
||||
if (ret) {
|
||||
DPU_ERROR("failed to init kms, ret=%d\n", ret);
|
||||
goto err;
|
||||
return ret;
|
||||
}
|
||||
dpu_kms->dev = ddev;
|
||||
dpu_kms->pdev = pdev;
|
||||
|
@ -1120,11 +1167,7 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
|
|||
dpu_kms->rpm_enabled = true;
|
||||
|
||||
priv->kms = &dpu_kms->base;
|
||||
return ret;
|
||||
err:
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
put_clkname:
|
||||
dev_pm_opp_put_clkname(dpu_kms->opp_table);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1140,9 +1183,6 @@ static void dpu_unbind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
if (dpu_kms->rpm_enabled)
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
dev_pm_opp_put_clkname(dpu_kms->opp_table);
|
||||
}
|
||||
|
||||
static const struct component_ops dpu_ops = {
|
||||
|
|
|
@ -82,16 +82,12 @@ struct dpu_irq_callback {
|
|||
* struct dpu_irq: IRQ structure contains callback registration info
|
||||
* @total_irq: total number of irq_idx obtained from HW interrupts mapping
|
||||
* @irq_cb_tbl: array of IRQ callbacks setting
|
||||
* @enable_counts array of IRQ enable counts
|
||||
* @cb_lock: callback lock
|
||||
* @debugfs_file: debugfs file for irq statistics
|
||||
*/
|
||||
struct dpu_irq {
|
||||
u32 total_irqs;
|
||||
struct list_head *irq_cb_tbl;
|
||||
atomic_t *enable_counts;
|
||||
atomic_t *irq_counts;
|
||||
spinlock_t cb_lock;
|
||||
};
|
||||
|
||||
struct dpu_kms {
|
||||
|
@ -130,8 +126,6 @@ struct dpu_kms {
|
|||
struct platform_device *pdev;
|
||||
bool rpm_enabled;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
|
||||
struct dss_module_power mp;
|
||||
|
||||
/* reference count bandwidth requests, so we know when we can
|
||||
|
@ -258,7 +252,7 @@ void dpu_kms_encoder_enable(struct drm_encoder *encoder);
|
|||
|
||||
/**
|
||||
* dpu_kms_get_clk_rate() - get the clock rate
|
||||
* @dpu_kms: poiner to dpu_kms structure
|
||||
* @dpu_kms: pointer to dpu_kms structure
|
||||
* @clock_name: clock name to get the rate
|
||||
*
|
||||
* Return: current clock rate
|
||||
|
|
|
@ -225,7 +225,7 @@ int dpu_mdss_init(struct drm_device *dev)
|
|||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct dpu_mdss *dpu_mdss;
|
||||
struct dss_module_power *mp;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int irq;
|
||||
|
||||
dpu_mdss = devm_kzalloc(dev->dev, sizeof(*dpu_mdss), GFP_KERNEL);
|
||||
|
@ -253,8 +253,10 @@ int dpu_mdss_init(struct drm_device *dev)
|
|||
goto irq_domain_error;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
goto irq_error;
|
||||
}
|
||||
|
||||
irq_set_chained_handler_and_data(irq, dpu_mdss_irq,
|
||||
dpu_mdss);
|
||||
|
@ -263,7 +265,7 @@ int dpu_mdss_init(struct drm_device *dev)
|
|||
|
||||
pm_runtime_enable(dev->dev);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
irq_error:
|
||||
_dpu_mdss_irq_domain_fini(dpu_mdss);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dpu_vbif.h"
|
||||
#include "dpu_plane.h"
|
||||
|
||||
#define DPU_DEBUG_PLANE(pl, fmt, ...) DPU_DEBUG("plane%d " fmt,\
|
||||
#define DPU_DEBUG_PLANE(pl, fmt, ...) DRM_DEBUG_ATOMIC("plane%d " fmt,\
|
||||
(pl) ? (pl)->base.base.id : -1, ##__VA_ARGS__)
|
||||
|
||||
#define DPU_ERROR_PLANE(pl, fmt, ...) DPU_ERROR("plane%d " fmt,\
|
||||
|
@ -284,8 +284,8 @@ static int _dpu_plane_calc_fill_level(struct drm_plane *plane,
|
|||
}
|
||||
}
|
||||
|
||||
DPU_DEBUG("plane%u: pnum:%d fmt: %4.4s w:%u fl:%u\n",
|
||||
plane->base.id, pdpu->pipe - SSPP_VIG0,
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d fmt: %4.4s w:%u fl:%u\n",
|
||||
pdpu->pipe - SSPP_VIG0,
|
||||
(char *)&fmt->base.pixel_format,
|
||||
src_width, total_fl);
|
||||
|
||||
|
@ -354,8 +354,7 @@ static void _dpu_plane_set_qos_lut(struct drm_plane *plane,
|
|||
(fmt) ? fmt->base.pixel_format : 0,
|
||||
pdpu->is_rt_pipe, total_fl, qos_lut, lut_usage);
|
||||
|
||||
DPU_DEBUG("plane%u: pnum:%d fmt: %4.4s rt:%d fl:%u lut:0x%llx\n",
|
||||
plane->base.id,
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d fmt: %4.4s rt:%d fl:%u lut:0x%llx\n",
|
||||
pdpu->pipe - SSPP_VIG0,
|
||||
fmt ? (char *)&fmt->base.pixel_format : NULL,
|
||||
pdpu->is_rt_pipe, total_fl, qos_lut);
|
||||
|
@ -364,7 +363,7 @@ static void _dpu_plane_set_qos_lut(struct drm_plane *plane,
|
|||
}
|
||||
|
||||
/**
|
||||
* _dpu_plane_set_panic_lut - set danger/safe LUT of the given plane
|
||||
* _dpu_plane_set_danger_lut - set danger/safe LUT of the given plane
|
||||
* @plane: Pointer to drm plane
|
||||
* @fb: Pointer to framebuffer associated with the given plane
|
||||
*/
|
||||
|
@ -407,8 +406,7 @@ static void _dpu_plane_set_danger_lut(struct drm_plane *plane,
|
|||
pdpu->pipe_qos_cfg.danger_lut,
|
||||
pdpu->pipe_qos_cfg.safe_lut);
|
||||
|
||||
DPU_DEBUG("plane%u: pnum:%d fmt: %4.4s mode:%d luts[0x%x, 0x%x]\n",
|
||||
plane->base.id,
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d fmt: %4.4s mode:%d luts[0x%x, 0x%x]\n",
|
||||
pdpu->pipe - SSPP_VIG0,
|
||||
fmt ? (char *)&fmt->base.pixel_format : NULL,
|
||||
fmt ? fmt->fetch_mode : -1,
|
||||
|
@ -451,8 +449,7 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane,
|
|||
pdpu->pipe_qos_cfg.danger_safe_en = false;
|
||||
}
|
||||
|
||||
DPU_DEBUG("plane%u: pnum:%d ds:%d vb:%d pri[0x%x, 0x%x] is_rt:%d\n",
|
||||
plane->base.id,
|
||||
DPU_DEBUG_PLANE(pdpu, "pnum:%d ds:%d vb:%d pri[0x%x, 0x%x] is_rt:%d\n",
|
||||
pdpu->pipe - SSPP_VIG0,
|
||||
pdpu->pipe_qos_cfg.danger_safe_en,
|
||||
pdpu->pipe_qos_cfg.vblank_en,
|
||||
|
@ -491,7 +488,7 @@ static void _dpu_plane_set_ot_limit(struct drm_plane *plane,
|
|||
}
|
||||
|
||||
/**
|
||||
* _dpu_plane_set_vbif_qos - set vbif QoS for the given plane
|
||||
* _dpu_plane_set_qos_remap - set vbif QoS for the given plane
|
||||
* @plane: Pointer to drm plane
|
||||
*/
|
||||
static void _dpu_plane_set_qos_remap(struct drm_plane *plane)
|
||||
|
@ -507,8 +504,8 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane)
|
|||
qos_params.num = pdpu->pipe_hw->idx - SSPP_VIG0;
|
||||
qos_params.is_rt = pdpu->is_rt_pipe;
|
||||
|
||||
DPU_DEBUG("plane%d pipe:%d vbif:%d xin:%d rt:%d, clk_ctrl:%d\n",
|
||||
plane->base.id, qos_params.num,
|
||||
DPU_DEBUG_PLANE(pdpu, "pipe:%d vbif:%d xin:%d rt:%d, clk_ctrl:%d\n",
|
||||
qos_params.num,
|
||||
qos_params.vbif_idx,
|
||||
qos_params.xin_id, qos_params.is_rt,
|
||||
qos_params.clk_ctrl);
|
||||
|
|
|
@ -162,7 +162,7 @@ int dpu_rm_init(struct dpu_rm *rm,
|
|||
goto fail;
|
||||
}
|
||||
if (pp->merge_3d && pp->merge_3d < MERGE_3D_MAX)
|
||||
hw->merge_3d = rm->merge_3d_blks[pp->merge_3d - MERGE_3D_0];
|
||||
hw->merge_3d = to_dpu_hw_merge_3d(rm->merge_3d_blks[pp->merge_3d - MERGE_3D_0]);
|
||||
rm->pingpong_blks[pp->id - PINGPONG_0] = &hw->base;
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ static int _dpu_rm_reserve_ctls(
|
|||
features = ctl->caps->features;
|
||||
has_split_display = BIT(DPU_CTL_SPLIT_DISPLAY) & features;
|
||||
|
||||
DPU_DEBUG("ctl %d caps 0x%lX\n", rm->ctl_blks[j]->id, features);
|
||||
DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features);
|
||||
|
||||
if (needs_split_display != has_split_display)
|
||||
continue;
|
||||
|
|
|
@ -168,44 +168,41 @@ TRACE_EVENT(dpu_perf_crtc_update,
|
|||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(dpu_enc_irq_template,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx, int hw_idx,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx,
|
||||
int irq_idx),
|
||||
TP_ARGS(drm_id, intr_idx, hw_idx, irq_idx),
|
||||
TP_ARGS(drm_id, intr_idx, irq_idx),
|
||||
TP_STRUCT__entry(
|
||||
__field( uint32_t, drm_id )
|
||||
__field( enum dpu_intr_idx, intr_idx )
|
||||
__field( int, hw_idx )
|
||||
__field( int, irq_idx )
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->drm_id = drm_id;
|
||||
__entry->intr_idx = intr_idx;
|
||||
__entry->hw_idx = hw_idx;
|
||||
__entry->irq_idx = irq_idx;
|
||||
),
|
||||
TP_printk("id=%u, intr=%d, hw=%d, irq=%d",
|
||||
__entry->drm_id, __entry->intr_idx, __entry->hw_idx,
|
||||
TP_printk("id=%u, intr=%d, irq=%d",
|
||||
__entry->drm_id, __entry->intr_idx,
|
||||
__entry->irq_idx)
|
||||
);
|
||||
DEFINE_EVENT(dpu_enc_irq_template, dpu_enc_irq_register_success,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx, int hw_idx,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx,
|
||||
int irq_idx),
|
||||
TP_ARGS(drm_id, intr_idx, hw_idx, irq_idx)
|
||||
TP_ARGS(drm_id, intr_idx, irq_idx)
|
||||
);
|
||||
DEFINE_EVENT(dpu_enc_irq_template, dpu_enc_irq_unregister_success,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx, int hw_idx,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx,
|
||||
int irq_idx),
|
||||
TP_ARGS(drm_id, intr_idx, hw_idx, irq_idx)
|
||||
TP_ARGS(drm_id, intr_idx, irq_idx)
|
||||
);
|
||||
|
||||
TRACE_EVENT(dpu_enc_irq_wait_success,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx, int hw_idx,
|
||||
TP_PROTO(uint32_t drm_id, enum dpu_intr_idx intr_idx,
|
||||
int irq_idx, enum dpu_pingpong pp_idx, int atomic_cnt),
|
||||
TP_ARGS(drm_id, intr_idx, hw_idx, irq_idx, pp_idx, atomic_cnt),
|
||||
TP_ARGS(drm_id, intr_idx, irq_idx, pp_idx, atomic_cnt),
|
||||
TP_STRUCT__entry(
|
||||
__field( uint32_t, drm_id )
|
||||
__field( enum dpu_intr_idx, intr_idx )
|
||||
__field( int, hw_idx )
|
||||
__field( int, irq_idx )
|
||||
__field( enum dpu_pingpong, pp_idx )
|
||||
__field( int, atomic_cnt )
|
||||
|
@ -213,13 +210,12 @@ TRACE_EVENT(dpu_enc_irq_wait_success,
|
|||
TP_fast_assign(
|
||||
__entry->drm_id = drm_id;
|
||||
__entry->intr_idx = intr_idx;
|
||||
__entry->hw_idx = hw_idx;
|
||||
__entry->irq_idx = irq_idx;
|
||||
__entry->pp_idx = pp_idx;
|
||||
__entry->atomic_cnt = atomic_cnt;
|
||||
),
|
||||
TP_printk("id=%u, intr=%d, hw=%d, irq=%d, pp=%d, atomic_cnt=%d",
|
||||
__entry->drm_id, __entry->intr_idx, __entry->hw_idx,
|
||||
TP_printk("id=%u, intr=%d, irq=%d, pp=%d, atomic_cnt=%d",
|
||||
__entry->drm_id, __entry->intr_idx,
|
||||
__entry->irq_idx, __entry->pp_idx, __entry->atomic_cnt)
|
||||
);
|
||||
|
||||
|
@ -514,12 +510,12 @@ DEFINE_EVENT(dpu_id_event_template, dpu_crtc_frame_event_more_pending,
|
|||
);
|
||||
|
||||
TRACE_EVENT(dpu_enc_wait_event_timeout,
|
||||
TP_PROTO(uint32_t drm_id, int32_t hw_id, int rc, s64 time,
|
||||
TP_PROTO(uint32_t drm_id, int irq_idx, int rc, s64 time,
|
||||
s64 expected_time, int atomic_cnt),
|
||||
TP_ARGS(drm_id, hw_id, rc, time, expected_time, atomic_cnt),
|
||||
TP_ARGS(drm_id, irq_idx, rc, time, expected_time, atomic_cnt),
|
||||
TP_STRUCT__entry(
|
||||
__field( uint32_t, drm_id )
|
||||
__field( int32_t, hw_id )
|
||||
__field( int, irq_idx )
|
||||
__field( int, rc )
|
||||
__field( s64, time )
|
||||
__field( s64, expected_time )
|
||||
|
@ -527,14 +523,14 @@ TRACE_EVENT(dpu_enc_wait_event_timeout,
|
|||
),
|
||||
TP_fast_assign(
|
||||
__entry->drm_id = drm_id;
|
||||
__entry->hw_id = hw_id;
|
||||
__entry->irq_idx = irq_idx;
|
||||
__entry->rc = rc;
|
||||
__entry->time = time;
|
||||
__entry->expected_time = expected_time;
|
||||
__entry->atomic_cnt = atomic_cnt;
|
||||
),
|
||||
TP_printk("id=%u, hw_id=%d, rc=%d, time=%lld, expected=%lld cnt=%d",
|
||||
__entry->drm_id, __entry->hw_id, __entry->rc, __entry->time,
|
||||
TP_printk("id=%u, irq_idx=%d, rc=%d, time=%lld, expected=%lld cnt=%d",
|
||||
__entry->drm_id, __entry->irq_idx, __entry->rc, __entry->time,
|
||||
__entry->expected_time, __entry->atomic_cnt)
|
||||
);
|
||||
|
||||
|
@ -879,29 +875,6 @@ TRACE_EVENT(dpu_pp_connect_ext_te,
|
|||
TP_printk("pp:%d cfg:%u", __entry->pp, __entry->cfg)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(dpu_core_irq_idx_cnt_template,
|
||||
TP_PROTO(int irq_idx, int enable_count),
|
||||
TP_ARGS(irq_idx, enable_count),
|
||||
TP_STRUCT__entry(
|
||||
__field( int, irq_idx )
|
||||
__field( int, enable_count )
|
||||
),
|
||||
TP_fast_assign(
|
||||
__entry->irq_idx = irq_idx;
|
||||
__entry->enable_count = enable_count;
|
||||
),
|
||||
TP_printk("irq_idx:%d enable_count:%u", __entry->irq_idx,
|
||||
__entry->enable_count)
|
||||
);
|
||||
DEFINE_EVENT(dpu_core_irq_idx_cnt_template, dpu_core_irq_enable_idx,
|
||||
TP_PROTO(int irq_idx, int enable_count),
|
||||
TP_ARGS(irq_idx, enable_count)
|
||||
);
|
||||
DEFINE_EVENT(dpu_core_irq_idx_cnt_template, dpu_core_irq_disable_idx,
|
||||
TP_PROTO(int irq_idx, int enable_count),
|
||||
TP_ARGS(irq_idx, enable_count)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(dpu_core_irq_callback_template,
|
||||
TP_PROTO(int irq_idx, struct dpu_irq_callback *callback),
|
||||
TP_ARGS(irq_idx, callback),
|
||||
|
|
|
@ -46,7 +46,7 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif *vbif, u32 xin_id)
|
|||
vbif->idx - VBIF_0, xin_id);
|
||||
} else {
|
||||
rc = 0;
|
||||
DPU_DEBUG("VBIF %d client %d is halted\n",
|
||||
DRM_DEBUG_ATOMIC("VBIF %d client %d is halted\n",
|
||||
vbif->idx - VBIF_0, xin_id);
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ static void _dpu_vbif_apply_dynamic_ot_limit(struct dpu_hw_vbif *vbif,
|
|||
}
|
||||
}
|
||||
|
||||
DPU_DEBUG("vbif:%d xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n",
|
||||
DRM_DEBUG_ATOMIC("vbif:%d xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n",
|
||||
vbif->idx - VBIF_0, params->xin_id,
|
||||
params->width, params->height, params->frame_rate,
|
||||
pps, *ot_lim);
|
||||
|
@ -133,7 +133,7 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif,
|
|||
}
|
||||
|
||||
exit:
|
||||
DPU_DEBUG("vbif:%d xin:%d ot_lim:%d\n",
|
||||
DRM_DEBUG_ATOMIC("vbif:%d xin:%d ot_lim:%d\n",
|
||||
vbif->idx - VBIF_0, params->xin_id, ot_lim);
|
||||
return ot_lim;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
|
|||
}
|
||||
|
||||
if (!vbif || !mdp) {
|
||||
DPU_DEBUG("invalid arguments vbif %d mdp %d\n",
|
||||
DRM_DEBUG_ATOMIC("invalid arguments vbif %d mdp %d\n",
|
||||
vbif != NULL, mdp != NULL);
|
||||
return;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
|
|||
}
|
||||
|
||||
if (!vbif->ops.set_qos_remap || !mdp->ops.setup_clk_force_ctrl) {
|
||||
DPU_DEBUG("qos remap not supported\n");
|
||||
DRM_DEBUG_ATOMIC("qos remap not supported\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -238,14 +238,14 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
|
|||
&vbif->cap->qos_nrt_tbl;
|
||||
|
||||
if (!qos_tbl->npriority_lvl || !qos_tbl->priority_lvl) {
|
||||
DPU_DEBUG("qos tbl not defined\n");
|
||||
DRM_DEBUG_ATOMIC("qos tbl not defined\n");
|
||||
return;
|
||||
}
|
||||
|
||||
forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true);
|
||||
|
||||
for (i = 0; i < qos_tbl->npriority_lvl; i++) {
|
||||
DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
|
||||
DRM_DEBUG_ATOMIC("vbif:%d xin:%d lvl:%d/%d\n",
|
||||
params->vbif_idx, params->xin_id, i,
|
||||
qos_tbl->priority_lvl[i]);
|
||||
vbif->ops.set_qos_remap(vbif, params->xin_id, i,
|
||||
|
|
|
@ -8,19 +8,27 @@ 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/src/envytools/rnndb/msm.xml ( 676 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 42301 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41874 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,19 +8,27 @@ 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/src/envytools/rnndb/msm.xml ( 676 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 42301 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41874 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -80,6 +88,10 @@ enum mdp5_pipe {
|
|||
SSPP_CURSOR1 = 12,
|
||||
};
|
||||
|
||||
enum mdp5_format {
|
||||
DUMMY = 0,
|
||||
};
|
||||
|
||||
enum mdp5_ctl_mode {
|
||||
MODE_NONE = 0,
|
||||
MODE_WB_0_BLOCK = 1,
|
||||
|
|
|
@ -95,6 +95,11 @@ static const struct mdp5_cfg_hw msm8x74v1_config = {
|
|||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 200,
|
||||
.ib_inefficiency = 120,
|
||||
.clk_inefficiency = 125
|
||||
},
|
||||
.max_clk = 200000000,
|
||||
};
|
||||
|
||||
|
@ -177,6 +182,11 @@ static const struct mdp5_cfg_hw msm8x74v2_config = {
|
|||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 200,
|
||||
.ib_inefficiency = 120,
|
||||
.clk_inefficiency = 125
|
||||
},
|
||||
.max_clk = 320000000,
|
||||
};
|
||||
|
||||
|
@ -272,6 +282,11 @@ static const struct mdp5_cfg_hw apq8084_config = {
|
|||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 200,
|
||||
.ib_inefficiency = 120,
|
||||
.clk_inefficiency = 105
|
||||
},
|
||||
.max_clk = 320000000,
|
||||
};
|
||||
|
||||
|
@ -339,6 +354,11 @@ static const struct mdp5_cfg_hw msm8x16_config = {
|
|||
[1] = INTF_DSI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 100,
|
||||
.ib_inefficiency = 200,
|
||||
.clk_inefficiency = 105
|
||||
},
|
||||
.max_clk = 320000000,
|
||||
};
|
||||
|
||||
|
@ -414,6 +434,11 @@ static const struct mdp5_cfg_hw msm8x36_config = {
|
|||
[2] = INTF_DSI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 100,
|
||||
.ib_inefficiency = 200,
|
||||
.clk_inefficiency = 105
|
||||
},
|
||||
.max_clk = 366670000,
|
||||
};
|
||||
|
||||
|
@ -509,6 +534,11 @@ static const struct mdp5_cfg_hw msm8x94_config = {
|
|||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 100,
|
||||
.ib_inefficiency = 100,
|
||||
.clk_inefficiency = 105
|
||||
},
|
||||
.max_clk = 400000000,
|
||||
};
|
||||
|
||||
|
@ -617,6 +647,11 @@ static const struct mdp5_cfg_hw msm8x96_config = {
|
|||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.perf = {
|
||||
.ab_inefficiency = 100,
|
||||
.ib_inefficiency = 200,
|
||||
.clk_inefficiency = 105
|
||||
},
|
||||
.max_clk = 412500000,
|
||||
};
|
||||
|
||||
|
|
|
@ -76,6 +76,12 @@ struct mdp5_intf_block {
|
|||
u32 connect[MDP5_INTF_NUM_MAX]; /* array of enum mdp5_intf_type */
|
||||
};
|
||||
|
||||
struct mdp5_perf_block {
|
||||
u32 ab_inefficiency;
|
||||
u32 ib_inefficiency;
|
||||
u32 clk_inefficiency;
|
||||
};
|
||||
|
||||
struct mdp5_cfg_hw {
|
||||
char *name;
|
||||
|
||||
|
@ -93,6 +99,7 @@ struct mdp5_cfg_hw {
|
|||
struct mdp5_sub_block dsc;
|
||||
struct mdp5_sub_block cdm;
|
||||
struct mdp5_intf_block intf;
|
||||
struct mdp5_perf_block perf;
|
||||
|
||||
uint32_t max_clk;
|
||||
};
|
||||
|
|
|
@ -291,8 +291,8 @@ static void blend_setup(struct drm_crtc *crtc)
|
|||
plane = pstates[i]->base.plane;
|
||||
blend_op = MDP5_LM_BLEND_OP_MODE_FG_ALPHA(FG_CONST) |
|
||||
MDP5_LM_BLEND_OP_MODE_BG_ALPHA(BG_CONST);
|
||||
fg_alpha = pstates[i]->alpha;
|
||||
bg_alpha = 0xFF - pstates[i]->alpha;
|
||||
fg_alpha = pstates[i]->base.alpha >> 8;
|
||||
bg_alpha = 0xFF - fg_alpha;
|
||||
|
||||
if (!format->alpha_enable && bg_alpha_enabled)
|
||||
mixer_op_mode = 0;
|
||||
|
@ -301,7 +301,8 @@ static void blend_setup(struct drm_crtc *crtc)
|
|||
|
||||
DBG("Stage %d fg_alpha %x bg_alpha %x", i, fg_alpha, bg_alpha);
|
||||
|
||||
if (format->alpha_enable && pstates[i]->premultiplied) {
|
||||
if (format->alpha_enable &&
|
||||
pstates[i]->base.pixel_blend_mode == DRM_MODE_BLEND_PREMULTI) {
|
||||
blend_op = MDP5_LM_BLEND_OP_MODE_FG_ALPHA(FG_CONST) |
|
||||
MDP5_LM_BLEND_OP_MODE_BG_ALPHA(FG_PIXEL);
|
||||
if (fg_alpha != 0xff) {
|
||||
|
@ -312,7 +313,8 @@ static void blend_setup(struct drm_crtc *crtc)
|
|||
} else {
|
||||
blend_op |= MDP5_LM_BLEND_OP_MODE_BG_INV_ALPHA;
|
||||
}
|
||||
} else if (format->alpha_enable) {
|
||||
} else if (format->alpha_enable &&
|
||||
pstates[i]->base.pixel_blend_mode == DRM_MODE_BLEND_COVERAGE) {
|
||||
blend_op = MDP5_LM_BLEND_OP_MODE_FG_ALPHA(FG_PIXEL) |
|
||||
MDP5_LM_BLEND_OP_MODE_BG_ALPHA(FG_PIXEL);
|
||||
if (fg_alpha != 0xff) {
|
||||
|
@ -648,7 +650,7 @@ static int pstate_cmp(const void *a, const void *b)
|
|||
{
|
||||
struct plane_state *pa = (struct plane_state *)a;
|
||||
struct plane_state *pb = (struct plane_state *)b;
|
||||
return pa->state->zpos - pb->state->zpos;
|
||||
return pa->state->base.normalized_zpos - pb->state->base.normalized_zpos;
|
||||
}
|
||||
|
||||
/* is there a helper for this? */
|
||||
|
|
|
@ -98,11 +98,6 @@ struct mdp5_plane_state {
|
|||
struct mdp5_hw_pipe *hwpipe;
|
||||
struct mdp5_hw_pipe *r_hwpipe; /* right hwpipe */
|
||||
|
||||
/* aligned with property */
|
||||
uint8_t premultiplied;
|
||||
uint8_t zpos;
|
||||
uint8_t alpha;
|
||||
|
||||
/* assigned by crtc blender */
|
||||
enum mdp_mixer_stage_id stage;
|
||||
};
|
||||
|
|
|
@ -44,8 +44,9 @@ static void mdp5_plane_destroy(struct drm_plane *plane)
|
|||
kfree(mdp5_plane);
|
||||
}
|
||||
|
||||
static void mdp5_plane_install_rotation_property(struct drm_device *dev,
|
||||
struct drm_plane *plane)
|
||||
/* helper to install properties which are common to planes and crtcs */
|
||||
static void mdp5_plane_install_properties(struct drm_plane *plane,
|
||||
struct drm_mode_object *obj)
|
||||
{
|
||||
drm_plane_create_rotation_property(plane,
|
||||
DRM_MODE_ROTATE_0,
|
||||
|
@ -53,104 +54,12 @@ static void mdp5_plane_install_rotation_property(struct drm_device *dev,
|
|||
DRM_MODE_ROTATE_180 |
|
||||
DRM_MODE_REFLECT_X |
|
||||
DRM_MODE_REFLECT_Y);
|
||||
}
|
||||
|
||||
/* helper to install properties which are common to planes and crtcs */
|
||||
static void mdp5_plane_install_properties(struct drm_plane *plane,
|
||||
struct drm_mode_object *obj)
|
||||
{
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct msm_drm_private *dev_priv = dev->dev_private;
|
||||
struct drm_property *prop;
|
||||
|
||||
#define INSTALL_PROPERTY(name, NAME, init_val, fnc, ...) do { \
|
||||
prop = dev_priv->plane_property[PLANE_PROP_##NAME]; \
|
||||
if (!prop) { \
|
||||
prop = drm_property_##fnc(dev, 0, #name, \
|
||||
##__VA_ARGS__); \
|
||||
if (!prop) { \
|
||||
dev_warn(dev->dev, \
|
||||
"Create property %s failed\n", \
|
||||
#name); \
|
||||
return; \
|
||||
} \
|
||||
dev_priv->plane_property[PLANE_PROP_##NAME] = prop; \
|
||||
} \
|
||||
drm_object_attach_property(&plane->base, prop, init_val); \
|
||||
} while (0)
|
||||
|
||||
#define INSTALL_RANGE_PROPERTY(name, NAME, min, max, init_val) \
|
||||
INSTALL_PROPERTY(name, NAME, init_val, \
|
||||
create_range, min, max)
|
||||
|
||||
#define INSTALL_ENUM_PROPERTY(name, NAME, init_val) \
|
||||
INSTALL_PROPERTY(name, NAME, init_val, \
|
||||
create_enum, name##_prop_enum_list, \
|
||||
ARRAY_SIZE(name##_prop_enum_list))
|
||||
|
||||
INSTALL_RANGE_PROPERTY(zpos, ZPOS, 1, 255, 1);
|
||||
|
||||
mdp5_plane_install_rotation_property(dev, plane);
|
||||
|
||||
#undef INSTALL_RANGE_PROPERTY
|
||||
#undef INSTALL_ENUM_PROPERTY
|
||||
#undef INSTALL_PROPERTY
|
||||
}
|
||||
|
||||
static int mdp5_plane_atomic_set_property(struct drm_plane *plane,
|
||||
struct drm_plane_state *state, struct drm_property *property,
|
||||
uint64_t val)
|
||||
{
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct mdp5_plane_state *pstate;
|
||||
struct msm_drm_private *dev_priv = dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
pstate = to_mdp5_plane_state(state);
|
||||
|
||||
#define SET_PROPERTY(name, NAME, type) do { \
|
||||
if (dev_priv->plane_property[PLANE_PROP_##NAME] == property) { \
|
||||
pstate->name = (type)val; \
|
||||
DBG("Set property %s %d", #name, (type)val); \
|
||||
goto done; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
SET_PROPERTY(zpos, ZPOS, uint8_t);
|
||||
|
||||
DRM_DEV_ERROR(dev->dev, "Invalid property\n");
|
||||
ret = -EINVAL;
|
||||
done:
|
||||
return ret;
|
||||
#undef SET_PROPERTY
|
||||
}
|
||||
|
||||
static int mdp5_plane_atomic_get_property(struct drm_plane *plane,
|
||||
const struct drm_plane_state *state,
|
||||
struct drm_property *property, uint64_t *val)
|
||||
{
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct mdp5_plane_state *pstate;
|
||||
struct msm_drm_private *dev_priv = dev->dev_private;
|
||||
int ret = 0;
|
||||
|
||||
pstate = to_mdp5_plane_state(state);
|
||||
|
||||
#define GET_PROPERTY(name, NAME, type) do { \
|
||||
if (dev_priv->plane_property[PLANE_PROP_##NAME] == property) { \
|
||||
*val = pstate->name; \
|
||||
DBG("Get property %s %lld", #name, *val); \
|
||||
goto done; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
GET_PROPERTY(zpos, ZPOS, uint8_t);
|
||||
|
||||
DRM_DEV_ERROR(dev->dev, "Invalid property\n");
|
||||
ret = -EINVAL;
|
||||
done:
|
||||
return ret;
|
||||
#undef SET_PROPERTY
|
||||
drm_plane_create_alpha_property(plane);
|
||||
drm_plane_create_blend_mode_property(plane,
|
||||
BIT(DRM_MODE_BLEND_PIXEL_NONE) |
|
||||
BIT(DRM_MODE_BLEND_PREMULTI) |
|
||||
BIT(DRM_MODE_BLEND_COVERAGE));
|
||||
drm_plane_create_zpos_property(plane, 1, 1, 255);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -166,9 +75,10 @@ mdp5_plane_atomic_print_state(struct drm_printer *p,
|
|||
drm_printf(p, "\tright-hwpipe=%s\n",
|
||||
pstate->r_hwpipe ? pstate->r_hwpipe->name :
|
||||
"(null)");
|
||||
drm_printf(p, "\tpremultiplied=%u\n", pstate->premultiplied);
|
||||
drm_printf(p, "\tzpos=%u\n", pstate->zpos);
|
||||
drm_printf(p, "\talpha=%u\n", pstate->alpha);
|
||||
drm_printf(p, "\tblend_mode=%u\n", pstate->base.pixel_blend_mode);
|
||||
drm_printf(p, "\tzpos=%u\n", pstate->base.zpos);
|
||||
drm_printf(p, "\tnormalized_zpos=%u\n", pstate->base.normalized_zpos);
|
||||
drm_printf(p, "\talpha=%u\n", pstate->base.alpha);
|
||||
drm_printf(p, "\tstage=%s\n", stage2name(pstate->stage));
|
||||
}
|
||||
|
||||
|
@ -176,24 +86,19 @@ static void mdp5_plane_reset(struct drm_plane *plane)
|
|||
{
|
||||
struct mdp5_plane_state *mdp5_state;
|
||||
|
||||
if (plane->state && plane->state->fb)
|
||||
drm_framebuffer_put(plane->state->fb);
|
||||
if (plane->state)
|
||||
__drm_atomic_helper_plane_destroy_state(plane->state);
|
||||
|
||||
kfree(to_mdp5_plane_state(plane->state));
|
||||
mdp5_state = kzalloc(sizeof(*mdp5_state), GFP_KERNEL);
|
||||
|
||||
/* assign default blend parameters */
|
||||
mdp5_state->alpha = 255;
|
||||
mdp5_state->premultiplied = 0;
|
||||
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
|
||||
mdp5_state->zpos = STAGE_BASE;
|
||||
mdp5_state->base.zpos = STAGE_BASE;
|
||||
else
|
||||
mdp5_state->zpos = STAGE0 + drm_plane_index(plane);
|
||||
mdp5_state->base.zpos = STAGE0 + drm_plane_index(plane);
|
||||
mdp5_state->base.normalized_zpos = mdp5_state->base.zpos;
|
||||
|
||||
mdp5_state->base.plane = plane;
|
||||
|
||||
plane->state = &mdp5_state->base;
|
||||
__drm_atomic_helper_plane_reset(plane, &mdp5_state->base);
|
||||
}
|
||||
|
||||
static struct drm_plane_state *
|
||||
|
@ -229,8 +134,6 @@ static const struct drm_plane_funcs mdp5_plane_funcs = {
|
|||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
.destroy = mdp5_plane_destroy,
|
||||
.atomic_set_property = mdp5_plane_atomic_set_property,
|
||||
.atomic_get_property = mdp5_plane_atomic_get_property,
|
||||
.reset = mdp5_plane_reset,
|
||||
.atomic_duplicate_state = mdp5_plane_duplicate_state,
|
||||
.atomic_destroy_state = mdp5_plane_destroy_state,
|
||||
|
|
|
@ -8,19 +8,27 @@ 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/src/envytools/rnndb/msm.xml ( 676 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 42301 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41874 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2020-07-23 21:58:14)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
||||
#include "msm_disp_snapshot.h"
|
||||
|
||||
static ssize_t __maybe_unused disp_devcoredump_read(char *buffer, loff_t offset,
|
||||
size_t count, void *data, size_t datalen)
|
||||
{
|
||||
struct drm_print_iterator iter;
|
||||
struct drm_printer p;
|
||||
struct msm_disp_state *disp_state;
|
||||
|
||||
disp_state = data;
|
||||
|
||||
iter.data = buffer;
|
||||
iter.offset = 0;
|
||||
iter.start = offset;
|
||||
iter.remain = count;
|
||||
|
||||
p = drm_coredump_printer(&iter);
|
||||
|
||||
msm_disp_state_print(disp_state, &p);
|
||||
|
||||
return count - iter.remain;
|
||||
}
|
||||
|
||||
static void _msm_disp_snapshot_work(struct kthread_work *work)
|
||||
{
|
||||
struct msm_kms *kms = container_of(work, struct msm_kms, dump_work);
|
||||
struct drm_device *drm_dev = kms->dev;
|
||||
struct msm_disp_state *disp_state;
|
||||
struct drm_printer p;
|
||||
|
||||
disp_state = kzalloc(sizeof(struct msm_disp_state), GFP_KERNEL);
|
||||
if (!disp_state)
|
||||
return;
|
||||
|
||||
disp_state->dev = drm_dev->dev;
|
||||
disp_state->drm_dev = drm_dev;
|
||||
|
||||
INIT_LIST_HEAD(&disp_state->blocks);
|
||||
|
||||
/* Serialize dumping here */
|
||||
mutex_lock(&kms->dump_mutex);
|
||||
|
||||
msm_disp_snapshot_capture_state(disp_state);
|
||||
|
||||
mutex_unlock(&kms->dump_mutex);
|
||||
|
||||
if (MSM_DISP_SNAPSHOT_DUMP_IN_CONSOLE) {
|
||||
p = drm_info_printer(disp_state->drm_dev->dev);
|
||||
msm_disp_state_print(disp_state, &p);
|
||||
}
|
||||
|
||||
/*
|
||||
* If COREDUMP is disabled, the stub will call the free function.
|
||||
* If there is a codedump pending for the device, the dev_coredumpm()
|
||||
* will also free new coredump state.
|
||||
*/
|
||||
dev_coredumpm(disp_state->dev, THIS_MODULE, disp_state, 0, GFP_KERNEL,
|
||||
disp_devcoredump_read, msm_disp_state_free);
|
||||
}
|
||||
|
||||
void msm_disp_snapshot_state(struct drm_device *drm_dev)
|
||||
{
|
||||
struct msm_drm_private *priv;
|
||||
struct msm_kms *kms;
|
||||
|
||||
if (!drm_dev) {
|
||||
DRM_ERROR("invalid params\n");
|
||||
return;
|
||||
}
|
||||
|
||||
priv = drm_dev->dev_private;
|
||||
kms = priv->kms;
|
||||
|
||||
kthread_queue_work(kms->dump_worker, &kms->dump_work);
|
||||
}
|
||||
|
||||
int msm_disp_snapshot_init(struct drm_device *drm_dev)
|
||||
{
|
||||
struct msm_drm_private *priv;
|
||||
struct msm_kms *kms;
|
||||
|
||||
if (!drm_dev) {
|
||||
DRM_ERROR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
priv = drm_dev->dev_private;
|
||||
kms = priv->kms;
|
||||
|
||||
mutex_init(&kms->dump_mutex);
|
||||
|
||||
kms->dump_worker = kthread_create_worker(0, "%s", "disp_snapshot");
|
||||
if (IS_ERR(kms->dump_worker))
|
||||
DRM_ERROR("failed to create disp state task\n");
|
||||
|
||||
kthread_init_work(&kms->dump_work, _msm_disp_snapshot_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void msm_disp_snapshot_destroy(struct drm_device *drm_dev)
|
||||
{
|
||||
struct msm_kms *kms;
|
||||
struct msm_drm_private *priv;
|
||||
|
||||
if (!drm_dev) {
|
||||
DRM_ERROR("invalid params\n");
|
||||
return;
|
||||
}
|
||||
|
||||
priv = drm_dev->dev_private;
|
||||
kms = priv->kms;
|
||||
|
||||
if (kms->dump_worker)
|
||||
kthread_destroy_worker(kms->dump_worker);
|
||||
|
||||
mutex_destroy(&kms->dump_mutex);
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef MSM_DISP_SNAPSHOT_H_
|
||||
#define MSM_DISP_SNAPSHOT_H_
|
||||
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_device.h>
|
||||
#include "../../../drm_crtc_internal.h"
|
||||
#include <drm/drm_print.h>
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/list_sort.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/devcoredump.h>
|
||||
#include <stdarg.h>
|
||||
#include "msm_kms.h"
|
||||
|
||||
#define MSM_DISP_SNAPSHOT_MAX_BLKS 10
|
||||
|
||||
/* debug option to print the registers in logs */
|
||||
#define MSM_DISP_SNAPSHOT_DUMP_IN_CONSOLE 0
|
||||
|
||||
/* print debug ranges in groups of 4 u32s */
|
||||
#define REG_DUMP_ALIGN 16
|
||||
|
||||
/**
|
||||
* struct msm_disp_state - structure to store current dpu state
|
||||
* @dev: device pointer
|
||||
* @drm_dev: drm device pointer
|
||||
* @atomic_state: atomic state duplicated at the time of the error
|
||||
* @timestamp: timestamp at which the coredump was captured
|
||||
*/
|
||||
struct msm_disp_state {
|
||||
struct device *dev;
|
||||
struct drm_device *drm_dev;
|
||||
|
||||
struct list_head blocks;
|
||||
|
||||
struct drm_atomic_state *atomic_state;
|
||||
|
||||
ktime_t timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct msm_disp_state_block - structure to store each hardware block state
|
||||
* @name: name of the block
|
||||
* @drm_dev: handle to the linked list head
|
||||
* @size: size of the register space of this hardware block
|
||||
* @state: array holding the register dump of this hardware block
|
||||
* @base_addr: starting address of this hardware block's register space
|
||||
*/
|
||||
struct msm_disp_state_block {
|
||||
char name[SZ_128];
|
||||
struct list_head node;
|
||||
unsigned int size;
|
||||
u32 *state;
|
||||
void __iomem *base_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
* msm_disp_snapshot_init - initialize display snapshot
|
||||
* @drm_dev: drm device handle
|
||||
*
|
||||
* Returns: 0 or -ERROR
|
||||
*/
|
||||
int msm_disp_snapshot_init(struct drm_device *drm_dev);
|
||||
|
||||
/**
|
||||
* msm_disp_snapshot_destroy - destroy the display snapshot
|
||||
* @drm_dev: drm device handle
|
||||
*
|
||||
* Returns: none
|
||||
*/
|
||||
void msm_disp_snapshot_destroy(struct drm_device *drm_dev);
|
||||
|
||||
/**
|
||||
* msm_disp_snapshot_state - trigger to dump the display snapshot
|
||||
* @drm_dev: handle to drm device
|
||||
|
||||
* Returns: none
|
||||
*/
|
||||
void msm_disp_snapshot_state(struct drm_device *drm_dev);
|
||||
|
||||
/**
|
||||
* msm_disp_state_print - print out the current dpu state
|
||||
* @disp_state: handle to drm device
|
||||
* @p: handle to drm printer
|
||||
*
|
||||
* Returns: none
|
||||
*/
|
||||
void msm_disp_state_print(struct msm_disp_state *disp_state, struct drm_printer *p);
|
||||
|
||||
/**
|
||||
* msm_disp_snapshot_capture_state - utility to capture atomic state and hw registers
|
||||
* @disp_state: handle to msm_disp_state struct
|
||||
|
||||
* Returns: none
|
||||
*/
|
||||
void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state);
|
||||
|
||||
/**
|
||||
* msm_disp_state_free - free the memory after the coredump has been read
|
||||
* @data: handle to struct msm_disp_state
|
||||
|
||||
* Returns: none
|
||||
*/
|
||||
void msm_disp_state_free(void *data);
|
||||
|
||||
/**
|
||||
* msm_disp_snapshot_add_block - add a hardware block with its register dump
|
||||
* @disp_state: handle to struct msm_disp_state
|
||||
* @name: name of the hardware block
|
||||
* @len: size of the register space of the hardware block
|
||||
* @base_addr: starting address of the register space of the hardware block
|
||||
* @fmt: format in which the block names need to be printed
|
||||
*
|
||||
* Returns: none
|
||||
*/
|
||||
__printf(4, 5)
|
||||
void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,
|
||||
void __iomem *base_addr, const char *fmt, ...);
|
||||
|
||||
#endif /* MSM_DISP_SNAPSHOT_H_ */
|
|
@ -0,0 +1,187 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
||||
#include "msm_disp_snapshot.h"
|
||||
|
||||
static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *base_addr)
|
||||
{
|
||||
u32 len_padded;
|
||||
u32 num_rows;
|
||||
u32 x0, x4, x8, xc;
|
||||
void __iomem *addr;
|
||||
u32 *dump_addr = NULL;
|
||||
void __iomem *end_addr;
|
||||
int i;
|
||||
|
||||
len_padded = aligned_len * REG_DUMP_ALIGN;
|
||||
num_rows = aligned_len / REG_DUMP_ALIGN;
|
||||
|
||||
addr = base_addr;
|
||||
end_addr = base_addr + aligned_len;
|
||||
|
||||
if (!(*reg))
|
||||
*reg = kzalloc(len_padded, GFP_KERNEL);
|
||||
|
||||
if (*reg)
|
||||
dump_addr = *reg;
|
||||
|
||||
for (i = 0; i < num_rows; i++) {
|
||||
x0 = (addr < end_addr) ? readl_relaxed(addr + 0x0) : 0;
|
||||
x4 = (addr + 0x4 < end_addr) ? readl_relaxed(addr + 0x4) : 0;
|
||||
x8 = (addr + 0x8 < end_addr) ? readl_relaxed(addr + 0x8) : 0;
|
||||
xc = (addr + 0xc < end_addr) ? readl_relaxed(addr + 0xc) : 0;
|
||||
|
||||
if (dump_addr) {
|
||||
dump_addr[i * 4] = x0;
|
||||
dump_addr[i * 4 + 1] = x4;
|
||||
dump_addr[i * 4 + 2] = x8;
|
||||
dump_addr[i * 4 + 3] = xc;
|
||||
}
|
||||
|
||||
addr += REG_DUMP_ALIGN;
|
||||
}
|
||||
}
|
||||
|
||||
static void msm_disp_state_print_regs(u32 **reg, u32 len, void __iomem *base_addr,
|
||||
struct drm_printer *p)
|
||||
{
|
||||
int i;
|
||||
u32 *dump_addr = NULL;
|
||||
void __iomem *addr;
|
||||
u32 num_rows;
|
||||
|
||||
addr = base_addr;
|
||||
num_rows = len / REG_DUMP_ALIGN;
|
||||
|
||||
if (*reg)
|
||||
dump_addr = *reg;
|
||||
|
||||
for (i = 0; i < num_rows; i++) {
|
||||
drm_printf(p, "0x%lx : %08x %08x %08x %08x\n",
|
||||
(unsigned long)(addr - base_addr),
|
||||
dump_addr[i * 4], dump_addr[i * 4 + 1],
|
||||
dump_addr[i * 4 + 2], dump_addr[i * 4 + 3]);
|
||||
addr += REG_DUMP_ALIGN;
|
||||
}
|
||||
}
|
||||
|
||||
void msm_disp_state_print(struct msm_disp_state *state, struct drm_printer *p)
|
||||
{
|
||||
struct msm_disp_state_block *block, *tmp;
|
||||
|
||||
if (!p) {
|
||||
DRM_ERROR("invalid drm printer\n");
|
||||
return;
|
||||
}
|
||||
|
||||
drm_printf(p, "---\n");
|
||||
|
||||
drm_printf(p, "module: " KBUILD_MODNAME "\n");
|
||||
drm_printf(p, "dpu devcoredump\n");
|
||||
drm_printf(p, "timestamp %lld\n", ktime_to_ns(state->timestamp));
|
||||
|
||||
list_for_each_entry_safe(block, tmp, &state->blocks, node) {
|
||||
drm_printf(p, "====================%s================\n", block->name);
|
||||
msm_disp_state_print_regs(&block->state, block->size, block->base_addr, p);
|
||||
}
|
||||
|
||||
drm_printf(p, "===================dpu drm state================\n");
|
||||
|
||||
if (state->atomic_state)
|
||||
drm_atomic_print_new_state(state->atomic_state, p);
|
||||
}
|
||||
|
||||
static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state)
|
||||
{
|
||||
struct drm_device *ddev;
|
||||
struct drm_modeset_acquire_ctx ctx;
|
||||
|
||||
disp_state->timestamp = ktime_get();
|
||||
|
||||
ddev = disp_state->drm_dev;
|
||||
|
||||
drm_modeset_acquire_init(&ctx, 0);
|
||||
|
||||
while (drm_modeset_lock_all_ctx(ddev, &ctx) != 0)
|
||||
drm_modeset_backoff(&ctx);
|
||||
|
||||
disp_state->atomic_state = drm_atomic_helper_duplicate_state(ddev,
|
||||
&ctx);
|
||||
drm_modeset_drop_locks(&ctx);
|
||||
drm_modeset_acquire_fini(&ctx);
|
||||
}
|
||||
|
||||
void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state)
|
||||
{
|
||||
struct msm_drm_private *priv;
|
||||
struct drm_device *drm_dev;
|
||||
struct msm_kms *kms;
|
||||
int i;
|
||||
|
||||
drm_dev = disp_state->drm_dev;
|
||||
priv = drm_dev->dev_private;
|
||||
kms = priv->kms;
|
||||
|
||||
if (priv->dp)
|
||||
msm_dp_snapshot(disp_state, priv->dp);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) {
|
||||
if (!priv->dsi[i])
|
||||
continue;
|
||||
|
||||
msm_dsi_snapshot(disp_state, priv->dsi[i]);
|
||||
}
|
||||
|
||||
if (kms->funcs->snapshot)
|
||||
kms->funcs->snapshot(disp_state, kms);
|
||||
|
||||
msm_disp_capture_atomic_state(disp_state);
|
||||
}
|
||||
|
||||
void msm_disp_state_free(void *data)
|
||||
{
|
||||
struct msm_disp_state *disp_state = data;
|
||||
struct msm_disp_state_block *block, *tmp;
|
||||
|
||||
if (disp_state->atomic_state) {
|
||||
drm_atomic_state_put(disp_state->atomic_state);
|
||||
disp_state->atomic_state = NULL;
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(block, tmp, &disp_state->blocks, node) {
|
||||
list_del(&block->node);
|
||||
kfree(block->state);
|
||||
kfree(block);
|
||||
}
|
||||
|
||||
kfree(disp_state);
|
||||
}
|
||||
|
||||
void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,
|
||||
void __iomem *base_addr, const char *fmt, ...)
|
||||
{
|
||||
struct msm_disp_state_block *new_blk;
|
||||
struct va_format vaf;
|
||||
va_list va;
|
||||
|
||||
new_blk = kzalloc(sizeof(struct msm_disp_state_block), GFP_KERNEL);
|
||||
|
||||
va_start(va, fmt);
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &va;
|
||||
snprintf(new_blk->name, sizeof(new_blk->name), "%pV", &vaf);
|
||||
|
||||
va_end(va);
|
||||
|
||||
INIT_LIST_HEAD(&new_blk->node);
|
||||
new_blk->size = ALIGN(len, REG_DUMP_ALIGN);
|
||||
new_blk->base_addr = base_addr;
|
||||
|
||||
msm_disp_state_dump_regs(&new_blk->state, new_blk->size, base_addr);
|
||||
list_add(&new_blk->node, &disp_state->blocks);
|
||||
}
|
|
@ -9,7 +9,15 @@
|
|||
#include "dp_reg.h"
|
||||
#include "dp_aux.h"
|
||||
|
||||
#define DP_AUX_ENUM_STR(x) #x
|
||||
enum msm_dp_aux_err {
|
||||
DP_AUX_ERR_NONE,
|
||||
DP_AUX_ERR_ADDR,
|
||||
DP_AUX_ERR_TOUT,
|
||||
DP_AUX_ERR_NACK,
|
||||
DP_AUX_ERR_DEFER,
|
||||
DP_AUX_ERR_NACK_DEFER,
|
||||
DP_AUX_ERR_PHY,
|
||||
};
|
||||
|
||||
struct dp_aux_private {
|
||||
struct device *dev;
|
||||
|
@ -18,7 +26,7 @@ struct dp_aux_private {
|
|||
struct mutex mutex;
|
||||
struct completion comp;
|
||||
|
||||
u32 aux_error_num;
|
||||
enum msm_dp_aux_err aux_error_num;
|
||||
u32 retry_cnt;
|
||||
bool cmd_busy;
|
||||
bool native;
|
||||
|
@ -27,69 +35,51 @@ struct dp_aux_private {
|
|||
bool no_send_stop;
|
||||
u32 offset;
|
||||
u32 segment;
|
||||
u32 isr;
|
||||
|
||||
struct drm_dp_aux dp_aux;
|
||||
};
|
||||
|
||||
#define MAX_AUX_RETRIES 5
|
||||
|
||||
static const char *dp_aux_get_error(u32 aux_error)
|
||||
{
|
||||
switch (aux_error) {
|
||||
case DP_AUX_ERR_NONE:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_NONE);
|
||||
case DP_AUX_ERR_ADDR:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_ADDR);
|
||||
case DP_AUX_ERR_TOUT:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_TOUT);
|
||||
case DP_AUX_ERR_NACK:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_NACK);
|
||||
case DP_AUX_ERR_DEFER:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_DEFER);
|
||||
case DP_AUX_ERR_NACK_DEFER:
|
||||
return DP_AUX_ENUM_STR(DP_AUX_ERR_NACK_DEFER);
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static u32 dp_aux_write(struct dp_aux_private *aux,
|
||||
static ssize_t dp_aux_write(struct dp_aux_private *aux,
|
||||
struct drm_dp_aux_msg *msg)
|
||||
{
|
||||
u32 data[4], reg, len;
|
||||
u8 data[4];
|
||||
u32 reg;
|
||||
ssize_t len;
|
||||
u8 *msgdata = msg->buffer;
|
||||
int const AUX_CMD_FIFO_LEN = 128;
|
||||
int i = 0;
|
||||
|
||||
if (aux->read)
|
||||
len = 4;
|
||||
len = 0;
|
||||
else
|
||||
len = msg->size + 4;
|
||||
len = msg->size;
|
||||
|
||||
/*
|
||||
* cmd fifo only has depth of 144 bytes
|
||||
* limit buf length to 128 bytes here
|
||||
*/
|
||||
if (len > AUX_CMD_FIFO_LEN) {
|
||||
if (len > AUX_CMD_FIFO_LEN - 4) {
|
||||
DRM_ERROR("buf size greater than allowed size of 128 bytes\n");
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Pack cmd and write to HW */
|
||||
data[0] = (msg->address >> 16) & 0xf; /* addr[19:16] */
|
||||
data[0] = (msg->address >> 16) & 0xf; /* addr[19:16] */
|
||||
if (aux->read)
|
||||
data[0] |= BIT(4); /* R/W */
|
||||
data[0] |= BIT(4); /* R/W */
|
||||
|
||||
data[1] = (msg->address >> 8) & 0xff; /* addr[15:8] */
|
||||
data[2] = msg->address & 0xff; /* addr[7:0] */
|
||||
data[3] = (msg->size - 1) & 0xff; /* len[7:0] */
|
||||
data[1] = msg->address >> 8; /* addr[15:8] */
|
||||
data[2] = msg->address; /* addr[7:0] */
|
||||
data[3] = msg->size - 1; /* len[7:0] */
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
for (i = 0; i < len + 4; i++) {
|
||||
reg = (i < 4) ? data[i] : msgdata[i - 4];
|
||||
reg <<= DP_AUX_DATA_OFFSET;
|
||||
reg &= DP_AUX_DATA_MASK;
|
||||
reg |= DP_AUX_DATA_WRITE;
|
||||
/* index = 0, write */
|
||||
reg = (((reg) << DP_AUX_DATA_OFFSET)
|
||||
& DP_AUX_DATA_MASK) | DP_AUX_DATA_WRITE;
|
||||
if (i == 0)
|
||||
reg |= DP_AUX_DATA_INDEX_WRITE;
|
||||
aux->catalog->aux_data = reg;
|
||||
|
@ -117,39 +107,27 @@ static u32 dp_aux_write(struct dp_aux_private *aux,
|
|||
return len;
|
||||
}
|
||||
|
||||
static int dp_aux_cmd_fifo_tx(struct dp_aux_private *aux,
|
||||
static ssize_t dp_aux_cmd_fifo_tx(struct dp_aux_private *aux,
|
||||
struct drm_dp_aux_msg *msg)
|
||||
{
|
||||
u32 ret, len, timeout;
|
||||
int aux_timeout_ms = HZ/4;
|
||||
ssize_t ret;
|
||||
unsigned long time_left;
|
||||
|
||||
reinit_completion(&aux->comp);
|
||||
|
||||
len = dp_aux_write(aux, msg);
|
||||
if (len == 0) {
|
||||
DRM_ERROR("DP AUX write failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = dp_aux_write(aux, msg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
timeout = wait_for_completion_timeout(&aux->comp, aux_timeout_ms);
|
||||
if (!timeout) {
|
||||
DRM_ERROR("aux %s timeout\n", (aux->read ? "read" : "write"));
|
||||
time_left = wait_for_completion_timeout(&aux->comp,
|
||||
msecs_to_jiffies(250));
|
||||
if (!time_left)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
if (aux->aux_error_num == DP_AUX_ERR_NONE) {
|
||||
ret = len;
|
||||
} else {
|
||||
DRM_ERROR_RATELIMITED("aux err: %s\n",
|
||||
dp_aux_get_error(aux->aux_error_num));
|
||||
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
|
||||
static ssize_t dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
|
||||
struct drm_dp_aux_msg *msg)
|
||||
{
|
||||
u32 data;
|
||||
|
@ -176,15 +154,14 @@ static void dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
|
|||
|
||||
actual_i = (data >> DP_AUX_DATA_INDEX_OFFSET) & 0xFF;
|
||||
if (i != actual_i)
|
||||
DRM_ERROR("Index mismatch: expected %d, found %d\n",
|
||||
i, actual_i);
|
||||
break;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
static void dp_aux_native_handler(struct dp_aux_private *aux)
|
||||
static void dp_aux_native_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
u32 isr = aux->isr;
|
||||
|
||||
if (isr & DP_INTR_AUX_I2C_DONE)
|
||||
aux->aux_error_num = DP_AUX_ERR_NONE;
|
||||
else if (isr & DP_INTR_WRONG_ADDR)
|
||||
|
@ -197,14 +174,10 @@ static void dp_aux_native_handler(struct dp_aux_private *aux)
|
|||
aux->aux_error_num = DP_AUX_ERR_PHY;
|
||||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
|
||||
complete(&aux->comp);
|
||||
}
|
||||
|
||||
static void dp_aux_i2c_handler(struct dp_aux_private *aux)
|
||||
static void dp_aux_i2c_handler(struct dp_aux_private *aux, u32 isr)
|
||||
{
|
||||
u32 isr = aux->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;
|
||||
|
@ -226,8 +199,6 @@ static void dp_aux_i2c_handler(struct dp_aux_private *aux)
|
|||
dp_catalog_aux_clear_hw_interrupts(aux->catalog);
|
||||
}
|
||||
}
|
||||
|
||||
complete(&aux->comp);
|
||||
}
|
||||
|
||||
static void dp_aux_update_offset_and_segment(struct dp_aux_private *aux,
|
||||
|
@ -338,30 +309,29 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux,
|
|||
ssize_t ret;
|
||||
int const aux_cmd_native_max = 16;
|
||||
int const aux_cmd_i2c_max = 128;
|
||||
struct dp_aux_private *aux = container_of(dp_aux,
|
||||
struct dp_aux_private, dp_aux);
|
||||
struct dp_aux_private *aux;
|
||||
|
||||
mutex_lock(&aux->mutex);
|
||||
aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
|
||||
|
||||
aux->native = msg->request & (DP_AUX_NATIVE_WRITE & DP_AUX_NATIVE_READ);
|
||||
|
||||
/* Ignore address only message */
|
||||
if ((msg->size == 0) || (msg->buffer == NULL)) {
|
||||
if (msg->size == 0 || !msg->buffer) {
|
||||
msg->reply = aux->native ?
|
||||
DP_AUX_NATIVE_REPLY_ACK : DP_AUX_I2C_REPLY_ACK;
|
||||
ret = msg->size;
|
||||
goto unlock_exit;
|
||||
return msg->size;
|
||||
}
|
||||
|
||||
/* msg sanity check */
|
||||
if ((aux->native && (msg->size > aux_cmd_native_max)) ||
|
||||
(msg->size > aux_cmd_i2c_max)) {
|
||||
if ((aux->native && msg->size > aux_cmd_native_max) ||
|
||||
msg->size > aux_cmd_i2c_max) {
|
||||
DRM_ERROR("%s: invalid msg: size(%zu), request(%x)\n",
|
||||
__func__, msg->size, msg->request);
|
||||
ret = -EINVAL;
|
||||
goto unlock_exit;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&aux->mutex);
|
||||
|
||||
dp_aux_update_offset_and_segment(aux, msg);
|
||||
dp_aux_transfer_helper(aux, msg, true);
|
||||
|
||||
|
@ -377,41 +347,44 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux,
|
|||
}
|
||||
|
||||
ret = dp_aux_cmd_fifo_tx(aux, msg);
|
||||
|
||||
if (ret < 0) {
|
||||
if (aux->native) {
|
||||
aux->retry_cnt++;
|
||||
if (!(aux->retry_cnt % MAX_AUX_RETRIES))
|
||||
dp_catalog_aux_update_cfg(aux->catalog);
|
||||
}
|
||||
usleep_range(400, 500); /* at least 400us to next try */
|
||||
goto unlock_exit;
|
||||
}
|
||||
|
||||
if (aux->aux_error_num == DP_AUX_ERR_NONE) {
|
||||
if (aux->read)
|
||||
dp_aux_cmd_fifo_rx(aux, msg);
|
||||
|
||||
msg->reply = aux->native ?
|
||||
DP_AUX_NATIVE_REPLY_ACK : DP_AUX_I2C_REPLY_ACK;
|
||||
} else {
|
||||
/* Reply defer to retry */
|
||||
msg->reply = aux->native ?
|
||||
DP_AUX_NATIVE_REPLY_DEFER : DP_AUX_I2C_REPLY_DEFER;
|
||||
aux->retry_cnt = 0;
|
||||
switch (aux->aux_error_num) {
|
||||
case DP_AUX_ERR_NONE:
|
||||
if (aux->read)
|
||||
ret = dp_aux_cmd_fifo_rx(aux, msg);
|
||||
msg->reply = aux->native ? DP_AUX_NATIVE_REPLY_ACK : DP_AUX_I2C_REPLY_ACK;
|
||||
break;
|
||||
case DP_AUX_ERR_DEFER:
|
||||
msg->reply = aux->native ? DP_AUX_NATIVE_REPLY_DEFER : DP_AUX_I2C_REPLY_DEFER;
|
||||
break;
|
||||
case DP_AUX_ERR_PHY:
|
||||
case DP_AUX_ERR_ADDR:
|
||||
case DP_AUX_ERR_NACK:
|
||||
case DP_AUX_ERR_NACK_DEFER:
|
||||
msg->reply = aux->native ? DP_AUX_NATIVE_REPLY_NACK : DP_AUX_I2C_REPLY_NACK;
|
||||
break;
|
||||
case DP_AUX_ERR_TOUT:
|
||||
ret = -ETIMEDOUT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return requested size for success or retry */
|
||||
ret = msg->size;
|
||||
aux->retry_cnt = 0;
|
||||
|
||||
unlock_exit:
|
||||
aux->cmd_busy = false;
|
||||
mutex_unlock(&aux->mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dp_aux_isr(struct drm_dp_aux *dp_aux)
|
||||
{
|
||||
u32 isr;
|
||||
struct dp_aux_private *aux;
|
||||
|
||||
if (!dp_aux) {
|
||||
|
@ -421,15 +394,17 @@ void dp_aux_isr(struct drm_dp_aux *dp_aux)
|
|||
|
||||
aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
|
||||
|
||||
aux->isr = dp_catalog_aux_get_irq(aux->catalog);
|
||||
isr = dp_catalog_aux_get_irq(aux->catalog);
|
||||
|
||||
if (!aux->cmd_busy)
|
||||
return;
|
||||
|
||||
if (aux->native)
|
||||
dp_aux_native_handler(aux);
|
||||
dp_aux_native_handler(aux, isr);
|
||||
else
|
||||
dp_aux_i2c_handler(aux);
|
||||
dp_aux_i2c_handler(aux, isr);
|
||||
|
||||
complete(&aux->comp);
|
||||
}
|
||||
|
||||
void dp_aux_reconfig(struct drm_dp_aux *dp_aux)
|
||||
|
|
|
@ -9,14 +9,6 @@
|
|||
#include "dp_catalog.h"
|
||||
#include <drm/drm_dp_helper.h>
|
||||
|
||||
#define DP_AUX_ERR_NONE 0
|
||||
#define DP_AUX_ERR_ADDR -1
|
||||
#define DP_AUX_ERR_TOUT -2
|
||||
#define DP_AUX_ERR_NACK -3
|
||||
#define DP_AUX_ERR_DEFER -4
|
||||
#define DP_AUX_ERR_NACK_DEFER -5
|
||||
#define DP_AUX_ERR_PHY -6
|
||||
|
||||
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);
|
||||
|
|
|
@ -62,6 +62,15 @@ struct dp_catalog_private {
|
|||
u8 aux_lut_cfg_index[PHY_AUX_CFG_MAX];
|
||||
};
|
||||
|
||||
void dp_catalog_snapshot(struct dp_catalog *dp_catalog, struct msm_disp_state *disp_state)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
|
||||
msm_disp_snapshot_add_block(disp_state, catalog->io->dp_controller.len,
|
||||
catalog->io->dp_controller.base, "dp_ctrl");
|
||||
}
|
||||
|
||||
static inline u32 dp_read_aux(struct dp_catalog_private *catalog, u32 offset)
|
||||
{
|
||||
offset += MSM_DP_CONTROLLER_AUX_OFFSET;
|
||||
|
@ -193,7 +202,7 @@ int dp_catalog_aux_clear_hw_interrupts(struct dp_catalog *dp_catalog)
|
|||
/**
|
||||
* dp_catalog_aux_reset() - reset AUX controller
|
||||
*
|
||||
* @aux: DP catalog structure
|
||||
* @dp_catalog: DP catalog structure
|
||||
*
|
||||
* return: void
|
||||
*
|
||||
|
@ -292,7 +301,7 @@ void dp_catalog_dump_regs(struct dp_catalog *dp_catalog)
|
|||
dump_regs(catalog->io->dp_controller.base + offset, len);
|
||||
}
|
||||
|
||||
int dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog)
|
||||
u32 dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog)
|
||||
{
|
||||
struct dp_catalog_private *catalog = container_of(dp_catalog,
|
||||
struct dp_catalog_private, dp_catalog);
|
||||
|
@ -582,10 +591,9 @@ void dp_catalog_ctrl_hpd_config(struct dp_catalog *dp_catalog)
|
|||
|
||||
u32 reftimer = dp_read_aux(catalog, REG_DP_DP_HPD_REFTIMER);
|
||||
|
||||
/* enable HPD interrupts */
|
||||
/* enable HPD plug and unplug interrupts */
|
||||
dp_catalog_hpd_config_intr(dp_catalog,
|
||||
DP_DP_HPD_PLUG_INT_MASK | DP_DP_IRQ_HPD_INT_MASK
|
||||
| DP_DP_HPD_UNPLUG_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, true);
|
||||
DP_DP_HPD_PLUG_INT_MASK | DP_DP_HPD_UNPLUG_INT_MASK, true);
|
||||
|
||||
/* Configure REFTIMER and enable it */
|
||||
reftimer |= DP_DP_HPD_REFTIMER_ENABLE;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <drm/drm_modes.h>
|
||||
|
||||
#include "dp_parser.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
/* interrupts */
|
||||
#define DP_INTR_HPD BIT(0)
|
||||
|
@ -71,6 +72,9 @@ struct dp_catalog {
|
|||
u32 audio_data;
|
||||
};
|
||||
|
||||
/* Debug module */
|
||||
void dp_catalog_snapshot(struct dp_catalog *dp_catalog, struct msm_disp_state *disp_state);
|
||||
|
||||
/* AUX APIs */
|
||||
u32 dp_catalog_aux_read_data(struct dp_catalog *dp_catalog);
|
||||
int dp_catalog_aux_write_data(struct dp_catalog *dp_catalog);
|
||||
|
@ -80,7 +84,7 @@ int dp_catalog_aux_clear_hw_interrupts(struct dp_catalog *dp_catalog);
|
|||
void dp_catalog_aux_reset(struct dp_catalog *dp_catalog);
|
||||
void dp_catalog_aux_enable(struct dp_catalog *dp_catalog, bool enable);
|
||||
void dp_catalog_aux_update_cfg(struct dp_catalog *dp_catalog);
|
||||
int dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog);
|
||||
u32 dp_catalog_aux_get_irq(struct dp_catalog *dp_catalog);
|
||||
|
||||
/* DP Controller APIs */
|
||||
void dp_catalog_ctrl_state_ctrl(struct dp_catalog *dp_catalog, u32 state);
|
||||
|
@ -124,7 +128,6 @@ void dp_catalog_audio_get_header(struct dp_catalog *catalog);
|
|||
void dp_catalog_audio_set_header(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_config_acr(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_enable(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_enable(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_config_sdp(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_init(struct dp_catalog *catalog);
|
||||
void dp_catalog_audio_sfe_level(struct dp_catalog *catalog);
|
||||
|
|
|
@ -77,8 +77,6 @@ struct dp_ctrl_private {
|
|||
struct dp_parser *parser;
|
||||
struct dp_catalog *catalog;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
|
||||
struct completion idle_comp;
|
||||
struct completion video_comp;
|
||||
};
|
||||
|
@ -1809,6 +1807,63 @@ end:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int dp_ctrl_off_link_stream(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
struct dp_io *dp_io;
|
||||
struct phy *phy;
|
||||
int ret;
|
||||
|
||||
ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);
|
||||
dp_io = &ctrl->parser->io;
|
||||
phy = dp_io->phy;
|
||||
|
||||
/* set dongle to D3 (power off) mode */
|
||||
dp_link_psm_config(ctrl->link, &ctrl->panel->link_info, true);
|
||||
|
||||
dp_catalog_ctrl_mainlink_ctrl(ctrl->catalog, false);
|
||||
|
||||
if (dp_power_clk_status(ctrl->power, DP_STREAM_PM)) {
|
||||
ret = dp_power_clk_enable(ctrl->power, DP_STREAM_PM, false);
|
||||
if (ret) {
|
||||
DRM_ERROR("Failed to disable pclk. ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = dp_power_clk_enable(ctrl->power, DP_CTRL_PM, false);
|
||||
if (ret) {
|
||||
DRM_ERROR("Failed to disable link clocks. ret=%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
phy_power_off(phy);
|
||||
|
||||
/* aux channel down, reinit phy */
|
||||
phy_exit(phy);
|
||||
phy_init(phy);
|
||||
|
||||
DRM_DEBUG_DP("DP off link/stream done\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
void dp_ctrl_off_phy(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
struct dp_io *dp_io;
|
||||
struct phy *phy;
|
||||
|
||||
ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);
|
||||
dp_io = &ctrl->parser->io;
|
||||
phy = dp_io->phy;
|
||||
|
||||
dp_catalog_ctrl_reset(ctrl->catalog);
|
||||
|
||||
phy_exit(phy);
|
||||
|
||||
DRM_DEBUG_DP("DP off phy done\n");
|
||||
}
|
||||
|
||||
int dp_ctrl_off(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
|
@ -1886,20 +1941,17 @@ struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
|||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
ctrl->opp_table = dev_pm_opp_set_clkname(dev, "ctrl_link");
|
||||
if (IS_ERR(ctrl->opp_table)) {
|
||||
ret = devm_pm_opp_set_clkname(dev, "ctrl_link");
|
||||
if (ret) {
|
||||
dev_err(dev, "invalid DP OPP table in device tree\n");
|
||||
/* caller do PTR_ERR(ctrl->opp_table) */
|
||||
return (struct dp_ctrl *)ctrl->opp_table;
|
||||
/* caller do PTR_ERR(opp_table) */
|
||||
return (struct dp_ctrl *)ERR_PTR(ret);
|
||||
}
|
||||
|
||||
/* OPP table is optional */
|
||||
ret = dev_pm_opp_of_add_table(dev);
|
||||
if (ret) {
|
||||
ret = devm_pm_opp_of_add_table(dev);
|
||||
if (ret)
|
||||
dev_err(dev, "failed to add DP OPP table\n");
|
||||
dev_pm_opp_put_clkname(ctrl->opp_table);
|
||||
ctrl->opp_table = NULL;
|
||||
}
|
||||
|
||||
init_completion(&ctrl->idle_comp);
|
||||
init_completion(&ctrl->video_comp);
|
||||
|
@ -1915,16 +1967,3 @@ struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
|||
|
||||
return &ctrl->dp_ctrl;
|
||||
}
|
||||
|
||||
void dp_ctrl_put(struct dp_ctrl *dp_ctrl)
|
||||
{
|
||||
struct dp_ctrl_private *ctrl;
|
||||
|
||||
ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl);
|
||||
|
||||
if (ctrl->opp_table) {
|
||||
dev_pm_opp_of_remove_table(ctrl->dev);
|
||||
dev_pm_opp_put_clkname(ctrl->opp_table);
|
||||
ctrl->opp_table = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl, bool flip, bool reset);
|
|||
void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl);
|
||||
int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl);
|
||||
int dp_ctrl_on_stream(struct dp_ctrl *dp_ctrl);
|
||||
int dp_ctrl_off_link_stream(struct dp_ctrl *dp_ctrl);
|
||||
void dp_ctrl_off_phy(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);
|
||||
|
@ -31,6 +33,5 @@ struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
|
|||
struct dp_panel *panel, struct drm_dp_aux *aux,
|
||||
struct dp_power *power, struct dp_catalog *catalog,
|
||||
struct dp_parser *parser);
|
||||
void dp_ctrl_put(struct dp_ctrl *dp_ctrl);
|
||||
|
||||
#endif /* _DP_CTRL_H_ */
|
||||
|
|
|
@ -208,10 +208,6 @@ static int dp_display_bind(struct device *dev, struct device *master,
|
|||
|
||||
dp = container_of(g_dp_display,
|
||||
struct dp_display_private, dp_display);
|
||||
if (!dp) {
|
||||
DRM_ERROR("DP driver bind failed. Invalid driver data\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dp->dp_display.drm_dev = drm;
|
||||
priv = drm->dev_private;
|
||||
|
@ -252,10 +248,6 @@ static void dp_display_unbind(struct device *dev, struct device *master,
|
|||
|
||||
dp = container_of(g_dp_display,
|
||||
struct dp_display_private, dp_display);
|
||||
if (!dp) {
|
||||
DRM_ERROR("Invalid DP driver data\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dp_power_client_deinit(dp->power);
|
||||
dp_aux_unregister(dp->aux);
|
||||
|
@ -346,6 +338,12 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
|
|||
dp->dp_display.max_pclk_khz = DP_MAX_PIXEL_CLK_KHZ;
|
||||
dp->dp_display.max_dp_lanes = dp->parser->max_dp_lanes;
|
||||
|
||||
/*
|
||||
* set sink to normal operation mode -- D0
|
||||
* before dpcd read
|
||||
*/
|
||||
dp_link_psm_config(dp->link, &dp->panel->link_info, false);
|
||||
|
||||
dp_link_reset_phy_params_vx_px(dp->link);
|
||||
rc = dp_ctrl_on_link(dp->ctrl);
|
||||
if (rc) {
|
||||
|
@ -406,19 +404,9 @@ static int dp_display_usbpd_configure_cb(struct device *dev)
|
|||
|
||||
dp = container_of(g_dp_display,
|
||||
struct dp_display_private, dp_display);
|
||||
if (!dp) {
|
||||
DRM_ERROR("no driver data found\n");
|
||||
rc = -ENODEV;
|
||||
goto end;
|
||||
}
|
||||
|
||||
dp_display_host_init(dp, false);
|
||||
|
||||
/*
|
||||
* set sink to normal operation mode -- D0
|
||||
* before dpcd read
|
||||
*/
|
||||
dp_link_psm_config(dp->link, &dp->panel->link_info, false);
|
||||
rc = dp_display_process_hpd_high(dp);
|
||||
end:
|
||||
return rc;
|
||||
|
@ -437,11 +425,6 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)
|
|||
|
||||
dp = container_of(g_dp_display,
|
||||
struct dp_display_private, dp_display);
|
||||
if (!dp) {
|
||||
DRM_ERROR("no driver data found\n");
|
||||
rc = -ENODEV;
|
||||
return rc;
|
||||
}
|
||||
|
||||
dp_add_event(dp, EV_USER_NOTIFICATION, false, 0);
|
||||
|
||||
|
@ -502,7 +485,6 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
|
|||
int rc = 0;
|
||||
u32 sink_request;
|
||||
struct dp_display_private *dp;
|
||||
struct dp_usbpd *hpd;
|
||||
|
||||
if (!dev) {
|
||||
DRM_ERROR("invalid dev\n");
|
||||
|
@ -511,12 +493,6 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
|
|||
|
||||
dp = container_of(g_dp_display,
|
||||
struct dp_display_private, dp_display);
|
||||
if (!dp) {
|
||||
DRM_ERROR("no driver data found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
hpd = dp->usbpd;
|
||||
|
||||
/* check for any test request issued by sink */
|
||||
rc = dp_link_process_request(dp->link);
|
||||
|
@ -579,6 +555,10 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data)
|
|||
dp_add_event(dp, EV_CONNECT_PENDING_TIMEOUT, 0, tout);
|
||||
}
|
||||
|
||||
/* enable HDP irq_hpd/replug interrupt */
|
||||
dp_catalog_hpd_config_intr(dp->catalog,
|
||||
DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, true);
|
||||
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
|
||||
/* uevent will complete connection part */
|
||||
|
@ -628,7 +608,26 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
|
|||
mutex_lock(&dp->event_mutex);
|
||||
|
||||
state = dp->hpd_state;
|
||||
if (state == ST_DISCONNECT_PENDING || state == ST_DISCONNECTED) {
|
||||
|
||||
/* disable irq_hpd/replug interrupts */
|
||||
dp_catalog_hpd_config_intr(dp->catalog,
|
||||
DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, false);
|
||||
|
||||
/* unplugged, no more irq_hpd handle */
|
||||
dp_del_event(dp, EV_IRQ_HPD_INT);
|
||||
|
||||
if (state == ST_DISCONNECTED) {
|
||||
/* triggered by irq_hdp with sink_count = 0 */
|
||||
if (dp->link->sink_count == 0) {
|
||||
dp_ctrl_off_phy(dp->ctrl);
|
||||
hpd->hpd_high = 0;
|
||||
dp->core_initialized = false;
|
||||
}
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (state == ST_DISCONNECT_PENDING) {
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
@ -642,9 +641,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
|
|||
|
||||
dp->hpd_state = ST_DISCONNECT_PENDING;
|
||||
|
||||
/* disable HPD plug interrupt until disconnect is done */
|
||||
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK
|
||||
| DP_DP_IRQ_HPD_INT_MASK, false);
|
||||
/* disable HPD plug interrupts */
|
||||
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false);
|
||||
|
||||
hpd->hpd_high = 0;
|
||||
|
||||
|
@ -660,8 +658,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
|
|||
/* signal the disconnect event early to ensure proper teardown */
|
||||
dp_display_handle_plugged_change(g_dp_display, false);
|
||||
|
||||
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
|
||||
DP_DP_IRQ_HPD_INT_MASK, true);
|
||||
/* enable HDP plug interrupt to prepare for next plugin */
|
||||
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, true);
|
||||
|
||||
/* uevent will complete disconnection part */
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
|
@ -692,7 +690,7 @@ static int dp_irq_hpd_handle(struct dp_display_private *dp, u32 data)
|
|||
|
||||
/* irq_hpd can happen at either connected or disconnected state */
|
||||
state = dp->hpd_state;
|
||||
if (state == ST_DISPLAY_OFF) {
|
||||
if (state == ST_DISPLAY_OFF || state == ST_SUSPENDED) {
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
@ -724,7 +722,6 @@ static int dp_irq_hpd_handle(struct dp_display_private *dp, u32 data)
|
|||
static void dp_display_deinit_sub_modules(struct dp_display_private *dp)
|
||||
{
|
||||
dp_debug_put(dp->debug);
|
||||
dp_ctrl_put(dp->ctrl);
|
||||
dp_panel_put(dp->panel);
|
||||
dp_aux_put(dp->aux);
|
||||
dp_audio_put(dp->audio);
|
||||
|
@ -818,13 +815,11 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
|
|||
rc = PTR_ERR(dp->audio);
|
||||
pr_err("failed to initialize audio, rc = %d\n", rc);
|
||||
dp->audio = NULL;
|
||||
goto error_audio;
|
||||
goto error_ctrl;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
||||
error_audio:
|
||||
dp_ctrl_put(dp->ctrl);
|
||||
error_ctrl:
|
||||
dp_panel_put(dp->panel);
|
||||
error_link:
|
||||
|
@ -910,9 +905,13 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
|
|||
|
||||
dp_display->audio_enabled = false;
|
||||
|
||||
dp_ctrl_off(dp->ctrl);
|
||||
|
||||
dp->core_initialized = false;
|
||||
/* triggered by irq_hpd with sink_count = 0 */
|
||||
if (dp->link->sink_count == 0) {
|
||||
dp_ctrl_off_link_stream(dp->ctrl);
|
||||
} else {
|
||||
dp_ctrl_off(dp->ctrl);
|
||||
dp->core_initialized = false;
|
||||
}
|
||||
|
||||
dp_display->power_on = false;
|
||||
|
||||
|
@ -1012,6 +1011,33 @@ int dp_display_get_test_bpp(struct msm_dp *dp)
|
|||
dp_display->link->test_video.test_bit_depth);
|
||||
}
|
||||
|
||||
void msm_dp_snapshot(struct msm_disp_state *disp_state, struct msm_dp *dp)
|
||||
{
|
||||
struct dp_display_private *dp_display;
|
||||
struct drm_device *drm;
|
||||
|
||||
dp_display = container_of(dp, struct dp_display_private, dp_display);
|
||||
drm = dp->drm_dev;
|
||||
|
||||
/*
|
||||
* if we are reading registers we need the link clocks to be on
|
||||
* however till DP cable is connected this will not happen as we
|
||||
* do not know the resolution to power up with. Hence check the
|
||||
* power_on status before dumping DP registers to avoid crash due
|
||||
* to unclocked access
|
||||
*/
|
||||
mutex_lock(&dp_display->event_mutex);
|
||||
|
||||
if (!dp->power_on) {
|
||||
mutex_unlock(&dp_display->event_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
dp_catalog_snapshot(dp_display->catalog, disp_state);
|
||||
|
||||
mutex_unlock(&dp_display->event_mutex);
|
||||
}
|
||||
|
||||
static void dp_display_config_hpd(struct dp_display_private *dp)
|
||||
{
|
||||
|
||||
|
@ -1300,8 +1326,13 @@ static int dp_pm_suspend(struct device *dev)
|
|||
|
||||
mutex_lock(&dp->event_mutex);
|
||||
|
||||
if (dp->core_initialized == true)
|
||||
if (dp->core_initialized == true) {
|
||||
/* mainlink enabled */
|
||||
if (dp_power_clk_status(dp->power, DP_CTRL_PM))
|
||||
dp_ctrl_off_link_stream(dp->ctrl);
|
||||
|
||||
dp_display_host_deinit(dp);
|
||||
}
|
||||
|
||||
dp->hpd_state = ST_SUSPENDED;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "dp_panel.h"
|
||||
#include <sound/hdmi-codec.h>
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
struct msm_dp {
|
||||
struct drm_device *drm_dev;
|
||||
|
|
|
@ -364,7 +364,7 @@ static int dp_link_parse_timing_params3(struct dp_link_private *link,
|
|||
}
|
||||
|
||||
/**
|
||||
* dp_parse_video_pattern_params() - parses video pattern parameters from DPCD
|
||||
* dp_link_parse_video_pattern_params() - parses video pattern parameters from DPCD
|
||||
* @link: Display Port Driver data
|
||||
*
|
||||
* Returns 0 if it successfully parses the video link pattern and the link
|
||||
|
@ -563,7 +563,7 @@ static int dp_link_parse_link_training_params(struct dp_link_private *link)
|
|||
}
|
||||
|
||||
/**
|
||||
* dp_parse_phy_test_params() - parses the phy link parameters
|
||||
* dp_link_parse_phy_test_params() - parses the phy link parameters
|
||||
* @link: Display Port Driver data
|
||||
*
|
||||
* Parses the DPCD (Byte 0x248) for the DP PHY link pattern that is being
|
||||
|
@ -843,10 +843,8 @@ bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum)
|
|||
return ret == 1;
|
||||
}
|
||||
|
||||
static int dp_link_parse_vx_px(struct dp_link_private *link)
|
||||
static void dp_link_parse_vx_px(struct dp_link_private *link)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
DRM_DEBUG_DP("vx: 0=%d, 1=%d, 2=%d, 3=%d\n",
|
||||
drm_dp_get_adjust_request_voltage(link->link_status, 0),
|
||||
drm_dp_get_adjust_request_voltage(link->link_status, 1),
|
||||
|
@ -876,8 +874,6 @@ static int dp_link_parse_vx_px(struct dp_link_private *link)
|
|||
DRM_DEBUG_DP("Requested: v_level = 0x%x, p_level = 0x%x\n",
|
||||
link->dp_link.phy_params.v_level,
|
||||
link->dp_link.phy_params.p_level);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -891,8 +887,6 @@ static int dp_link_parse_vx_px(struct dp_link_private *link)
|
|||
static int dp_link_process_phy_test_pattern_request(
|
||||
struct dp_link_private *link)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!(link->request.test_requested & DP_TEST_LINK_PHY_TEST_PATTERN)) {
|
||||
DRM_DEBUG_DP("no phy test\n");
|
||||
return -EINVAL;
|
||||
|
@ -918,12 +912,9 @@ static int dp_link_process_phy_test_pattern_request(
|
|||
link->dp_link.link_params.rate =
|
||||
drm_dp_bw_code_to_link_rate(link->request.test_link_rate);
|
||||
|
||||
ret = dp_link_parse_vx_px(link);
|
||||
dp_link_parse_vx_px(link);
|
||||
|
||||
if (ret)
|
||||
DRM_ERROR("parse_vx_px failed. ret=%d\n", ret);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 get_link_status(const u8 link_status[DP_LINK_STATUS_SIZE], int r)
|
||||
|
@ -961,7 +952,7 @@ static int dp_link_process_link_status_update(struct dp_link_private *link)
|
|||
}
|
||||
|
||||
/**
|
||||
* dp_link_process_downstream_port_status_change() - process port status changes
|
||||
* dp_link_process_ds_port_status_change() - process port status changes
|
||||
* @link: Display Port Driver data
|
||||
*
|
||||
* This function will handle downstream port updates that are initiated by
|
||||
|
|
|
@ -141,7 +141,6 @@ static int dp_panel_update_modes(struct drm_connector *connector,
|
|||
return rc;
|
||||
}
|
||||
rc = drm_add_edid_modes(connector, edid);
|
||||
DRM_DEBUG_DP("%s -", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -351,7 +350,6 @@ void dp_panel_dump_regs(struct dp_panel *dp_panel)
|
|||
|
||||
int dp_panel_timing_cfg(struct dp_panel *dp_panel)
|
||||
{
|
||||
int rc = 0;
|
||||
u32 data, total_ver, total_hor;
|
||||
struct dp_catalog *catalog;
|
||||
struct dp_panel_private *panel;
|
||||
|
@ -404,7 +402,7 @@ int dp_panel_timing_cfg(struct dp_panel *dp_panel)
|
|||
dp_catalog_panel_timing_cfg(catalog);
|
||||
panel->panel_on = true;
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dp_panel_init_panel_info(struct dp_panel *dp_panel)
|
||||
|
|
|
@ -88,7 +88,7 @@ int dp_power_client_init(struct dp_power *power);
|
|||
* return: 0 for success, error for failure.
|
||||
*
|
||||
* This API will de-initialize the DisplayPort's clocks and regulator
|
||||
* modueles.
|
||||
* modules.
|
||||
*/
|
||||
void dp_power_client_deinit(struct dp_power *power);
|
||||
|
||||
|
@ -100,7 +100,7 @@ void dp_power_client_deinit(struct dp_power *power);
|
|||
*
|
||||
* This API will configure the DisplayPort's power module and provides
|
||||
* methods to be called by the client to configure the power related
|
||||
* modueles.
|
||||
* modules.
|
||||
*/
|
||||
struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser);
|
||||
|
||||
|
|
|
@ -266,3 +266,9 @@ fail:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi)
|
||||
{
|
||||
msm_dsi_host_snapshot(disp_state, msm_dsi->host);
|
||||
msm_dsi_phy_snapshot(disp_state, msm_dsi->phy);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <drm/drm_panel.h>
|
||||
|
||||
#include "msm_drv.h"
|
||||
#include "disp/msm_disp_snapshot.h"
|
||||
|
||||
#define DSI_0 0
|
||||
#define DSI_1 1
|
||||
|
@ -146,7 +147,7 @@ int dsi_clk_init_v2(struct msm_dsi_host *msm_host);
|
|||
int dsi_clk_init_6g_v2(struct msm_dsi_host *msm_host);
|
||||
int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi);
|
||||
int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi);
|
||||
|
||||
void msm_dsi_host_snapshot(struct msm_disp_state *disp_state, struct mipi_dsi_host *host);
|
||||
/* dsi phy */
|
||||
struct msm_dsi_phy;
|
||||
struct msm_dsi_phy_shared_timings {
|
||||
|
@ -173,6 +174,7 @@ int msm_dsi_phy_get_clk_provider(struct msm_dsi_phy *phy,
|
|||
struct clk **byte_clk_provider, struct clk **pixel_clk_provider);
|
||||
void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy);
|
||||
int msm_dsi_phy_pll_restore_state(struct msm_dsi_phy *phy);
|
||||
void msm_dsi_phy_snapshot(struct msm_disp_state *disp_state, struct msm_dsi_phy *phy);
|
||||
|
||||
#endif /* __DSI_CONNECTOR_H__ */
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -102,6 +102,7 @@ struct msm_dsi_host {
|
|||
int id;
|
||||
|
||||
void __iomem *ctrl_base;
|
||||
phys_addr_t ctrl_size;
|
||||
struct regulator_bulk_data supplies[DSI_DEV_REGULATOR_MAX];
|
||||
|
||||
struct clk *bus_clks[DSI_BUS_CLK_MAX];
|
||||
|
@ -113,8 +114,6 @@ struct msm_dsi_host {
|
|||
struct clk *pixel_clk_src;
|
||||
struct clk *byte_intf_clk;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
|
||||
u32 byte_clk_rate;
|
||||
u32 pixel_clk_rate;
|
||||
u32 esc_clk_rate;
|
||||
|
@ -1092,7 +1091,7 @@ int dsi_tx_buf_alloc_6g(struct msm_dsi_host *msm_host, int size)
|
|||
uint64_t iova;
|
||||
u8 *data;
|
||||
|
||||
data = msm_gem_kernel_new(dev, size, MSM_BO_UNCACHED,
|
||||
data = msm_gem_kernel_new(dev, size, MSM_BO_WC,
|
||||
priv->kms->aspace,
|
||||
&msm_host->tx_gem_obj, &iova);
|
||||
|
||||
|
@ -1839,7 +1838,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
msm_host->ctrl_base = msm_ioremap(pdev, "dsi_ctrl", "DSI CTRL");
|
||||
msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", "DSI CTRL", &msm_host->ctrl_size);
|
||||
if (IS_ERR(msm_host->ctrl_base)) {
|
||||
pr_err("%s: unable to map Dsi ctrl base\n", __func__);
|
||||
ret = PTR_ERR(msm_host->ctrl_base);
|
||||
|
@ -1884,14 +1883,13 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
msm_host->opp_table = dev_pm_opp_set_clkname(&pdev->dev, "byte");
|
||||
if (IS_ERR(msm_host->opp_table))
|
||||
return PTR_ERR(msm_host->opp_table);
|
||||
ret = devm_pm_opp_set_clkname(&pdev->dev, "byte");
|
||||
if (ret)
|
||||
return ret;
|
||||
/* OPP table is optional */
|
||||
ret = dev_pm_opp_of_add_table(&pdev->dev);
|
||||
ret = devm_pm_opp_of_add_table(&pdev->dev);
|
||||
if (ret && ret != -ENODEV) {
|
||||
dev_err(&pdev->dev, "invalid OPP table in device tree\n");
|
||||
dev_pm_opp_put_clkname(msm_host->opp_table);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1930,8 +1928,6 @@ void msm_dsi_host_destroy(struct mipi_dsi_host *host)
|
|||
mutex_destroy(&msm_host->cmd_mutex);
|
||||
mutex_destroy(&msm_host->dev_mutex);
|
||||
|
||||
dev_pm_opp_of_remove_table(&msm_host->pdev->dev);
|
||||
dev_pm_opp_put_clkname(msm_host->opp_table);
|
||||
pm_runtime_disable(&msm_host->pdev->dev);
|
||||
}
|
||||
|
||||
|
@ -2487,3 +2483,15 @@ struct drm_bridge *msm_dsi_host_get_bridge(struct mipi_dsi_host *host)
|
|||
|
||||
return of_drm_find_bridge(msm_host->device_node);
|
||||
}
|
||||
|
||||
void msm_dsi_host_snapshot(struct msm_disp_state *disp_state, struct mipi_dsi_host *host)
|
||||
{
|
||||
struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
|
||||
|
||||
pm_runtime_get_sync(&msm_host->pdev->dev);
|
||||
|
||||
msm_disp_snapshot_add_block(disp_state, msm_host->ctrl_size,
|
||||
msm_host->ctrl_base, "dsi%d_ctrl", msm_host->id);
|
||||
|
||||
pm_runtime_put_sync(&msm_host->pdev->dev);
|
||||
}
|
||||
|
|
|
@ -373,14 +373,14 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
|
|||
if (!msm_dsi_device_connected(msm_dsi))
|
||||
return;
|
||||
|
||||
ret = dsi_mgr_phy_enable(id, phy_shared_timings);
|
||||
if (ret)
|
||||
goto phy_en_fail;
|
||||
|
||||
/* Do nothing with the host if it is slave-DSI in case of dual DSI */
|
||||
if (is_dual_dsi && !IS_MASTER_DSI_LINK(id))
|
||||
return;
|
||||
|
||||
ret = dsi_mgr_phy_enable(id, phy_shared_timings);
|
||||
if (ret)
|
||||
goto phy_en_fail;
|
||||
|
||||
ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_dual_dsi);
|
||||
if (ret) {
|
||||
pr_err("%s: power on host %d failed, %d\n", __func__, id, ret);
|
||||
|
@ -817,8 +817,8 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
|
|||
|
||||
ret = dsi_mgr_setup_components(id);
|
||||
if (ret) {
|
||||
pr_err("%s: failed to register mipi dsi host for DSI %d\n",
|
||||
__func__, id);
|
||||
pr_err("%s: failed to register mipi dsi host for DSI %d: %d\n",
|
||||
__func__, id, ret);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
#ifndef DSI_PHY_10NM_XML
|
||||
#define DSI_PHY_10NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_REVISION_ID0 0x00000000
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_REVISION_ID1 0x00000004
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_REVISION_ID2 0x00000008
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_REVISION_ID3 0x0000000c
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_CLK_CFG0 0x00000010
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_CLK_CFG1 0x00000014
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_GLBL_CTRL 0x00000018
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_RBUF_CTRL 0x0000001c
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_VREG_CTRL 0x00000020
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_CTRL_0 0x00000024
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_CTRL_1 0x00000028
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_CTRL_2 0x0000002c
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CFG0 0x00000030
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CFG1 0x00000034
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_PLL_CNTRL 0x00000038
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CTRL0 0x00000098
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CTRL1 0x0000009c
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CTRL2 0x000000a0
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CTRL3 0x000000a4
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_CTRL4 0x000000a8
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_0 0x000000ac
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_1 0x000000b0
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_2 0x000000b4
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_3 0x000000b8
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_4 0x000000bc
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_5 0x000000c0
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_6 0x000000c4
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_7 0x000000c8
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_8 0x000000cc
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_9 0x000000d0
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_10 0x000000d4
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_TIMING_CTRL_11 0x000000d8
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_PHY_STATUS 0x000000ec
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_STATUS0 0x000000f4
|
||||
|
||||
#define REG_DSI_10nm_PHY_CMN_LANE_STATUS1 0x000000f8
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_CFG0(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_CFG1(uint32_t i0) { return 0x00000004 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_CFG2(uint32_t i0) { return 0x00000008 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_CFG3(uint32_t i0) { return 0x0000000c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x00000010 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_PIN_SWAP(uint32_t i0) { return 0x00000014 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_HSTX_STR_CTRL(uint32_t i0) { return 0x00000018 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_OFFSET_TOP_CTRL(uint32_t i0) { return 0x0000001c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_OFFSET_BOT_CTRL(uint32_t i0) { return 0x00000020 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_LPTX_STR_CTRL(uint32_t i0) { return 0x00000024 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_LPRX_CTRL(uint32_t i0) { return 0x00000028 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_10nm_PHY_LN_TX_DCTRL(uint32_t i0) { return 0x0000002c + 0x80*i0; }
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_ANALOG_CONTROLS_ONE 0x00000000
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_ANALOG_CONTROLS_TWO 0x00000004
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_ANALOG_CONTROLS_THREE 0x00000010
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_DSM_DIVIDER 0x0000001c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_FEEDBACK_DIVIDER 0x00000020
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SYSTEM_MUXES 0x00000024
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_CMODE 0x0000002c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_CALIBRATION_SETTINGS 0x00000030
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_THREE 0x00000054
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_FREQ_DETECT_SETTINGS_ONE 0x00000064
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PFILT 0x0000007c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_IFILT 0x00000080
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_OUTDIV 0x00000094
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_CORE_OVERRIDE 0x000000a4
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_CORE_INPUT_OVERRIDE 0x000000a8
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_DIGITAL_TIMERS_TWO 0x000000b4
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_DECIMAL_DIV_START_1 0x000000cc
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_FRAC_DIV_START_LOW_1 0x000000d0
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_FRAC_DIV_START_MID_1 0x000000d4
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_FRAC_DIV_START_HIGH_1 0x000000d8
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_STEPSIZE_LOW_1 0x0000010c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_STEPSIZE_HIGH_1 0x00000110
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_DIV_PER_LOW_1 0x00000114
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_DIV_PER_HIGH_1 0x00000118
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_DIV_ADJPER_LOW_1 0x0000011c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_DIV_ADJPER_HIGH_1 0x00000120
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_SSC_CONTROL 0x0000013c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_OUTDIV_RATE 0x00000140
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_LOCKDET_RATE_1 0x00000144
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_PROP_GAIN_RATE_1 0x0000014c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_BAND_SET_RATE_1 0x00000154
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_INT_GAIN_IFILT_BAND_1 0x0000015c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_FL_INT_GAIN_PFILT_BAND_1 0x00000164
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_LOCK_OVERRIDE 0x00000180
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_PLL_LOCK_DELAY 0x00000184
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_CLOCK_INVERTERS 0x0000018c
|
||||
|
||||
#define REG_DSI_10nm_PHY_PLL_COMMON_STATUS_ONE 0x000001a0
|
||||
|
||||
|
||||
#endif /* DSI_PHY_10NM_XML */
|
|
@ -0,0 +1,310 @@
|
|||
#ifndef DSI_PHY_14NM_XML
|
||||
#define DSI_PHY_14NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_REVISION_ID0 0x00000000
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_REVISION_ID1 0x00000004
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_REVISION_ID2 0x00000008
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_REVISION_ID3 0x0000000c
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_CLK_CFG0 0x00000010
|
||||
#define DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_3_0__MASK 0x000000f0
|
||||
#define DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_3_0__SHIFT 4
|
||||
static inline uint32_t DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_3_0(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_3_0__SHIFT) & DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_3_0__MASK;
|
||||
}
|
||||
#define DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_7_4__MASK 0x000000f0
|
||||
#define DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_7_4__SHIFT 4
|
||||
static inline uint32_t DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_7_4(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_7_4__SHIFT) & DSI_14nm_PHY_CMN_CLK_CFG0_DIV_CTRL_7_4__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_CLK_CFG1 0x00000014
|
||||
#define DSI_14nm_PHY_CMN_CLK_CFG1_DSICLK_SEL 0x00000001
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_GLBL_TEST_CTRL 0x00000018
|
||||
#define DSI_14nm_PHY_CMN_GLBL_TEST_CTRL_BITCLK_HS_SEL 0x00000004
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_CTRL_0 0x0000001c
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_CTRL_1 0x00000020
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_TRIGGER 0x00000024
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_SW_CFG0 0x00000028
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_SW_CFG1 0x0000002c
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_SW_CFG2 0x00000030
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_CFG0 0x00000034
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_CFG1 0x00000038
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_CFG2 0x0000003c
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_CFG3 0x00000040
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_HW_CFG4 0x00000044
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_PLL_CNTRL 0x00000048
|
||||
#define DSI_14nm_PHY_CMN_PLL_CNTRL_PLL_START 0x00000001
|
||||
|
||||
#define REG_DSI_14nm_PHY_CMN_LDO_CNTRL 0x0000004c
|
||||
#define DSI_14nm_PHY_CMN_LDO_CNTRL_VREG_CTRL__MASK 0x0000003f
|
||||
#define DSI_14nm_PHY_CMN_LDO_CNTRL_VREG_CTRL__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_CMN_LDO_CNTRL_VREG_CTRL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_CMN_LDO_CNTRL_VREG_CTRL__SHIFT) & DSI_14nm_PHY_CMN_LDO_CNTRL_VREG_CTRL__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_CFG0(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_CFG0_PREPARE_DLY__MASK 0x000000c0
|
||||
#define DSI_14nm_PHY_LN_CFG0_PREPARE_DLY__SHIFT 6
|
||||
static inline uint32_t DSI_14nm_PHY_LN_CFG0_PREPARE_DLY(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_CFG0_PREPARE_DLY__SHIFT) & DSI_14nm_PHY_LN_CFG0_PREPARE_DLY__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_CFG1(uint32_t i0) { return 0x00000004 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_CFG1_HALFBYTECLK_EN 0x00000001
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_CFG2(uint32_t i0) { return 0x00000008 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_CFG3(uint32_t i0) { return 0x0000000c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x00000010 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TEST_STR(uint32_t i0) { return 0x00000014 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_4(uint32_t i0) { return 0x00000018 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_4_HS_EXIT__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_4_HS_EXIT__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_4_HS_EXIT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_4_HS_EXIT__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_4_HS_EXIT__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_5(uint32_t i0) { return 0x0000001c + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_5_HS_ZERO__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_5_HS_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_5_HS_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_5_HS_ZERO__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_5_HS_ZERO__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_6(uint32_t i0) { return 0x00000020 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_6_HS_PREPARE__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_6_HS_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_6_HS_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_6_HS_PREPARE__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_6_HS_PREPARE__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_7(uint32_t i0) { return 0x00000024 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_7_HS_TRAIL__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_7_HS_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_7_HS_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_7_HS_TRAIL__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_7_HS_TRAIL__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_8(uint32_t i0) { return 0x00000028 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_8_HS_RQST__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_8_HS_RQST__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_8_HS_RQST(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_8_HS_RQST__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_8_HS_RQST__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_9(uint32_t i0) { return 0x0000002c + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_GO__MASK 0x00000007
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_GO__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_GO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_GO__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_GO__MASK;
|
||||
}
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_SURE__MASK 0x00000070
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_SURE__SHIFT 4
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_SURE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_SURE__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_9_TA_SURE__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_10(uint32_t i0) { return 0x00000030 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_10_TA_GET__MASK 0x00000007
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_10_TA_GET__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_10_TA_GET(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_10_TA_GET__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_10_TA_GET__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_TIMING_CTRL_11(uint32_t i0) { return 0x00000034 + 0x80*i0; }
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_11_TRIG3_CMD__MASK 0x000000ff
|
||||
#define DSI_14nm_PHY_LN_TIMING_CTRL_11_TRIG3_CMD__SHIFT 0
|
||||
static inline uint32_t DSI_14nm_PHY_LN_TIMING_CTRL_11_TRIG3_CMD(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_14nm_PHY_LN_TIMING_CTRL_11_TRIG3_CMD__SHIFT) & DSI_14nm_PHY_LN_TIMING_CTRL_11_TRIG3_CMD__MASK;
|
||||
}
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_STRENGTH_CTRL_0(uint32_t i0) { return 0x00000038 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_STRENGTH_CTRL_1(uint32_t i0) { return 0x0000003c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_14nm_PHY_LN_VREG_CNTRL(uint32_t i0) { return 0x00000064 + 0x80*i0; }
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_IE_TRIM 0x00000000
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_IP_TRIM 0x00000004
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_IPTAT_TRIM 0x00000010
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_CLKBUFLR_EN 0x0000001c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SYSCLK_EN_RESET 0x00000028
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESETSM_CNTRL 0x0000002c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESETSM_CNTRL2 0x00000030
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESETSM_CNTRL3 0x00000034
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESETSM_CNTRL4 0x00000038
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESETSM_CNTRL5 0x0000003c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_KVCO_DIV_REF1 0x00000040
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_KVCO_DIV_REF2 0x00000044
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_KVCO_COUNT1 0x00000048
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_KVCO_COUNT2 0x0000004c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_VREF_CFG1 0x0000005c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_KVCO_CODE 0x00000058
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_VCO_DIV_REF1 0x0000006c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_VCO_DIV_REF2 0x00000070
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_VCO_COUNT1 0x00000074
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_VCO_COUNT2 0x00000078
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLLLOCK_CMP1 0x0000007c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLLLOCK_CMP2 0x00000080
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLLLOCK_CMP3 0x00000084
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLLLOCK_CMP_EN 0x00000088
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_VCO_TUNE 0x0000008c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_DEC_START 0x00000090
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_EN_CENTER 0x00000094
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_ADJ_PER1 0x00000098
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_ADJ_PER2 0x0000009c
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_PER1 0x000000a0
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_PER2 0x000000a4
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_STEP_SIZE1 0x000000a8
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_SSC_STEP_SIZE2 0x000000ac
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_DIV_FRAC_START1 0x000000b4
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_DIV_FRAC_START2 0x000000b8
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_DIV_FRAC_START3 0x000000bc
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_TXCLK_EN 0x000000c0
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_CRCTRL 0x000000c4
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_RESET_SM_READY_STATUS 0x000000cc
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_MISC1 0x000000e8
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_CP_SET_CUR 0x000000f0
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_ICPMSET 0x000000f4
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_ICPCSET 0x000000f8
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_ICP_SET 0x000000fc
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_LPF1 0x00000100
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_LPF2_POSTDIV 0x00000104
|
||||
|
||||
#define REG_DSI_14nm_PHY_PLL_PLL_BANDGAP 0x00000108
|
||||
|
||||
|
||||
#endif /* DSI_PHY_14NM_XML */
|
|
@ -0,0 +1,238 @@
|
|||
#ifndef DSI_PHY_20NM_XML
|
||||
#define DSI_PHY_20NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_CFG_0(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_CFG_1(uint32_t i0) { return 0x00000004 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_CFG_2(uint32_t i0) { return 0x00000008 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_CFG_3(uint32_t i0) { return 0x0000000c + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_CFG_4(uint32_t i0) { return 0x00000010 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x00000014 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_DEBUG_SEL(uint32_t i0) { return 0x00000018 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_TEST_STR_0(uint32_t i0) { return 0x0000001c + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_20nm_PHY_LN_TEST_STR_1(uint32_t i0) { return 0x00000020 + 0x40*i0; }
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_CFG_0 0x00000100
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_CFG_1 0x00000104
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_CFG_2 0x00000108
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_CFG_3 0x0000010c
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_CFG_4 0x00000110
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_TEST_DATAPATH 0x00000114
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_DEBUG_SEL 0x00000118
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_TEST_STR0 0x0000011c
|
||||
|
||||
#define REG_DSI_20nm_PHY_LNCK_TEST_STR1 0x00000120
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_0 0x00000140
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_0_CLK_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_1 0x00000144
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_2 0x00000148
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_3 0x0000014c
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_3_CLK_ZERO_8 0x00000001
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_4 0x00000150
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_4_HS_EXIT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_5 0x00000154
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_5_HS_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_6 0x00000158
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_6_HS_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_7 0x0000015c
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_7_HS_TRAIL__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_7_HS_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_7_HS_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_8 0x00000160
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_8_HS_RQST__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_8_HS_RQST__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_8_HS_RQST(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_8_HS_RQST__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_8_HS_RQST__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_9 0x00000164
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_9_TA_GO__MASK 0x00000007
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_9_TA_GO__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_9_TA_GO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_9_TA_GO__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_9_TA_GO__MASK;
|
||||
}
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_9_TA_SURE__MASK 0x00000070
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_9_TA_SURE__SHIFT 4
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_9_TA_SURE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_9_TA_SURE__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_9_TA_SURE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_10 0x00000168
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_10_TA_GET__MASK 0x00000007
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_10_TA_GET__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_10_TA_GET(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_10_TA_GET__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_10_TA_GET__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_TIMING_CTRL_11 0x0000016c
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK 0x000000ff
|
||||
#define DSI_20nm_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT 0
|
||||
static inline uint32_t DSI_20nm_PHY_TIMING_CTRL_11_TRIG3_CMD(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_20nm_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT) & DSI_20nm_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_20nm_PHY_CTRL_0 0x00000170
|
||||
|
||||
#define REG_DSI_20nm_PHY_CTRL_1 0x00000174
|
||||
|
||||
#define REG_DSI_20nm_PHY_CTRL_2 0x00000178
|
||||
|
||||
#define REG_DSI_20nm_PHY_CTRL_3 0x0000017c
|
||||
|
||||
#define REG_DSI_20nm_PHY_CTRL_4 0x00000180
|
||||
|
||||
#define REG_DSI_20nm_PHY_STRENGTH_0 0x00000184
|
||||
|
||||
#define REG_DSI_20nm_PHY_STRENGTH_1 0x00000188
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_0 0x000001b4
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_1 0x000001b8
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_2 0x000001bc
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_3 0x000001c0
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_4 0x000001c4
|
||||
|
||||
#define REG_DSI_20nm_PHY_BIST_CTRL_5 0x000001c8
|
||||
|
||||
#define REG_DSI_20nm_PHY_GLBL_TEST_CTRL 0x000001d4
|
||||
#define DSI_20nm_PHY_GLBL_TEST_CTRL_BITCLK_HS_SEL 0x00000001
|
||||
|
||||
#define REG_DSI_20nm_PHY_LDO_CNTRL 0x000001dc
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_0 0x00000000
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_1 0x00000004
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_2 0x00000008
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_3 0x0000000c
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_4 0x00000010
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CTRL_5 0x00000014
|
||||
|
||||
#define REG_DSI_20nm_PHY_REGULATOR_CAL_PWR_CFG 0x00000018
|
||||
|
||||
|
||||
#endif /* DSI_PHY_20NM_XML */
|
|
@ -0,0 +1,385 @@
|
|||
#ifndef DSI_PHY_28NM_XML
|
||||
#define DSI_PHY_28NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_CFG_0(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_CFG_1(uint32_t i0) { return 0x00000004 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_CFG_2(uint32_t i0) { return 0x00000008 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_CFG_3(uint32_t i0) { return 0x0000000c + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_CFG_4(uint32_t i0) { return 0x00000010 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x00000014 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_DEBUG_SEL(uint32_t i0) { return 0x00000018 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_TEST_STR_0(uint32_t i0) { return 0x0000001c + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_PHY_LN_TEST_STR_1(uint32_t i0) { return 0x00000020 + 0x40*i0; }
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_CFG_0 0x00000100
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_CFG_1 0x00000104
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_CFG_2 0x00000108
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_CFG_3 0x0000010c
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_CFG_4 0x00000110
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_TEST_DATAPATH 0x00000114
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_DEBUG_SEL 0x00000118
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_TEST_STR0 0x0000011c
|
||||
|
||||
#define REG_DSI_28nm_PHY_LNCK_TEST_STR1 0x00000120
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_0 0x00000140
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_0_CLK_ZERO__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_0_CLK_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_0_CLK_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_1 0x00000144
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_1_CLK_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_2 0x00000148
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_2_CLK_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_3 0x0000014c
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_3_CLK_ZERO_8 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_4 0x00000150
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_4_HS_EXIT__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_4_HS_EXIT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_4_HS_EXIT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_5 0x00000154
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_5_HS_ZERO__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_5_HS_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_5_HS_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_6 0x00000158
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_6_HS_PREPARE__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_6_HS_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_6_HS_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_7 0x0000015c
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_7_HS_TRAIL__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_7_HS_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_7_HS_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_8 0x00000160
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_8_HS_RQST__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_8_HS_RQST__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_8_HS_RQST(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_8_HS_RQST__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_8_HS_RQST__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_9 0x00000164
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_9_TA_GO__MASK 0x00000007
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_9_TA_GO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_9_TA_GO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_9_TA_GO__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_9_TA_GO__MASK;
|
||||
}
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_9_TA_SURE__MASK 0x00000070
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_9_TA_SURE__SHIFT 4
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_9_TA_SURE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_9_TA_SURE__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_9_TA_SURE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_10 0x00000168
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_10_TA_GET__MASK 0x00000007
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_10_TA_GET__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_10_TA_GET(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_10_TA_GET__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_10_TA_GET__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_TIMING_CTRL_11 0x0000016c
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_TIMING_CTRL_11_TRIG3_CMD(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT) & DSI_28nm_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_CTRL_0 0x00000170
|
||||
|
||||
#define REG_DSI_28nm_PHY_CTRL_1 0x00000174
|
||||
|
||||
#define REG_DSI_28nm_PHY_CTRL_2 0x00000178
|
||||
|
||||
#define REG_DSI_28nm_PHY_CTRL_3 0x0000017c
|
||||
|
||||
#define REG_DSI_28nm_PHY_CTRL_4 0x00000180
|
||||
|
||||
#define REG_DSI_28nm_PHY_STRENGTH_0 0x00000184
|
||||
|
||||
#define REG_DSI_28nm_PHY_STRENGTH_1 0x00000188
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_0 0x000001b4
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_1 0x000001b8
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_2 0x000001bc
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_3 0x000001c0
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_4 0x000001c4
|
||||
|
||||
#define REG_DSI_28nm_PHY_BIST_CTRL_5 0x000001c8
|
||||
|
||||
#define REG_DSI_28nm_PHY_GLBL_TEST_CTRL 0x000001d4
|
||||
#define DSI_28nm_PHY_GLBL_TEST_CTRL_BITCLK_HS_SEL 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_PHY_LDO_CNTRL 0x000001dc
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_0 0x00000000
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_1 0x00000004
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_2 0x00000008
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_3 0x0000000c
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_4 0x00000010
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CTRL_5 0x00000014
|
||||
|
||||
#define REG_DSI_28nm_PHY_REGULATOR_CAL_PWR_CFG 0x00000018
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_REFCLK_CFG 0x00000000
|
||||
#define DSI_28nm_PHY_PLL_REFCLK_CFG_DBLR 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_POSTDIV1_CFG 0x00000004
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CHGPUMP_CFG 0x00000008
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_VCOLPF_CFG 0x0000000c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_VREG_CFG 0x00000010
|
||||
#define DSI_28nm_PHY_PLL_VREG_CFG_POSTDIV1_BYPASS_B 0x00000002
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_PWRGEN_CFG 0x00000014
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DMUX_CFG 0x00000018
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_AMUX_CFG 0x0000001c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_GLB_CFG 0x00000020
|
||||
#define DSI_28nm_PHY_PLL_GLB_CFG_PLL_PWRDN_B 0x00000001
|
||||
#define DSI_28nm_PHY_PLL_GLB_CFG_PLL_LDO_PWRDN_B 0x00000002
|
||||
#define DSI_28nm_PHY_PLL_GLB_CFG_PLL_PWRGEN_PWRDN_B 0x00000004
|
||||
#define DSI_28nm_PHY_PLL_GLB_CFG_PLL_ENABLE 0x00000008
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_POSTDIV2_CFG 0x00000024
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_POSTDIV3_CFG 0x00000028
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LPFR_CFG 0x0000002c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LPFC1_CFG 0x00000030
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LPFC2_CFG 0x00000034
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SDM_CFG0 0x00000038
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG0_BYP_DIV__MASK 0x0000003f
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG0_BYP_DIV__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_PLL_SDM_CFG0_BYP_DIV(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_PLL_SDM_CFG0_BYP_DIV__SHIFT) & DSI_28nm_PHY_PLL_SDM_CFG0_BYP_DIV__MASK;
|
||||
}
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG0_BYP 0x00000040
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SDM_CFG1 0x0000003c
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG1_DC_OFFSET__MASK 0x0000003f
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG1_DC_OFFSET__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_PLL_SDM_CFG1_DC_OFFSET(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_PLL_SDM_CFG1_DC_OFFSET__SHIFT) & DSI_28nm_PHY_PLL_SDM_CFG1_DC_OFFSET__MASK;
|
||||
}
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG1_DITHER_EN__MASK 0x00000040
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG1_DITHER_EN__SHIFT 6
|
||||
static inline uint32_t DSI_28nm_PHY_PLL_SDM_CFG1_DITHER_EN(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_PLL_SDM_CFG1_DITHER_EN__SHIFT) & DSI_28nm_PHY_PLL_SDM_CFG1_DITHER_EN__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SDM_CFG2 0x00000040
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG2_FREQ_SEED_7_0__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG2_FREQ_SEED_7_0__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_PLL_SDM_CFG2_FREQ_SEED_7_0(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_PLL_SDM_CFG2_FREQ_SEED_7_0__SHIFT) & DSI_28nm_PHY_PLL_SDM_CFG2_FREQ_SEED_7_0__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SDM_CFG3 0x00000044
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG3_FREQ_SEED_15_8__MASK 0x000000ff
|
||||
#define DSI_28nm_PHY_PLL_SDM_CFG3_FREQ_SEED_15_8__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_PHY_PLL_SDM_CFG3_FREQ_SEED_15_8(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_PHY_PLL_SDM_CFG3_FREQ_SEED_15_8__SHIFT) & DSI_28nm_PHY_PLL_SDM_CFG3_FREQ_SEED_15_8__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SDM_CFG4 0x00000048
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SSC_CFG0 0x0000004c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SSC_CFG1 0x00000050
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SSC_CFG2 0x00000054
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_SSC_CFG3 0x00000058
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LKDET_CFG0 0x0000005c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LKDET_CFG1 0x00000060
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_LKDET_CFG2 0x00000064
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_TEST_CFG 0x00000068
|
||||
#define DSI_28nm_PHY_PLL_TEST_CFG_PLL_SW_RESET 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG0 0x0000006c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG1 0x00000070
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG2 0x00000074
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG3 0x00000078
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG4 0x0000007c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG5 0x00000080
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG6 0x00000084
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG7 0x00000088
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG8 0x0000008c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG9 0x00000090
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG10 0x00000094
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CAL_CFG11 0x00000098
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_EFUSE_CFG 0x0000009c
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DEBUG_BUS_SEL 0x000000a0
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_42 0x000000a4
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_43 0x000000a8
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_44 0x000000ac
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_45 0x000000b0
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_46 0x000000b4
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_47 0x000000b8
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_48 0x000000bc
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_STATUS 0x000000c0
|
||||
#define DSI_28nm_PHY_PLL_STATUS_PLL_RDY 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DEBUG_BUS0 0x000000c4
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DEBUG_BUS1 0x000000c8
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DEBUG_BUS2 0x000000cc
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_DEBUG_BUS3 0x000000d0
|
||||
|
||||
#define REG_DSI_28nm_PHY_PLL_CTRL_54 0x000000d4
|
||||
|
||||
|
||||
#endif /* DSI_PHY_28NM_XML */
|
|
@ -0,0 +1,287 @@
|
|||
#ifndef DSI_PHY_28NM_8960_XML
|
||||
#define DSI_PHY_28NM_8960_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_CFG_0(uint32_t i0) { return 0x00000000 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_CFG_1(uint32_t i0) { return 0x00000004 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_CFG_2(uint32_t i0) { return 0x00000008 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x0000000c + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_TEST_STR_0(uint32_t i0) { return 0x00000014 + 0x40*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_28nm_8960_PHY_LN_TEST_STR_1(uint32_t i0) { return 0x00000018 + 0x40*i0; }
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_CFG_0 0x00000100
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_CFG_1 0x00000104
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_CFG_2 0x00000108
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_TEST_DATAPATH 0x0000010c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_TEST_STR0 0x00000114
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LNCK_TEST_STR1 0x00000118
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_0 0x00000140
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_0_CLK_ZERO__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_0_CLK_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_0_CLK_ZERO__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_0_CLK_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_1 0x00000144
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_1_CLK_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_1_CLK_TRAIL__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_1_CLK_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_2 0x00000148
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_2_CLK_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_2_CLK_PREPARE__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_2_CLK_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_3 0x0000014c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_4 0x00000150
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_4_HS_EXIT__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_4_HS_EXIT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_4_HS_EXIT__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_4_HS_EXIT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_5 0x00000154
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_5_HS_ZERO__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_5_HS_ZERO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_5_HS_ZERO__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_5_HS_ZERO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_6 0x00000158
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_6_HS_PREPARE__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_6_HS_PREPARE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_6_HS_PREPARE__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_6_HS_PREPARE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_7 0x0000015c
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_7_HS_TRAIL__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_7_HS_TRAIL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_7_HS_TRAIL__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_7_HS_TRAIL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_8 0x00000160
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_8_HS_RQST__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_8_HS_RQST__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_8_HS_RQST(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_8_HS_RQST__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_8_HS_RQST__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_9 0x00000164
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_GO__MASK 0x00000007
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_GO__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_GO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_GO__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_GO__MASK;
|
||||
}
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_SURE__MASK 0x00000070
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_SURE__SHIFT 4
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_SURE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_SURE__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_9_TA_SURE__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_10 0x00000168
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_10_TA_GET__MASK 0x00000007
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_10_TA_GET__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_10_TA_GET(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_10_TA_GET__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_10_TA_GET__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_TIMING_CTRL_11 0x0000016c
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK 0x000000ff
|
||||
#define DSI_28nm_8960_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT 0
|
||||
static inline uint32_t DSI_28nm_8960_PHY_TIMING_CTRL_11_TRIG3_CMD(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_28nm_8960_PHY_TIMING_CTRL_11_TRIG3_CMD__SHIFT) & DSI_28nm_8960_PHY_TIMING_CTRL_11_TRIG3_CMD__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_CTRL_0 0x00000170
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_CTRL_1 0x00000174
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_CTRL_2 0x00000178
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_CTRL_3 0x0000017c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_STRENGTH_0 0x00000180
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_STRENGTH_1 0x00000184
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_STRENGTH_2 0x00000188
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_BIST_CTRL_0 0x0000018c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_BIST_CTRL_1 0x00000190
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_BIST_CTRL_2 0x00000194
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_BIST_CTRL_3 0x00000198
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_BIST_CTRL_4 0x0000019c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_LDO_CTRL 0x000001b0
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_0 0x00000000
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_1 0x00000004
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_2 0x00000008
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_3 0x0000000c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_4 0x00000010
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CTRL_5 0x00000014
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_REGULATOR_CAL_PWR_CFG 0x00000018
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_TRIGGER 0x00000028
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_SW_CFG_0 0x0000002c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_SW_CFG_1 0x00000030
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_SW_CFG_2 0x00000034
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_CFG_0 0x00000038
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_CFG_1 0x0000003c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_CFG_2 0x00000040
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_CFG_3 0x00000044
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_HW_CFG_4 0x00000048
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_MISC_CAL_STATUS 0x00000050
|
||||
#define DSI_28nm_8960_PHY_MISC_CAL_STATUS_CAL_BUSY 0x00000010
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_0 0x00000000
|
||||
#define DSI_28nm_8960_PHY_PLL_CTRL_0_ENABLE 0x00000001
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_1 0x00000004
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_2 0x00000008
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_3 0x0000000c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_4 0x00000010
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_5 0x00000014
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_6 0x00000018
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_7 0x0000001c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_8 0x00000020
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_9 0x00000024
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_10 0x00000028
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_11 0x0000002c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_12 0x00000030
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_13 0x00000034
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_14 0x00000038
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_15 0x0000003c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_16 0x00000040
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_17 0x00000044
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_18 0x00000048
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_19 0x0000004c
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_CTRL_20 0x00000050
|
||||
|
||||
#define REG_DSI_28nm_8960_PHY_PLL_RDY 0x00000080
|
||||
#define DSI_28nm_8960_PHY_PLL_RDY_PLL_RDY 0x00000001
|
||||
|
||||
|
||||
#endif /* DSI_PHY_28NM_8960_XML */
|
|
@ -0,0 +1,480 @@
|
|||
#ifndef DSI_PHY_5NM_XML
|
||||
#define DSI_PHY_5NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_REVISION_ID0 0x00000000
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_REVISION_ID1 0x00000004
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_REVISION_ID2 0x00000008
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_REVISION_ID3 0x0000000c
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CLK_CFG0 0x00000010
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CLK_CFG1 0x00000014
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_CTRL 0x00000018
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_RBUF_CTRL 0x0000001c
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_VREG_CTRL_0 0x00000020
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CTRL_0 0x00000024
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CTRL_1 0x00000028
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CTRL_2 0x0000002c
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CTRL_3 0x00000030
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CFG0 0x00000034
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CFG1 0x00000038
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_PLL_CNTRL 0x0000003c
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_DPHY_SOT 0x00000040
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CTRL0 0x000000a0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CTRL1 0x000000a4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CTRL2 0x000000a8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CTRL3 0x000000ac
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_CTRL4 0x000000b0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_0 0x000000b4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_1 0x000000b8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_2 0x000000bc
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_3 0x000000c0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_4 0x000000c4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_5 0x000000c8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_6 0x000000cc
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_7 0x000000d0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_8 0x000000d4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_9 0x000000d8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_10 0x000000dc
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_11 0x000000e0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_12 0x000000e4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_TIMING_CTRL_13 0x000000e8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_HSTX_STR_CTRL_0 0x000000ec
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_HSTX_STR_CTRL_1 0x000000f0
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_RESCODE_OFFSET_TOP_CTRL 0x000000f4
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_RESCODE_OFFSET_BOT_CTRL 0x000000f8
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_RESCODE_OFFSET_MID_CTRL 0x000000fc
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_LPTX_STR_CTRL 0x00000100
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_PEMPH_CTRL_0 0x00000104
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_PEMPH_CTRL_1 0x00000108
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_GLBL_STR_SWI_CAL_SEL_CTRL 0x0000010c
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_VREG_CTRL_1 0x00000110
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_CTRL_4 0x00000114
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_PHY_STATUS 0x00000140
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_STATUS0 0x00000148
|
||||
|
||||
#define REG_DSI_5nm_PHY_CMN_LANE_STATUS1 0x0000014c
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_CFG0(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_CFG1(uint32_t i0) { return 0x00000004 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_CFG2(uint32_t i0) { return 0x00000008 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x0000000c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_PIN_SWAP(uint32_t i0) { return 0x00000010 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_LPRX_CTRL(uint32_t i0) { return 0x00000014 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_5nm_PHY_LN_TX_DCTRL(uint32_t i0) { return 0x00000018 + 0x80*i0; }
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_ONE 0x00000000
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_TWO 0x00000004
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_INT_LOOP_SETTINGS 0x00000008
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_INT_LOOP_SETTINGS_TWO 0x0000000c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_THREE 0x00000010
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_FOUR 0x00000014
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_FIVE 0x00000018
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_INT_LOOP_CONTROLS 0x0000001c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DSM_DIVIDER 0x00000020
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FEEDBACK_DIVIDER 0x00000024
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SYSTEM_MUXES 0x00000028
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_UPDATE_CONTROL_OVERRIDES 0x0000002c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CMODE 0x00000030
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PSM_CTRL 0x00000034
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_RSM_CTRL 0x00000038
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_TUNE_MAP 0x0000003c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_CNTRL 0x00000040
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CALIBRATION_SETTINGS 0x00000044
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_TIMER_LOW 0x00000048
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_TIMER_HIGH 0x0000004c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_SETTINGS 0x00000050
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_MIN 0x00000054
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_MAX 0x00000058
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_PFILT 0x0000005c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_IFILT 0x00000060
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_TWO 0x00000064
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_THREE 0x00000068
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_FOUR 0x0000006c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_ICODE_HIGH 0x00000070
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_ICODE_LOW 0x00000074
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DETECT_SETTINGS_ONE 0x00000078
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DETECT_THRESH 0x0000007c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DET_REFCLK_HIGH 0x00000080
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DET_REFCLK_LOW 0x00000084
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DET_PLLCLK_HIGH 0x00000088
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_DET_PLLCLK_LOW 0x0000008c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PFILT 0x00000090
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_IFILT 0x00000094
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_GAIN 0x00000098
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ICODE_LOW 0x0000009c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ICODE_HIGH 0x000000a0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_LOCKDET 0x000000a4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_OUTDIV 0x000000a8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FASTLOCK_CONTROL 0x000000ac
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PASS_OUT_OVERRIDE_ONE 0x000000b0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PASS_OUT_OVERRIDE_TWO 0x000000b4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CORE_OVERRIDE 0x000000b8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CORE_INPUT_OVERRIDE 0x000000bc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_RATE_CHANGE 0x000000c0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_DIGITAL_TIMERS 0x000000c4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_DIGITAL_TIMERS_TWO 0x000000c8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DECIMAL_DIV_START 0x000000cc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_LOW 0x000000d0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_MID 0x000000d4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_HIGH 0x000000d8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEC_FRAC_MUXES 0x000000dc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DECIMAL_DIV_START_1 0x000000e0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_LOW_1 0x000000e4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_MID_1 0x000000e8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_HIGH_1 0x000000ec
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DECIMAL_DIV_START_2 0x000000f0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_LOW_2 0x000000f4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_MID_2 0x000000f8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FRAC_DIV_START_HIGH_2 0x000000fc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_MASH_CONTROL 0x00000100
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_LOW 0x00000104
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_HIGH 0x00000108
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_LOW 0x0000010c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_HIGH 0x00000110
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_LOW 0x00000114
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_HIGH 0x00000118
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_MUX_CONTROL 0x0000011c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_LOW_1 0x00000120
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_HIGH_1 0x00000124
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_LOW_1 0x00000128
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_HIGH_1 0x0000012c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_LOW_1 0x00000130
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_HIGH_1 0x00000134
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_LOW_2 0x00000138
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_STEPSIZE_HIGH_2 0x0000013c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_LOW_2 0x00000140
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_DIV_PER_HIGH_2 0x00000144
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_LOW_2 0x00000148
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_ADJPER_HIGH_2 0x0000014c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SSC_CONTROL 0x00000150
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_OUTDIV_RATE 0x00000154
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_LOCKDET_RATE_1 0x00000158
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_LOCKDET_RATE_2 0x0000015c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_PROP_GAIN_RATE_1 0x00000160
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_PROP_GAIN_RATE_2 0x00000164
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_BAND_SEL_RATE_1 0x00000168
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_BAND_SEL_RATE_2 0x0000016c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_INT_GAIN_IFILT_BAND_1 0x00000170
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_INT_GAIN_IFILT_BAND_2 0x00000174
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_FL_INT_GAIN_PFILT_BAND_1 0x00000178
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_FL_INT_GAIN_PFILT_BAND_2 0x0000017c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_FASTLOCK_EN_BAND 0x00000180
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_MID 0x00000184
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_HIGH 0x00000188
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_MUX 0x0000018c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_LOCK_OVERRIDE 0x00000190
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_LOCK_DELAY 0x00000194
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_LOCK_MIN_DELAY 0x00000198
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CLOCK_INVERTERS 0x0000019c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SPARE_AND_JPC_OVERRIDES 0x000001a0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BIAS_CONTROL_1 0x000001a4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BIAS_CONTROL_2 0x000001a8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ALOG_OBSV_BUS_CTRL_1 0x000001ac
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_COMMON_STATUS_ONE 0x000001b0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_COMMON_STATUS_TWO 0x000001b4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_BAND_SEL_CAL 0x000001b8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ICODE_ACCUM_STATUS_LOW 0x000001bc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ICODE_ACCUM_STATUS_HIGH 0x000001c0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FD_OUT_LOW 0x000001c4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FD_OUT_HIGH 0x000001c8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ALOG_OBSV_BUS_STATUS_1 0x000001cc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_MISC_CONFIG 0x000001d0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_CONFIG 0x000001d4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_FREQ_ACQ_TIME 0x000001d8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_CODE0 0x000001dc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_CODE1 0x000001e0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_GAIN0 0x000001e4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FLL_GAIN1 0x000001e8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SW_RESET 0x000001ec
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_FAST_PWRUP 0x000001f0
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_LOCKTIME0 0x000001f4
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_LOCKTIME1 0x000001f8
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEBUG_BUS_SEL 0x000001fc
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEBUG_BUS0 0x00000200
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEBUG_BUS1 0x00000204
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEBUG_BUS2 0x00000208
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_DEBUG_BUS3 0x0000020c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_FLL_CONTROL_OVERRIDES 0x00000210
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_CONFIG 0x00000214
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_CAL_CODE1_MODE0_STATUS 0x00000218
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_CAL_CODE1_MODE1_STATUS 0x0000021c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_RESET_SM_STATUS 0x00000220
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_TDC_OFFSET 0x00000224
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PS3_PWRDOWN_CONTROLS 0x00000228
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PS4_PWRDOWN_CONTROLS 0x0000022c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PLL_RST_CONTROLS 0x00000230
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_GEAR_BAND_SELECT_CONTROLS 0x00000234
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PSM_CLK_CONTROLS 0x00000238
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_SYSTEM_MUXES_2 0x0000023c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_CONFIG_1 0x00000240
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_VCO_CONFIG_2 0x00000244
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CLOCK_INVERTERS_1 0x00000248
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CLOCK_INVERTERS_2 0x0000024c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CMODE_1 0x00000250
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_CMODE_2 0x00000254
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_FIVE_1 0x00000258
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_ANALOG_CONTROLS_FIVE_2 0x0000025c
|
||||
|
||||
#define REG_DSI_5nm_PHY_PLL_PERF_OPTIMIZE 0x00000260
|
||||
|
||||
|
||||
#endif /* DSI_PHY_5NM_XML */
|
|
@ -0,0 +1,482 @@
|
|||
#ifndef DSI_PHY_7NM_XML
|
||||
#define DSI_PHY_7NM_XML
|
||||
|
||||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
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/src/mesa/mesa/src/freedreno/registers/msm.xml ( 981 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/freedreno_copyright.xml ( 1572 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp4.xml ( 20912 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp_common.xml ( 2849 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/mdp/mdp5.xml ( 37461 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi.xml ( 15291 bytes, from 2021-06-15 22:36:13)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_v2.xml ( 3236 bytes, from 2021-06-05 21:37:42)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm_8960.xml ( 4935 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_28nm.xml ( 7004 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_20nm.xml ( 3712 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_14nm.xml ( 5381 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_10nm.xml ( 4499 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_7nm.xml ( 10953 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/dsi_phy_5nm.xml ( 10900 bytes, from 2021-05-21 19:18:08)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/sfpb.xml ( 602 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/dsi/mmss_cc.xml ( 1686 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/qfprom.xml ( 600 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/hdmi/hdmi.xml ( 41874 bytes, from 2021-02-18 16:45:44)
|
||||
- /home/robclark/src/mesa/mesa/src/freedreno/registers/edp/edp.xml ( 10416 bytes, from 2021-02-18 16:45:44)
|
||||
|
||||
Copyright (C) 2013-2021 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the
|
||||
next paragraph) shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_REVISION_ID0 0x00000000
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_REVISION_ID1 0x00000004
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_REVISION_ID2 0x00000008
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_REVISION_ID3 0x0000000c
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CLK_CFG0 0x00000010
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CLK_CFG1 0x00000014
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_CTRL 0x00000018
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_RBUF_CTRL 0x0000001c
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_VREG_CTRL_0 0x00000020
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CTRL_0 0x00000024
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CTRL_1 0x00000028
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CTRL_2 0x0000002c
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CTRL_3 0x00000030
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CFG0 0x00000034
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CFG1 0x00000038
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_PLL_CNTRL 0x0000003c
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_DPHY_SOT 0x00000040
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CTRL0 0x000000a0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CTRL1 0x000000a4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CTRL2 0x000000a8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CTRL3 0x000000ac
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_CTRL4 0x000000b0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_0 0x000000b4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_1 0x000000b8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_2 0x000000bc
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_3 0x000000c0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_4 0x000000c4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_5 0x000000c8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_6 0x000000cc
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_7 0x000000d0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_8 0x000000d4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_9 0x000000d8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_10 0x000000dc
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_11 0x000000e0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_12 0x000000e4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_TIMING_CTRL_13 0x000000e8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_HSTX_STR_CTRL_0 0x000000ec
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_HSTX_STR_CTRL_1 0x000000f0
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_RESCODE_OFFSET_TOP_CTRL 0x000000f4
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_RESCODE_OFFSET_BOT_CTRL 0x000000f8
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_RESCODE_OFFSET_MID_CTRL 0x000000fc
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_LPTX_STR_CTRL 0x00000100
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_PEMPH_CTRL_0 0x00000104
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_PEMPH_CTRL_1 0x00000108
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_STR_SWI_CAL_SEL_CTRL 0x0000010c
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_VREG_CTRL_1 0x00000110
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_CTRL_4 0x00000114
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE4 0x00000128
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_PHY_STATUS 0x00000140
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_STATUS0 0x00000148
|
||||
|
||||
#define REG_DSI_7nm_PHY_CMN_LANE_STATUS1 0x0000014c
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_CFG0(uint32_t i0) { return 0x00000000 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_CFG1(uint32_t i0) { return 0x00000004 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_CFG2(uint32_t i0) { return 0x00000008 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_TEST_DATAPATH(uint32_t i0) { return 0x0000000c + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_PIN_SWAP(uint32_t i0) { return 0x00000010 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_LPRX_CTRL(uint32_t i0) { return 0x00000014 + 0x80*i0; }
|
||||
|
||||
static inline uint32_t REG_DSI_7nm_PHY_LN_TX_DCTRL(uint32_t i0) { return 0x00000018 + 0x80*i0; }
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_ONE 0x00000000
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_TWO 0x00000004
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_INT_LOOP_SETTINGS 0x00000008
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_INT_LOOP_SETTINGS_TWO 0x0000000c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_THREE 0x00000010
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_FOUR 0x00000014
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_FIVE 0x00000018
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_INT_LOOP_CONTROLS 0x0000001c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DSM_DIVIDER 0x00000020
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FEEDBACK_DIVIDER 0x00000024
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SYSTEM_MUXES 0x00000028
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_UPDATE_CONTROL_OVERRIDES 0x0000002c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CMODE 0x00000030
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PSM_CTRL 0x00000034
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_RSM_CTRL 0x00000038
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_TUNE_MAP 0x0000003c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_CNTRL 0x00000040
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CALIBRATION_SETTINGS 0x00000044
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_TIMER_LOW 0x00000048
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_TIMER_HIGH 0x0000004c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_SETTINGS 0x00000050
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_MIN 0x00000054
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_MAX 0x00000058
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_PFILT 0x0000005c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_IFILT 0x00000060
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_TWO 0x00000064
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_THREE 0x00000068
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL_SETTINGS_FOUR 0x0000006c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_ICODE_HIGH 0x00000070
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_ICODE_LOW 0x00000074
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DETECT_SETTINGS_ONE 0x00000078
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DETECT_THRESH 0x0000007c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DET_REFCLK_HIGH 0x00000080
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DET_REFCLK_LOW 0x00000084
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DET_PLLCLK_HIGH 0x00000088
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_DET_PLLCLK_LOW 0x0000008c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PFILT 0x00000090
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_IFILT 0x00000094
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_GAIN 0x00000098
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ICODE_LOW 0x0000009c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ICODE_HIGH 0x000000a0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_LOCKDET 0x000000a4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_OUTDIV 0x000000a8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FASTLOCK_CONTROL 0x000000ac
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PASS_OUT_OVERRIDE_ONE 0x000000b0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PASS_OUT_OVERRIDE_TWO 0x000000b4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CORE_OVERRIDE 0x000000b8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CORE_INPUT_OVERRIDE 0x000000bc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_RATE_CHANGE 0x000000c0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_DIGITAL_TIMERS 0x000000c4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_DIGITAL_TIMERS_TWO 0x000000c8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DECIMAL_DIV_START 0x000000cc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_LOW 0x000000d0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_MID 0x000000d4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_HIGH 0x000000d8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEC_FRAC_MUXES 0x000000dc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DECIMAL_DIV_START_1 0x000000e0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_LOW_1 0x000000e4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_MID_1 0x000000e8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_HIGH_1 0x000000ec
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DECIMAL_DIV_START_2 0x000000f0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_LOW_2 0x000000f4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_MID_2 0x000000f8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FRAC_DIV_START_HIGH_2 0x000000fc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_MASH_CONTROL 0x00000100
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_LOW 0x00000104
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_HIGH 0x00000108
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_LOW 0x0000010c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_HIGH 0x00000110
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_LOW 0x00000114
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_HIGH 0x00000118
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_MUX_CONTROL 0x0000011c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_LOW_1 0x00000120
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_HIGH_1 0x00000124
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_LOW_1 0x00000128
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_HIGH_1 0x0000012c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_LOW_1 0x00000130
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_HIGH_1 0x00000134
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_LOW_2 0x00000138
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_STEPSIZE_HIGH_2 0x0000013c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_LOW_2 0x00000140
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_DIV_PER_HIGH_2 0x00000144
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_LOW_2 0x00000148
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_ADJPER_HIGH_2 0x0000014c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SSC_CONTROL 0x00000150
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_OUTDIV_RATE 0x00000154
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_LOCKDET_RATE_1 0x00000158
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_LOCKDET_RATE_2 0x0000015c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_PROP_GAIN_RATE_1 0x00000160
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_PROP_GAIN_RATE_2 0x00000164
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_BAND_SEL_RATE_1 0x00000168
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_BAND_SEL_RATE_2 0x0000016c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_INT_GAIN_IFILT_BAND_1 0x00000170
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_INT_GAIN_IFILT_BAND_2 0x00000174
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_FL_INT_GAIN_PFILT_BAND_1 0x00000178
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_FL_INT_GAIN_PFILT_BAND_2 0x0000017c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_FASTLOCK_EN_BAND 0x00000180
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_MID 0x00000184
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_HIGH 0x00000188
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FREQ_TUNE_ACCUM_INIT_MUX 0x0000018c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_LOCK_OVERRIDE 0x00000190
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_LOCK_DELAY 0x00000194
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_LOCK_MIN_DELAY 0x00000198
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CLOCK_INVERTERS 0x0000019c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SPARE_AND_JPC_OVERRIDES 0x000001a0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BIAS_CONTROL_1 0x000001a4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BIAS_CONTROL_2 0x000001a8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ALOG_OBSV_BUS_CTRL_1 0x000001ac
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_COMMON_STATUS_ONE 0x000001b0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_COMMON_STATUS_TWO 0x000001b4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_BAND_SEL_CAL 0x000001b8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ICODE_ACCUM_STATUS_LOW 0x000001bc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ICODE_ACCUM_STATUS_HIGH 0x000001c0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FD_OUT_LOW 0x000001c4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FD_OUT_HIGH 0x000001c8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ALOG_OBSV_BUS_STATUS_1 0x000001cc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_MISC_CONFIG 0x000001d0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_CONFIG 0x000001d4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_FREQ_ACQ_TIME 0x000001d8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_CODE0 0x000001dc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_CODE1 0x000001e0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_GAIN0 0x000001e4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FLL_GAIN1 0x000001e8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SW_RESET 0x000001ec
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_FAST_PWRUP 0x000001f0
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_LOCKTIME0 0x000001f4
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_LOCKTIME1 0x000001f8
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEBUG_BUS_SEL 0x000001fc
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEBUG_BUS0 0x00000200
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEBUG_BUS1 0x00000204
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEBUG_BUS2 0x00000208
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_DEBUG_BUS3 0x0000020c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_FLL_CONTROL_OVERRIDES 0x00000210
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_CONFIG 0x00000214
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_CAL_CODE1_MODE0_STATUS 0x00000218
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_CAL_CODE1_MODE1_STATUS 0x0000021c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_RESET_SM_STATUS 0x00000220
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_TDC_OFFSET 0x00000224
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PS3_PWRDOWN_CONTROLS 0x00000228
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PS4_PWRDOWN_CONTROLS 0x0000022c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PLL_RST_CONTROLS 0x00000230
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_GEAR_BAND_SELECT_CONTROLS 0x00000234
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PSM_CLK_CONTROLS 0x00000238
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_SYSTEM_MUXES_2 0x0000023c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_CONFIG_1 0x00000240
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_VCO_CONFIG_2 0x00000244
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CLOCK_INVERTERS_1 0x00000248
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CLOCK_INVERTERS_2 0x0000024c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CMODE_1 0x00000250
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_CMODE_2 0x00000254
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_FIVE_1 0x00000258
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_ANALOG_CONTROLS_FIVE_2 0x0000025c
|
||||
|
||||
#define REG_DSI_7nm_PHY_PLL_PERF_OPTIMIZE 0x00000260
|
||||
|
||||
|
||||
#endif /* DSI_PHY_7NM_XML */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue