Merge tag 'drm-msm-next-2020-07-30' of https://gitlab.freedesktop.org/drm/msm into drm-next
Take 2 of msm-next pull, this version drops the OPP patch due to [1], so I'll send the gpu opp/bw scaling patch after the OPP patch lands. Since I had to force-push I took the opportunity to rebase on drm-next, and since you already merged in 5.8-rc6 a few fixes from the last cycle dropped out. This time around: * A bunch more a650/a640 (sm8150/sm8250) display and GPU enablement and fixes * Enable dpu dither block for 6bpc panels * dpu suspend fixes * dpu fix for cursor on 2nd display * dsi/mdp5 enablement for sdm630/sdm636/sdm660 I also regenerated the register headers, which accounts for a good bit of the size this time, because we hadn't re-synced the register headers since the early days of a6xx bringup. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/ <CAF6AEGs_eswoX-E0Ddg5DoEQy35x3GG+6SDXUAjPMrtAWFkqng@mail.gmail.com
This commit is contained in:
commit
dc100bc8fa
|
@ -87,6 +87,7 @@ Required properties:
|
|||
* "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"
|
||||
- reg: Physical base address and length of the registers of PLL, PHY. Some
|
||||
|
|
|
@ -112,6 +112,34 @@ Example a6xx (with GMU):
|
|||
interconnects = <&rsc_hlos MASTER_GFX3D &rsc_hlos SLAVE_EBI1>;
|
||||
interconnect-names = "gfx-mem";
|
||||
|
||||
gpu_opp_table: opp-table {
|
||||
compatible = "operating-points-v2";
|
||||
|
||||
opp-430000000 {
|
||||
opp-hz = /bits/ 64 <430000000>;
|
||||
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
|
||||
opp-peak-kBps = <5412000>;
|
||||
};
|
||||
|
||||
opp-355000000 {
|
||||
opp-hz = /bits/ 64 <355000000>;
|
||||
opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
|
||||
opp-peak-kBps = <3072000>;
|
||||
};
|
||||
|
||||
opp-267000000 {
|
||||
opp-hz = /bits/ 64 <267000000>;
|
||||
opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
|
||||
opp-peak-kBps = <3072000>;
|
||||
};
|
||||
|
||||
opp-180000000 {
|
||||
opp-hz = /bits/ 64 <180000000>;
|
||||
opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
|
||||
opp-peak-kBps = <1804000>;
|
||||
};
|
||||
};
|
||||
|
||||
qcom,gmu = <&gmu>;
|
||||
|
||||
zap-shader {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,19 +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 ( 501 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 42463 bytes, from 2018-11-19 13:44:03)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14201 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 43052 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 83840 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112086 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 147240 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 140790 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 10431 bytes, from 2018-09-14 13:03:07)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -48,7 +50,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
enum a3xx_tile_mode {
|
||||
LINEAR = 0,
|
||||
TILE_4X4 = 1,
|
||||
TILE_32X32 = 2,
|
||||
TILE_4X2 = 3,
|
||||
};
|
||||
|
||||
enum a3xx_state_block_id {
|
||||
|
@ -123,6 +127,7 @@ enum a3xx_vtx_fmt {
|
|||
VFMT_2_10_10_10_UNORM = 61,
|
||||
VFMT_2_10_10_10_SINT = 62,
|
||||
VFMT_2_10_10_10_SNORM = 63,
|
||||
VFMT_NONE = 255,
|
||||
};
|
||||
|
||||
enum a3xx_tex_fmt {
|
||||
|
@ -206,15 +211,7 @@ enum a3xx_tex_fmt {
|
|||
TFMT_ETC2_RGBA8 = 116,
|
||||
TFMT_ETC2_RGB8A1 = 117,
|
||||
TFMT_ETC2_RGB8 = 118,
|
||||
};
|
||||
|
||||
enum a3xx_tex_fetchsize {
|
||||
TFETCH_DISABLE = 0,
|
||||
TFETCH_1_BYTE = 1,
|
||||
TFETCH_2_BYTE = 2,
|
||||
TFETCH_4_BYTE = 3,
|
||||
TFETCH_8_BYTE = 4,
|
||||
TFETCH_16_BYTE = 5,
|
||||
TFMT_NONE = 255,
|
||||
};
|
||||
|
||||
enum a3xx_color_fmt {
|
||||
|
@ -228,8 +225,8 @@ enum a3xx_color_fmt {
|
|||
RB_R8G8B8A8_SINT = 11,
|
||||
RB_R8G8_UNORM = 12,
|
||||
RB_R8G8_SNORM = 13,
|
||||
RB_R8_UINT = 14,
|
||||
RB_R8_SINT = 15,
|
||||
RB_R8G8_UINT = 14,
|
||||
RB_R8G8_SINT = 15,
|
||||
RB_R10G10B10A2_UNORM = 16,
|
||||
RB_A2R10G10B10_UNORM = 17,
|
||||
RB_R10G10B10A2_UINT = 18,
|
||||
|
@ -261,6 +258,7 @@ enum a3xx_color_fmt {
|
|||
RB_R32_UINT = 56,
|
||||
RB_R32G32_UINT = 57,
|
||||
RB_R32G32B32A32_UINT = 59,
|
||||
RB_NONE = 255,
|
||||
};
|
||||
|
||||
enum a3xx_cp_perfcounter_select {
|
||||
|
@ -932,6 +930,9 @@ static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460
|
|||
|
||||
#define REG_A3XX_GRAS_CL_CLIP_CNTL 0x00002040
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER 0x00001000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_NON_PERSP_CENTER 0x00002000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTROID 0x00004000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_IJ_NON_PERSP_CENTROID 0x00008000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_CLIP_DISABLE 0x00010000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZFAR_CLIP_DISABLE 0x00020000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_VP_CLIP_CODE_IGNORE 0x00080000
|
||||
|
@ -1170,10 +1171,12 @@ static inline uint32_t A3XX_RB_RENDER_CONTROL_BIN_WIDTH(uint32_t val)
|
|||
}
|
||||
#define A3XX_RB_RENDER_CONTROL_DISABLE_COLOR_PIPE 0x00001000
|
||||
#define A3XX_RB_RENDER_CONTROL_ENABLE_GMEM 0x00002000
|
||||
#define A3XX_RB_RENDER_CONTROL_XCOORD 0x00004000
|
||||
#define A3XX_RB_RENDER_CONTROL_YCOORD 0x00008000
|
||||
#define A3XX_RB_RENDER_CONTROL_ZCOORD 0x00010000
|
||||
#define A3XX_RB_RENDER_CONTROL_WCOORD 0x00020000
|
||||
#define A3XX_RB_RENDER_CONTROL_COORD_MASK__MASK 0x0003c000
|
||||
#define A3XX_RB_RENDER_CONTROL_COORD_MASK__SHIFT 14
|
||||
static inline uint32_t A3XX_RB_RENDER_CONTROL_COORD_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_RB_RENDER_CONTROL_COORD_MASK__SHIFT) & A3XX_RB_RENDER_CONTROL_COORD_MASK__MASK;
|
||||
}
|
||||
#define A3XX_RB_RENDER_CONTROL_I_CLAMP_ENABLE 0x00080000
|
||||
#define A3XX_RB_RENDER_CONTROL_COV_VALUE_OUTPUT_ENABLE 0x00100000
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TEST 0x00400000
|
||||
|
@ -1755,11 +1758,29 @@ static inline uint32_t A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A3XX_HLSQ_CONTROL_3_REG 0x00002203
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_REGID__MASK 0x000000ff
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_REGID__SHIFT 0
|
||||
static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_REGID(uint32_t val)
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID__MASK 0x000000ff
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID__SHIFT 0
|
||||
static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_HLSQ_CONTROL_3_REG_REGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_REGID__MASK;
|
||||
return ((val) << A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID__MASK;
|
||||
}
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTERREGID__MASK 0x0000ff00
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTERREGID__SHIFT 8
|
||||
static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTERREGID(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTERREGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTERREGID__MASK;
|
||||
}
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTROIDREGID__MASK 0x00ff0000
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTROIDREGID__SHIFT 16
|
||||
static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTROIDREGID(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTROIDREGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTROIDREGID__MASK;
|
||||
}
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTROIDREGID__MASK 0xff000000
|
||||
#define A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTROIDREGID__SHIFT 24
|
||||
static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTROIDREGID(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTROIDREGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_IJNONPERSPCENTROIDREGID__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_HLSQ_VS_CONTROL_REG 0x00002204
|
||||
|
@ -1944,8 +1965,6 @@ static inline uint32_t A3XX_VFD_CONTROL_1_REGID4INST(uint32_t val)
|
|||
|
||||
#define REG_A3XX_VFD_INDEX_OFFSET 0x00002245
|
||||
|
||||
#define REG_A3XX_VFD_INDEX_OFFSET 0x00002245
|
||||
|
||||
static inline uint32_t REG_A3XX_VFD_FETCH(uint32_t i0) { return 0x00002246 + 0x2*i0; }
|
||||
|
||||
static inline uint32_t REG_A3XX_VFD_FETCH_INSTR_0(uint32_t i0) { return 0x00002246 + 0x2*i0; }
|
||||
|
@ -3107,7 +3126,12 @@ static inline uint32_t A3XX_TEX_SAMP_1_MIN_LOD(float val)
|
|||
}
|
||||
|
||||
#define REG_A3XX_TEX_CONST_0 0x00000000
|
||||
#define A3XX_TEX_CONST_0_TILED 0x00000001
|
||||
#define A3XX_TEX_CONST_0_TILE_MODE__MASK 0x00000003
|
||||
#define A3XX_TEX_CONST_0_TILE_MODE__SHIFT 0
|
||||
static inline uint32_t A3XX_TEX_CONST_0_TILE_MODE(enum a3xx_tile_mode val)
|
||||
{
|
||||
return ((val) << A3XX_TEX_CONST_0_TILE_MODE__SHIFT) & A3XX_TEX_CONST_0_TILE_MODE__MASK;
|
||||
}
|
||||
#define A3XX_TEX_CONST_0_SRGB 0x00000004
|
||||
#define A3XX_TEX_CONST_0_SWIZ_X__MASK 0x00000070
|
||||
#define A3XX_TEX_CONST_0_SWIZ_X__SHIFT 4
|
||||
|
@ -3172,11 +3196,11 @@ static inline uint32_t A3XX_TEX_CONST_1_WIDTH(uint32_t val)
|
|||
{
|
||||
return ((val) << A3XX_TEX_CONST_1_WIDTH__SHIFT) & A3XX_TEX_CONST_1_WIDTH__MASK;
|
||||
}
|
||||
#define A3XX_TEX_CONST_1_FETCHSIZE__MASK 0xf0000000
|
||||
#define A3XX_TEX_CONST_1_FETCHSIZE__SHIFT 28
|
||||
static inline uint32_t A3XX_TEX_CONST_1_FETCHSIZE(enum a3xx_tex_fetchsize val)
|
||||
#define A3XX_TEX_CONST_1_PITCHALIGN__MASK 0xf0000000
|
||||
#define A3XX_TEX_CONST_1_PITCHALIGN__SHIFT 28
|
||||
static inline uint32_t A3XX_TEX_CONST_1_PITCHALIGN(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_TEX_CONST_1_FETCHSIZE__SHIFT) & A3XX_TEX_CONST_1_FETCHSIZE__MASK;
|
||||
return ((val) << A3XX_TEX_CONST_1_PITCHALIGN__SHIFT) & A3XX_TEX_CONST_1_PITCHALIGN__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_TEX_CONST_2 0x00000002
|
||||
|
|
|
@ -8,19 +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 ( 501 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 42463 bytes, from 2018-11-19 13:44:03)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14201 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 43052 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 83840 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112086 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 147240 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 140790 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 10431 bytes, from 2018-09-14 13:03:07)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -91,6 +93,7 @@ enum a4xx_color_fmt {
|
|||
RB4_R32G32B32A32_FLOAT = 60,
|
||||
RB4_R32G32B32A32_UINT = 61,
|
||||
RB4_R32G32B32A32_SINT = 62,
|
||||
RB4_NONE = 255,
|
||||
};
|
||||
|
||||
enum a4xx_tile_mode {
|
||||
|
@ -161,6 +164,7 @@ enum a4xx_vtx_fmt {
|
|||
VFMT4_2_10_10_10_UNORM = 61,
|
||||
VFMT4_2_10_10_10_SINT = 62,
|
||||
VFMT4_2_10_10_10_SNORM = 63,
|
||||
VFMT4_NONE = 255,
|
||||
};
|
||||
|
||||
enum a4xx_tex_fmt {
|
||||
|
@ -248,14 +252,7 @@ enum a4xx_tex_fmt {
|
|||
TFMT4_ASTC_10x10 = 122,
|
||||
TFMT4_ASTC_12x10 = 123,
|
||||
TFMT4_ASTC_12x12 = 124,
|
||||
};
|
||||
|
||||
enum a4xx_tex_fetchsize {
|
||||
TFETCH4_1_BYTE = 0,
|
||||
TFETCH4_2_BYTE = 1,
|
||||
TFETCH4_4_BYTE = 2,
|
||||
TFETCH4_8_BYTE = 3,
|
||||
TFETCH4_16_BYTE = 4,
|
||||
TFMT4_NONE = 255,
|
||||
};
|
||||
|
||||
enum a4xx_depth_format {
|
||||
|
@ -949,10 +946,12 @@ static inline uint32_t A4XX_RB_MSAA_CONTROL_SAMPLES(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A4XX_RB_RENDER_CONTROL2 0x000020a3
|
||||
#define A4XX_RB_RENDER_CONTROL2_XCOORD 0x00000001
|
||||
#define A4XX_RB_RENDER_CONTROL2_YCOORD 0x00000002
|
||||
#define A4XX_RB_RENDER_CONTROL2_ZCOORD 0x00000004
|
||||
#define A4XX_RB_RENDER_CONTROL2_WCOORD 0x00000008
|
||||
#define A4XX_RB_RENDER_CONTROL2_COORD_MASK__MASK 0x0000000f
|
||||
#define A4XX_RB_RENDER_CONTROL2_COORD_MASK__SHIFT 0
|
||||
static inline uint32_t A4XX_RB_RENDER_CONTROL2_COORD_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_RB_RENDER_CONTROL2_COORD_MASK__SHIFT) & A4XX_RB_RENDER_CONTROL2_COORD_MASK__MASK;
|
||||
}
|
||||
#define A4XX_RB_RENDER_CONTROL2_SAMPLEMASK 0x00000010
|
||||
#define A4XX_RB_RENDER_CONTROL2_FACENESS 0x00000020
|
||||
#define A4XX_RB_RENDER_CONTROL2_SAMPLEID 0x00000040
|
||||
|
@ -963,7 +962,10 @@ static inline uint32_t A4XX_RB_RENDER_CONTROL2_MSAA_SAMPLES(uint32_t val)
|
|||
return ((val) << A4XX_RB_RENDER_CONTROL2_MSAA_SAMPLES__SHIFT) & A4XX_RB_RENDER_CONTROL2_MSAA_SAMPLES__MASK;
|
||||
}
|
||||
#define A4XX_RB_RENDER_CONTROL2_SAMPLEID_HR 0x00000800
|
||||
#define A4XX_RB_RENDER_CONTROL2_VARYING 0x00001000
|
||||
#define A4XX_RB_RENDER_CONTROL2_IJ_PERSP_PIXEL 0x00001000
|
||||
#define A4XX_RB_RENDER_CONTROL2_IJ_PERSP_CENTROID 0x00002000
|
||||
#define A4XX_RB_RENDER_CONTROL2_IJ_PERSP_SAMPLE 0x00004000
|
||||
#define A4XX_RB_RENDER_CONTROL2_SIZE 0x00008000
|
||||
|
||||
static inline uint32_t REG_A4XX_RB_MRT(uint32_t i0) { return 0x000020a4 + 0x5*i0; }
|
||||
|
||||
|
@ -1877,10 +1879,6 @@ static inline uint32_t REG_A4XX_RBBM_CLOCK_DELAY_TP_REG(uint32_t i0) { return 0x
|
|||
|
||||
#define REG_A4XX_RBBM_PERFCTR_TP_0_HI 0x00000115
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_TP_0_LO 0x00000114
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_TP_0_HI 0x00000115
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_TP_1_LO 0x00000116
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_TP_1_HI 0x00000117
|
||||
|
@ -2061,8 +2059,6 @@ static inline uint32_t REG_A4XX_RBBM_CLOCK_DELAY_RB_MARB_CCU_L1_REG(uint32_t i0)
|
|||
|
||||
#define REG_A4XX_RBBM_SP_REGFILE_SLEEP_CNTL_1 0x0000009a
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_PWR_1_LO 0x00000168
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_CTL 0x00000170
|
||||
|
||||
#define REG_A4XX_RBBM_PERFCTR_LOAD_CMD0 0x00000171
|
||||
|
@ -2210,8 +2206,18 @@ static inline uint32_t A4XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
|
|||
{
|
||||
return ((val) << A4XX_CP_PROTECT_REG_MASK_LEN__SHIFT) & A4XX_CP_PROTECT_REG_MASK_LEN__MASK;
|
||||
}
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_WRITE 0x20000000
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_READ 0x40000000
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_WRITE__MASK 0x20000000
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_WRITE__SHIFT 29
|
||||
static inline uint32_t A4XX_CP_PROTECT_REG_TRAP_WRITE(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_CP_PROTECT_REG_TRAP_WRITE__SHIFT) & A4XX_CP_PROTECT_REG_TRAP_WRITE__MASK;
|
||||
}
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_READ__MASK 0x40000000
|
||||
#define A4XX_CP_PROTECT_REG_TRAP_READ__SHIFT 30
|
||||
static inline uint32_t A4XX_CP_PROTECT_REG_TRAP_READ(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_CP_PROTECT_REG_TRAP_READ__SHIFT) & A4XX_CP_PROTECT_REG_TRAP_READ__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_CP_PROTECT_CTRL 0x00000250
|
||||
|
||||
|
@ -3151,8 +3157,9 @@ static inline uint32_t A4XX_TPL1_TP_TEX_COUNT_GS(uint32_t val)
|
|||
#define A4XX_GRAS_CL_CLIP_CNTL_ZFAR_CLIP_DISABLE 0x00020000
|
||||
#define A4XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z 0x00400000
|
||||
|
||||
#define REG_A4XX_GRAS_CLEAR_CNTL 0x00002003
|
||||
#define A4XX_GRAS_CLEAR_CNTL_NOT_FASTCLEAR 0x00000001
|
||||
#define REG_A4XX_GRAS_CNTL 0x00002003
|
||||
#define A4XX_GRAS_CNTL_IJ_PERSP 0x00000001
|
||||
#define A4XX_GRAS_CNTL_IJ_LINEAR 0x00000002
|
||||
|
||||
#define REG_A4XX_GRAS_CL_GB_CLIP_ADJ 0x00002004
|
||||
#define A4XX_GRAS_CL_GB_CLIP_ADJ_HORZ__MASK 0x000003ff
|
||||
|
@ -3524,14 +3531,44 @@ static inline uint32_t A4XX_HLSQ_CONTROL_2_REG_SAMPLEMASK_REGID(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A4XX_HLSQ_CONTROL_3_REG 0x000023c3
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_REGID__MASK 0x000000ff
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_REGID__SHIFT 0
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_3_REG_REGID(uint32_t val)
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__MASK 0x000000ff
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__SHIFT 0
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_3_REG_REGID__SHIFT) & A4XX_HLSQ_CONTROL_3_REG_REGID__MASK;
|
||||
return ((val) << A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__SHIFT) & A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__MASK;
|
||||
}
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__MASK 0x0000ff00
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__SHIFT 8
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__SHIFT) & A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__MASK;
|
||||
}
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__MASK 0x00ff0000
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__SHIFT 16
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__SHIFT) & A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__MASK;
|
||||
}
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__MASK 0xff000000
|
||||
#define A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__SHIFT 24
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__SHIFT) & A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_HLSQ_CONTROL_4_REG 0x000023c4
|
||||
#define A4XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__MASK 0x000000ff
|
||||
#define A4XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__SHIFT 0
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__SHIFT) & A4XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__MASK;
|
||||
}
|
||||
#define A4XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__MASK 0x0000ff00
|
||||
#define A4XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__SHIFT 8
|
||||
static inline uint32_t A4XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__SHIFT) & A4XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__MASK;
|
||||
}
|
||||
|
||||
#define REG_A4XX_HLSQ_VS_CONTROL_REG 0x000023c5
|
||||
#define A4XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH__MASK 0x000000ff
|
||||
|
@ -4115,11 +4152,11 @@ static inline uint32_t A4XX_TEX_CONST_1_WIDTH(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A4XX_TEX_CONST_2 0x00000002
|
||||
#define A4XX_TEX_CONST_2_FETCHSIZE__MASK 0x0000000f
|
||||
#define A4XX_TEX_CONST_2_FETCHSIZE__SHIFT 0
|
||||
static inline uint32_t A4XX_TEX_CONST_2_FETCHSIZE(enum a4xx_tex_fetchsize val)
|
||||
#define A4XX_TEX_CONST_2_PITCHALIGN__MASK 0x0000000f
|
||||
#define A4XX_TEX_CONST_2_PITCHALIGN__SHIFT 0
|
||||
static inline uint32_t A4XX_TEX_CONST_2_PITCHALIGN(uint32_t val)
|
||||
{
|
||||
return ((val) << A4XX_TEX_CONST_2_FETCHSIZE__SHIFT) & A4XX_TEX_CONST_2_FETCHSIZE__MASK;
|
||||
return ((val) << A4XX_TEX_CONST_2_PITCHALIGN__SHIFT) & A4XX_TEX_CONST_2_PITCHALIGN__MASK;
|
||||
}
|
||||
#define A4XX_TEX_CONST_2_PITCH__MASK 0x3ffffe00
|
||||
#define A4XX_TEX_CONST_2_PITCH__SHIFT 9
|
||||
|
|
|
@ -8,19 +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/ubuntu/envytools/envytools/rnndb/./adreno.xml ( 501 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a2xx.xml ( 79608 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/adreno_common.xml ( 14239 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/adreno_pm4.xml ( 43155 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a3xx.xml ( 83840 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a4xx.xml ( 112086 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a5xx.xml ( 147291 bytes, from 2019-05-29 14:51:41)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a6xx.xml ( 148461 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/a6xx_gmu.xml ( 10431 bytes, from 2019-05-29 01:28:15)
|
||||
- /home/ubuntu/envytools/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2019-05-29 01:28:15)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2019 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -91,6 +93,7 @@ enum a5xx_color_fmt {
|
|||
RB5_R32G32B32A32_FLOAT = 130,
|
||||
RB5_R32G32B32A32_UINT = 131,
|
||||
RB5_R32G32B32A32_SINT = 132,
|
||||
RB5_NONE = 255,
|
||||
};
|
||||
|
||||
enum a5xx_tile_mode {
|
||||
|
@ -165,6 +168,7 @@ enum a5xx_vtx_fmt {
|
|||
VFMT5_32_32_32_32_UINT = 131,
|
||||
VFMT5_32_32_32_32_SINT = 132,
|
||||
VFMT5_32_32_32_32_FIXED = 133,
|
||||
VFMT5_NONE = 255,
|
||||
};
|
||||
|
||||
enum a5xx_tex_fmt {
|
||||
|
@ -250,14 +254,7 @@ enum a5xx_tex_fmt {
|
|||
TFMT5_ASTC_10x10 = 204,
|
||||
TFMT5_ASTC_12x10 = 205,
|
||||
TFMT5_ASTC_12x12 = 206,
|
||||
};
|
||||
|
||||
enum a5xx_tex_fetchsize {
|
||||
TFETCH5_1_BYTE = 0,
|
||||
TFETCH5_2_BYTE = 1,
|
||||
TFETCH5_4_BYTE = 2,
|
||||
TFETCH5_8_BYTE = 3,
|
||||
TFETCH5_16_BYTE = 4,
|
||||
TFMT5_NONE = 255,
|
||||
};
|
||||
|
||||
enum a5xx_depth_format {
|
||||
|
@ -1052,8 +1049,18 @@ static inline uint32_t A5XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
|
|||
{
|
||||
return ((val) << A5XX_CP_PROTECT_REG_MASK_LEN__SHIFT) & A5XX_CP_PROTECT_REG_MASK_LEN__MASK;
|
||||
}
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_WRITE 0x20000000
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_READ 0x40000000
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_WRITE__MASK 0x20000000
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_WRITE__SHIFT 29
|
||||
static inline uint32_t A5XX_CP_PROTECT_REG_TRAP_WRITE(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_CP_PROTECT_REG_TRAP_WRITE__SHIFT) & A5XX_CP_PROTECT_REG_TRAP_WRITE__MASK;
|
||||
}
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_READ__MASK 0x40000000
|
||||
#define A5XX_CP_PROTECT_REG_TRAP_READ__SHIFT 30
|
||||
static inline uint32_t A5XX_CP_PROTECT_REG_TRAP_READ(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_CP_PROTECT_REG_TRAP_READ__SHIFT) & A5XX_CP_PROTECT_REG_TRAP_READ__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_CP_PROTECT_CNTL 0x000008a0
|
||||
|
||||
|
@ -1825,37 +1832,192 @@ static inline uint32_t A5XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
|
|||
#define REG_A5XX_RBBM_ALWAYSON_COUNTER_HI 0x000004d3
|
||||
|
||||
#define REG_A5XX_RBBM_STATUS 0x000004f5
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB 0x80000000
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP 0x40000000
|
||||
#define A5XX_RBBM_STATUS_HLSQ_BUSY 0x20000000
|
||||
#define A5XX_RBBM_STATUS_VSC_BUSY 0x10000000
|
||||
#define A5XX_RBBM_STATUS_TPL1_BUSY 0x08000000
|
||||
#define A5XX_RBBM_STATUS_SP_BUSY 0x04000000
|
||||
#define A5XX_RBBM_STATUS_UCHE_BUSY 0x02000000
|
||||
#define A5XX_RBBM_STATUS_VPC_BUSY 0x01000000
|
||||
#define A5XX_RBBM_STATUS_VFDP_BUSY 0x00800000
|
||||
#define A5XX_RBBM_STATUS_VFD_BUSY 0x00400000
|
||||
#define A5XX_RBBM_STATUS_TESS_BUSY 0x00200000
|
||||
#define A5XX_RBBM_STATUS_PC_VSD_BUSY 0x00100000
|
||||
#define A5XX_RBBM_STATUS_PC_DCALL_BUSY 0x00080000
|
||||
#define A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY 0x00040000
|
||||
#define A5XX_RBBM_STATUS_DCOM_BUSY 0x00020000
|
||||
#define A5XX_RBBM_STATUS_COM_BUSY 0x00010000
|
||||
#define A5XX_RBBM_STATUS_LRZ_BUZY 0x00008000
|
||||
#define A5XX_RBBM_STATUS_A2D_DSP_BUSY 0x00004000
|
||||
#define A5XX_RBBM_STATUS_CCUFCHE_BUSY 0x00002000
|
||||
#define A5XX_RBBM_STATUS_RB_BUSY 0x00001000
|
||||
#define A5XX_RBBM_STATUS_RAS_BUSY 0x00000800
|
||||
#define A5XX_RBBM_STATUS_TSE_BUSY 0x00000400
|
||||
#define A5XX_RBBM_STATUS_VBIF_BUSY 0x00000200
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST 0x00000100
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST 0x00000080
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY 0x00000040
|
||||
#define A5XX_RBBM_STATUS_GPMU_MASTER_BUSY 0x00000020
|
||||
#define A5XX_RBBM_STATUS_CP_CRASH_BUSY 0x00000010
|
||||
#define A5XX_RBBM_STATUS_CP_ETS_BUSY 0x00000008
|
||||
#define A5XX_RBBM_STATUS_CP_PFP_BUSY 0x00000004
|
||||
#define A5XX_RBBM_STATUS_CP_ME_BUSY 0x00000002
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB__MASK 0x80000000
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB__SHIFT 31
|
||||
static inline uint32_t A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB__SHIFT) & A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP__MASK 0x40000000
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP__SHIFT 30
|
||||
static inline uint32_t A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP__SHIFT) & A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_HLSQ_BUSY__MASK 0x20000000
|
||||
#define A5XX_RBBM_STATUS_HLSQ_BUSY__SHIFT 29
|
||||
static inline uint32_t A5XX_RBBM_STATUS_HLSQ_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_HLSQ_BUSY__SHIFT) & A5XX_RBBM_STATUS_HLSQ_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_VSC_BUSY__MASK 0x10000000
|
||||
#define A5XX_RBBM_STATUS_VSC_BUSY__SHIFT 28
|
||||
static inline uint32_t A5XX_RBBM_STATUS_VSC_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_VSC_BUSY__SHIFT) & A5XX_RBBM_STATUS_VSC_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_TPL1_BUSY__MASK 0x08000000
|
||||
#define A5XX_RBBM_STATUS_TPL1_BUSY__SHIFT 27
|
||||
static inline uint32_t A5XX_RBBM_STATUS_TPL1_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_TPL1_BUSY__SHIFT) & A5XX_RBBM_STATUS_TPL1_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_SP_BUSY__MASK 0x04000000
|
||||
#define A5XX_RBBM_STATUS_SP_BUSY__SHIFT 26
|
||||
static inline uint32_t A5XX_RBBM_STATUS_SP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_SP_BUSY__SHIFT) & A5XX_RBBM_STATUS_SP_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_UCHE_BUSY__MASK 0x02000000
|
||||
#define A5XX_RBBM_STATUS_UCHE_BUSY__SHIFT 25
|
||||
static inline uint32_t A5XX_RBBM_STATUS_UCHE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_UCHE_BUSY__SHIFT) & A5XX_RBBM_STATUS_UCHE_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_VPC_BUSY__MASK 0x01000000
|
||||
#define A5XX_RBBM_STATUS_VPC_BUSY__SHIFT 24
|
||||
static inline uint32_t A5XX_RBBM_STATUS_VPC_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_VPC_BUSY__SHIFT) & A5XX_RBBM_STATUS_VPC_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_VFDP_BUSY__MASK 0x00800000
|
||||
#define A5XX_RBBM_STATUS_VFDP_BUSY__SHIFT 23
|
||||
static inline uint32_t A5XX_RBBM_STATUS_VFDP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_VFDP_BUSY__SHIFT) & A5XX_RBBM_STATUS_VFDP_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_VFD_BUSY__MASK 0x00400000
|
||||
#define A5XX_RBBM_STATUS_VFD_BUSY__SHIFT 22
|
||||
static inline uint32_t A5XX_RBBM_STATUS_VFD_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_VFD_BUSY__SHIFT) & A5XX_RBBM_STATUS_VFD_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_TESS_BUSY__MASK 0x00200000
|
||||
#define A5XX_RBBM_STATUS_TESS_BUSY__SHIFT 21
|
||||
static inline uint32_t A5XX_RBBM_STATUS_TESS_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_TESS_BUSY__SHIFT) & A5XX_RBBM_STATUS_TESS_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_PC_VSD_BUSY__MASK 0x00100000
|
||||
#define A5XX_RBBM_STATUS_PC_VSD_BUSY__SHIFT 20
|
||||
static inline uint32_t A5XX_RBBM_STATUS_PC_VSD_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_PC_VSD_BUSY__SHIFT) & A5XX_RBBM_STATUS_PC_VSD_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_PC_DCALL_BUSY__MASK 0x00080000
|
||||
#define A5XX_RBBM_STATUS_PC_DCALL_BUSY__SHIFT 19
|
||||
static inline uint32_t A5XX_RBBM_STATUS_PC_DCALL_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_PC_DCALL_BUSY__SHIFT) & A5XX_RBBM_STATUS_PC_DCALL_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY__MASK 0x00040000
|
||||
#define A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY__SHIFT 18
|
||||
static inline uint32_t A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY__SHIFT) & A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_DCOM_BUSY__MASK 0x00020000
|
||||
#define A5XX_RBBM_STATUS_DCOM_BUSY__SHIFT 17
|
||||
static inline uint32_t A5XX_RBBM_STATUS_DCOM_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_DCOM_BUSY__SHIFT) & A5XX_RBBM_STATUS_DCOM_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_COM_BUSY__MASK 0x00010000
|
||||
#define A5XX_RBBM_STATUS_COM_BUSY__SHIFT 16
|
||||
static inline uint32_t A5XX_RBBM_STATUS_COM_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_COM_BUSY__SHIFT) & A5XX_RBBM_STATUS_COM_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_LRZ_BUZY__MASK 0x00008000
|
||||
#define A5XX_RBBM_STATUS_LRZ_BUZY__SHIFT 15
|
||||
static inline uint32_t A5XX_RBBM_STATUS_LRZ_BUZY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_LRZ_BUZY__SHIFT) & A5XX_RBBM_STATUS_LRZ_BUZY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_A2D_DSP_BUSY__MASK 0x00004000
|
||||
#define A5XX_RBBM_STATUS_A2D_DSP_BUSY__SHIFT 14
|
||||
static inline uint32_t A5XX_RBBM_STATUS_A2D_DSP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_A2D_DSP_BUSY__SHIFT) & A5XX_RBBM_STATUS_A2D_DSP_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CCUFCHE_BUSY__MASK 0x00002000
|
||||
#define A5XX_RBBM_STATUS_CCUFCHE_BUSY__SHIFT 13
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CCUFCHE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CCUFCHE_BUSY__SHIFT) & A5XX_RBBM_STATUS_CCUFCHE_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_RB_BUSY__MASK 0x00001000
|
||||
#define A5XX_RBBM_STATUS_RB_BUSY__SHIFT 12
|
||||
static inline uint32_t A5XX_RBBM_STATUS_RB_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_RB_BUSY__SHIFT) & A5XX_RBBM_STATUS_RB_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_RAS_BUSY__MASK 0x00000800
|
||||
#define A5XX_RBBM_STATUS_RAS_BUSY__SHIFT 11
|
||||
static inline uint32_t A5XX_RBBM_STATUS_RAS_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_RAS_BUSY__SHIFT) & A5XX_RBBM_STATUS_RAS_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_TSE_BUSY__MASK 0x00000400
|
||||
#define A5XX_RBBM_STATUS_TSE_BUSY__SHIFT 10
|
||||
static inline uint32_t A5XX_RBBM_STATUS_TSE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_TSE_BUSY__SHIFT) & A5XX_RBBM_STATUS_TSE_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_VBIF_BUSY__MASK 0x00000200
|
||||
#define A5XX_RBBM_STATUS_VBIF_BUSY__SHIFT 9
|
||||
static inline uint32_t A5XX_RBBM_STATUS_VBIF_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_VBIF_BUSY__SHIFT) & A5XX_RBBM_STATUS_VBIF_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST__MASK 0x00000100
|
||||
#define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST__SHIFT 8
|
||||
static inline uint32_t A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST__SHIFT) & A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST__MASK 0x00000080
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST__SHIFT 7
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST__SHIFT) & A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY__MASK 0x00000040
|
||||
#define A5XX_RBBM_STATUS_CP_BUSY__SHIFT 6
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_BUSY__SHIFT) & A5XX_RBBM_STATUS_CP_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_GPMU_MASTER_BUSY__MASK 0x00000020
|
||||
#define A5XX_RBBM_STATUS_GPMU_MASTER_BUSY__SHIFT 5
|
||||
static inline uint32_t A5XX_RBBM_STATUS_GPMU_MASTER_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_GPMU_MASTER_BUSY__SHIFT) & A5XX_RBBM_STATUS_GPMU_MASTER_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_CRASH_BUSY__MASK 0x00000010
|
||||
#define A5XX_RBBM_STATUS_CP_CRASH_BUSY__SHIFT 4
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_CRASH_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_CRASH_BUSY__SHIFT) & A5XX_RBBM_STATUS_CP_CRASH_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_ETS_BUSY__MASK 0x00000008
|
||||
#define A5XX_RBBM_STATUS_CP_ETS_BUSY__SHIFT 3
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_ETS_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_ETS_BUSY__SHIFT) & A5XX_RBBM_STATUS_CP_ETS_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_PFP_BUSY__MASK 0x00000004
|
||||
#define A5XX_RBBM_STATUS_CP_PFP_BUSY__SHIFT 2
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_PFP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_PFP_BUSY__SHIFT) & A5XX_RBBM_STATUS_CP_PFP_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_CP_ME_BUSY__MASK 0x00000002
|
||||
#define A5XX_RBBM_STATUS_CP_ME_BUSY__SHIFT 1
|
||||
static inline uint32_t A5XX_RBBM_STATUS_CP_ME_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RBBM_STATUS_CP_ME_BUSY__SHIFT) & A5XX_RBBM_STATUS_CP_ME_BUSY__MASK;
|
||||
}
|
||||
#define A5XX_RBBM_STATUS_HI_BUSY 0x00000001
|
||||
|
||||
#define REG_A5XX_RBBM_STATUS3 0x00000530
|
||||
|
@ -1884,14 +2046,6 @@ static inline uint32_t A5XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
|
|||
|
||||
#define REG_A5XX_RBBM_PERFCTR_LOAD_VALUE_HI 0x0000046a
|
||||
|
||||
#define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_0 0x0000046b
|
||||
|
||||
#define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_1 0x0000046c
|
||||
|
||||
#define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_2 0x0000046d
|
||||
|
||||
#define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_3 0x0000046e
|
||||
|
||||
#define REG_A5XX_RBBM_PERFCTR_GPU_BUSY_MASKED 0x0000046f
|
||||
|
||||
#define REG_A5XX_RBBM_AHB_ERROR 0x000004ed
|
||||
|
@ -2455,8 +2609,6 @@ static inline uint32_t A5XX_VSC_RESOLVE_CNTL_Y(uint32_t val)
|
|||
|
||||
#define REG_A5XX_GPMU_PWR_COL_BINNING_CTRL 0x0000a894
|
||||
|
||||
#define REG_A5XX_GPMU_CLOCK_THROTTLE_CTRL 0x0000a8a3
|
||||
|
||||
#define REG_A5XX_GPMU_WFI_CONFIG 0x0000a8c1
|
||||
|
||||
#define REG_A5XX_GPMU_RBBM_INTR_INFO 0x0000a8d6
|
||||
|
@ -2659,12 +2811,16 @@ static inline uint32_t A5XX_VSC_RESOLVE_CNTL_Y(uint32_t val)
|
|||
#define REG_A5XX_UNKNOWN_E004 0x0000e004
|
||||
|
||||
#define REG_A5XX_GRAS_CNTL 0x0000e005
|
||||
#define A5XX_GRAS_CNTL_VARYING 0x00000001
|
||||
#define A5XX_GRAS_CNTL_UNK3 0x00000008
|
||||
#define A5XX_GRAS_CNTL_XCOORD 0x00000040
|
||||
#define A5XX_GRAS_CNTL_YCOORD 0x00000080
|
||||
#define A5XX_GRAS_CNTL_ZCOORD 0x00000100
|
||||
#define A5XX_GRAS_CNTL_WCOORD 0x00000200
|
||||
#define A5XX_GRAS_CNTL_IJ_PERSP_PIXEL 0x00000001
|
||||
#define A5XX_GRAS_CNTL_IJ_PERSP_CENTROID 0x00000002
|
||||
#define A5XX_GRAS_CNTL_IJ_PERSP_SAMPLE 0x00000004
|
||||
#define A5XX_GRAS_CNTL_SIZE 0x00000008
|
||||
#define A5XX_GRAS_CNTL_COORD_MASK__MASK 0x000003c0
|
||||
#define A5XX_GRAS_CNTL_COORD_MASK__SHIFT 6
|
||||
static inline uint32_t A5XX_GRAS_CNTL_COORD_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_GRAS_CNTL_COORD_MASK__SHIFT) & A5XX_GRAS_CNTL_COORD_MASK__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ 0x0000e006
|
||||
#define A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__MASK 0x000003ff
|
||||
|
@ -2991,12 +3147,16 @@ static inline uint32_t A5XX_RB_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val
|
|||
#define A5XX_RB_DEST_MSAA_CNTL_MSAA_DISABLE 0x00000004
|
||||
|
||||
#define REG_A5XX_RB_RENDER_CONTROL0 0x0000e144
|
||||
#define A5XX_RB_RENDER_CONTROL0_VARYING 0x00000001
|
||||
#define A5XX_RB_RENDER_CONTROL0_UNK3 0x00000008
|
||||
#define A5XX_RB_RENDER_CONTROL0_XCOORD 0x00000040
|
||||
#define A5XX_RB_RENDER_CONTROL0_YCOORD 0x00000080
|
||||
#define A5XX_RB_RENDER_CONTROL0_ZCOORD 0x00000100
|
||||
#define A5XX_RB_RENDER_CONTROL0_WCOORD 0x00000200
|
||||
#define A5XX_RB_RENDER_CONTROL0_IJ_PERSP_PIXEL 0x00000001
|
||||
#define A5XX_RB_RENDER_CONTROL0_IJ_PERSP_CENTROID 0x00000002
|
||||
#define A5XX_RB_RENDER_CONTROL0_IJ_PERSP_SAMPLE 0x00000004
|
||||
#define A5XX_RB_RENDER_CONTROL0_SIZE 0x00000008
|
||||
#define A5XX_RB_RENDER_CONTROL0_COORD_MASK__MASK 0x000003c0
|
||||
#define A5XX_RB_RENDER_CONTROL0_COORD_MASK__SHIFT 6
|
||||
static inline uint32_t A5XX_RB_RENDER_CONTROL0_COORD_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_RB_RENDER_CONTROL0_COORD_MASK__SHIFT) & A5XX_RB_RENDER_CONTROL0_COORD_MASK__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_RENDER_CONTROL1 0x0000e145
|
||||
#define A5XX_RB_RENDER_CONTROL1_SAMPLEMASK 0x00000001
|
||||
|
@ -4450,16 +4610,52 @@ static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(uint32_t val)
|
|||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_SIZE__MASK 0xff000000
|
||||
#define A5XX_HLSQ_CONTROL_2_REG_SIZE__SHIFT 24
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_SIZE(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_2_REG_SIZE__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_SIZE__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_HLSQ_CONTROL_3_REG 0x0000e787
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK 0x000000ff
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT 0
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID(uint32_t val)
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__MASK 0x000000ff
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__SHIFT 0
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK;
|
||||
return ((val) << A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__MASK 0x0000ff00
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__SHIFT 8
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__MASK 0x00ff0000
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__SHIFT 16
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__MASK 0xff000000
|
||||
#define A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__SHIFT 24
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_HLSQ_CONTROL_4_REG 0x0000e788
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__MASK 0x000000ff
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__SHIFT 0
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__SHIFT) & A5XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__MASK 0x0000ff00
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__SHIFT 8
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__SHIFT) & A5XX_HLSQ_CONTROL_4_REG_IJ_LINEAR_SAMPLE__MASK;
|
||||
}
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__MASK 0x00ff0000
|
||||
#define A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__SHIFT 16
|
||||
static inline uint32_t A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(uint32_t val)
|
||||
|
@ -4855,10 +5051,26 @@ static inline uint32_t A5XX_RB_2D_DST_SIZE_ARRAY_PITCH(uint32_t val)
|
|||
|
||||
#define REG_A5XX_RB_2D_SRC_FLAGS_HI 0x00002141
|
||||
|
||||
#define REG_A5XX_RB_2D_SRC_FLAGS_PITCH 0x00002142
|
||||
#define A5XX_RB_2D_SRC_FLAGS_PITCH__MASK 0xffffffff
|
||||
#define A5XX_RB_2D_SRC_FLAGS_PITCH__SHIFT 0
|
||||
static inline uint32_t A5XX_RB_2D_SRC_FLAGS_PITCH(uint32_t val)
|
||||
{
|
||||
return ((val >> 6) << A5XX_RB_2D_SRC_FLAGS_PITCH__SHIFT) & A5XX_RB_2D_SRC_FLAGS_PITCH__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_RB_2D_DST_FLAGS_LO 0x00002143
|
||||
|
||||
#define REG_A5XX_RB_2D_DST_FLAGS_HI 0x00002144
|
||||
|
||||
#define REG_A5XX_RB_2D_DST_FLAGS_PITCH 0x00002145
|
||||
#define A5XX_RB_2D_DST_FLAGS_PITCH__MASK 0xffffffff
|
||||
#define A5XX_RB_2D_DST_FLAGS_PITCH__SHIFT 0
|
||||
static inline uint32_t A5XX_RB_2D_DST_FLAGS_PITCH(uint32_t val)
|
||||
{
|
||||
return ((val >> 6) << A5XX_RB_2D_DST_FLAGS_PITCH__SHIFT) & A5XX_RB_2D_DST_FLAGS_PITCH__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_GRAS_2D_BLIT_CNTL 0x00002180
|
||||
|
||||
#define REG_A5XX_GRAS_2D_SRC_INFO 0x00002181
|
||||
|
@ -5059,11 +5271,11 @@ static inline uint32_t A5XX_TEX_CONST_1_HEIGHT(uint32_t val)
|
|||
}
|
||||
|
||||
#define REG_A5XX_TEX_CONST_2 0x00000002
|
||||
#define A5XX_TEX_CONST_2_FETCHSIZE__MASK 0x0000000f
|
||||
#define A5XX_TEX_CONST_2_FETCHSIZE__SHIFT 0
|
||||
static inline uint32_t A5XX_TEX_CONST_2_FETCHSIZE(enum a5xx_tex_fetchsize val)
|
||||
#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)
|
||||
{
|
||||
return ((val) << A5XX_TEX_CONST_2_FETCHSIZE__SHIFT) & A5XX_TEX_CONST_2_FETCHSIZE__MASK;
|
||||
return ((val) << A5XX_TEX_CONST_2_PITCHALIGN__SHIFT) & A5XX_TEX_CONST_2_PITCHALIGN__MASK;
|
||||
}
|
||||
#define A5XX_TEX_CONST_2_PITCH__MASK 0x1fffff80
|
||||
#define A5XX_TEX_CONST_2_PITCH__SHIFT 7
|
||||
|
@ -5085,6 +5297,13 @@ static inline uint32_t A5XX_TEX_CONST_3_ARRAY_PITCH(uint32_t val)
|
|||
{
|
||||
return ((val >> 12) << A5XX_TEX_CONST_3_ARRAY_PITCH__SHIFT) & A5XX_TEX_CONST_3_ARRAY_PITCH__MASK;
|
||||
}
|
||||
#define A5XX_TEX_CONST_3_MIN_LAYERSZ__MASK 0x07800000
|
||||
#define A5XX_TEX_CONST_3_MIN_LAYERSZ__SHIFT 23
|
||||
static inline uint32_t A5XX_TEX_CONST_3_MIN_LAYERSZ(uint32_t val)
|
||||
{
|
||||
return ((val >> 12) << A5XX_TEX_CONST_3_MIN_LAYERSZ__SHIFT) & A5XX_TEX_CONST_3_MIN_LAYERSZ__MASK;
|
||||
}
|
||||
#define A5XX_TEX_CONST_3_TILE_ALL 0x08000000
|
||||
#define A5XX_TEX_CONST_3_FLAG 0x10000000
|
||||
|
||||
#define REG_A5XX_TEX_CONST_4 0x00000004
|
||||
|
@ -5197,5 +5416,21 @@ static inline uint32_t A5XX_SSBO_2_1_BASE_HI(uint32_t val)
|
|||
return ((val) << A5XX_SSBO_2_1_BASE_HI__SHIFT) & A5XX_SSBO_2_1_BASE_HI__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_UBO_0 0x00000000
|
||||
#define A5XX_UBO_0_BASE_LO__MASK 0xffffffff
|
||||
#define A5XX_UBO_0_BASE_LO__SHIFT 0
|
||||
static inline uint32_t A5XX_UBO_0_BASE_LO(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_UBO_0_BASE_LO__SHIFT) & A5XX_UBO_0_BASE_LO__MASK;
|
||||
}
|
||||
|
||||
#define REG_A5XX_UBO_1 0x00000001
|
||||
#define A5XX_UBO_1_BASE_HI__MASK 0x0001ffff
|
||||
#define A5XX_UBO_1_BASE_HI__SHIFT 0
|
||||
static inline uint32_t A5XX_UBO_1_BASE_HI(uint32_t val)
|
||||
{
|
||||
return ((val) << A5XX_UBO_1_BASE_HI__SHIFT) & A5XX_UBO_1_BASE_HI__MASK;
|
||||
}
|
||||
|
||||
|
||||
#endif /* A5XX_XML */
|
||||
|
|
|
@ -186,7 +186,8 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
|
|||
* timestamp is written to the memory and then triggers the interrupt
|
||||
*/
|
||||
OUT_PKT7(ring, CP_EVENT_WRITE, 4);
|
||||
OUT_RING(ring, CACHE_FLUSH_TS | (1 << 31));
|
||||
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_TS) |
|
||||
CP_EVENT_WRITE_0_IRQ);
|
||||
OUT_RING(ring, lower_32_bits(rbmemptr(ring, fence)));
|
||||
OUT_RING(ring, upper_32_bits(rbmemptr(ring, fence)));
|
||||
OUT_RING(ring, submit->seqno);
|
||||
|
@ -730,7 +731,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
|
|||
*/
|
||||
if (adreno_is_a530(adreno_gpu)) {
|
||||
OUT_PKT7(gpu->rb[0], CP_EVENT_WRITE, 1);
|
||||
OUT_RING(gpu->rb[0], 0x0F);
|
||||
OUT_RING(gpu->rb[0], CP_EVENT_WRITE_0_EVENT(STAT_EVENT));
|
||||
|
||||
gpu->funcs->flush(gpu, gpu->rb[0]);
|
||||
if (!a5xx_idle(gpu, gpu->rb[0]))
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -103,17 +103,45 @@ bool a6xx_gmu_gx_is_on(struct a6xx_gmu *gmu)
|
|||
A6XX_GMU_SPTPRAC_PWR_CLK_STATUS_GX_HM_CLK_OFF));
|
||||
}
|
||||
|
||||
static void __a6xx_gmu_set_freq(struct a6xx_gmu *gmu, int index)
|
||||
void a6xx_gmu_set_freq(struct msm_gpu *gpu, struct dev_pm_opp *opp)
|
||||
{
|
||||
struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu);
|
||||
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
|
||||
struct msm_gpu *gpu = &adreno_gpu->base;
|
||||
int ret;
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
|
||||
u32 perf_index;
|
||||
unsigned long gpu_freq;
|
||||
int ret = 0;
|
||||
|
||||
gpu_freq = dev_pm_opp_get_freq(opp);
|
||||
|
||||
if (gpu_freq == gmu->freq)
|
||||
return;
|
||||
|
||||
for (perf_index = 0; perf_index < gmu->nr_gpu_freqs - 1; perf_index++)
|
||||
if (gpu_freq == gmu->gpu_freqs[perf_index])
|
||||
break;
|
||||
|
||||
gmu->current_perf_index = perf_index;
|
||||
gmu->freq = gmu->gpu_freqs[perf_index];
|
||||
|
||||
/*
|
||||
* This can get called from devfreq while the hardware is idle. Don't
|
||||
* bring up the power if it isn't already active
|
||||
*/
|
||||
if (pm_runtime_get_if_in_use(gmu->dev) == 0)
|
||||
return;
|
||||
|
||||
if (!gmu->legacy) {
|
||||
a6xx_hfi_set_freq(gmu, perf_index);
|
||||
icc_set_bw(gpu->icc_path, 0, MBps_to_icc(7216));
|
||||
pm_runtime_put(gmu->dev);
|
||||
return;
|
||||
}
|
||||
|
||||
gmu_write(gmu, REG_A6XX_GMU_DCVS_ACK_OPTION, 0);
|
||||
|
||||
gmu_write(gmu, REG_A6XX_GMU_DCVS_PERF_SETTING,
|
||||
((3 & 0xf) << 28) | index);
|
||||
((3 & 0xf) << 28) | perf_index);
|
||||
|
||||
/*
|
||||
* Send an invalid index as a vote for the bus bandwidth and let the
|
||||
|
@ -134,37 +162,6 @@ static void __a6xx_gmu_set_freq(struct a6xx_gmu *gmu, int index)
|
|||
* for now leave it at max so that the performance is nominal.
|
||||
*/
|
||||
icc_set_bw(gpu->icc_path, 0, MBps_to_icc(7216));
|
||||
}
|
||||
|
||||
void a6xx_gmu_set_freq(struct msm_gpu *gpu, unsigned long freq)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
|
||||
u32 perf_index = 0;
|
||||
|
||||
if (freq == gmu->freq)
|
||||
return;
|
||||
|
||||
for (perf_index = 0; perf_index < gmu->nr_gpu_freqs - 1; perf_index++)
|
||||
if (freq == gmu->gpu_freqs[perf_index])
|
||||
break;
|
||||
|
||||
gmu->current_perf_index = perf_index;
|
||||
gmu->freq = gmu->gpu_freqs[perf_index];
|
||||
|
||||
/*
|
||||
* This can get called from devfreq while the hardware is idle. Don't
|
||||
* bring up the power if it isn't already active
|
||||
*/
|
||||
if (pm_runtime_get_if_in_use(gmu->dev) == 0)
|
||||
return;
|
||||
|
||||
if (gmu->legacy)
|
||||
__a6xx_gmu_set_freq(gmu, perf_index);
|
||||
else
|
||||
a6xx_hfi_set_freq(gmu, perf_index);
|
||||
|
||||
pm_runtime_put(gmu->dev);
|
||||
}
|
||||
|
||||
|
@ -839,6 +836,19 @@ static void a6xx_gmu_force_off(struct a6xx_gmu *gmu)
|
|||
a6xx_gmu_rpmh_off(gmu);
|
||||
}
|
||||
|
||||
static void a6xx_gmu_set_initial_freq(struct msm_gpu *gpu, struct a6xx_gmu *gmu)
|
||||
{
|
||||
struct dev_pm_opp *gpu_opp;
|
||||
unsigned long gpu_freq = gmu->gpu_freqs[gmu->current_perf_index];
|
||||
|
||||
gpu_opp = dev_pm_opp_find_freq_exact(&gpu->pdev->dev, gpu_freq, true);
|
||||
if (IS_ERR_OR_NULL(gpu_opp))
|
||||
return;
|
||||
|
||||
a6xx_gmu_set_freq(gpu, gpu_opp);
|
||||
dev_pm_opp_put(gpu_opp);
|
||||
}
|
||||
|
||||
int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
|
||||
|
@ -854,10 +864,19 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu)
|
|||
/* Turn on the resources */
|
||||
pm_runtime_get_sync(gmu->dev);
|
||||
|
||||
/*
|
||||
* "enable" the GX power domain which won't actually do anything but it
|
||||
* will make sure that the refcounting is correct in case we need to
|
||||
* bring down the GX after a GMU failure
|
||||
*/
|
||||
if (!IS_ERR_OR_NULL(gmu->gxpd))
|
||||
pm_runtime_get_sync(gmu->gxpd);
|
||||
|
||||
/* Use a known rate to bring up the GMU */
|
||||
clk_set_rate(gmu->core_clk, 200000000);
|
||||
ret = clk_bulk_prepare_enable(gmu->nr_clocks, gmu->clocks);
|
||||
if (ret) {
|
||||
pm_runtime_put(gmu->gxpd);
|
||||
pm_runtime_put(gmu->dev);
|
||||
return ret;
|
||||
}
|
||||
|
@ -898,24 +917,14 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu)
|
|||
enable_irq(gmu->hfi_irq);
|
||||
|
||||
/* Set the GPU to the current freq */
|
||||
if (gmu->legacy)
|
||||
__a6xx_gmu_set_freq(gmu, gmu->current_perf_index);
|
||||
else
|
||||
a6xx_hfi_set_freq(gmu, gmu->current_perf_index);
|
||||
|
||||
/*
|
||||
* "enable" the GX power domain which won't actually do anything but it
|
||||
* will make sure that the refcounting is correct in case we need to
|
||||
* bring down the GX after a GMU failure
|
||||
*/
|
||||
if (!IS_ERR_OR_NULL(gmu->gxpd))
|
||||
pm_runtime_get(gmu->gxpd);
|
||||
a6xx_gmu_set_initial_freq(gpu, gmu);
|
||||
|
||||
out:
|
||||
/* On failure, shut down the GMU to leave it in a good state */
|
||||
if (ret) {
|
||||
disable_irq(gmu->gmu_irq);
|
||||
a6xx_rpmh_stop(gmu);
|
||||
pm_runtime_put(gmu->gxpd);
|
||||
pm_runtime_put(gmu->dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -127,6 +127,11 @@ static inline u64 gmu_read64(struct a6xx_gmu *gmu, u32 lo, u32 hi)
|
|||
readl_poll_timeout((gmu)->mmio + ((addr) << 2), val, cond, \
|
||||
interval, timeout)
|
||||
|
||||
static inline u32 gmu_read_rscc(struct a6xx_gmu *gmu, u32 offset)
|
||||
{
|
||||
return msm_readl(gmu->rscc + (offset << 2));
|
||||
}
|
||||
|
||||
static inline void gmu_write_rscc(struct a6xx_gmu *gmu, u32 offset, u32 value)
|
||||
{
|
||||
return msm_writel(value, gmu->rscc + (offset << 2));
|
||||
|
|
|
@ -8,19 +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 ( 501 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 42463 bytes, from 2018-11-19 13:44:03)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14201 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 43052 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 83840 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112086 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 147240 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 140790 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 10431 bytes, from 2018-09-14 13:03:07)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -46,24 +48,109 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
*/
|
||||
|
||||
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB 0x00800000
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB 0x40000000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK 0x00400000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK 0x40000000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK 0x40000000
|
||||
#define A6XX_GMU_OOB_DCVS_SET_MASK 0x00800000
|
||||
#define A6XX_GMU_OOB_DCVS_CHECK_MASK 0x80000000
|
||||
#define A6XX_GMU_OOB_DCVS_CLEAR_MASK 0x80000000
|
||||
#define A6XX_GMU_OOB_GPU_SET_MASK 0x00040000
|
||||
#define A6XX_GMU_OOB_GPU_CHECK_MASK 0x04000000
|
||||
#define A6XX_GMU_OOB_GPU_CLEAR_MASK 0x04000000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_SET_MASK 0x00020000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CHECK_MASK 0x02000000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK 0x02000000
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB__MASK 0x00800000
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB__SHIFT 23
|
||||
static inline uint32_t A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB__SHIFT) & A6XX_GMU_GPU_IDLE_STATUS_BUSY_IGN_AHB__MASK;
|
||||
}
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB__MASK 0x40000000
|
||||
#define A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB__SHIFT 30
|
||||
static inline uint32_t A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB__SHIFT) & A6XX_GMU_GPU_IDLE_STATUS_CX_GX_CPU_BUSY_IGN_AHB__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK__MASK 0x00400000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK__SHIFT 22
|
||||
static inline uint32_t A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK__SHIFT) & A6XX_GMU_OOB_BOOT_SLUMBER_SET_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK__MASK 0x40000000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK__SHIFT 30
|
||||
static inline uint32_t A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK__SHIFT) & A6XX_GMU_OOB_BOOT_SLUMBER_CHECK_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK__MASK 0x40000000
|
||||
#define A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK__SHIFT 30
|
||||
static inline uint32_t A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK__SHIFT) & A6XX_GMU_OOB_BOOT_SLUMBER_CLEAR_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_DCVS_SET_MASK__MASK 0x00800000
|
||||
#define A6XX_GMU_OOB_DCVS_SET_MASK__SHIFT 23
|
||||
static inline uint32_t A6XX_GMU_OOB_DCVS_SET_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_DCVS_SET_MASK__SHIFT) & A6XX_GMU_OOB_DCVS_SET_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_DCVS_CHECK_MASK__MASK 0x80000000
|
||||
#define A6XX_GMU_OOB_DCVS_CHECK_MASK__SHIFT 31
|
||||
static inline uint32_t A6XX_GMU_OOB_DCVS_CHECK_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_DCVS_CHECK_MASK__SHIFT) & A6XX_GMU_OOB_DCVS_CHECK_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_DCVS_CLEAR_MASK__MASK 0x80000000
|
||||
#define A6XX_GMU_OOB_DCVS_CLEAR_MASK__SHIFT 31
|
||||
static inline uint32_t A6XX_GMU_OOB_DCVS_CLEAR_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_DCVS_CLEAR_MASK__SHIFT) & A6XX_GMU_OOB_DCVS_CLEAR_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_GPU_SET_MASK__MASK 0x00040000
|
||||
#define A6XX_GMU_OOB_GPU_SET_MASK__SHIFT 18
|
||||
static inline uint32_t A6XX_GMU_OOB_GPU_SET_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_GPU_SET_MASK__SHIFT) & A6XX_GMU_OOB_GPU_SET_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_GPU_CHECK_MASK__MASK 0x04000000
|
||||
#define A6XX_GMU_OOB_GPU_CHECK_MASK__SHIFT 26
|
||||
static inline uint32_t A6XX_GMU_OOB_GPU_CHECK_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_GPU_CHECK_MASK__SHIFT) & A6XX_GMU_OOB_GPU_CHECK_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_GPU_CLEAR_MASK__MASK 0x04000000
|
||||
#define A6XX_GMU_OOB_GPU_CLEAR_MASK__SHIFT 26
|
||||
static inline uint32_t A6XX_GMU_OOB_GPU_CLEAR_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_GPU_CLEAR_MASK__SHIFT) & A6XX_GMU_OOB_GPU_CLEAR_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_PERFCNTR_SET_MASK__MASK 0x00020000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_SET_MASK__SHIFT 17
|
||||
static inline uint32_t A6XX_GMU_OOB_PERFCNTR_SET_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_PERFCNTR_SET_MASK__SHIFT) & A6XX_GMU_OOB_PERFCNTR_SET_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CHECK_MASK__MASK 0x02000000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CHECK_MASK__SHIFT 25
|
||||
static inline uint32_t A6XX_GMU_OOB_PERFCNTR_CHECK_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_PERFCNTR_CHECK_MASK__SHIFT) & A6XX_GMU_OOB_PERFCNTR_CHECK_MASK__MASK;
|
||||
}
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK__MASK 0x02000000
|
||||
#define A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK__SHIFT 25
|
||||
static inline uint32_t A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK__SHIFT) & A6XX_GMU_OOB_PERFCNTR_CLEAR_MASK__MASK;
|
||||
}
|
||||
#define A6XX_HFI_IRQ_MSGQ_MASK 0x00000001
|
||||
#define A6XX_HFI_IRQ_DSGQ_MASK 0x00000002
|
||||
#define A6XX_HFI_IRQ_BLOCKED_MSG_MASK 0x00000004
|
||||
#define A6XX_HFI_IRQ_CM3_FAULT_MASK 0x00800000
|
||||
#define A6XX_HFI_IRQ_DSGQ_MASK__MASK 0x00000002
|
||||
#define A6XX_HFI_IRQ_DSGQ_MASK__SHIFT 1
|
||||
static inline uint32_t A6XX_HFI_IRQ_DSGQ_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_HFI_IRQ_DSGQ_MASK__SHIFT) & A6XX_HFI_IRQ_DSGQ_MASK__MASK;
|
||||
}
|
||||
#define A6XX_HFI_IRQ_BLOCKED_MSG_MASK__MASK 0x00000004
|
||||
#define A6XX_HFI_IRQ_BLOCKED_MSG_MASK__SHIFT 2
|
||||
static inline uint32_t A6XX_HFI_IRQ_BLOCKED_MSG_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_HFI_IRQ_BLOCKED_MSG_MASK__SHIFT) & A6XX_HFI_IRQ_BLOCKED_MSG_MASK__MASK;
|
||||
}
|
||||
#define A6XX_HFI_IRQ_CM3_FAULT_MASK__MASK 0x00800000
|
||||
#define A6XX_HFI_IRQ_CM3_FAULT_MASK__SHIFT 23
|
||||
static inline uint32_t A6XX_HFI_IRQ_CM3_FAULT_MASK(uint32_t val)
|
||||
{
|
||||
return ((val) << A6XX_HFI_IRQ_CM3_FAULT_MASK__SHIFT) & A6XX_HFI_IRQ_CM3_FAULT_MASK__MASK;
|
||||
}
|
||||
#define A6XX_HFI_IRQ_GMU_ERR_MASK__MASK 0x007f0000
|
||||
#define A6XX_HFI_IRQ_GMU_ERR_MASK__SHIFT 16
|
||||
static inline uint32_t A6XX_HFI_IRQ_GMU_ERR_MASK(uint32_t val)
|
||||
|
|
|
@ -74,7 +74,9 @@ static void get_stats_counter(struct msm_ringbuffer *ring, u32 counter,
|
|||
u64 iova)
|
||||
{
|
||||
OUT_PKT7(ring, CP_REG_TO_MEM, 3);
|
||||
OUT_RING(ring, counter | (1 << 30) | (2 << 18));
|
||||
OUT_RING(ring, CP_REG_TO_MEM_0_REG(counter) |
|
||||
CP_REG_TO_MEM_0_CNT(2) |
|
||||
CP_REG_TO_MEM_0_64B);
|
||||
OUT_RING(ring, lower_32_bits(iova));
|
||||
OUT_RING(ring, upper_32_bits(iova));
|
||||
}
|
||||
|
@ -102,10 +104,10 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
|
|||
|
||||
/* Invalidate CCU depth and color */
|
||||
OUT_PKT7(ring, CP_EVENT_WRITE, 1);
|
||||
OUT_RING(ring, PC_CCU_INVALIDATE_DEPTH);
|
||||
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(PC_CCU_INVALIDATE_DEPTH));
|
||||
|
||||
OUT_PKT7(ring, CP_EVENT_WRITE, 1);
|
||||
OUT_RING(ring, PC_CCU_INVALIDATE_COLOR);
|
||||
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(PC_CCU_INVALIDATE_COLOR));
|
||||
|
||||
/* Submit the commands */
|
||||
for (i = 0; i < submit->nr_cmds; i++) {
|
||||
|
@ -139,7 +141,8 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
|
|||
* timestamp is written to the memory and then triggers the interrupt
|
||||
*/
|
||||
OUT_PKT7(ring, CP_EVENT_WRITE, 4);
|
||||
OUT_RING(ring, CACHE_FLUSH_TS | (1 << 31));
|
||||
OUT_RING(ring, CP_EVENT_WRITE_0_EVENT(CACHE_FLUSH_TS) |
|
||||
CP_EVENT_WRITE_0_IRQ);
|
||||
OUT_RING(ring, lower_32_bits(rbmemptr(ring, fence)));
|
||||
OUT_RING(ring, upper_32_bits(rbmemptr(ring, fence)));
|
||||
OUT_RING(ring, submit->seqno);
|
||||
|
@ -151,10 +154,7 @@ static void a6xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
|
|||
a6xx_flush(gpu, ring);
|
||||
}
|
||||
|
||||
static const struct {
|
||||
u32 offset;
|
||||
u32 value;
|
||||
} a6xx_hwcg[] = {
|
||||
const struct adreno_reglist a630_hwcg[] = {
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_SP0, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_SP1, 0x22222222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_SP2, 0x22222222},
|
||||
|
@ -259,7 +259,114 @@ static const struct {
|
|||
{REG_A6XX_RBBM_CLOCK_MODE_HLSQ, 0x00002222},
|
||||
{REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX, 0x00000222},
|
||||
{REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX, 0x00000111},
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555}
|
||||
{REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555},
|
||||
{},
|
||||
};
|
||||
|
||||
const struct adreno_reglist a640_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, 0x02222222},
|
||||
{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, 0x05222022},
|
||||
{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},
|
||||
{},
|
||||
};
|
||||
|
||||
const struct adreno_reglist a650_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, 0x02222222},
|
||||
{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, 0x00000777},
|
||||
{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)
|
||||
|
@ -267,26 +374,65 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
|
|||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
|
||||
const struct adreno_reglist *reg;
|
||||
unsigned int i;
|
||||
u32 val;
|
||||
u32 val, clock_cntl_on;
|
||||
|
||||
if (!adreno_gpu->info->hwcg)
|
||||
return;
|
||||
|
||||
if (adreno_is_a630(adreno_gpu))
|
||||
clock_cntl_on = 0x8aa8aa02;
|
||||
else
|
||||
clock_cntl_on = 0x8aa8aa82;
|
||||
|
||||
val = gpu_read(gpu, REG_A6XX_RBBM_CLOCK_CNTL);
|
||||
|
||||
/* Don't re-program the registers if they are already correct */
|
||||
if ((!state && !val) || (state && (val == 0x8aa8aa02)))
|
||||
if ((!state && !val) || (state && (val == clock_cntl_on)))
|
||||
return;
|
||||
|
||||
/* Disable SP clock before programming HWCG registers */
|
||||
gmu_rmw(gmu, REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL, 1, 0);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(a6xx_hwcg); i++)
|
||||
gpu_write(gpu, a6xx_hwcg[i].offset,
|
||||
state ? a6xx_hwcg[i].value : 0);
|
||||
for (i = 0; (reg = &adreno_gpu->info->hwcg[i], reg->offset); i++)
|
||||
gpu_write(gpu, reg->offset, state ? reg->value : 0);
|
||||
|
||||
/* Enable SP clock */
|
||||
gmu_rmw(gmu, REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL, 0, 1);
|
||||
|
||||
gpu_write(gpu, REG_A6XX_RBBM_CLOCK_CNTL, state ? 0x8aa8aa02 : 0);
|
||||
gpu_write(gpu, REG_A6XX_RBBM_CLOCK_CNTL, state ? clock_cntl_on : 0);
|
||||
}
|
||||
|
||||
static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
u32 lower_bit = 2;
|
||||
u32 amsbc = 0;
|
||||
u32 rgb565_predicator = 0;
|
||||
u32 uavflagprd_inv = 0;
|
||||
|
||||
/* a618 is using the hw default values */
|
||||
if (adreno_is_a618(adreno_gpu))
|
||||
return;
|
||||
|
||||
if (adreno_is_a640(adreno_gpu))
|
||||
amsbc = 1;
|
||||
|
||||
if (adreno_is_a650(adreno_gpu)) {
|
||||
/* TODO: get ddr type from bootloader and use 2 for LPDDR4 */
|
||||
lower_bit = 3;
|
||||
amsbc = 1;
|
||||
rgb565_predicator = 1;
|
||||
uavflagprd_inv = 2;
|
||||
}
|
||||
|
||||
gpu_write(gpu, REG_A6XX_RB_NC_MODE_CNTL,
|
||||
rgb565_predicator << 11 | amsbc << 4 | lower_bit << 1);
|
||||
gpu_write(gpu, REG_A6XX_TPL1_NC_MODE_CNTL, lower_bit << 1);
|
||||
gpu_write(gpu, REG_A6XX_SP_NC_MODE_CNTL,
|
||||
uavflagprd_inv >> 4 | lower_bit << 1);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_MODE_CNTL, lower_bit << 21);
|
||||
}
|
||||
|
||||
static int a6xx_cp_init(struct msm_gpu *gpu)
|
||||
|
@ -406,11 +552,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
gpu_write(gpu, REG_A6XX_TPL1_ADDR_MODE_CNTL, 0x1);
|
||||
gpu_write(gpu, REG_A6XX_RBBM_SECVID_TSB_ADDR_MODE_CNTL, 0x1);
|
||||
|
||||
/*
|
||||
* enable hardware clockgating
|
||||
* For now enable clock gating only for a630
|
||||
*/
|
||||
if (adreno_is_a630(adreno_gpu))
|
||||
/* enable hardware clockgating */
|
||||
a6xx_set_hwcg(gpu, true);
|
||||
|
||||
/* VBIF/GBIF start*/
|
||||
|
@ -478,12 +620,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)
|
|||
/* Select CP0 to always count cycles */
|
||||
gpu_write(gpu, REG_A6XX_CP_PERFCTR_CP_SEL_0, PERF_CP_ALWAYS_COUNT);
|
||||
|
||||
if (adreno_is_a630(adreno_gpu)) {
|
||||
gpu_write(gpu, REG_A6XX_RB_NC_MODE_CNTL, 2 << 1);
|
||||
gpu_write(gpu, REG_A6XX_TPL1_NC_MODE_CNTL, 2 << 1);
|
||||
gpu_write(gpu, REG_A6XX_SP_NC_MODE_CNTL, 2 << 1);
|
||||
gpu_write(gpu, REG_A6XX_UCHE_MODE_CNTL, 2 << 21);
|
||||
}
|
||||
a6xx_set_ubwc_config(gpu);
|
||||
|
||||
/* Enable fault detection */
|
||||
gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL,
|
||||
|
|
|
@ -63,7 +63,7 @@ void a6xx_gmu_clear_oob(struct a6xx_gmu *gmu, enum a6xx_gmu_oob_state state);
|
|||
int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node);
|
||||
void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu);
|
||||
|
||||
void a6xx_gmu_set_freq(struct msm_gpu *gpu, unsigned long freq);
|
||||
void a6xx_gmu_set_freq(struct msm_gpu *gpu, struct dev_pm_opp *opp);
|
||||
unsigned long a6xx_gmu_get_freq(struct msm_gpu *gpu);
|
||||
|
||||
void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
|
||||
|
|
|
@ -736,7 +736,8 @@ static void a6xx_get_ahb_gpu_registers(struct msm_gpu *gpu,
|
|||
static void _a6xx_get_gmu_registers(struct msm_gpu *gpu,
|
||||
struct a6xx_gpu_state *a6xx_state,
|
||||
const struct a6xx_registers *regs,
|
||||
struct a6xx_gpu_state_obj *obj)
|
||||
struct a6xx_gpu_state_obj *obj,
|
||||
bool rscc)
|
||||
{
|
||||
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
|
||||
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
|
||||
|
@ -755,9 +756,17 @@ static void _a6xx_get_gmu_registers(struct msm_gpu *gpu,
|
|||
u32 count = RANGE(regs->registers, i);
|
||||
int j;
|
||||
|
||||
for (j = 0; j < count; j++)
|
||||
obj->data[index++] = gmu_read(gmu,
|
||||
regs->registers[i] + j);
|
||||
for (j = 0; j < count; j++) {
|
||||
u32 offset = regs->registers[i] + j;
|
||||
u32 val;
|
||||
|
||||
if (rscc)
|
||||
val = gmu_read_rscc(gmu, offset);
|
||||
else
|
||||
val = gmu_read(gmu, offset);
|
||||
|
||||
obj->data[index++] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -777,7 +786,9 @@ static void a6xx_get_gmu_registers(struct msm_gpu *gpu,
|
|||
|
||||
/* Get the CX GMU registers from AHB */
|
||||
_a6xx_get_gmu_registers(gpu, a6xx_state, &a6xx_gmu_reglist[0],
|
||||
&a6xx_state->gmu_registers[0]);
|
||||
&a6xx_state->gmu_registers[0], false);
|
||||
_a6xx_get_gmu_registers(gpu, a6xx_state, &a6xx_gmu_reglist[1],
|
||||
&a6xx_state->gmu_registers[1], true);
|
||||
|
||||
if (!a6xx_gmu_gx_is_on(&a6xx_gpu->gmu))
|
||||
return;
|
||||
|
@ -785,8 +796,8 @@ static void a6xx_get_gmu_registers(struct msm_gpu *gpu,
|
|||
/* Set the fence to ALLOW mode so we can access the registers */
|
||||
gpu_write(gpu, REG_A6XX_GMU_AO_AHB_FENCE_CTRL, 0);
|
||||
|
||||
_a6xx_get_gmu_registers(gpu, a6xx_state, &a6xx_gmu_reglist[1],
|
||||
&a6xx_state->gmu_registers[1]);
|
||||
_a6xx_get_gmu_registers(gpu, a6xx_state, &a6xx_gmu_reglist[2],
|
||||
&a6xx_state->gmu_registers[2], false);
|
||||
}
|
||||
|
||||
#define A6XX_GBIF_REGLIST_SIZE 1
|
||||
|
|
|
@ -341,10 +341,6 @@ static const u32 a6xx_gmu_cx_registers[] = {
|
|||
0x5157, 0x5158, 0x515d, 0x515d, 0x5162, 0x5162, 0x5164, 0x5165,
|
||||
0x5180, 0x5186, 0x5190, 0x519e, 0x51c0, 0x51c0, 0x51c5, 0x51cc,
|
||||
0x51e0, 0x51e2, 0x51f0, 0x51f0, 0x5200, 0x5201,
|
||||
/* GPU RSCC */
|
||||
0x8c8c, 0x8c8c, 0x8d01, 0x8d02, 0x8f40, 0x8f42, 0x8f44, 0x8f47,
|
||||
0x8f4c, 0x8f87, 0x8fec, 0x8fef, 0x8ff4, 0x902f, 0x9094, 0x9097,
|
||||
0x909c, 0x90d7, 0x913c, 0x913f, 0x9144, 0x917f,
|
||||
/* GMU AO */
|
||||
0x9300, 0x9316, 0x9400, 0x9400,
|
||||
/* GPU CC */
|
||||
|
@ -357,8 +353,16 @@ static const u32 a6xx_gmu_cx_registers[] = {
|
|||
0xbc00, 0xbc16, 0xbc20, 0xbc27,
|
||||
};
|
||||
|
||||
static const u32 a6xx_gmu_cx_rscc_registers[] = {
|
||||
/* GPU RSCC */
|
||||
0x008c, 0x008c, 0x0101, 0x0102, 0x0340, 0x0342, 0x0344, 0x0347,
|
||||
0x034c, 0x0387, 0x03ec, 0x03ef, 0x03f4, 0x042f, 0x0494, 0x0497,
|
||||
0x049c, 0x04d7, 0x053c, 0x053f, 0x0544, 0x057f,
|
||||
};
|
||||
|
||||
static const struct a6xx_registers a6xx_gmu_reglist[] = {
|
||||
REGS(a6xx_gmu_cx_registers, 0, 0),
|
||||
REGS(a6xx_gmu_cx_rscc_registers, 0, 0),
|
||||
REGS(a6xx_gmu_gx_registers, 0, 0),
|
||||
};
|
||||
|
||||
|
|
|
@ -281,6 +281,76 @@ static void a618_build_bw_table(struct a6xx_hfi_msg_bw_table *msg)
|
|||
msg->cnoc_cmds_data[1][0] = 0x60000001;
|
||||
}
|
||||
|
||||
static void a640_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] = 0x50000;
|
||||
msg->ddr_cmds_addrs[1] = 0x5003c;
|
||||
msg->ddr_cmds_addrs[2] = 0x5000c;
|
||||
|
||||
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 = 3;
|
||||
msg->cnoc_wait_bitmask = 0x01;
|
||||
|
||||
msg->cnoc_cmds_addrs[0] = 0x50034;
|
||||
msg->cnoc_cmds_addrs[1] = 0x5007c;
|
||||
msg->cnoc_cmds_addrs[2] = 0x5004c;
|
||||
|
||||
msg->cnoc_cmds_data[0][0] = 0x40000000;
|
||||
msg->cnoc_cmds_data[0][1] = 0x00000000;
|
||||
msg->cnoc_cmds_data[0][2] = 0x40000000;
|
||||
|
||||
msg->cnoc_cmds_data[1][0] = 0x60000001;
|
||||
msg->cnoc_cmds_data[1][1] = 0x20000001;
|
||||
msg->cnoc_cmds_data[1][2] = 0x60000001;
|
||||
}
|
||||
|
||||
static void a650_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] = 0x50000;
|
||||
msg->ddr_cmds_addrs[1] = 0x50004;
|
||||
msg->ddr_cmds_addrs[2] = 0x5007c;
|
||||
|
||||
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] = 0x500a4;
|
||||
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 */
|
||||
|
@ -327,6 +397,10 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)
|
|||
|
||||
if (adreno_is_a618(adreno_gpu))
|
||||
a618_build_bw_table(&msg);
|
||||
else if (adreno_is_a640(adreno_gpu))
|
||||
a640_build_bw_table(&msg);
|
||||
else if (adreno_is_a650(adreno_gpu))
|
||||
a650_build_bw_table(&msg);
|
||||
else
|
||||
a6xx_build_bw_table(&msg);
|
||||
|
||||
|
|
|
@ -8,19 +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 ( 501 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a2xx.xml ( 42463 bytes, from 2018-11-19 13:44:03)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml ( 14201 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml ( 43052 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a3xx.xml ( 83840 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a4xx.xml ( 112086 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a5xx.xml ( 147240 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx.xml ( 140790 bytes, from 2018-12-02 17:29:54)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml ( 10431 bytes, from 2018-09-14 13:03:07)
|
||||
- /home/robclark/src/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -159,6 +161,7 @@ enum a3xx_msaa_samples {
|
|||
MSAA_ONE = 0,
|
||||
MSAA_TWO = 1,
|
||||
MSAA_FOUR = 2,
|
||||
MSAA_EIGHT = 3,
|
||||
};
|
||||
|
||||
enum a3xx_threadmode {
|
||||
|
@ -197,6 +200,11 @@ enum a4xx_tess_spacing {
|
|||
EVEN_SPACING = 3,
|
||||
};
|
||||
|
||||
enum a5xx_address_mode {
|
||||
ADDR_32B = 0,
|
||||
ADDR_64B = 1,
|
||||
};
|
||||
|
||||
#define REG_AXXX_CP_RB_BASE 0x000001c0
|
||||
|
||||
#define REG_AXXX_CP_RB_CNTL 0x000001c1
|
||||
|
@ -446,34 +454,174 @@ static inline uint32_t AXXX_CP_CSQ_IB2_STAT_WPTR(uint32_t val)
|
|||
#define REG_AXXX_CP_IB2_BUFSZ 0x0000045b
|
||||
|
||||
#define REG_AXXX_CP_STAT 0x0000047f
|
||||
#define AXXX_CP_STAT_CP_BUSY 0x80000000
|
||||
#define AXXX_CP_STAT_VS_EVENT_FIFO_BUSY 0x40000000
|
||||
#define AXXX_CP_STAT_PS_EVENT_FIFO_BUSY 0x20000000
|
||||
#define AXXX_CP_STAT_CF_EVENT_FIFO_BUSY 0x10000000
|
||||
#define AXXX_CP_STAT_RB_EVENT_FIFO_BUSY 0x08000000
|
||||
#define AXXX_CP_STAT_ME_BUSY 0x04000000
|
||||
#define AXXX_CP_STAT_MIU_WR_C_BUSY 0x02000000
|
||||
#define AXXX_CP_STAT_CP_3D_BUSY 0x00800000
|
||||
#define AXXX_CP_STAT_CP_NRT_BUSY 0x00400000
|
||||
#define AXXX_CP_STAT_RBIU_SCRATCH_BUSY 0x00200000
|
||||
#define AXXX_CP_STAT_RCIU_ME_BUSY 0x00100000
|
||||
#define AXXX_CP_STAT_RCIU_PFP_BUSY 0x00080000
|
||||
#define AXXX_CP_STAT_MEQ_RING_BUSY 0x00040000
|
||||
#define AXXX_CP_STAT_PFP_BUSY 0x00020000
|
||||
#define AXXX_CP_STAT_ST_QUEUE_BUSY 0x00010000
|
||||
#define AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY 0x00002000
|
||||
#define AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY 0x00001000
|
||||
#define AXXX_CP_STAT_RING_QUEUE_BUSY 0x00000800
|
||||
#define AXXX_CP_STAT_CSF_BUSY 0x00000400
|
||||
#define AXXX_CP_STAT_CSF_ST_BUSY 0x00000200
|
||||
#define AXXX_CP_STAT_EVENT_BUSY 0x00000100
|
||||
#define AXXX_CP_STAT_CSF_INDIRECT2_BUSY 0x00000080
|
||||
#define AXXX_CP_STAT_CSF_INDIRECTS_BUSY 0x00000040
|
||||
#define AXXX_CP_STAT_CSF_RING_BUSY 0x00000020
|
||||
#define AXXX_CP_STAT_RCIU_BUSY 0x00000010
|
||||
#define AXXX_CP_STAT_RBIU_BUSY 0x00000008
|
||||
#define AXXX_CP_STAT_MIU_RD_RETURN_BUSY 0x00000004
|
||||
#define AXXX_CP_STAT_MIU_RD_REQ_BUSY 0x00000002
|
||||
#define AXXX_CP_STAT_CP_BUSY__MASK 0x80000000
|
||||
#define AXXX_CP_STAT_CP_BUSY__SHIFT 31
|
||||
static inline uint32_t AXXX_CP_STAT_CP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CP_BUSY__SHIFT) & AXXX_CP_STAT_CP_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_VS_EVENT_FIFO_BUSY__MASK 0x40000000
|
||||
#define AXXX_CP_STAT_VS_EVENT_FIFO_BUSY__SHIFT 30
|
||||
static inline uint32_t AXXX_CP_STAT_VS_EVENT_FIFO_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_VS_EVENT_FIFO_BUSY__SHIFT) & AXXX_CP_STAT_VS_EVENT_FIFO_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_PS_EVENT_FIFO_BUSY__MASK 0x20000000
|
||||
#define AXXX_CP_STAT_PS_EVENT_FIFO_BUSY__SHIFT 29
|
||||
static inline uint32_t AXXX_CP_STAT_PS_EVENT_FIFO_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_PS_EVENT_FIFO_BUSY__SHIFT) & AXXX_CP_STAT_PS_EVENT_FIFO_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CF_EVENT_FIFO_BUSY__MASK 0x10000000
|
||||
#define AXXX_CP_STAT_CF_EVENT_FIFO_BUSY__SHIFT 28
|
||||
static inline uint32_t AXXX_CP_STAT_CF_EVENT_FIFO_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CF_EVENT_FIFO_BUSY__SHIFT) & AXXX_CP_STAT_CF_EVENT_FIFO_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RB_EVENT_FIFO_BUSY__MASK 0x08000000
|
||||
#define AXXX_CP_STAT_RB_EVENT_FIFO_BUSY__SHIFT 27
|
||||
static inline uint32_t AXXX_CP_STAT_RB_EVENT_FIFO_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RB_EVENT_FIFO_BUSY__SHIFT) & AXXX_CP_STAT_RB_EVENT_FIFO_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_ME_BUSY__MASK 0x04000000
|
||||
#define AXXX_CP_STAT_ME_BUSY__SHIFT 26
|
||||
static inline uint32_t AXXX_CP_STAT_ME_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_ME_BUSY__SHIFT) & AXXX_CP_STAT_ME_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_MIU_WR_C_BUSY__MASK 0x02000000
|
||||
#define AXXX_CP_STAT_MIU_WR_C_BUSY__SHIFT 25
|
||||
static inline uint32_t AXXX_CP_STAT_MIU_WR_C_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_MIU_WR_C_BUSY__SHIFT) & AXXX_CP_STAT_MIU_WR_C_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CP_3D_BUSY__MASK 0x00800000
|
||||
#define AXXX_CP_STAT_CP_3D_BUSY__SHIFT 23
|
||||
static inline uint32_t AXXX_CP_STAT_CP_3D_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CP_3D_BUSY__SHIFT) & AXXX_CP_STAT_CP_3D_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CP_NRT_BUSY__MASK 0x00400000
|
||||
#define AXXX_CP_STAT_CP_NRT_BUSY__SHIFT 22
|
||||
static inline uint32_t AXXX_CP_STAT_CP_NRT_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CP_NRT_BUSY__SHIFT) & AXXX_CP_STAT_CP_NRT_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RBIU_SCRATCH_BUSY__MASK 0x00200000
|
||||
#define AXXX_CP_STAT_RBIU_SCRATCH_BUSY__SHIFT 21
|
||||
static inline uint32_t AXXX_CP_STAT_RBIU_SCRATCH_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RBIU_SCRATCH_BUSY__SHIFT) & AXXX_CP_STAT_RBIU_SCRATCH_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RCIU_ME_BUSY__MASK 0x00100000
|
||||
#define AXXX_CP_STAT_RCIU_ME_BUSY__SHIFT 20
|
||||
static inline uint32_t AXXX_CP_STAT_RCIU_ME_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RCIU_ME_BUSY__SHIFT) & AXXX_CP_STAT_RCIU_ME_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RCIU_PFP_BUSY__MASK 0x00080000
|
||||
#define AXXX_CP_STAT_RCIU_PFP_BUSY__SHIFT 19
|
||||
static inline uint32_t AXXX_CP_STAT_RCIU_PFP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RCIU_PFP_BUSY__SHIFT) & AXXX_CP_STAT_RCIU_PFP_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_MEQ_RING_BUSY__MASK 0x00040000
|
||||
#define AXXX_CP_STAT_MEQ_RING_BUSY__SHIFT 18
|
||||
static inline uint32_t AXXX_CP_STAT_MEQ_RING_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_MEQ_RING_BUSY__SHIFT) & AXXX_CP_STAT_MEQ_RING_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_PFP_BUSY__MASK 0x00020000
|
||||
#define AXXX_CP_STAT_PFP_BUSY__SHIFT 17
|
||||
static inline uint32_t AXXX_CP_STAT_PFP_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_PFP_BUSY__SHIFT) & AXXX_CP_STAT_PFP_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_ST_QUEUE_BUSY__MASK 0x00010000
|
||||
#define AXXX_CP_STAT_ST_QUEUE_BUSY__SHIFT 16
|
||||
static inline uint32_t AXXX_CP_STAT_ST_QUEUE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_ST_QUEUE_BUSY__SHIFT) & AXXX_CP_STAT_ST_QUEUE_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY__MASK 0x00002000
|
||||
#define AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY__SHIFT 13
|
||||
static inline uint32_t AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY__SHIFT) & AXXX_CP_STAT_INDIRECT2_QUEUE_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY__MASK 0x00001000
|
||||
#define AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY__SHIFT 12
|
||||
static inline uint32_t AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY__SHIFT) & AXXX_CP_STAT_INDIRECTS_QUEUE_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RING_QUEUE_BUSY__MASK 0x00000800
|
||||
#define AXXX_CP_STAT_RING_QUEUE_BUSY__SHIFT 11
|
||||
static inline uint32_t AXXX_CP_STAT_RING_QUEUE_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RING_QUEUE_BUSY__SHIFT) & AXXX_CP_STAT_RING_QUEUE_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CSF_BUSY__MASK 0x00000400
|
||||
#define AXXX_CP_STAT_CSF_BUSY__SHIFT 10
|
||||
static inline uint32_t AXXX_CP_STAT_CSF_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CSF_BUSY__SHIFT) & AXXX_CP_STAT_CSF_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CSF_ST_BUSY__MASK 0x00000200
|
||||
#define AXXX_CP_STAT_CSF_ST_BUSY__SHIFT 9
|
||||
static inline uint32_t AXXX_CP_STAT_CSF_ST_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CSF_ST_BUSY__SHIFT) & AXXX_CP_STAT_CSF_ST_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_EVENT_BUSY__MASK 0x00000100
|
||||
#define AXXX_CP_STAT_EVENT_BUSY__SHIFT 8
|
||||
static inline uint32_t AXXX_CP_STAT_EVENT_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_EVENT_BUSY__SHIFT) & AXXX_CP_STAT_EVENT_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CSF_INDIRECT2_BUSY__MASK 0x00000080
|
||||
#define AXXX_CP_STAT_CSF_INDIRECT2_BUSY__SHIFT 7
|
||||
static inline uint32_t AXXX_CP_STAT_CSF_INDIRECT2_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CSF_INDIRECT2_BUSY__SHIFT) & AXXX_CP_STAT_CSF_INDIRECT2_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CSF_INDIRECTS_BUSY__MASK 0x00000040
|
||||
#define AXXX_CP_STAT_CSF_INDIRECTS_BUSY__SHIFT 6
|
||||
static inline uint32_t AXXX_CP_STAT_CSF_INDIRECTS_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CSF_INDIRECTS_BUSY__SHIFT) & AXXX_CP_STAT_CSF_INDIRECTS_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_CSF_RING_BUSY__MASK 0x00000020
|
||||
#define AXXX_CP_STAT_CSF_RING_BUSY__SHIFT 5
|
||||
static inline uint32_t AXXX_CP_STAT_CSF_RING_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_CSF_RING_BUSY__SHIFT) & AXXX_CP_STAT_CSF_RING_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RCIU_BUSY__MASK 0x00000010
|
||||
#define AXXX_CP_STAT_RCIU_BUSY__SHIFT 4
|
||||
static inline uint32_t AXXX_CP_STAT_RCIU_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RCIU_BUSY__SHIFT) & AXXX_CP_STAT_RCIU_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_RBIU_BUSY__MASK 0x00000008
|
||||
#define AXXX_CP_STAT_RBIU_BUSY__SHIFT 3
|
||||
static inline uint32_t AXXX_CP_STAT_RBIU_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_RBIU_BUSY__SHIFT) & AXXX_CP_STAT_RBIU_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_MIU_RD_RETURN_BUSY__MASK 0x00000004
|
||||
#define AXXX_CP_STAT_MIU_RD_RETURN_BUSY__SHIFT 2
|
||||
static inline uint32_t AXXX_CP_STAT_MIU_RD_RETURN_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_MIU_RD_RETURN_BUSY__SHIFT) & AXXX_CP_STAT_MIU_RD_RETURN_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_MIU_RD_REQ_BUSY__MASK 0x00000002
|
||||
#define AXXX_CP_STAT_MIU_RD_REQ_BUSY__SHIFT 1
|
||||
static inline uint32_t AXXX_CP_STAT_MIU_RD_REQ_BUSY(uint32_t val)
|
||||
{
|
||||
return ((val) << AXXX_CP_STAT_MIU_RD_REQ_BUSY__SHIFT) & AXXX_CP_STAT_MIU_RD_REQ_BUSY__MASK;
|
||||
}
|
||||
#define AXXX_CP_STAT_MIU_WR_BUSY 0x00000001
|
||||
|
||||
#define REG_AXXX_CP_SCRATCH_REG0 0x00000578
|
||||
|
|
|
@ -200,6 +200,7 @@ static const struct adreno_info gpulist[] = {
|
|||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a6xx_gpu_init,
|
||||
.zapfw = "a630_zap.mdt",
|
||||
.hwcg = a630_hwcg,
|
||||
}, {
|
||||
.rev = ADRENO_REV(6, 4, 0, ANY_ID),
|
||||
.revn = 640,
|
||||
|
@ -212,6 +213,7 @@ static const struct adreno_info gpulist[] = {
|
|||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a6xx_gpu_init,
|
||||
.zapfw = "a640_zap.mdt",
|
||||
.hwcg = a640_hwcg,
|
||||
}, {
|
||||
.rev = ADRENO_REV(6, 5, 0, ANY_ID),
|
||||
.revn = 650,
|
||||
|
@ -224,6 +226,7 @@ static const struct adreno_info gpulist[] = {
|
|||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a6xx_gpu_init,
|
||||
.zapfw = "a650_zap.mdt",
|
||||
.hwcg = a650_hwcg,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -895,7 +895,7 @@ static int adreno_get_legacy_pwrlevels(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int adreno_get_pwrlevels(struct device *dev,
|
||||
static void adreno_get_pwrlevels(struct device *dev,
|
||||
struct msm_gpu *gpu)
|
||||
{
|
||||
unsigned long freq = ULONG_MAX;
|
||||
|
@ -930,24 +930,6 @@ static int adreno_get_pwrlevels(struct device *dev,
|
|||
}
|
||||
|
||||
DBG("fast_rate=%u, slow_rate=27000000", gpu->fast_rate);
|
||||
|
||||
/* Check for an interconnect path for the bus */
|
||||
gpu->icc_path = of_icc_get(dev, "gfx-mem");
|
||||
if (!gpu->icc_path) {
|
||||
/*
|
||||
* Keep compatbility with device trees that don't have an
|
||||
* interconnect-names property.
|
||||
*/
|
||||
gpu->icc_path = of_icc_get(dev, NULL);
|
||||
}
|
||||
if (IS_ERR(gpu->icc_path))
|
||||
gpu->icc_path = NULL;
|
||||
|
||||
gpu->ocmem_icc_path = of_icc_get(dev, "ocmem");
|
||||
if (IS_ERR(gpu->ocmem_icc_path))
|
||||
gpu->ocmem_icc_path = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adreno_gpu_ocmem_init(struct device *dev, struct adreno_gpu *adreno_gpu,
|
||||
|
@ -993,9 +975,11 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
struct adreno_gpu *adreno_gpu,
|
||||
const struct adreno_gpu_funcs *funcs, int nr_rings)
|
||||
{
|
||||
struct adreno_platform_config *config = pdev->dev.platform_data;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct adreno_platform_config *config = dev->platform_data;
|
||||
struct msm_gpu_config adreno_gpu_config = { 0 };
|
||||
struct msm_gpu *gpu = &adreno_gpu->base;
|
||||
int ret;
|
||||
|
||||
adreno_gpu->funcs = funcs;
|
||||
adreno_gpu->info = adreno_info(config->rev);
|
||||
|
@ -1007,27 +991,59 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
|
||||
adreno_gpu_config.nr_rings = nr_rings;
|
||||
|
||||
adreno_get_pwrlevels(&pdev->dev, gpu);
|
||||
adreno_get_pwrlevels(dev, gpu);
|
||||
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev,
|
||||
pm_runtime_set_autosuspend_delay(dev,
|
||||
adreno_gpu->info->inactive_period);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
return msm_gpu_init(drm, pdev, &adreno_gpu->base, &funcs->base,
|
||||
ret = msm_gpu_init(drm, pdev, &adreno_gpu->base, &funcs->base,
|
||||
adreno_gpu->info->name, &adreno_gpu_config);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* The legacy case, before "interconnect-names", only has a
|
||||
* single interconnect path which is equivalent to "gfx-mem"
|
||||
*/
|
||||
if (!of_find_property(dev->of_node, "interconnect-names", NULL)) {
|
||||
gpu->icc_path = of_icc_get(dev, NULL);
|
||||
} else {
|
||||
gpu->icc_path = of_icc_get(dev, "gfx-mem");
|
||||
gpu->ocmem_icc_path = of_icc_get(dev, "ocmem");
|
||||
}
|
||||
|
||||
if (IS_ERR(gpu->icc_path)) {
|
||||
ret = PTR_ERR(gpu->icc_path);
|
||||
gpu->icc_path = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (IS_ERR(gpu->ocmem_icc_path)) {
|
||||
ret = PTR_ERR(gpu->ocmem_icc_path);
|
||||
gpu->ocmem_icc_path = NULL;
|
||||
/* allow -ENODATA, ocmem icc is optional */
|
||||
if (ret != -ENODATA)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)
|
||||
{
|
||||
struct msm_gpu *gpu = &adreno_gpu->base;
|
||||
struct msm_drm_private *priv = gpu->dev->dev_private;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(adreno_gpu->info->fw); i++)
|
||||
release_firmware(adreno_gpu->fw[i]);
|
||||
|
||||
icc_put(gpu->icc_path);
|
||||
icc_put(gpu->ocmem_icc_path);
|
||||
pm_runtime_disable(&priv->gpu_pdev->dev);
|
||||
|
||||
msm_gpu_cleanup(&adreno_gpu->base);
|
||||
|
||||
icc_put(gpu->icc_path);
|
||||
icc_put(gpu->ocmem_icc_path);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,13 @@ struct adreno_gpu_funcs {
|
|||
int (*get_timestamp)(struct msm_gpu *gpu, uint64_t *value);
|
||||
};
|
||||
|
||||
struct adreno_reglist {
|
||||
u32 offset;
|
||||
u32 value;
|
||||
};
|
||||
|
||||
extern const struct adreno_reglist a630_hwcg[], a640_hwcg[], a650_hwcg[];
|
||||
|
||||
struct adreno_info {
|
||||
struct adreno_rev rev;
|
||||
uint32_t revn;
|
||||
|
@ -78,6 +85,7 @@ struct adreno_info {
|
|||
struct msm_gpu *(*init)(struct drm_device *dev);
|
||||
const char *zapfw;
|
||||
u32 inactive_period;
|
||||
const struct adreno_reglist *hwcg;
|
||||
};
|
||||
|
||||
const struct adreno_info *adreno_info(struct adreno_rev rev);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,7 @@
|
|||
#include <linux/debugfs.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/sort.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/bitmap.h>
|
||||
|
@ -218,7 +219,7 @@ static int _dpu_core_perf_set_core_clk_rate(struct dpu_kms *kms, u64 rate)
|
|||
rate = core_clk->max_rate;
|
||||
|
||||
core_clk->rate = rate;
|
||||
return msm_dss_clk_set_rate(core_clk, 1);
|
||||
return dev_pm_opp_set_rate(&kms->pdev->dev, core_clk->rate);
|
||||
}
|
||||
|
||||
static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
|
||||
|
|
|
@ -389,14 +389,14 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
|
|||
spin_unlock_irqrestore(&dpu_crtc->spin_lock, flags);
|
||||
|
||||
if (!fevent) {
|
||||
DRM_ERROR("crtc%d event %d overflow\n", crtc->base.id, event);
|
||||
DRM_ERROR_RATELIMITED("crtc%d event %d overflow\n", crtc->base.id, event);
|
||||
return;
|
||||
}
|
||||
|
||||
fevent->event = event;
|
||||
fevent->crtc = crtc;
|
||||
fevent->ts = ktime_get();
|
||||
kthread_queue_work(&priv->event_thread[crtc_id].worker, &fevent->work);
|
||||
kthread_queue_work(priv->event_thread[crtc_id].worker, &fevent->work);
|
||||
}
|
||||
|
||||
void dpu_crtc_complete_commit(struct drm_crtc *crtc)
|
||||
|
|
|
@ -208,6 +208,36 @@ struct dpu_encoder_virt {
|
|||
|
||||
#define to_dpu_encoder_virt(x) container_of(x, struct dpu_encoder_virt, base)
|
||||
|
||||
static u32 dither_matrix[DITHER_MATRIX_SZ] = {
|
||||
15, 7, 13, 5, 3, 11, 1, 9, 12, 4, 14, 6, 0, 8, 2, 10
|
||||
};
|
||||
|
||||
static void _dpu_encoder_setup_dither(struct dpu_hw_pingpong *hw_pp, unsigned bpc)
|
||||
{
|
||||
struct dpu_hw_dither_cfg dither_cfg = { 0 };
|
||||
|
||||
if (!hw_pp->ops.setup_dither)
|
||||
return;
|
||||
|
||||
switch (bpc) {
|
||||
case 6:
|
||||
dither_cfg.c0_bitdepth = 6;
|
||||
dither_cfg.c1_bitdepth = 6;
|
||||
dither_cfg.c2_bitdepth = 6;
|
||||
dither_cfg.c3_bitdepth = 6;
|
||||
dither_cfg.temporal_en = 0;
|
||||
break;
|
||||
default:
|
||||
hw_pp->ops.setup_dither(hw_pp, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&dither_cfg.matrix, dither_matrix,
|
||||
sizeof(u32) * DITHER_MATRIX_SZ);
|
||||
|
||||
hw_pp->ops.setup_dither(hw_pp, &dither_cfg);
|
||||
}
|
||||
|
||||
void dpu_encoder_helper_report_irq_timeout(struct dpu_encoder_phys *phys_enc,
|
||||
enum dpu_intr_idx intr_idx)
|
||||
{
|
||||
|
@ -1058,7 +1088,7 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
|
|||
{
|
||||
struct dpu_encoder_virt *dpu_enc = NULL;
|
||||
struct msm_drm_private *priv;
|
||||
struct dpu_kms *dpu_kms;
|
||||
int i;
|
||||
|
||||
if (!drm_enc || !drm_enc->dev) {
|
||||
DPU_ERROR("invalid parameters\n");
|
||||
|
@ -1066,7 +1096,6 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
|
|||
}
|
||||
|
||||
priv = drm_enc->dev->dev_private;
|
||||
dpu_kms = to_dpu_kms(priv->kms);
|
||||
|
||||
dpu_enc = to_dpu_encoder_virt(drm_enc);
|
||||
if (!dpu_enc || !dpu_enc->cur_master) {
|
||||
|
@ -1074,13 +1103,17 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
|
|||
return;
|
||||
}
|
||||
|
||||
if (dpu_enc->cur_master->hw_mdptop &&
|
||||
dpu_enc->cur_master->hw_mdptop->ops.reset_ubwc)
|
||||
dpu_enc->cur_master->hw_mdptop->ops.reset_ubwc(
|
||||
dpu_enc->cur_master->hw_mdptop,
|
||||
dpu_kms->catalog);
|
||||
|
||||
_dpu_encoder_update_vsync_source(dpu_enc, &dpu_enc->disp_info);
|
||||
|
||||
if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI &&
|
||||
!WARN_ON(dpu_enc->num_phys_encs == 0)) {
|
||||
unsigned bpc = dpu_enc->phys_encs[0]->connector->display_info.bpc;
|
||||
for (i = 0; i < MAX_CHANNELS_PER_ENC; i++) {
|
||||
if (!dpu_enc->hw_pp[i])
|
||||
continue;
|
||||
_dpu_encoder_setup_dither(dpu_enc->hw_pp[i], bpc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dpu_encoder_virt_runtime_resume(struct drm_encoder *drm_enc)
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
|
||||
#define DSPP_SC7180_MASK BIT(DPU_DSPP_PCC)
|
||||
|
||||
#define INTF_SDM845_MASK (0)
|
||||
|
||||
#define INTF_SC7180_MASK BIT(DPU_INTF_INPUT_CTRL) | BIT(DPU_INTF_TE)
|
||||
|
||||
#define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)
|
||||
#define DEFAULT_DPU_LINE_WIDTH 2048
|
||||
#define DEFAULT_DPU_OUTPUT_LINE_WIDTH 2560
|
||||
|
@ -70,6 +74,10 @@ static const struct dpu_caps sdm845_dpu_caps = {
|
|||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_caps sc7180_dpu_caps = {
|
||||
|
@ -80,6 +88,39 @@ static const struct dpu_caps sc7180_dpu_caps = {
|
|||
.ubwc_version = DPU_HW_UBWC_VER_20,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_caps sm8150_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3,
|
||||
.smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */
|
||||
.ubwc_version = DPU_HW_UBWC_VER_30,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.max_hdeci_exp = MAX_HORZ_DECIMATION,
|
||||
.max_vdeci_exp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
static const struct dpu_caps sm8250_dpu_caps = {
|
||||
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.max_mixer_blendstages = 0xb,
|
||||
.max_linewidth = 4096,
|
||||
.qseed_type = DPU_SSPP_SCALER_QSEED3, /* TODO: qseed3 lite */
|
||||
.smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */
|
||||
.ubwc_version = DPU_HW_UBWC_VER_40,
|
||||
.has_src_split = true,
|
||||
.has_dim_layer = true,
|
||||
.has_idle_pc = true,
|
||||
.has_3d_merge = true,
|
||||
.max_linewidth = 4096,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sdm845_mdp[] = {
|
||||
|
@ -117,10 +158,37 @@ static const struct dpu_mdp_cfg sc7180_mdp[] = {
|
|||
.reg_off = 0x2AC, .bit_off = 0},
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = {
|
||||
.reg_off = 0x2AC, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR0] = {
|
||||
.reg_off = 0x2B4, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR1] = {
|
||||
.reg_off = 0x2C4, .bit_off = 8},
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_mdp_cfg sm8250_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x45C,
|
||||
.features = 0,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = {
|
||||
.reg_off = 0x2AC, .bit_off = 0},
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG1] = {
|
||||
.reg_off = 0x2B4, .bit_off = 0},
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG2] = {
|
||||
.reg_off = 0x2BC, .bit_off = 0},
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG3] = {
|
||||
.reg_off = 0x2C4, .bit_off = 0},
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA0] = {
|
||||
.reg_off = 0x2AC, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_DMA1] = {
|
||||
.reg_off = 0x2B4, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR0] = {
|
||||
.reg_off = 0x2BC, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_CURSOR1] = {
|
||||
.reg_off = 0x2C4, .bit_off = 8},
|
||||
.clk_ctrls[DPU_CLK_CTRL_REG_DMA] = {
|
||||
.reg_off = 0x2BC, .bit_off = 20},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -173,21 +241,47 @@ static const struct dpu_ctl_cfg sc7180_ctl[] = {
|
|||
},
|
||||
};
|
||||
|
||||
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)
|
||||
},
|
||||
{
|
||||
.name = "ctl_1", .id = CTL_1,
|
||||
.base = 0x1200, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY)
|
||||
},
|
||||
{
|
||||
.name = "ctl_2", .id = CTL_2,
|
||||
.base = 0x1400, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
},
|
||||
{
|
||||
.name = "ctl_3", .id = CTL_3,
|
||||
.base = 0x1600, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
},
|
||||
{
|
||||
.name = "ctl_4", .id = CTL_4,
|
||||
.base = 0x1800, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
},
|
||||
{
|
||||
.name = "ctl_5", .id = CTL_5,
|
||||
.base = 0x1a00, .len = 0x1e0,
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG)
|
||||
},
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* SSPP sub blocks config
|
||||
*************************************************************/
|
||||
|
||||
/* SSPP common configuration */
|
||||
static const struct dpu_sspp_blks_common sdm845_sspp_common = {
|
||||
.maxlinewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
|
||||
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
|
||||
.maxhdeciexp = MAX_HORZ_DECIMATION,
|
||||
.maxvdeciexp = MAX_VERT_DECIMATION,
|
||||
};
|
||||
|
||||
#define _VIG_SBLK(num, sdma_pri, qseed_ver) \
|
||||
{ \
|
||||
.common = &sdm845_sspp_common, \
|
||||
.maxdwnscale = MAX_DOWNSCALE_RATIO, \
|
||||
.maxupscale = MAX_UPSCALE_RATIO, \
|
||||
.smart_dma_priority = sdma_pri, \
|
||||
|
@ -207,7 +301,6 @@ static const struct dpu_sspp_blks_common sdm845_sspp_common = {
|
|||
|
||||
#define _DMA_SBLK(num, sdma_pri) \
|
||||
{ \
|
||||
.common = &sdm845_sspp_common, \
|
||||
.maxdwnscale = SSPP_UNITY_SCALE, \
|
||||
.maxupscale = SSPP_UNITY_SCALE, \
|
||||
.smart_dma_priority = sdma_pri, \
|
||||
|
@ -272,10 +365,10 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
|
|||
sc7180_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
|
||||
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, DMA_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA1),
|
||||
SSPP_BLK("sspp_9", SSPP_DMA1, 0x26000, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_1, 5, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR0),
|
||||
SSPP_BLK("sspp_10", SSPP_DMA2, 0x28000, DMA_CURSOR_SDM845_MASK,
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR0),
|
||||
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
|
@ -336,6 +429,23 @@ static const struct dpu_lm_cfg sc7180_lm[] = {
|
|||
&sc7180_lm_sblk, PINGPONG_1, LM_0, 0),
|
||||
};
|
||||
|
||||
/* SM8150 */
|
||||
|
||||
static const struct dpu_lm_cfg sm8150_lm[] = {
|
||||
LM_BLK("lm_0", LM_0, 0x44000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_0, LM_1, 0),
|
||||
LM_BLK("lm_1", LM_1, 0x45000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_1, LM_0, 0),
|
||||
LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_2, LM_3, 0),
|
||||
LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
|
||||
LM_BLK("lm_4", LM_4, 0x48000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_4, LM_5, 0),
|
||||
LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
|
||||
&sdm845_lm_sblk, PINGPONG_5, LM_4, 0),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* DSPP sub blocks config
|
||||
*************************************************************/
|
||||
|
@ -355,6 +465,7 @@ static const struct dpu_dspp_sub_blks sc7180_dspp_sblk = {
|
|||
static const struct dpu_dspp_cfg sc7180_dspp[] = {
|
||||
DSPP_BLK("dspp_0", DSPP_0, 0x54000),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* PINGPONG sub blocks config
|
||||
*************************************************************/
|
||||
|
@ -397,29 +508,45 @@ static struct dpu_pingpong_cfg sc7180_pp[] = {
|
|||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800),
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg sm8150_pp[] = {
|
||||
PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000),
|
||||
PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800),
|
||||
PP_BLK("pingpong_2", PINGPONG_2, 0x71000),
|
||||
PP_BLK("pingpong_3", PINGPONG_3, 0x71800),
|
||||
PP_BLK("pingpong_4", PINGPONG_4, 0x72000),
|
||||
PP_BLK("pingpong_5", PINGPONG_5, 0x72800),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* INTF sub blocks config
|
||||
*************************************************************/
|
||||
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id) \
|
||||
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id, _features) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = 0x280, \
|
||||
.features = BIT(DPU_CTL_ACTIVE_CFG), \
|
||||
.features = _features, \
|
||||
.type = _type, \
|
||||
.controller_id = _ctrl_id, \
|
||||
.prog_fetch_lines_worst_case = 24 \
|
||||
}
|
||||
|
||||
static const struct dpu_intf_cfg sdm845_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1),
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, INTF_SDM845_MASK),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, INTF_SDM845_MASK),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc7180_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0),
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SC7180_MASK),
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8150_intf[] = {
|
||||
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, INTF_SC7180_MASK),
|
||||
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, INTF_SC7180_MASK),
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
|
@ -452,6 +579,18 @@ static const struct dpu_reg_dma_cfg sdm845_regdma = {
|
|||
.base = 0x0, .version = 0x1, .trigger_sel_off = 0x119c
|
||||
};
|
||||
|
||||
static const struct dpu_reg_dma_cfg sm8150_regdma = {
|
||||
.base = 0x0, .version = 0x00010001, .trigger_sel_off = 0x119c
|
||||
};
|
||||
|
||||
static const struct dpu_reg_dma_cfg sm8250_regdma = {
|
||||
.base = 0x0,
|
||||
.version = 0x00010002,
|
||||
.trigger_sel_off = 0x119c,
|
||||
.xin_id = 7,
|
||||
.clk_ctrl = DPU_CLK_CTRL_REG_DMA,
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* PERF data config
|
||||
*************************************************************/
|
||||
|
@ -476,6 +615,10 @@ static const struct dpu_qos_lut_entry sc7180_qos_linear[] = {
|
|||
{.fl = 0, .lut = 0x0011222222335777},
|
||||
};
|
||||
|
||||
static const struct dpu_qos_lut_entry sm8150_qos_linear[] = {
|
||||
{.fl = 0, .lut = 0x0011222222223357 },
|
||||
};
|
||||
|
||||
static const struct dpu_qos_lut_entry sdm845_qos_macrotile[] = {
|
||||
{.fl = 10, .lut = 0x344556677},
|
||||
{.fl = 11, .lut = 0x3344556677},
|
||||
|
@ -560,6 +703,56 @@ static const struct dpu_perf_cfg sc7180_perf_data = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8150_perf_data = {
|
||||
.max_bw_low = 12800000,
|
||||
.max_bw_high = 12800000,
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sm8150_qos_linear),
|
||||
.entries = sm8150_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_perf_cfg sm8250_perf_data = {
|
||||
.max_bw_low = 13700000,
|
||||
.max_bw_high = 16600000,
|
||||
.min_core_ib = 4800000,
|
||||
.min_llcc_ib = 0,
|
||||
.min_dram_ib = 800000,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.qos_lut_tbl = {
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
|
||||
.entries = sc7180_qos_linear
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
|
||||
.entries = sc7180_qos_macrotile
|
||||
},
|
||||
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
|
||||
.entries = sc7180_qos_nrt
|
||||
},
|
||||
/* TODO: macrotile-qseed is different from macrotile */
|
||||
},
|
||||
.cdp_cfg = {
|
||||
{.rd_enable = 1, .wr_enable = 1},
|
||||
{.rd_enable = 1, .wr_enable = 0}
|
||||
},
|
||||
};
|
||||
|
||||
/*************************************************************
|
||||
* Hardware catalog init
|
||||
*************************************************************/
|
||||
|
@ -624,9 +817,71 @@ static void sc7180_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
|||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* sm8150_cfg_init(): populate sm8150 dpu sub-blocks reg offsets
|
||||
* and instance counts.
|
||||
*/
|
||||
static void sm8150_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
||||
{
|
||||
*dpu_cfg = (struct dpu_mdss_cfg){
|
||||
.caps = &sm8150_dpu_caps,
|
||||
.mdp_count = ARRAY_SIZE(sdm845_mdp),
|
||||
.mdp = sdm845_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8150_ctl),
|
||||
.ctl = sm8150_ctl,
|
||||
.sspp_count = ARRAY_SIZE(sdm845_sspp),
|
||||
.sspp = sdm845_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8150_lm),
|
||||
.mixer = sm8150_lm,
|
||||
.pingpong_count = ARRAY_SIZE(sm8150_pp),
|
||||
.pingpong = sm8150_pp,
|
||||
.intf_count = ARRAY_SIZE(sm8150_intf),
|
||||
.intf = sm8150_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = sm8150_regdma,
|
||||
.perf = sm8150_perf_data,
|
||||
.mdss_irqs = 0x3ff,
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* sm8250_cfg_init(): populate sm8250 dpu sub-blocks reg offsets
|
||||
* and instance counts.
|
||||
*/
|
||||
static void sm8250_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
|
||||
{
|
||||
*dpu_cfg = (struct dpu_mdss_cfg){
|
||||
.caps = &sm8250_dpu_caps,
|
||||
.mdp_count = ARRAY_SIZE(sm8250_mdp),
|
||||
.mdp = sm8250_mdp,
|
||||
.ctl_count = ARRAY_SIZE(sm8150_ctl),
|
||||
.ctl = sm8150_ctl,
|
||||
/* TODO: sspp qseed version differs from 845 */
|
||||
.sspp_count = ARRAY_SIZE(sdm845_sspp),
|
||||
.sspp = sdm845_sspp,
|
||||
.mixer_count = ARRAY_SIZE(sm8150_lm),
|
||||
.mixer = sm8150_lm,
|
||||
.pingpong_count = ARRAY_SIZE(sm8150_pp),
|
||||
.pingpong = sm8150_pp,
|
||||
.intf_count = ARRAY_SIZE(sm8150_intf),
|
||||
.intf = sm8150_intf,
|
||||
.vbif_count = ARRAY_SIZE(sdm845_vbif),
|
||||
.vbif = sdm845_vbif,
|
||||
.reg_dma_count = 1,
|
||||
.dma_cfg = sm8250_regdma,
|
||||
.perf = sm8250_perf_data,
|
||||
.mdss_irqs = 0xff,
|
||||
};
|
||||
}
|
||||
|
||||
static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
|
||||
{ .hw_rev = DPU_HW_VER_400, .cfg_init = sdm845_cfg_init},
|
||||
{ .hw_rev = DPU_HW_VER_401, .cfg_init = sdm845_cfg_init},
|
||||
{ .hw_rev = DPU_HW_VER_500, .cfg_init = sm8150_cfg_init},
|
||||
{ .hw_rev = DPU_HW_VER_501, .cfg_init = sm8150_cfg_init},
|
||||
{ .hw_rev = DPU_HW_VER_600, .cfg_init = sm8250_cfg_init},
|
||||
{ .hw_rev = DPU_HW_VER_620, .cfg_init = sc7180_cfg_init},
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@
|
|||
#define DPU_HW_VER_400 DPU_HW_VER(4, 0, 0) /* sdm845 v1.0 */
|
||||
#define DPU_HW_VER_401 DPU_HW_VER(4, 0, 1) /* sdm845 v2.0 */
|
||||
#define DPU_HW_VER_410 DPU_HW_VER(4, 1, 0) /* sdm670 v1.0 */
|
||||
#define DPU_HW_VER_500 DPU_HW_VER(5, 0, 0) /* sdm855 v1.0 */
|
||||
#define DPU_HW_VER_500 DPU_HW_VER(5, 0, 0) /* sm8150 v1.0 */
|
||||
#define DPU_HW_VER_501 DPU_HW_VER(5, 0, 1) /* sm8150 v2.0 */
|
||||
#define DPU_HW_VER_600 DPU_HW_VER(6, 0, 0) /* sm8250 */
|
||||
#define DPU_HW_VER_620 DPU_HW_VER(6, 2, 0) /* sc7180 v1.0 */
|
||||
|
||||
|
||||
|
@ -65,10 +67,9 @@ enum {
|
|||
DPU_HW_UBWC_VER_10 = 0x100,
|
||||
DPU_HW_UBWC_VER_20 = 0x200,
|
||||
DPU_HW_UBWC_VER_30 = 0x300,
|
||||
DPU_HW_UBWC_VER_40 = 0x400,
|
||||
};
|
||||
|
||||
#define IS_UBWC_20_SUPPORTED(rev) ((rev) >= DPU_HW_UBWC_VER_20)
|
||||
|
||||
/**
|
||||
* MDP TOP BLOCK features
|
||||
* @DPU_MDP_PANIC_PER_PIPE Panic configuration needs to be be done per pipe
|
||||
|
@ -185,6 +186,19 @@ enum {
|
|||
DPU_CTL_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* INTF sub-blocks
|
||||
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
|
||||
* pixel data arrives to this INTF
|
||||
* @DPU_INTF_TE INTF block has TE configuration support
|
||||
* @DPU_INTF_MAX
|
||||
*/
|
||||
enum {
|
||||
DPU_INTF_INPUT_CTRL = 0x1,
|
||||
DPU_INTF_TE,
|
||||
DPU_INTF_MAX
|
||||
};
|
||||
|
||||
/**
|
||||
* VBIF sub-blocks and features
|
||||
* @DPU_VBIF_QOS_OTLIM VBIF supports OT Limit
|
||||
|
@ -300,6 +314,10 @@ struct dpu_qos_lut_tbl {
|
|||
* @has_dim_layer dim layer feature status
|
||||
* @has_idle_pc indicate if idle power collapse feature is supported
|
||||
* @has_3d_merge indicate if 3D merge is supported
|
||||
* @max_linewidth max linewidth for sspp
|
||||
* @pixel_ram_size size of latency hiding and de-tiling buffer in bytes
|
||||
* @max_hdeci_exp max horizontal decimation supported (max is 2^value)
|
||||
* @max_vdeci_exp max vertical decimation supported (max is 2^value)
|
||||
*/
|
||||
struct dpu_caps {
|
||||
u32 max_mixer_width;
|
||||
|
@ -311,22 +329,11 @@ struct dpu_caps {
|
|||
bool has_dim_layer;
|
||||
bool has_idle_pc;
|
||||
bool has_3d_merge;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_sspp_blks_common : SSPP sub-blocks common configuration
|
||||
* @maxwidth: max pixelwidth supported by this pipe
|
||||
* @pixel_ram_size: size of latency hiding and de-tiling buffer in bytes
|
||||
* @maxhdeciexp: max horizontal decimation supported by this pipe
|
||||
* (max is 2^value)
|
||||
* @maxvdeciexp: max vertical decimation supported by this pipe
|
||||
* (max is 2^value)
|
||||
*/
|
||||
struct dpu_sspp_blks_common {
|
||||
u32 maxlinewidth;
|
||||
/* SSPP limits */
|
||||
u32 max_linewidth;
|
||||
u32 pixel_ram_size;
|
||||
u32 maxhdeciexp;
|
||||
u32 maxvdeciexp;
|
||||
u32 max_hdeci_exp;
|
||||
u32 max_vdeci_exp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -352,7 +359,6 @@ struct dpu_sspp_blks_common {
|
|||
* @virt_num_formats: Number of supported formats for virtual planes
|
||||
*/
|
||||
struct dpu_sspp_sub_blks {
|
||||
const struct dpu_sspp_blks_common *common;
|
||||
u32 creq_vblank;
|
||||
u32 danger_vblank;
|
||||
u32 maxdwnscale;
|
||||
|
@ -423,6 +429,7 @@ enum dpu_clk_ctrl_type {
|
|||
DPU_CLK_CTRL_CURSOR0,
|
||||
DPU_CLK_CTRL_CURSOR1,
|
||||
DPU_CLK_CTRL_INLINE_ROT0_SSPP,
|
||||
DPU_CLK_CTRL_REG_DMA,
|
||||
DPU_CLK_CTRL_MAX,
|
||||
};
|
||||
|
||||
|
@ -447,7 +454,6 @@ struct dpu_clk_ctrl_reg {
|
|||
struct dpu_mdp_cfg {
|
||||
DPU_HW_BLK_INFO;
|
||||
u32 highest_bank_bit;
|
||||
u32 ubwc_static;
|
||||
u32 ubwc_swizzle;
|
||||
struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX];
|
||||
};
|
||||
|
@ -607,6 +613,8 @@ struct dpu_reg_dma_cfg {
|
|||
DPU_HW_BLK_INFO;
|
||||
u32 version;
|
||||
u32 trigger_sel_off;
|
||||
u32 xin_id;
|
||||
enum dpu_clk_ctrl_type clk_ctrl;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -245,30 +245,14 @@ static int dpu_hw_ctl_get_bitmask_intf(struct dpu_hw_ctl *ctx,
|
|||
static int dpu_hw_ctl_get_bitmask_intf_v1(struct dpu_hw_ctl *ctx,
|
||||
u32 *flushbits, enum dpu_intf intf)
|
||||
{
|
||||
switch (intf) {
|
||||
case INTF_0:
|
||||
case INTF_1:
|
||||
*flushbits |= BIT(31);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dpu_hw_ctl_active_get_bitmask_intf(struct dpu_hw_ctl *ctx,
|
||||
u32 *flushbits, enum dpu_intf intf)
|
||||
{
|
||||
switch (intf) {
|
||||
case INTF_0:
|
||||
*flushbits |= BIT(0);
|
||||
break;
|
||||
case INTF_1:
|
||||
*flushbits |= BIT(1);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
*flushbits |= BIT(intf - INTF_0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,11 +107,6 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
|
|||
display_v_end = ((vsync_period - p->v_front_porch) * hsync_period) +
|
||||
p->hsync_skew - 1;
|
||||
|
||||
if (ctx->cap->type == INTF_EDP || ctx->cap->type == INTF_DP) {
|
||||
display_v_start += p->hsync_pulse_width + p->h_back_porch;
|
||||
display_v_end -= p->h_front_porch;
|
||||
}
|
||||
|
||||
hsync_start_x = p->h_back_porch + p->hsync_pulse_width;
|
||||
hsync_end_x = hsync_period - p->h_front_porch - 1;
|
||||
|
||||
|
@ -144,10 +139,25 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
|
|||
hsync_ctl = (hsync_period << 16) | p->hsync_pulse_width;
|
||||
display_hctl = (hsync_end_x << 16) | hsync_start_x;
|
||||
|
||||
if (ctx->cap->type == INTF_EDP || ctx->cap->type == INTF_DP) {
|
||||
active_h_start = hsync_start_x;
|
||||
active_h_end = active_h_start + p->xres - 1;
|
||||
active_v_start = display_v_start;
|
||||
active_v_end = active_v_start + (p->yres * hsync_period) - 1;
|
||||
|
||||
display_v_start += p->hsync_pulse_width + p->h_back_porch;
|
||||
|
||||
active_hctl = (active_h_end << 16) | active_h_start;
|
||||
display_hctl = active_hctl;
|
||||
}
|
||||
|
||||
den_polarity = 0;
|
||||
if (ctx->cap->type == INTF_HDMI) {
|
||||
hsync_polarity = p->yres >= 720 ? 0 : 1;
|
||||
vsync_polarity = p->yres >= 720 ? 0 : 1;
|
||||
} else if (ctx->cap->type == INTF_DP) {
|
||||
hsync_polarity = p->hsync_polarity;
|
||||
vsync_polarity = p->vsync_polarity;
|
||||
} else {
|
||||
hsync_polarity = 0;
|
||||
vsync_polarity = 0;
|
||||
|
@ -225,14 +235,9 @@ static void dpu_hw_intf_bind_pingpong_blk(
|
|||
bool enable,
|
||||
const enum dpu_pingpong pp)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
struct dpu_hw_blk_reg_map *c = &intf->hw;
|
||||
u32 mux_cfg;
|
||||
|
||||
if (!intf)
|
||||
return;
|
||||
|
||||
c = &intf->hw;
|
||||
|
||||
mux_cfg = DPU_REG_READ(c, INTF_MUX);
|
||||
mux_cfg &= ~0xf;
|
||||
|
||||
|
@ -280,7 +285,7 @@ static void _setup_intf_ops(struct dpu_hw_intf_ops *ops,
|
|||
ops->get_status = dpu_hw_intf_get_status;
|
||||
ops->enable_timing = dpu_hw_intf_enable_timing_engine;
|
||||
ops->get_line_count = dpu_hw_intf_get_line_count;
|
||||
if (cap & BIT(DPU_CTL_ACTIVE_CFG))
|
||||
if (cap & BIT(DPU_INTF_INPUT_CTRL))
|
||||
ops->bind_pingpong_blk = dpu_hw_intf_bind_pingpong_blk;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,14 +152,13 @@ static void _setup_mixer_ops(const struct dpu_mdss_cfg *m,
|
|||
unsigned long features)
|
||||
{
|
||||
ops->setup_mixer_out = dpu_hw_lm_setup_out;
|
||||
if (IS_SDM845_TARGET(m->hwversion) || IS_SDM670_TARGET(m->hwversion)
|
||||
|| IS_SC7180_TARGET(m->hwversion))
|
||||
if (m->hwversion >= DPU_HW_VER_400)
|
||||
ops->setup_blend_config = dpu_hw_lm_setup_blend_config_sdm845;
|
||||
else
|
||||
ops->setup_blend_config = dpu_hw_lm_setup_blend_config;
|
||||
ops->setup_alpha_out = dpu_hw_lm_setup_color3;
|
||||
ops->setup_border_color = dpu_hw_lm_setup_border_color;
|
||||
};
|
||||
}
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
||||
|
|
|
@ -171,6 +171,7 @@ enum dpu_ctl {
|
|||
CTL_2,
|
||||
CTL_3,
|
||||
CTL_4,
|
||||
CTL_5,
|
||||
CTL_MAX
|
||||
};
|
||||
|
||||
|
@ -180,6 +181,7 @@ enum dpu_pingpong {
|
|||
PINGPONG_2,
|
||||
PINGPONG_3,
|
||||
PINGPONG_4,
|
||||
PINGPONG_5,
|
||||
PINGPONG_S0,
|
||||
PINGPONG_MAX
|
||||
};
|
||||
|
|
|
@ -28,6 +28,16 @@
|
|||
#define PP_FBC_BUDGET_CTL 0x038
|
||||
#define PP_FBC_LOSSY_MODE 0x03C
|
||||
|
||||
#define PP_DITHER_EN 0x000
|
||||
#define PP_DITHER_BITDEPTH 0x004
|
||||
#define PP_DITHER_MATRIX 0x008
|
||||
|
||||
#define DITHER_DEPTH_MAP_INDEX 9
|
||||
|
||||
static u32 dither_depth_map[DITHER_DEPTH_MAP_INDEX] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 1, 2
|
||||
};
|
||||
|
||||
static const struct dpu_pingpong_cfg *_pingpong_offset(enum dpu_pingpong pp,
|
||||
const struct dpu_mdss_cfg *m,
|
||||
void __iomem *addr,
|
||||
|
@ -49,6 +59,37 @@ static const struct dpu_pingpong_cfg *_pingpong_offset(enum dpu_pingpong pp,
|
|||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
static void dpu_hw_pp_setup_dither(struct dpu_hw_pingpong *pp,
|
||||
struct dpu_hw_dither_cfg *cfg)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
u32 i, base, data = 0;
|
||||
|
||||
c = &pp->hw;
|
||||
base = pp->caps->sblk->dither.base;
|
||||
if (!cfg) {
|
||||
DPU_REG_WRITE(c, base + PP_DITHER_EN, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
data = dither_depth_map[cfg->c0_bitdepth] & REG_MASK(2);
|
||||
data |= (dither_depth_map[cfg->c1_bitdepth] & REG_MASK(2)) << 2;
|
||||
data |= (dither_depth_map[cfg->c2_bitdepth] & REG_MASK(2)) << 4;
|
||||
data |= (dither_depth_map[cfg->c3_bitdepth] & REG_MASK(2)) << 6;
|
||||
data |= (cfg->temporal_en) ? (1 << 8) : 0;
|
||||
|
||||
DPU_REG_WRITE(c, base + PP_DITHER_BITDEPTH, data);
|
||||
|
||||
for (i = 0; i < DITHER_MATRIX_SZ - 3; i += 4) {
|
||||
data = (cfg->matrix[i] & REG_MASK(4)) |
|
||||
((cfg->matrix[i + 1] & REG_MASK(4)) << 4) |
|
||||
((cfg->matrix[i + 2] & REG_MASK(4)) << 8) |
|
||||
((cfg->matrix[i + 3] & REG_MASK(4)) << 12);
|
||||
DPU_REG_WRITE(c, base + PP_DITHER_MATRIX + i, data);
|
||||
}
|
||||
DPU_REG_WRITE(c, base + PP_DITHER_EN, 1);
|
||||
}
|
||||
|
||||
static int dpu_hw_pp_setup_te_config(struct dpu_hw_pingpong *pp,
|
||||
struct dpu_hw_tear_check *te)
|
||||
{
|
||||
|
@ -180,15 +221,18 @@ static u32 dpu_hw_pp_get_line_count(struct dpu_hw_pingpong *pp)
|
|||
return line;
|
||||
}
|
||||
|
||||
static void _setup_pingpong_ops(struct dpu_hw_pingpong_ops *ops,
|
||||
const struct dpu_pingpong_cfg *hw_cap)
|
||||
static void _setup_pingpong_ops(struct dpu_hw_pingpong *c,
|
||||
unsigned long features)
|
||||
{
|
||||
ops->setup_tearcheck = dpu_hw_pp_setup_te_config;
|
||||
ops->enable_tearcheck = dpu_hw_pp_enable_te;
|
||||
ops->connect_external_te = dpu_hw_pp_connect_external_te;
|
||||
ops->get_vsync_info = dpu_hw_pp_get_vsync_info;
|
||||
ops->poll_timeout_wr_ptr = dpu_hw_pp_poll_timeout_wr_ptr;
|
||||
ops->get_line_count = dpu_hw_pp_get_line_count;
|
||||
c->ops.setup_tearcheck = dpu_hw_pp_setup_te_config;
|
||||
c->ops.enable_tearcheck = dpu_hw_pp_enable_te;
|
||||
c->ops.connect_external_te = dpu_hw_pp_connect_external_te;
|
||||
c->ops.get_vsync_info = dpu_hw_pp_get_vsync_info;
|
||||
c->ops.poll_timeout_wr_ptr = dpu_hw_pp_poll_timeout_wr_ptr;
|
||||
c->ops.get_line_count = dpu_hw_pp_get_line_count;
|
||||
|
||||
if (test_bit(DPU_PINGPONG_DITHER, &features))
|
||||
c->ops.setup_dither = dpu_hw_pp_setup_dither;
|
||||
};
|
||||
|
||||
static struct dpu_hw_blk_ops dpu_hw_ops;
|
||||
|
@ -212,7 +256,7 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
|
|||
|
||||
c->idx = idx;
|
||||
c->caps = cfg;
|
||||
_setup_pingpong_ops(&c->ops, c->caps);
|
||||
_setup_pingpong_ops(c, c->caps->features);
|
||||
|
||||
dpu_hw_blk_init(&c->base, DPU_HW_BLK_PINGPONG, idx, &dpu_hw_ops);
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "dpu_hw_util.h"
|
||||
#include "dpu_hw_blk.h"
|
||||
|
||||
#define DITHER_MATRIX_SZ 16
|
||||
|
||||
struct dpu_hw_pingpong;
|
||||
|
||||
struct dpu_hw_tear_check {
|
||||
|
@ -34,6 +36,26 @@ struct dpu_hw_pp_vsync_info {
|
|||
u32 wr_ptr_line_count; /* current line within pp fifo (wr ptr) */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dpu_hw_dither_cfg - dither feature structure
|
||||
* @flags: for customizing operations
|
||||
* @temporal_en: temperal dither enable
|
||||
* @c0_bitdepth: c0 component bit depth
|
||||
* @c1_bitdepth: c1 component bit depth
|
||||
* @c2_bitdepth: c2 component bit depth
|
||||
* @c3_bitdepth: c2 component bit depth
|
||||
* @matrix: dither strength matrix
|
||||
*/
|
||||
struct dpu_hw_dither_cfg {
|
||||
u64 flags;
|
||||
u32 temporal_en;
|
||||
u32 c0_bitdepth;
|
||||
u32 c1_bitdepth;
|
||||
u32 c2_bitdepth;
|
||||
u32 c3_bitdepth;
|
||||
u32 matrix[DITHER_MATRIX_SZ];
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* struct dpu_hw_pingpong_ops : Interface to the pingpong Hw driver functions
|
||||
|
@ -82,6 +104,12 @@ struct dpu_hw_pingpong_ops {
|
|||
* Obtain current vertical line counter
|
||||
*/
|
||||
u32 (*get_line_count)(struct dpu_hw_pingpong *pp);
|
||||
|
||||
/**
|
||||
* Setup dither matix for pingpong block
|
||||
*/
|
||||
void (*setup_dither)(struct dpu_hw_pingpong *pp,
|
||||
struct dpu_hw_dither_cfg *cfg);
|
||||
};
|
||||
|
||||
struct dpu_hw_pingpong {
|
||||
|
|
|
@ -303,11 +303,25 @@ static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,
|
|||
DPU_REG_WRITE(c, SSPP_FETCH_CONFIG,
|
||||
DPU_FETCH_CONFIG_RESET_VALUE |
|
||||
ctx->mdp->highest_bank_bit << 18);
|
||||
if (IS_UBWC_20_SUPPORTED(ctx->catalog->caps->ubwc_version)) {
|
||||
switch (ctx->catalog->caps->ubwc_version) {
|
||||
case DPU_HW_UBWC_VER_10:
|
||||
/* TODO: UBWC v1 case */
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_20:
|
||||
fast_clear = fmt->alpha_enable ? BIT(31) : 0;
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
fast_clear | (ctx->mdp->ubwc_swizzle) |
|
||||
(ctx->mdp->highest_bank_bit << 4));
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_30:
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
BIT(30) | (ctx->mdp->ubwc_swizzle) |
|
||||
(ctx->mdp->highest_bank_bit << 4));
|
||||
break;
|
||||
case DPU_HW_UBWC_VER_40:
|
||||
DPU_REG_WRITE(c, SSPP_UBWC_STATIC_CTRL,
|
||||
DPU_FORMAT_IS_YUV(fmt) ? 0 : BIT(30));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "dpu_kms.h"
|
||||
|
||||
#define SSPP_SPARE 0x28
|
||||
#define UBWC_STATIC 0x144
|
||||
|
||||
#define FLD_SPLIT_DISPLAY_CMD BIT(1)
|
||||
#define FLD_SMART_PANEL_FREE_RUN BIT(2)
|
||||
|
@ -249,22 +248,6 @@ static void dpu_hw_get_safe_status(struct dpu_hw_mdp *mdp,
|
|||
status->sspp[SSPP_CURSOR1] = (value >> 26) & 0x1;
|
||||
}
|
||||
|
||||
static void dpu_hw_reset_ubwc(struct dpu_hw_mdp *mdp, struct dpu_mdss_cfg *m)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map c;
|
||||
|
||||
if (!mdp || !m)
|
||||
return;
|
||||
|
||||
if (!IS_UBWC_20_SUPPORTED(m->caps->ubwc_version))
|
||||
return;
|
||||
|
||||
/* force blk offset to zero to access beginning of register region */
|
||||
c = mdp->hw;
|
||||
c.blk_off = 0x0;
|
||||
DPU_REG_WRITE(&c, UBWC_STATIC, m->mdp[0].ubwc_static);
|
||||
}
|
||||
|
||||
static void dpu_hw_intf_audio_select(struct dpu_hw_mdp *mdp)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c;
|
||||
|
@ -285,7 +268,6 @@ static void _setup_mdp_ops(struct dpu_hw_mdp_ops *ops,
|
|||
ops->get_danger_status = dpu_hw_get_danger_status;
|
||||
ops->setup_vsync_source = dpu_hw_setup_vsync_source;
|
||||
ops->get_safe_status = dpu_hw_get_safe_status;
|
||||
ops->reset_ubwc = dpu_hw_reset_ubwc;
|
||||
ops->intf_audio_select = dpu_hw_intf_audio_select;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,13 +126,6 @@ struct dpu_hw_mdp_ops {
|
|||
void (*get_safe_status)(struct dpu_hw_mdp *mdp,
|
||||
struct dpu_danger_safe_status *status);
|
||||
|
||||
/**
|
||||
* reset_ubwc - reset top level UBWC configuration
|
||||
* @mdp: mdp top context driver
|
||||
* @m: pointer to mdss catalog data
|
||||
*/
|
||||
void (*reset_ubwc)(struct dpu_hw_mdp *mdp, struct dpu_mdss_cfg *m);
|
||||
|
||||
/**
|
||||
* intf_audio_select - select the external interface for audio
|
||||
* @mdp: mdp top context driver
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/debugfs.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/pm_opp.h>
|
||||
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_file.h>
|
||||
|
@ -45,20 +46,6 @@
|
|||
static int dpu_kms_hw_init(struct msm_kms *kms);
|
||||
static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms);
|
||||
|
||||
static unsigned long dpu_iomap_size(struct platform_device *pdev,
|
||||
const char *name)
|
||||
{
|
||||
struct resource *res;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
|
||||
if (!res) {
|
||||
DRM_ERROR("failed to get memory resource: %s\n", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return resource_size(res);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static int _dpu_danger_signal_status(struct seq_file *s,
|
||||
bool danger_status)
|
||||
|
@ -844,7 +831,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
|||
goto error;
|
||||
}
|
||||
DRM_DEBUG("mapped dpu address space @%pK\n", dpu_kms->mmio);
|
||||
dpu_kms->mmio_len = dpu_iomap_size(dpu_kms->pdev, "mdp");
|
||||
|
||||
dpu_kms->vbif[VBIF_RT] = msm_ioremap(dpu_kms->pdev, "vbif", "vbif");
|
||||
if (IS_ERR(dpu_kms->vbif[VBIF_RT])) {
|
||||
|
@ -853,22 +839,16 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
|||
dpu_kms->vbif[VBIF_RT] = NULL;
|
||||
goto error;
|
||||
}
|
||||
dpu_kms->vbif_len[VBIF_RT] = dpu_iomap_size(dpu_kms->pdev, "vbif");
|
||||
dpu_kms->vbif[VBIF_NRT] = msm_ioremap(dpu_kms->pdev, "vbif_nrt", "vbif_nrt");
|
||||
dpu_kms->vbif[VBIF_NRT] = msm_ioremap_quiet(dpu_kms->pdev, "vbif_nrt", "vbif_nrt");
|
||||
if (IS_ERR(dpu_kms->vbif[VBIF_NRT])) {
|
||||
dpu_kms->vbif[VBIF_NRT] = NULL;
|
||||
DPU_DEBUG("VBIF NRT is not defined");
|
||||
} else {
|
||||
dpu_kms->vbif_len[VBIF_NRT] = dpu_iomap_size(dpu_kms->pdev,
|
||||
"vbif_nrt");
|
||||
}
|
||||
|
||||
dpu_kms->reg_dma = msm_ioremap(dpu_kms->pdev, "regdma", "regdma");
|
||||
dpu_kms->reg_dma = msm_ioremap_quiet(dpu_kms->pdev, "regdma", "regdma");
|
||||
if (IS_ERR(dpu_kms->reg_dma)) {
|
||||
dpu_kms->reg_dma = NULL;
|
||||
DPU_DEBUG("REG_DMA is not defined");
|
||||
} else {
|
||||
dpu_kms->reg_dma_len = dpu_iomap_size(dpu_kms->pdev, "regdma");
|
||||
}
|
||||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
|
@ -1025,11 +1005,24 @@ 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);
|
||||
/* OPP table is optional */
|
||||
ret = dev_pm_opp_of_add_table(dev);
|
||||
if (!ret) {
|
||||
dpu_kms->has_opp_table = true;
|
||||
} else if (ret != -ENODEV) {
|
||||
dev_err(dev, "invalid OPP table in device tree\n");
|
||||
dev_pm_opp_put_clkname(dpu_kms->opp_table);
|
||||
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);
|
||||
return ret;
|
||||
goto err;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, dpu_kms);
|
||||
|
@ -1043,6 +1036,11 @@ static int dpu_bind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
priv->kms = &dpu_kms->base;
|
||||
return ret;
|
||||
err:
|
||||
if (dpu_kms->has_opp_table)
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
dev_pm_opp_put_clkname(dpu_kms->opp_table);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dpu_unbind(struct device *dev, struct device *master, void *data)
|
||||
|
@ -1057,6 +1055,10 @@ static void dpu_unbind(struct device *dev, struct device *master, void *data)
|
|||
|
||||
if (dpu_kms->rpm_enabled)
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
if (dpu_kms->has_opp_table)
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
dev_pm_opp_put_clkname(dpu_kms->opp_table);
|
||||
}
|
||||
|
||||
static const struct component_ops dpu_ops = {
|
||||
|
@ -1082,6 +1084,8 @@ static int __maybe_unused dpu_runtime_suspend(struct device *dev)
|
|||
struct dpu_kms *dpu_kms = platform_get_drvdata(pdev);
|
||||
struct dss_module_power *mp = &dpu_kms->mp;
|
||||
|
||||
/* Drop the performance state vote */
|
||||
dev_pm_opp_set_rate(dev, 0);
|
||||
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, false);
|
||||
if (rc)
|
||||
DPU_ERROR("clock disable failed rc:%d\n", rc);
|
||||
|
@ -1115,6 +1119,8 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev)
|
|||
|
||||
static const struct dev_pm_ops dpu_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(dpu_runtime_suspend, dpu_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static const struct of_device_id dpu_dt_match[] = {
|
||||
|
|
|
@ -100,7 +100,6 @@ struct dpu_kms {
|
|||
|
||||
/* io/register spaces: */
|
||||
void __iomem *mmio, *vbif[VBIF_MAX], *reg_dma;
|
||||
unsigned long mmio_len, vbif_len[VBIF_MAX], reg_dma_len;
|
||||
|
||||
struct regulator *vdd;
|
||||
struct regulator *mmagic;
|
||||
|
@ -128,6 +127,10 @@ struct dpu_kms {
|
|||
|
||||
struct platform_device *pdev;
|
||||
bool rpm_enabled;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
bool has_opp_table;
|
||||
|
||||
struct dss_module_power mp;
|
||||
|
||||
/* reference count bandwidth requests, so we know when we can
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
#define HW_REV 0x0
|
||||
#define HW_INTR_STATUS 0x0010
|
||||
|
||||
#define UBWC_STATIC 0x144
|
||||
#define UBWC_CTRL_2 0x150
|
||||
#define UBWC_PREDICTION_MODE 0x154
|
||||
|
||||
/* Max BW defined in KBps */
|
||||
#define MAX_BW 6800000
|
||||
|
||||
|
@ -23,65 +27,15 @@ struct dpu_irq_controller {
|
|||
struct irq_domain *domain;
|
||||
};
|
||||
|
||||
struct dpu_hw_cfg {
|
||||
u32 val;
|
||||
u32 offset;
|
||||
};
|
||||
|
||||
struct dpu_mdss_hw_init_handler {
|
||||
u32 hw_rev;
|
||||
u32 hw_reg_count;
|
||||
struct dpu_hw_cfg* hw_cfg;
|
||||
};
|
||||
|
||||
struct dpu_mdss {
|
||||
struct msm_mdss base;
|
||||
void __iomem *mmio;
|
||||
unsigned long mmio_len;
|
||||
struct dss_module_power mp;
|
||||
struct dpu_irq_controller irq_controller;
|
||||
struct icc_path *path[2];
|
||||
u32 num_paths;
|
||||
};
|
||||
|
||||
static struct dpu_hw_cfg hw_cfg[] = {
|
||||
{
|
||||
/* UBWC global settings */
|
||||
.val = 0x1E,
|
||||
.offset = 0x144,
|
||||
}
|
||||
};
|
||||
|
||||
static struct dpu_mdss_hw_init_handler cfg_handler[] = {
|
||||
{ .hw_rev = DPU_HW_VER_620,
|
||||
.hw_reg_count = ARRAY_SIZE(hw_cfg),
|
||||
.hw_cfg = hw_cfg
|
||||
},
|
||||
};
|
||||
|
||||
static void dpu_mdss_hw_init(struct dpu_mdss *dpu_mdss, u32 hw_rev)
|
||||
{
|
||||
int i;
|
||||
u32 count = 0;
|
||||
struct dpu_hw_cfg *hw_cfg = NULL;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) {
|
||||
if (cfg_handler[i].hw_rev == hw_rev) {
|
||||
hw_cfg = cfg_handler[i].hw_cfg;
|
||||
count = cfg_handler[i].hw_reg_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++ ) {
|
||||
writel_relaxed(hw_cfg->val,
|
||||
dpu_mdss->mmio + hw_cfg->offset);
|
||||
hw_cfg++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int dpu_mdss_parse_data_bus_icc_path(struct drm_device *dev,
|
||||
struct dpu_mdss *dpu_mdss)
|
||||
{
|
||||
|
@ -224,7 +178,6 @@ static int dpu_mdss_enable(struct msm_mdss *mdss)
|
|||
struct dpu_mdss *dpu_mdss = to_dpu_mdss(mdss);
|
||||
struct dss_module_power *mp = &dpu_mdss->mp;
|
||||
int ret;
|
||||
u32 mdss_rev;
|
||||
|
||||
dpu_mdss_icc_request_bw(mdss);
|
||||
|
||||
|
@ -234,8 +187,25 @@ static int dpu_mdss_enable(struct msm_mdss *mdss)
|
|||
return ret;
|
||||
}
|
||||
|
||||
mdss_rev = readl_relaxed(dpu_mdss->mmio + HW_REV);
|
||||
dpu_mdss_hw_init(dpu_mdss, mdss_rev);
|
||||
/*
|
||||
* ubwc config is part of the "mdss" region which is not accessible
|
||||
* from the rest of the driver. hardcode known configurations here
|
||||
*/
|
||||
switch (readl_relaxed(dpu_mdss->mmio + HW_REV)) {
|
||||
case DPU_HW_VER_500:
|
||||
case DPU_HW_VER_501:
|
||||
writel_relaxed(0x420, dpu_mdss->mmio + UBWC_STATIC);
|
||||
break;
|
||||
case DPU_HW_VER_600:
|
||||
/* TODO: 0x102e for LP_DDR4 */
|
||||
writel_relaxed(0x103e, dpu_mdss->mmio + UBWC_STATIC);
|
||||
writel_relaxed(2, dpu_mdss->mmio + UBWC_CTRL_2);
|
||||
writel_relaxed(1, dpu_mdss->mmio + UBWC_PREDICTION_MODE);
|
||||
break;
|
||||
case DPU_HW_VER_620:
|
||||
writel_relaxed(0x1e, dpu_mdss->mmio + UBWC_STATIC);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -292,7 +262,6 @@ int dpu_mdss_init(struct drm_device *dev)
|
|||
{
|
||||
struct platform_device *pdev = to_platform_device(dev->dev);
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct resource *res;
|
||||
struct dpu_mdss *dpu_mdss;
|
||||
struct dss_module_power *mp;
|
||||
int ret = 0;
|
||||
|
@ -308,13 +277,6 @@ int dpu_mdss_init(struct drm_device *dev)
|
|||
|
||||
DRM_DEBUG("mapped mdss address space @%pK\n", dpu_mdss->mmio);
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mdss");
|
||||
if (!res) {
|
||||
DRM_ERROR("failed to get memory resource for mdss\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
dpu_mdss->mmio_len = resource_size(res);
|
||||
|
||||
ret = dpu_mdss_parse_data_bus_icc_path(dev, dpu_mdss);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
@ -153,7 +153,7 @@ static int _dpu_plane_calc_fill_level(struct drm_plane *plane,
|
|||
|
||||
pdpu = to_dpu_plane(plane);
|
||||
pstate = to_dpu_plane_state(plane->state);
|
||||
fixed_buff_size = pdpu->pipe_sblk->common->pixel_ram_size;
|
||||
fixed_buff_size = pdpu->catalog->caps->pixel_ram_size;
|
||||
|
||||
list_for_each_entry(tmp, &pdpu->mplane_list, mplane_list) {
|
||||
if (!tmp->base.state->visible)
|
||||
|
@ -709,7 +709,7 @@ int dpu_plane_validate_multirect_v2(struct dpu_multirect_plane_states *plane)
|
|||
* So we cannot support more than half of the supported SSPP
|
||||
* width for tiled formats.
|
||||
*/
|
||||
width_threshold = dpu_plane[i]->pipe_sblk->common->maxlinewidth;
|
||||
width_threshold = dpu_plane[i]->catalog->caps->max_linewidth;
|
||||
if (has_tiled_rect)
|
||||
width_threshold /= 2;
|
||||
|
||||
|
@ -887,7 +887,7 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
|
|||
fb_rect.x2 = state->fb->width;
|
||||
fb_rect.y2 = state->fb->height;
|
||||
|
||||
max_linewidth = pdpu->pipe_sblk->common->maxlinewidth;
|
||||
max_linewidth = pdpu->catalog->caps->max_linewidth;
|
||||
|
||||
fmt = to_dpu_format(msm_framebuffer_format(state->fb));
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -910,6 +910,202 @@ static const struct mdp5_cfg_hw msm8998_config = {
|
|||
.max_clk = 412500000,
|
||||
};
|
||||
|
||||
static const struct mdp5_cfg_hw sdm630_config = {
|
||||
.name = "sdm630",
|
||||
.mdp = {
|
||||
.count = 1,
|
||||
.caps = MDP_CAP_CDM |
|
||||
MDP_CAP_SRC_SPLIT |
|
||||
0,
|
||||
},
|
||||
.ctl = {
|
||||
.count = 5,
|
||||
.base = { 0x01000, 0x01200, 0x01400, 0x01600, 0x01800 },
|
||||
.flush_hw_mask = 0xf4ffffff,
|
||||
},
|
||||
.pipe_vig = {
|
||||
.count = 1,
|
||||
.base = { 0x04000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SCALE |
|
||||
MDP_PIPE_CAP_CSC |
|
||||
MDP_PIPE_CAP_DECIMATION |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_rgb = {
|
||||
.count = 4,
|
||||
.base = { 0x14000, 0x16000, 0x18000, 0x1a000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SCALE |
|
||||
MDP_PIPE_CAP_DECIMATION |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_dma = {
|
||||
.count = 2, /* driver supports max of 2 currently */
|
||||
.base = { 0x24000, 0x26000, 0x28000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_cursor = {
|
||||
.count = 1,
|
||||
.base = { 0x34000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
MDP_PIPE_CAP_CURSOR |
|
||||
0,
|
||||
},
|
||||
|
||||
.lm = {
|
||||
.count = 2,
|
||||
.base = { 0x44000, 0x46000 },
|
||||
.instances = {
|
||||
{ .id = 0, .pp = 0, .dspp = 0,
|
||||
.caps = MDP_LM_CAP_DISPLAY |
|
||||
MDP_LM_CAP_PAIR, },
|
||||
{ .id = 1, .pp = 1, .dspp = -1,
|
||||
.caps = MDP_LM_CAP_WB, },
|
||||
},
|
||||
.nb_stages = 8,
|
||||
.max_width = 2048,
|
||||
.max_height = 0xFFFF,
|
||||
},
|
||||
.dspp = {
|
||||
.count = 1,
|
||||
.base = { 0x54000 },
|
||||
},
|
||||
.ad = {
|
||||
.count = 2,
|
||||
.base = { 0x78000, 0x78800 },
|
||||
},
|
||||
.pp = {
|
||||
.count = 3,
|
||||
.base = { 0x70000, 0x71000, 0x72000 },
|
||||
},
|
||||
.cdm = {
|
||||
.count = 1,
|
||||
.base = { 0x79200 },
|
||||
},
|
||||
.intf = {
|
||||
.base = { 0x6a000, 0x6a800 },
|
||||
.connect = {
|
||||
[0] = INTF_DISABLED,
|
||||
[1] = INTF_DSI,
|
||||
},
|
||||
},
|
||||
.max_clk = 412500000,
|
||||
};
|
||||
|
||||
static const struct mdp5_cfg_hw sdm660_config = {
|
||||
.name = "sdm660",
|
||||
.mdp = {
|
||||
.count = 1,
|
||||
.caps = MDP_CAP_DSC |
|
||||
MDP_CAP_CDM |
|
||||
MDP_CAP_SRC_SPLIT |
|
||||
0,
|
||||
},
|
||||
.ctl = {
|
||||
.count = 5,
|
||||
.base = { 0x01000, 0x01200, 0x01400, 0x01600, 0x01800 },
|
||||
.flush_hw_mask = 0xf4ffffff,
|
||||
},
|
||||
.pipe_vig = {
|
||||
.count = 2,
|
||||
.base = { 0x04000, 0x6000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SCALE |
|
||||
MDP_PIPE_CAP_CSC |
|
||||
MDP_PIPE_CAP_DECIMATION |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_rgb = {
|
||||
.count = 4,
|
||||
.base = { 0x14000, 0x16000, 0x18000, 0x1a000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SCALE |
|
||||
MDP_PIPE_CAP_DECIMATION |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_dma = {
|
||||
.count = 2, /* driver supports max of 2 currently */
|
||||
.base = { 0x24000, 0x26000, 0x28000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
0,
|
||||
},
|
||||
.pipe_cursor = {
|
||||
.count = 1,
|
||||
.base = { 0x34000 },
|
||||
.caps = MDP_PIPE_CAP_HFLIP |
|
||||
MDP_PIPE_CAP_VFLIP |
|
||||
MDP_PIPE_CAP_SW_PIX_EXT |
|
||||
MDP_PIPE_CAP_CURSOR |
|
||||
0,
|
||||
},
|
||||
|
||||
.lm = {
|
||||
.count = 4,
|
||||
.base = { 0x44000, 0x45000, 0x46000, 0x49000 },
|
||||
.instances = {
|
||||
{ .id = 0, .pp = 0, .dspp = 0,
|
||||
.caps = MDP_LM_CAP_DISPLAY |
|
||||
MDP_LM_CAP_PAIR, },
|
||||
{ .id = 1, .pp = 1, .dspp = 1,
|
||||
.caps = MDP_LM_CAP_DISPLAY, },
|
||||
{ .id = 2, .pp = 2, .dspp = -1,
|
||||
.caps = MDP_LM_CAP_DISPLAY |
|
||||
MDP_LM_CAP_PAIR, },
|
||||
{ .id = 3, .pp = 3, .dspp = -1,
|
||||
.caps = MDP_LM_CAP_WB, },
|
||||
},
|
||||
.nb_stages = 8,
|
||||
.max_width = 2560,
|
||||
.max_height = 0xFFFF,
|
||||
},
|
||||
.dspp = {
|
||||
.count = 2,
|
||||
.base = { 0x54000, 0x56000 },
|
||||
},
|
||||
.ad = {
|
||||
.count = 2,
|
||||
.base = { 0x78000, 0x78800 },
|
||||
},
|
||||
.pp = {
|
||||
.count = 5,
|
||||
.base = { 0x70000, 0x70800, 0x71000, 0x71800, 0x72000 },
|
||||
},
|
||||
.cdm = {
|
||||
.count = 1,
|
||||
.base = { 0x79200 },
|
||||
},
|
||||
.dsc = {
|
||||
.count = 2,
|
||||
.base = { 0x80000, 0x80400 },
|
||||
},
|
||||
.intf = {
|
||||
.base = { 0x6a000, 0x6a800, 0x6b000, 0x6b800 },
|
||||
.connect = {
|
||||
[0] = INTF_DISABLED,
|
||||
[1] = INTF_DSI,
|
||||
[2] = INTF_DSI,
|
||||
[3] = INTF_HDMI,
|
||||
},
|
||||
},
|
||||
.max_clk = 412500000,
|
||||
};
|
||||
|
||||
static const struct mdp5_cfg_handler cfg_handlers_v1[] = {
|
||||
{ .revision = 0, .config = { .hw = &msm8x74v1_config } },
|
||||
{ .revision = 2, .config = { .hw = &msm8x74v2_config } },
|
||||
|
@ -924,6 +1120,8 @@ static const struct mdp5_cfg_handler cfg_handlers_v1[] = {
|
|||
|
||||
static const struct mdp5_cfg_handler cfg_handlers_v3[] = {
|
||||
{ .revision = 0, .config = { .hw = &msm8998_config } },
|
||||
{ .revision = 2, .config = { .hw = &sdm660_config } },
|
||||
{ .revision = 3, .config = { .hw = &sdm630_config } },
|
||||
};
|
||||
|
||||
static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev);
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -161,6 +161,8 @@ static const struct of_device_id dt_match[] = {
|
|||
|
||||
static const struct dev_pm_ops dsi_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(msm_dsi_runtime_suspend, msm_dsi_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver dsi_driver = {
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
@ -148,7 +148,31 @@ static inline uint32_t DSI_6G_HW_VERSION_STEP(uint32_t val)
|
|||
#define DSI_STATUS0_INTERLEAVE_OP_CONTENTION 0x80000000
|
||||
|
||||
#define REG_DSI_FIFO_STATUS 0x00000008
|
||||
#define DSI_FIFO_STATUS_VIDEO_MDP_FIFO_OVERFLOW 0x00000001
|
||||
#define DSI_FIFO_STATUS_VIDEO_MDP_FIFO_UNDERFLOW 0x00000008
|
||||
#define DSI_FIFO_STATUS_CMD_MDP_FIFO_UNDERFLOW 0x00000080
|
||||
#define DSI_FIFO_STATUS_CMD_DMA_FIFO_RD_WATERMARK_REACH 0x00000100
|
||||
#define DSI_FIFO_STATUS_CMD_DMA_FIFO_WR_WATERMARK_REACH 0x00000200
|
||||
#define DSI_FIFO_STATUS_CMD_DMA_FIFO_UNDERFLOW 0x00000400
|
||||
#define DSI_FIFO_STATUS_DLN0_LP_FIFO_EMPTY 0x00001000
|
||||
#define DSI_FIFO_STATUS_DLN0_LP_FIFO_FULL 0x00002000
|
||||
#define DSI_FIFO_STATUS_DLN0_LP_FIFO_OVERFLOW 0x00004000
|
||||
#define DSI_FIFO_STATUS_DLN0_HS_FIFO_EMPTY 0x00010000
|
||||
#define DSI_FIFO_STATUS_DLN0_HS_FIFO_FULL 0x00020000
|
||||
#define DSI_FIFO_STATUS_DLN0_HS_FIFO_OVERFLOW 0x00040000
|
||||
#define DSI_FIFO_STATUS_DLN0_HS_FIFO_UNDERFLOW 0x00080000
|
||||
#define DSI_FIFO_STATUS_DLN1_HS_FIFO_EMPTY 0x00100000
|
||||
#define DSI_FIFO_STATUS_DLN1_HS_FIFO_FULL 0x00200000
|
||||
#define DSI_FIFO_STATUS_DLN1_HS_FIFO_OVERFLOW 0x00400000
|
||||
#define DSI_FIFO_STATUS_DLN1_HS_FIFO_UNDERFLOW 0x00800000
|
||||
#define DSI_FIFO_STATUS_DLN2_HS_FIFO_EMPTY 0x01000000
|
||||
#define DSI_FIFO_STATUS_DLN2_HS_FIFO_FULL 0x02000000
|
||||
#define DSI_FIFO_STATUS_DLN2_HS_FIFO_OVERFLOW 0x04000000
|
||||
#define DSI_FIFO_STATUS_DLN2_HS_FIFO_UNDERFLOW 0x08000000
|
||||
#define DSI_FIFO_STATUS_DLN3_HS_FIFO_EMPTY 0x10000000
|
||||
#define DSI_FIFO_STATUS_DLN3_HS_FIFO_FULL 0x20000000
|
||||
#define DSI_FIFO_STATUS_DLN3_HS_FIFO_OVERFLOW 0x40000000
|
||||
#define DSI_FIFO_STATUS_DLN3_HS_FIFO_UNDERFLOW 0x80000000
|
||||
|
||||
#define REG_DSI_VID_CFG0 0x0000000c
|
||||
#define DSI_VID_CFG0_VIRT_CHANNEL__MASK 0x00000003
|
||||
|
@ -318,38 +342,72 @@ static inline uint32_t DSI_CMD_CFG1_WR_MEM_CONTINUE(uint32_t val)
|
|||
|
||||
#define REG_DSI_DMA_LEN 0x00000048
|
||||
|
||||
#define REG_DSI_CMD_MDP_STREAM_CTRL 0x00000054
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE__MASK 0x0000003f
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE(uint32_t val)
|
||||
#define REG_DSI_CMD_MDP_STREAM0_CTRL 0x00000054
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE__MASK 0x0000003f
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE__SHIFT) & DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE__MASK;
|
||||
return ((val) << DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE__SHIFT) & DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL__MASK 0x00000300
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL__SHIFT 8
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL(uint32_t val)
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL__MASK 0x00000300
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL__SHIFT 8
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL__SHIFT) & DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL__MASK;
|
||||
return ((val) << DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL__SHIFT) & DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT__MASK 0xffff0000
|
||||
#define DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT(uint32_t val)
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT__MASK 0xffff0000
|
||||
#define DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT__SHIFT) & DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT__MASK;
|
||||
return ((val) << DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT__SHIFT) & DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_CMD_MDP_STREAM_TOTAL 0x00000058
|
||||
#define DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL__MASK 0x00000fff
|
||||
#define DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL(uint32_t val)
|
||||
#define REG_DSI_CMD_MDP_STREAM0_TOTAL 0x00000058
|
||||
#define DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL__MASK 0x00000fff
|
||||
#define DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL__MASK;
|
||||
return ((val) << DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL__MASK 0x0fff0000
|
||||
#define DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL(uint32_t val)
|
||||
#define DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL__MASK 0x0fff0000
|
||||
#define DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL__MASK;
|
||||
return ((val) << DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_CMD_MDP_STREAM1_CTRL 0x0000005c
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_DATA_TYPE__MASK 0x0000003f
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_DATA_TYPE__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM1_CTRL_DATA_TYPE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM1_CTRL_DATA_TYPE__SHIFT) & DSI_CMD_MDP_STREAM1_CTRL_DATA_TYPE__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_VIRTUAL_CHANNEL__MASK 0x00000300
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_VIRTUAL_CHANNEL__SHIFT 8
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM1_CTRL_VIRTUAL_CHANNEL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM1_CTRL_VIRTUAL_CHANNEL__SHIFT) & DSI_CMD_MDP_STREAM1_CTRL_VIRTUAL_CHANNEL__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_WORD_COUNT__MASK 0xffff0000
|
||||
#define DSI_CMD_MDP_STREAM1_CTRL_WORD_COUNT__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM1_CTRL_WORD_COUNT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM1_CTRL_WORD_COUNT__SHIFT) & DSI_CMD_MDP_STREAM1_CTRL_WORD_COUNT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_CMD_MDP_STREAM1_TOTAL 0x00000060
|
||||
#define DSI_CMD_MDP_STREAM1_TOTAL_H_TOTAL__MASK 0x0000ffff
|
||||
#define DSI_CMD_MDP_STREAM1_TOTAL_H_TOTAL__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM1_TOTAL_H_TOTAL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM1_TOTAL_H_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM1_TOTAL_H_TOTAL__MASK;
|
||||
}
|
||||
#define DSI_CMD_MDP_STREAM1_TOTAL_V_TOTAL__MASK 0xffff0000
|
||||
#define DSI_CMD_MDP_STREAM1_TOTAL_V_TOTAL__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MDP_STREAM1_TOTAL_V_TOTAL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MDP_STREAM1_TOTAL_V_TOTAL__SHIFT) & DSI_CMD_MDP_STREAM1_TOTAL_V_TOTAL__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_ACK_ERR_STATUS 0x00000064
|
||||
|
@ -389,6 +447,35 @@ static inline uint32_t DSI_TRIG_CTRL_STREAM(uint32_t val)
|
|||
#define DSI_DLN0_PHY_ERR_DLN0_ERR_CONTENTION_LP0 0x00001000
|
||||
#define DSI_DLN0_PHY_ERR_DLN0_ERR_CONTENTION_LP1 0x00010000
|
||||
|
||||
#define REG_DSI_LP_TIMER_CTRL 0x000000b4
|
||||
#define DSI_LP_TIMER_CTRL_LP_RX_TO__MASK 0x0000ffff
|
||||
#define DSI_LP_TIMER_CTRL_LP_RX_TO__SHIFT 0
|
||||
static inline uint32_t DSI_LP_TIMER_CTRL_LP_RX_TO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_LP_TIMER_CTRL_LP_RX_TO__SHIFT) & DSI_LP_TIMER_CTRL_LP_RX_TO__MASK;
|
||||
}
|
||||
#define DSI_LP_TIMER_CTRL_BTA_TO__MASK 0xffff0000
|
||||
#define DSI_LP_TIMER_CTRL_BTA_TO__SHIFT 16
|
||||
static inline uint32_t DSI_LP_TIMER_CTRL_BTA_TO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_LP_TIMER_CTRL_BTA_TO__SHIFT) & DSI_LP_TIMER_CTRL_BTA_TO__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_HS_TIMER_CTRL 0x000000b8
|
||||
#define DSI_HS_TIMER_CTRL_HS_TX_TO__MASK 0x0000ffff
|
||||
#define DSI_HS_TIMER_CTRL_HS_TX_TO__SHIFT 0
|
||||
static inline uint32_t DSI_HS_TIMER_CTRL_HS_TX_TO(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_HS_TIMER_CTRL_HS_TX_TO__SHIFT) & DSI_HS_TIMER_CTRL_HS_TX_TO__MASK;
|
||||
}
|
||||
#define DSI_HS_TIMER_CTRL_TIMER_RESOLUTION__MASK 0x000f0000
|
||||
#define DSI_HS_TIMER_CTRL_TIMER_RESOLUTION__SHIFT 16
|
||||
static inline uint32_t DSI_HS_TIMER_CTRL_TIMER_RESOLUTION(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_HS_TIMER_CTRL_TIMER_RESOLUTION__SHIFT) & DSI_HS_TIMER_CTRL_TIMER_RESOLUTION__MASK;
|
||||
}
|
||||
#define DSI_HS_TIMER_CTRL_HS_TX_TO_STOP_EN 0x10000000
|
||||
|
||||
#define REG_DSI_TIMEOUT_STATUS 0x000000bc
|
||||
|
||||
#define REG_DSI_CLKOUT_TIMING_CTRL 0x000000c0
|
||||
|
@ -409,6 +496,19 @@ static inline uint32_t DSI_CLKOUT_TIMING_CTRL_T_CLK_POST(uint32_t val)
|
|||
#define DSI_EOT_PACKET_CTRL_TX_EOT_APPEND 0x00000001
|
||||
#define DSI_EOT_PACKET_CTRL_RX_EOT_IGNORE 0x00000010
|
||||
|
||||
#define REG_DSI_LANE_STATUS 0x000000a4
|
||||
#define DSI_LANE_STATUS_DLN0_STOPSTATE 0x00000001
|
||||
#define DSI_LANE_STATUS_DLN1_STOPSTATE 0x00000002
|
||||
#define DSI_LANE_STATUS_DLN2_STOPSTATE 0x00000004
|
||||
#define DSI_LANE_STATUS_DLN3_STOPSTATE 0x00000008
|
||||
#define DSI_LANE_STATUS_CLKLN_STOPSTATE 0x00000010
|
||||
#define DSI_LANE_STATUS_DLN0_ULPS_ACTIVE_NOT 0x00000100
|
||||
#define DSI_LANE_STATUS_DLN1_ULPS_ACTIVE_NOT 0x00000200
|
||||
#define DSI_LANE_STATUS_DLN2_ULPS_ACTIVE_NOT 0x00000400
|
||||
#define DSI_LANE_STATUS_DLN3_ULPS_ACTIVE_NOT 0x00000800
|
||||
#define DSI_LANE_STATUS_CLKLN_ULPS_ACTIVE_NOT 0x00001000
|
||||
#define DSI_LANE_STATUS_DLN0_DIRECTION 0x00010000
|
||||
|
||||
#define REG_DSI_LANE_CTRL 0x000000a8
|
||||
#define DSI_LANE_CTRL_CLKLN_HS_FORCE_REQUEST 0x10000000
|
||||
|
||||
|
@ -436,6 +536,21 @@ static inline uint32_t DSI_LANE_SWAP_CTRL_DLN_SWAP_SEL(enum dsi_lane_swap val)
|
|||
#define DSI_CLK_CTRL_FORCE_ON_DYN_AHBM_HCLK 0x00000200
|
||||
|
||||
#define REG_DSI_CLK_STATUS 0x0000011c
|
||||
#define DSI_CLK_STATUS_DSI_AON_AHBM_HCLK_ACTIVE 0x00000001
|
||||
#define DSI_CLK_STATUS_DSI_DYN_AHBM_HCLK_ACTIVE 0x00000002
|
||||
#define DSI_CLK_STATUS_DSI_AON_AHBS_HCLK_ACTIVE 0x00000004
|
||||
#define DSI_CLK_STATUS_DSI_DYN_AHBS_HCLK_ACTIVE 0x00000008
|
||||
#define DSI_CLK_STATUS_DSI_AON_DSICLK_ACTIVE 0x00000010
|
||||
#define DSI_CLK_STATUS_DSI_DYN_DSICLK_ACTIVE 0x00000020
|
||||
#define DSI_CLK_STATUS_DSI_AON_BYTECLK_ACTIVE 0x00000040
|
||||
#define DSI_CLK_STATUS_DSI_DYN_BYTECLK_ACTIVE 0x00000080
|
||||
#define DSI_CLK_STATUS_DSI_AON_ESCCLK_ACTIVE 0x00000100
|
||||
#define DSI_CLK_STATUS_DSI_AON_PCLK_ACTIVE 0x00000200
|
||||
#define DSI_CLK_STATUS_DSI_DYN_PCLK_ACTIVE 0x00000400
|
||||
#define DSI_CLK_STATUS_DSI_DYN_CMD_PCLK_ACTIVE 0x00001000
|
||||
#define DSI_CLK_STATUS_DSI_CMD_PCLK_ACTIVE 0x00002000
|
||||
#define DSI_CLK_STATUS_DSI_VID_PCLK_ACTIVE 0x00004000
|
||||
#define DSI_CLK_STATUS_DSI_CAM_BIST_PCLK_ACT 0x00008000
|
||||
#define DSI_CLK_STATUS_PLL_UNLOCKED 0x00010000
|
||||
|
||||
#define REG_DSI_PHY_RESET 0x00000128
|
||||
|
@ -444,6 +559,51 @@ static inline uint32_t DSI_LANE_SWAP_CTRL_DLN_SWAP_SEL(enum dsi_lane_swap val)
|
|||
#define REG_DSI_T_CLK_PRE_EXTEND 0x0000017c
|
||||
#define DSI_T_CLK_PRE_EXTEND_INC_BY_2_BYTECLK 0x00000001
|
||||
|
||||
#define REG_DSI_CMD_MODE_MDP_CTRL2 0x000001b4
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_DST_FORMAT2__MASK 0x0000000f
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_DST_FORMAT2__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_CTRL2_DST_FORMAT2(enum dsi_cmd_dst_format val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_CTRL2_DST_FORMAT2__SHIFT) & DSI_CMD_MODE_MDP_CTRL2_DST_FORMAT2__MASK;
|
||||
}
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_R_SEL 0x00000010
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_G_SEL 0x00000020
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_B_SEL 0x00000040
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_BYTE_MSB_LSB_FLIP 0x00000080
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_RGB_SWAP__MASK 0x00000700
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_RGB_SWAP__SHIFT 8
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_CTRL2_RGB_SWAP(enum dsi_rgb_swap val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_CTRL2_RGB_SWAP__SHIFT) & DSI_CMD_MODE_MDP_CTRL2_RGB_SWAP__MASK;
|
||||
}
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_INPUT_RGB_SWAP__MASK 0x00007000
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_INPUT_RGB_SWAP__SHIFT 12
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_CTRL2_INPUT_RGB_SWAP(enum dsi_rgb_swap val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_CTRL2_INPUT_RGB_SWAP__SHIFT) & DSI_CMD_MODE_MDP_CTRL2_INPUT_RGB_SWAP__MASK;
|
||||
}
|
||||
#define DSI_CMD_MODE_MDP_CTRL2_BURST_MODE 0x00010000
|
||||
|
||||
#define REG_DSI_CMD_MODE_MDP_STREAM2_CTRL 0x000001b8
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_DATA_TYPE__MASK 0x0000003f
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_DATA_TYPE__SHIFT 0
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_STREAM2_CTRL_DATA_TYPE(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_STREAM2_CTRL_DATA_TYPE__SHIFT) & DSI_CMD_MODE_MDP_STREAM2_CTRL_DATA_TYPE__MASK;
|
||||
}
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_VIRTUAL_CHANNEL__MASK 0x00000300
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_VIRTUAL_CHANNEL__SHIFT 8
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_STREAM2_CTRL_VIRTUAL_CHANNEL(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_STREAM2_CTRL_VIRTUAL_CHANNEL__SHIFT) & DSI_CMD_MODE_MDP_STREAM2_CTRL_VIRTUAL_CHANNEL__MASK;
|
||||
}
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_WORD_COUNT__MASK 0xffff0000
|
||||
#define DSI_CMD_MODE_MDP_STREAM2_CTRL_WORD_COUNT__SHIFT 16
|
||||
static inline uint32_t DSI_CMD_MODE_MDP_STREAM2_CTRL_WORD_COUNT(uint32_t val)
|
||||
{
|
||||
return ((val) << DSI_CMD_MODE_MDP_STREAM2_CTRL_WORD_COUNT__SHIFT) & DSI_CMD_MODE_MDP_STREAM2_CTRL_WORD_COUNT__MASK;
|
||||
}
|
||||
|
||||
#define REG_DSI_RDBK_DATA_CTRL 0x000001d0
|
||||
#define DSI_RDBK_DATA_CTRL_COUNT__MASK 0x00ff0000
|
||||
#define DSI_RDBK_DATA_CTRL_COUNT__SHIFT 16
|
||||
|
|
|
@ -149,6 +149,25 @@ static const struct msm_dsi_config msm8998_dsi_cfg = {
|
|||
.num_dsi = 2,
|
||||
};
|
||||
|
||||
static const char * const dsi_sdm660_bus_clk_names[] = {
|
||||
"iface", "bus", "core", "core_mmss",
|
||||
};
|
||||
|
||||
static const struct msm_dsi_config sdm660_dsi_cfg = {
|
||||
.io_offset = DSI_6G_REG_SHIFT,
|
||||
.reg_cfg = {
|
||||
.num = 2,
|
||||
.regs = {
|
||||
{"vdd", 73400, 32 }, /* 0.9 V */
|
||||
{"vdda", 12560, 4 }, /* 1.2 V */
|
||||
},
|
||||
},
|
||||
.bus_clk_names = dsi_sdm660_bus_clk_names,
|
||||
.num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names),
|
||||
.io_start = { 0xc994000, 0xc996000 },
|
||||
.num_dsi = 2,
|
||||
};
|
||||
|
||||
static const char * const dsi_sdm845_bus_clk_names[] = {
|
||||
"iface", "bus",
|
||||
};
|
||||
|
@ -240,6 +259,8 @@ static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = {
|
|||
&msm8996_dsi_cfg, &msm_dsi_6g_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_2,
|
||||
&msm8976_dsi_cfg, &msm_dsi_6g_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_1_0,
|
||||
&sdm660_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_0,
|
||||
&msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops},
|
||||
{MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_1,
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define MSM_DSI_6G_VER_MINOR_V1_3_1 0x10030001
|
||||
#define MSM_DSI_6G_VER_MINOR_V1_4_1 0x10040001
|
||||
#define MSM_DSI_6G_VER_MINOR_V1_4_2 0x10040002
|
||||
#define MSM_DSI_6G_VER_MINOR_V2_1_0 0x20010000
|
||||
#define MSM_DSI_6G_VER_MINOR_V2_2_0 0x20000000
|
||||
#define MSM_DSI_6G_VER_MINOR_V2_2_1 0x20020001
|
||||
#define MSM_DSI_6G_VER_MINOR_V2_4_1 0x20040001
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/of_graph.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -111,6 +112,9 @@ struct msm_dsi_host {
|
|||
struct clk *pixel_clk_src;
|
||||
struct clk *byte_intf_clk;
|
||||
|
||||
struct opp_table *opp_table;
|
||||
bool has_opp_table;
|
||||
|
||||
u32 byte_clk_rate;
|
||||
u32 pixel_clk_rate;
|
||||
u32 esc_clk_rate;
|
||||
|
@ -512,9 +516,10 @@ int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host)
|
|||
DBG("Set clk rates: pclk=%d, byteclk=%d",
|
||||
msm_host->mode->clock, msm_host->byte_clk_rate);
|
||||
|
||||
ret = clk_set_rate(msm_host->byte_clk, msm_host->byte_clk_rate);
|
||||
ret = dev_pm_opp_set_rate(&msm_host->pdev->dev,
|
||||
msm_host->byte_clk_rate);
|
||||
if (ret) {
|
||||
pr_err("%s: Failed to set rate byte clk, %d\n", __func__, ret);
|
||||
pr_err("%s: dev_pm_opp_set_rate failed %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -658,6 +663,8 @@ error:
|
|||
|
||||
void dsi_link_clk_disable_6g(struct msm_dsi_host *msm_host)
|
||||
{
|
||||
/* Drop the performance state vote */
|
||||
dev_pm_opp_set_rate(&msm_host->pdev->dev, 0);
|
||||
clk_disable_unprepare(msm_host->esc_clk);
|
||||
clk_disable_unprepare(msm_host->pixel_clk);
|
||||
if (msm_host->byte_intf_clk)
|
||||
|
@ -986,16 +993,16 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi)
|
|||
/* image data and 1 byte write_memory_start cmd */
|
||||
wc = hdisplay * dsi_get_bpp(msm_host->format) / 8 + 1;
|
||||
|
||||
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM_CTRL,
|
||||
DSI_CMD_MDP_STREAM_CTRL_WORD_COUNT(wc) |
|
||||
DSI_CMD_MDP_STREAM_CTRL_VIRTUAL_CHANNEL(
|
||||
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_CTRL,
|
||||
DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT(wc) |
|
||||
DSI_CMD_MDP_STREAM0_CTRL_VIRTUAL_CHANNEL(
|
||||
msm_host->channel) |
|
||||
DSI_CMD_MDP_STREAM_CTRL_DATA_TYPE(
|
||||
DSI_CMD_MDP_STREAM0_CTRL_DATA_TYPE(
|
||||
MIPI_DSI_DCS_LONG_WRITE));
|
||||
|
||||
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM_TOTAL,
|
||||
DSI_CMD_MDP_STREAM_TOTAL_H_TOTAL(hdisplay) |
|
||||
DSI_CMD_MDP_STREAM_TOTAL_V_TOTAL(mode->vdisplay));
|
||||
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_TOTAL,
|
||||
DSI_CMD_MDP_STREAM0_TOTAL_H_TOTAL(hdisplay) |
|
||||
DSI_CMD_MDP_STREAM0_TOTAL_V_TOTAL(mode->vdisplay));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1879,6 +1886,19 @@ 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);
|
||||
/* OPP table is optional */
|
||||
ret = dev_pm_opp_of_add_table(&pdev->dev);
|
||||
if (!ret) {
|
||||
msm_host->has_opp_table = true;
|
||||
} else if (ret != -ENODEV) {
|
||||
dev_err(&pdev->dev, "invalid OPP table in device tree\n");
|
||||
dev_pm_opp_put_clkname(msm_host->opp_table);
|
||||
return ret;
|
||||
}
|
||||
|
||||
init_completion(&msm_host->dma_comp);
|
||||
init_completion(&msm_host->video_comp);
|
||||
mutex_init(&msm_host->dev_mutex);
|
||||
|
@ -1914,6 +1934,9 @@ void msm_dsi_host_destroy(struct mipi_dsi_host *host)
|
|||
mutex_destroy(&msm_host->cmd_mutex);
|
||||
mutex_destroy(&msm_host->dev_mutex);
|
||||
|
||||
if (msm_host->has_opp_table)
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -499,6 +499,8 @@ static const struct of_device_id dsi_phy_dt_match[] = {
|
|||
#ifdef CONFIG_DRM_MSM_DSI_14NM_PHY
|
||||
{ .compatible = "qcom,dsi-phy-14nm",
|
||||
.data = &dsi_phy_14nm_cfgs },
|
||||
{ .compatible = "qcom,dsi-phy-14nm-660",
|
||||
.data = &dsi_phy_14nm_660_cfgs },
|
||||
#endif
|
||||
#ifdef CONFIG_DRM_MSM_DSI_10NM_PHY
|
||||
{ .compatible = "qcom,dsi-phy-10nm",
|
||||
|
|
|
@ -45,6 +45,7 @@ extern const struct msm_dsi_phy_cfg dsi_phy_28nm_lp_cfgs;
|
|||
extern const struct msm_dsi_phy_cfg dsi_phy_20nm_cfgs;
|
||||
extern const struct msm_dsi_phy_cfg dsi_phy_28nm_8960_cfgs;
|
||||
extern const struct msm_dsi_phy_cfg dsi_phy_14nm_cfgs;
|
||||
extern const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs;
|
||||
extern const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs;
|
||||
extern const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs;
|
||||
|
||||
|
|
|
@ -161,3 +161,21 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_cfgs = {
|
|||
.io_start = { 0x994400, 0x996400 },
|
||||
.num_dsi_phy = 2,
|
||||
};
|
||||
|
||||
const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs = {
|
||||
.type = MSM_DSI_PHY_14NM,
|
||||
.src_pll_truthtable = { {false, false}, {true, false} },
|
||||
.reg_cfg = {
|
||||
.num = 1,
|
||||
.regs = {
|
||||
{"vcca", 17000, 32},
|
||||
},
|
||||
},
|
||||
.ops = {
|
||||
.enable = dsi_14nm_phy_enable,
|
||||
.disable = dsi_14nm_phy_disable,
|
||||
.init = dsi_14nm_phy_init,
|
||||
},
|
||||
.io_start = { 0xc994400, 0xc996000 },
|
||||
.num_dsi_phy = 2,
|
||||
};
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -8,19 +8,19 @@ http://github.com/freedreno/envytools/
|
|||
git clone https://github.com/freedreno/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/envytools/rnndb/msm.xml ( 676 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/freedreno_copyright.xml ( 1572 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp4.xml ( 20915 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp_common.xml ( 2849 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/mdp/mdp5.xml ( 37411 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/dsi.xml ( 37239 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/sfpb.xml ( 602 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/dsi/mmss_cc.xml ( 1686 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/qfprom.xml ( 600 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/hdmi/hdmi.xml ( 41799 bytes, from 2018-07-03 19:37:13)
|
||||
- /home/robclark/src/envytools/rnndb/edp/edp.xml ( 10416 bytes, from 2018-07-03 19:37:13)
|
||||
- /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)
|
||||
|
||||
Copyright (C) 2013-2018 by the following authors:
|
||||
Copyright (C) 2013-2020 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
- Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
|
||||
|
||||
|
|
|
@ -120,8 +120,8 @@ struct clk *msm_clk_get(struct platform_device *pdev, const char *name)
|
|||
return clk;
|
||||
}
|
||||
|
||||
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname)
|
||||
void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname, bool quiet)
|
||||
{
|
||||
struct resource *res;
|
||||
unsigned long size;
|
||||
|
@ -133,6 +133,7 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
|||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
||||
if (!res) {
|
||||
if (!quiet)
|
||||
DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n", name);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
@ -141,6 +142,7 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
|||
|
||||
ptr = devm_ioremap(&pdev->dev, res->start, size);
|
||||
if (!ptr) {
|
||||
if (!quiet)
|
||||
DRM_DEV_ERROR(&pdev->dev, "failed to ioremap: %s\n", name);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
@ -151,6 +153,18 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
|||
return ptr;
|
||||
}
|
||||
|
||||
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname)
|
||||
{
|
||||
return _msm_ioremap(pdev, name, dbgname, false);
|
||||
}
|
||||
|
||||
void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname)
|
||||
{
|
||||
return _msm_ioremap(pdev, name, dbgname, true);
|
||||
}
|
||||
|
||||
void msm_writel(u32 data, void __iomem *addr)
|
||||
{
|
||||
if (reglog)
|
||||
|
@ -238,10 +252,8 @@ static int msm_drm_uninit(struct device *dev)
|
|||
|
||||
/* clean up event worker threads */
|
||||
for (i = 0; i < priv->num_crtcs; i++) {
|
||||
if (priv->event_thread[i].thread) {
|
||||
kthread_destroy_worker(&priv->event_thread[i].worker);
|
||||
priv->event_thread[i].thread = NULL;
|
||||
}
|
||||
if (priv->event_thread[i].worker)
|
||||
kthread_destroy_worker(priv->event_thread[i].worker);
|
||||
}
|
||||
|
||||
msm_gem_shrinker_cleanup(ddev);
|
||||
|
@ -504,19 +516,15 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
|
|||
for (i = 0; i < priv->num_crtcs; i++) {
|
||||
/* initialize event thread */
|
||||
priv->event_thread[i].crtc_id = priv->crtcs[i]->base.id;
|
||||
kthread_init_worker(&priv->event_thread[i].worker);
|
||||
priv->event_thread[i].dev = ddev;
|
||||
priv->event_thread[i].thread =
|
||||
kthread_run(kthread_worker_fn,
|
||||
&priv->event_thread[i].worker,
|
||||
priv->event_thread[i].worker = kthread_create_worker(0,
|
||||
"crtc_event:%d", priv->event_thread[i].crtc_id);
|
||||
if (IS_ERR(priv->event_thread[i].thread)) {
|
||||
if (IS_ERR(priv->event_thread[i].worker)) {
|
||||
DRM_DEV_ERROR(dev, "failed to create crtc_event kthread\n");
|
||||
priv->event_thread[i].thread = NULL;
|
||||
goto err_msm_uninit;
|
||||
}
|
||||
|
||||
ret = sched_setscheduler(priv->event_thread[i].thread,
|
||||
ret = sched_setscheduler(priv->event_thread[i].worker->task,
|
||||
SCHED_FIFO, ¶m);
|
||||
if (ret)
|
||||
dev_warn(dev, "event_thread set priority failed:%d\n",
|
||||
|
@ -1039,44 +1047,7 @@ static struct drm_driver msm_driver = {
|
|||
.patchlevel = MSM_VERSION_PATCHLEVEL,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int msm_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
|
||||
if (WARN_ON(priv->pm_state))
|
||||
drm_atomic_state_put(priv->pm_state);
|
||||
|
||||
priv->pm_state = drm_atomic_helper_suspend(ddev);
|
||||
if (IS_ERR(priv->pm_state)) {
|
||||
int ret = PTR_ERR(priv->pm_state);
|
||||
DRM_ERROR("Failed to suspend dpu, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm_pm_resume(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(!priv->pm_state))
|
||||
return -ENOENT;
|
||||
|
||||
ret = drm_atomic_helper_resume(ddev, priv->pm_state);
|
||||
if (!ret)
|
||||
priv->pm_state = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int msm_runtime_suspend(struct device *dev)
|
||||
static int __maybe_unused msm_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
|
@ -1090,7 +1061,7 @@ static int msm_runtime_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int msm_runtime_resume(struct device *dev)
|
||||
static int __maybe_unused msm_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
|
@ -1103,11 +1074,43 @@ static int msm_runtime_resume(struct device *dev)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __maybe_unused msm_pm_suspend(struct device *dev)
|
||||
{
|
||||
|
||||
if (pm_runtime_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return msm_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int __maybe_unused msm_pm_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return msm_runtime_resume(dev);
|
||||
}
|
||||
|
||||
static int __maybe_unused msm_pm_prepare(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
|
||||
return drm_mode_config_helper_suspend(ddev);
|
||||
}
|
||||
|
||||
static void __maybe_unused msm_pm_complete(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
|
||||
drm_mode_config_helper_resume(ddev);
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops msm_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(msm_pm_suspend, msm_pm_resume)
|
||||
SET_RUNTIME_PM_OPS(msm_runtime_suspend, msm_runtime_resume, NULL)
|
||||
.prepare = msm_pm_prepare,
|
||||
.complete = msm_pm_complete,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -129,9 +129,8 @@ struct msm_display_info {
|
|||
/* Commit/Event thread specific structure */
|
||||
struct msm_drm_thread {
|
||||
struct drm_device *dev;
|
||||
struct task_struct *thread;
|
||||
unsigned int crtc_id;
|
||||
struct kthread_worker worker;
|
||||
struct kthread_worker *worker;
|
||||
};
|
||||
|
||||
struct msm_drm_private {
|
||||
|
@ -411,6 +410,8 @@ struct clk *msm_clk_bulk_get_clock(struct clk_bulk_data *bulk, int count,
|
|||
const char *name);
|
||||
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname);
|
||||
void __iomem *msm_ioremap_quiet(struct platform_device *pdev, const char *name,
|
||||
const char *dbgname);
|
||||
void msm_writel(u32 data, void __iomem *addr);
|
||||
u32 msm_readl(const void __iomem *addr);
|
||||
|
||||
|
|
|
@ -996,10 +996,8 @@ int msm_gem_new_handle(struct drm_device *dev, struct drm_file *file,
|
|||
|
||||
static int msm_gem_new_impl(struct drm_device *dev,
|
||||
uint32_t size, uint32_t flags,
|
||||
struct drm_gem_object **obj,
|
||||
bool struct_mutex_locked)
|
||||
struct drm_gem_object **obj)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_gem_object *msm_obj;
|
||||
|
||||
switch (flags & MSM_BO_CACHE_MASK) {
|
||||
|
@ -1025,15 +1023,6 @@ static int msm_gem_new_impl(struct drm_device *dev,
|
|||
INIT_LIST_HEAD(&msm_obj->submit_entry);
|
||||
INIT_LIST_HEAD(&msm_obj->vmas);
|
||||
|
||||
if (struct_mutex_locked) {
|
||||
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
} else {
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
}
|
||||
|
||||
*obj = &msm_obj->base;
|
||||
|
||||
return 0;
|
||||
|
@ -1043,6 +1032,7 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
|
|||
uint32_t size, uint32_t flags, bool struct_mutex_locked)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_gem_object *msm_obj;
|
||||
struct drm_gem_object *obj = NULL;
|
||||
bool use_vram = false;
|
||||
int ret;
|
||||
|
@ -1063,14 +1053,15 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
|
|||
if (size == 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
ret = msm_gem_new_impl(dev, size, flags, &obj, struct_mutex_locked);
|
||||
ret = msm_gem_new_impl(dev, size, flags, &obj);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
msm_obj = to_msm_bo(obj);
|
||||
|
||||
if (use_vram) {
|
||||
struct msm_gem_vma *vma;
|
||||
struct page **pages;
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
|
||||
mutex_lock(&msm_obj->lock);
|
||||
|
||||
|
@ -1105,6 +1096,15 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
|
|||
mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER);
|
||||
}
|
||||
|
||||
if (struct_mutex_locked) {
|
||||
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
} else {
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
}
|
||||
|
||||
return obj;
|
||||
|
||||
fail:
|
||||
|
@ -1127,6 +1127,7 @@ struct drm_gem_object *msm_gem_new(struct drm_device *dev,
|
|||
struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
||||
struct dma_buf *dmabuf, struct sg_table *sgt)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_gem_object *msm_obj;
|
||||
struct drm_gem_object *obj;
|
||||
uint32_t size;
|
||||
|
@ -1140,7 +1141,7 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
|||
|
||||
size = PAGE_ALIGN(dmabuf->size);
|
||||
|
||||
ret = msm_gem_new_impl(dev, size, MSM_BO_WC, &obj, false);
|
||||
ret = msm_gem_new_impl(dev, size, MSM_BO_WC, &obj);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
|
@ -1165,6 +1166,11 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
|||
}
|
||||
|
||||
mutex_unlock(&msm_obj->lock);
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
list_add_tail(&msm_obj->mm_list, &priv->inactive_list);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
|
||||
return obj;
|
||||
|
||||
fail:
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <generated/utsrelease.h>
|
||||
#include <linux/string_helpers.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/devfreq.h>
|
||||
#include <linux/devcoredump.h>
|
||||
#include <linux/sched/task.h>
|
||||
|
@ -34,7 +33,7 @@ static int msm_devfreq_target(struct device *dev, unsigned long *freq,
|
|||
return PTR_ERR(opp);
|
||||
|
||||
if (gpu->funcs->gpu_set_freq)
|
||||
gpu->funcs->gpu_set_freq(gpu, (u64)*freq);
|
||||
gpu->funcs->gpu_set_freq(gpu, opp);
|
||||
else
|
||||
clk_set_rate(gpu->core_clk, *freq);
|
||||
|
||||
|
@ -93,7 +92,11 @@ static void msm_devfreq_init(struct msm_gpu *gpu)
|
|||
/*
|
||||
* Don't set the freq_table or max_state and let devfreq build the table
|
||||
* from OPP
|
||||
* After a deferred probe, these may have be left to non-zero values,
|
||||
* so set them back to zero before creating the devfreq device
|
||||
*/
|
||||
msm_devfreq_profile.freq_table = NULL;
|
||||
msm_devfreq_profile.max_state = 0;
|
||||
|
||||
gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev,
|
||||
&msm_devfreq_profile, DEVFREQ_GOV_SIMPLE_ONDEMAND,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include "msm_drv.h"
|
||||
|
@ -61,7 +62,7 @@ struct msm_gpu_funcs {
|
|||
struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu);
|
||||
int (*gpu_state_put)(struct msm_gpu_state *state);
|
||||
unsigned long (*gpu_get_freq)(struct msm_gpu *gpu);
|
||||
void (*gpu_set_freq)(struct msm_gpu *gpu, unsigned long freq);
|
||||
void (*gpu_set_freq)(struct msm_gpu *gpu, struct dev_pm_opp *opp);
|
||||
struct msm_gem_address_space *(*create_address_space)
|
||||
(struct msm_gpu *gpu, struct platform_device *pdev);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue