|
|
|
|
Quelle mtk_dp.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0
/*java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 40
( 2019-2022MediaTek Inc.
* AUDIO_java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
*/
#includejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 70
ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 31
#include <drm
#include <drm/drm_atomic_helper.h>
#includejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
# <drm_crtch>
#include <drm/drm_edid.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
#include java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 47
#include <linux/clk.h>
#include <linux/delay
#include <linux/errno.h>
#include <linux/kernel.m java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
#nclude l/bus-ormat.h>
#include <linux/nvmem-consumer.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_platform.java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/soc/mediatek/mtk_sip_svc.h>
#include <sound/hdmi-codec.h>
#include <video/videomode.h>
#include "mtk_dp_reg.h"
#define AUDIO_2CH_EN_DP_ENC0_P0_MASK;
#define java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 8
#define java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 9
#define MTK_DP_THREAD_CABLE_STATE_CHG BIT(0)
#define AUDIO_8CH_EN_DP_ENC0_P0_MASK
#define java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 8
#define MTK_DP_HDE 2
# 2
#define MTK_DP_AUX_WAIT_REPLY_COUNT 20 java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 37
#define java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
#define java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
#define MTK_DP_TRAIN_DOWNSCALE_RETRY,java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 38
#define MTK_DP_VERSION java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
#define MTK_DP_SDP_AUI 0 java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
enum {
=0java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
mtk_dp_initialize_priv_datjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
MTK_DP_CAL_LN_TX_IMPSEL_PMOS_2,
MTK_DP_CAL_LN_TX_IMPSEL_PMOS_3,
MTK_DP_CAL_LN_TX_IMPSEL_NMOS_0,
MTK_DP_CAL_LN_TX_IMPSEL_NMOS_1,
MTK_DP_CAL_LN_TX_IMPSEL_NMOS_2,
switchcfg-> java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
iec.status[3].status3] java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
};44100:
struct mtk_dp_train_info {
iecstatus[] ;
bool cable_plugged_injava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
case48000:
int link_rateiec.[3 = java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
unsignedstatus[]= java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
} 96000
struct mtk_dp_audio_cfg status[]=IEC958_AES3_CON_FS_96000
detect_monitor
int sad_count;
int sample_rate;
int iec.status[3] = IEC9java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
int channels;
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
struct java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
format
struct videomode vm;
mtk_dp_audio_cfgaudio_cur_cfg
};
struct iec.status4] ;
unsigned short idx;
unsigned java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
unsigned short mask;
unsigned short min_val;
unsignedshort
unsigned java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
};
struct mtk_dp {
bool enabled;
bool ;
int irq;
u8 max_lanesjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
u8 max_linkrate;
u8 rx_cap[DP_RECEIVER_CAP_SIZE];
u32 java.lang.StringIndexOutOfBoundsException: Range [1, 13) out of bounds for length 2
/*
/* irq_thread_lock is used to protect irq_thread_handle */
spinlock_t irq_thread_lock;
struct device *dev;
struct drm_bridge bridge;
struct mtk_dp_update_bitsmtk_dpjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
struct drm_connector *conn;
struct drm_device *drm_dev;
struct drm_dp_aux aux;
const struct mtk_dp_data *data;
struct mtk_dp_info info;
struct mtk_dp_train_info
struct platform_device *phy_dev;
struct phy *phy;
struct regmap *regs;
struct timer_list
/* For audio */
bool audio_enable;
hdmi_codec_plugged_cb plugged_cb;
struct platform_device int channels)
struct device *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
/* protect the plugged_cb as it's used in both bridge ops and audio */
struct mutex update_plugged_status_lock;
};
struct mtk_dp_datavoidmtk_dp_audio_set_divider(mtk_dpmtk_dp
int bridge_type
unsigned int smc_cmdjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
bool
bool void mtk_dp_sdp_trigger_
u16 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
};
struct java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 76
[mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3280,
.idx = 0,
.shift = 10,
k=0x1f,
.min_val = 1,
.max_val = 0x1e,
.default_val
},
[MTK_DP_CAL_CLKTX_IMPSE] = {
.idx = 0,
.shift = 15,
.mask = 0xf,
.java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
data_bytes,0x10)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
.default_val = 0x8,
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_0] = {
idx= 1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
.shift =0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
.min_val u32=MTK_DP_ENC0_P0_30D8 +(MTK_DP_SDP_AUI-1 *8;
.max_val = 0xe,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_1] = {
.idx = 1,
.shift = 8,
.mask = 0xf,
.=1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
.max_val = 0xe, voidmtk_dp_disable_sdp_aui
.default_val {
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_2] .type=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.idx = pmtk_dp,MTK_DP_ENC0_P0_30A8 x, 0,
.shift
.mask =0xf,
.min_val = 1, java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
.max_val = 0xe,
.default_val = 08java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_3] = {
.idx = 1,
.shift
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
. java.lang.StringIndexOutOfBoundsException: Range [33, 26) out of bounds for length 53
},
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.=1
.shift = 4,
.mask = 0xf,
.min_val = 1,
max_val xe
.default_val = 0 /* Enable periodic
mtk_dp,&0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_1] = {
.idx = 1,
.shift = 12java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
xf
.min_val = 1,
.max_val = 0xe,
default_val x,
},
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_2] = {
.idx = 1,
. 20,
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
.default_val
},
[ mtk_dp_update_bits(mtk_dp,MTK_DP_AUX_P0_3644,
.idx = 1,
.shift = 28,
.mask = 0xf,
.min_val = 1,
.max_val = 0xeE cmd,MCU_REQUEST_COMMAND_AUX_TX_P0_MASK);
.default_val =08,
},
};
static const );
]= java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
.idx = 3,
.shift = 27,
.mask = 0x1f,
.min_val = 1,
.max_val = 0x1e,
.default_val (m->vm,0 sizeof(java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 55
}
[MTK_DP_CAL_CLKTX_IMPSE] = {
.idx = 0,
.shift = 9,
. xf,
.min_val = 1,
.max_val = 0xe,
.default_val = 0x8 PHY_FIFO_RST_AUX_TX_P0_MASK |
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_0] = {
.idx = 2,
.shift = 28static mtk_dp_aux_request_ready(tructmtk_dp *tk_dp)
.mask = {
.min_val = 1,
.max_val = 0xe,
.default_val = 0x8,
},
[]= {
.idx = 2,
static void (struct java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 37
.mask = 0xf,
.min_val = 1,
e,
.default_val = 0x8,
},
[TK_DP_CAL_LN_TX_IMPSEL_PMOS_2
.idx = 2,
.shift = 12,
.mask = 0xf,
.min_val =1,
.max_val = 0xe,
. size_tlength, int read_delay)
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_3] = {
.idx = 2,
.
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
int read_pos;
},
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_0] = {
.idx = java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
.shift = 24,
mask =xf
.min_val = 1,
.max_val = 0xe,
=0x8,
},
mtk_dp,java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
.idx = 2,
AUX_RX_FIFO_READ_PULSE_TX_P0
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
.default_val = 0x8,
},
[] =
.idx = 2,
..hift =8
.mask = 0xf,
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 15
.max_val = 0xe,
.default_val = 0x8,
},
[] java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
. 2,
.shift = 0,
,
.min_val = 1,
.
.default_val = 0x8,
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
};
static const struct mtk_dp_efuse_fmt mt8195_dp_efuse_fmt[MTK_DP_CAL_MAX] = {
] java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
.idx = 0,
.shift = 27,
.mask = 0x1f,
.l 1
.max_val = 0x1e,
. xf,
},
[AUX_NO_LENGTH_AUX_TX_P
.idx = X java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 32
.=13java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
.mask = 0xf,
.min_val = 1,
.=xe
.default_val = 0x8,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
[] java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
.idx = 1,
.shift = 28,
mask=0xf,
.min_val = 1,u32 aux_irq_status
.max_val = 0xe,
default_val=0,
},
[ u32 fifo_statusmtk_dp )
.idx = 1,
.shift = 20,
. xf,
.min_val = 1,
.max_val = 0xe,
.default_val =struct drm_display_mode mode;
},
[java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 37
.idx = 1,
.shift = 12,
.mask = 0xf,
.min_val = 1,
.max_val aux_irq_status = mtk_dp_read(,MTK_DP_AUX_P0_3640);
.default_val = 0x8,
},
[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_3] = {
= 1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
.shift = 4,
.mask = 0xf,
min_val 1
.max_val = 0xe,
.default_val = 0x8,
},
[ =java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
.idx = 1,
.shift = 24,
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
.default_val = 0}
},
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_1] = {
.idx = 1,
.shift = 16,
.mask = 0xf,
.static mtk_dp_aux_do_transfers mtk_dp *mtk_dp, bool is_read, u8 cmd,
.max_val = 0xe,
.default_val = 0x8,
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_2] = java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
. (is_read& length > DP_AUX_MAX_PAYLOAD_BYTES
.shift = 8,
mask 0xf
.min_val = 1,
return EINVAL;
.default_val = 0x8,
},
[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_3
.idx = 1,
.shift = 0,
.mask = 0xf,
.min_val = 1,
.max_val = 0xe,
. AUX_TX_FIFO_NE,
},
};
static const struct regmap_config mtk_dp_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
.= 0,
.name = "mtk-dp-registers",
};
static mtk_dp, ;
{
return b, struct java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
staticu32 (java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 57
{
u32 read_val;
int ret;
ret = regmap_read(mtk_dp->regsjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 2
if (ret) {
dev_err(mtk_dp->dev, "
offset, * Wait for feedback from sink device. */
return 0;
}
return read_val;
}
static int(struct mtk_dp *mtk_dp, u32 offset, u32 val)
{
int ret = regmap_write(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (ret)
dev_err(mtk_dp->dev,
"Failed to write register 0x%x with value 0x%x\n",
offset, val);
return ret;
}
static int mtk_dp_update_bits(struct mtk_dp *mtk_dp, u32 offset,
u32 val, u32 mask)
{
int ret = regmap_update_bits(mtk_dp->regs, offset, mask, val);
if (ret)
AUX_RX_PHY_STATE_AUX_TX_P0_MASK;
"if phy_status ! {
offset ,;
AUX Auxhang,need SW reset\)
}
static void mtk_dp_bulk_16bit_write(struct java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
{
int i;
/* 2 bytes per register */
for ( java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
u32 val = buf[i] | (i + 1 AUX_RESERVED_RW_0_AUX_TX_P0_MASK);
if (mtk_dp_write(mtk_dp, *2 )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
return;
}
}
static void mtk_dp_msa_bypass_enable(struct if(md= DP_AUX_I2C_READ|DP_AUX_I2C_MOT |
{
u32 mask = =500;
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 6
HWIDTH_SEL_DP_ENC0_P0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HSP_SEL_DP_ENC0_P0 | HSW_SEL_DP_ENC0_P0 |
VSP_SEL_DP_ENC0_P0
mtk_dp_update_bits(mtk_dpjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static void mtk_dp_set_msa(struct mtk_dp *mtk_dp)
{
struct drm_display_mode mode;
struct videomode *vm = &mtk_dp{
,&mode)
/* horizontal */
mtk_dp_update_bits(mtk_dpjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
mode.htotal, HTOTAL_SW_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp "link training: swing_val = 0%x emphasis = 0x%x\n",
vm->hsync_len + vm->hback_porch,
swing_val,preemphasis)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
mtk_dp_update_bits( mtk_dp_update_bits(mtk_dp,MTK_DP_TOP_SWING_EMP,
vm->hsync_len, HSW_SW_DP_ENC0_P0_MASK);
mtk_dp_update_bits(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 48
ASK;
mtk_dp_update_bits( java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
vm->hactive, HWIDTH_SW_DP_ENC0_P0_MASK);
/* vertical */
mtk_dp_update_bits
static structmtk_dp*tk_dp
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
vm->vsync_len + vm->vback_porch 0
)
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 30
vm->sync_len VSW_SW_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_302C,
0, VSP_SW_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 28
vm->vactive, VHEIGHT_SW_DP_ENC0_P0_MASK);
/* horizontal */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3064,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
vm>,;
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3154,
mode.htotal, PGEN_HTOTAL_DP_ENC0_P0_MASK)
mtk_dp_update_bits(mtk_dp,MTK_DP_ENC0_P0_3158,
vm->hfront_porch,
PGEN_HSYNC_RISING_DP_ENC0_P0_MASK);
mtk_dp_update_bits( ;
vm->hsync_len
if (irq_status) {
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3160,
-h+vm-hsync_len,
PGEN_HFDE_START_DP_ENC0_P0_MASK);
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 48
vm->hactive,
_java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
/* vertical */
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 19
mode.vtotal,
PGEN_VTOTAL_DP_ENC0_P0_MASK mtk_dp)
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_316C,
vm->
PGEN_VSYNC_RISING_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3170 u32irq_status = (mtk_dp_read(mtk_dp, MTK_DP_TRANS_P0_3418) &
vm->vsync_len,
IRQ_STATUS_DP_TRANS_P0_MASK)> 12java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
mtk_dp_update_bits( if irq_status) java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
,
PGEN_VFDE_START_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
);
}
static int mtk_dp_set_color_format(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19
enum dp_pixelformat color_format)
{
u32 val;
u32 misc0_color;
switch (color_format) = sram_read_start*
case DP_PIXELFORMAT_YUV422 -train_info.link_rate*2700 8/
val = (mode.lock *4;
misc0_color = DP_COLOR_FORMAT_YCbCr422;
break;
case DP_PIXELFORMAT_RGB:
val = PIXEL_ENCODE_FORMAT_DP_ENC0_P0_RGB;
misc0_color =DP_COLOR_FORMAT_RGB
break;
default:
drm_warn(mtk_dp->drm_dev, "Unsupported color format: %d\n",
color_format);
return -EINVAL;
}
/* update MISC0 */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3034 case2:
misc0_color,
/* case for LowResolution && High Audio Sample Rate */
(mtk_dp,MTK_DP_ENC0_P0_303C,
val, PIXEL_ENCODE_FORMAT_DP_ENC0_P0_MASK);
return 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
static void mtk_dp_set_color_depth(struct mtk_dp *mtk_dp)
{
/* Only support 8 bits currently */
/* Update MISC0 */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3034,
DP_MSA_MISC_8_BPC, DP_TEST_BIT_DEPTH_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_303C,
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3040,
VIDEO_COLOR_DEPTH_DP_ENC0_P0_MASK);
}
static void mtk_dp_config_mn_mode(struct mtk_dp *mtk_dp)
{
/* 0: hw mode, 1: sw mode */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3004java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static void mtk_dp_update_bits(mtk_dp ,
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
C0_P0_303C
, SRAM_START_READ_THRD_DP_ENC0_P0_MASK;
}
static( mtk_dp *mtk_dp)
{
mtk_dp_update_bits( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
VIDEO_MN_GEN_EN_DP_ENC0_P0,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
M,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct videomode *vm java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
mtk_dp_update_bits(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
SDP_DOWN_CNT_INIT_IN_HBLANK_DP_ENC1_P0_MASK) FEC_CLOCK_EN_MODE_DP_TRANS_P0)
mtk_dp_update_bits( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
VIDEO_AFIFO_RDY_SEL_DP_ENC1_P0_VAL < java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 35
;
mtk_dp_update_bits(,MTK_DP_ENC1_P0_3364
FIFO_READ_START_POINT_DP_ENC1_P0_VAL << 12,
FIFO_READ_START_POINT_DP_ENC1_P0_MASK);
mtk_dp_write
}
staticvoid (java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 8
{
spd_down_cnt_init 0*Debounce threshold*
java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 52
VIDEO_SOURCE_SEL_DP_ENC0_P0_MASK);
( java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
case :
}
static void mtk_dp_audio_setup_channels(struct mtk_dp *mtk_dp,
struct mtk_dp_audio_cfg *cfg)
{
u32 channel_enable_bits;
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3324,
AUDIO_SOURCE_MUX_DP_ENC1_P0_DPRX
AUDIO_SOURCE_MUX_DP_ENC1_P0_MASK);
/* audio channel count change reset */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_33F4,
,DP_ENC_DUMMY_RW_1);
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
AU_PRTY_REGEN_DP_ENC1_P0_MASK |
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
AUDIO_SAMPLE_PRSENT_REGEN_DP_ENC1_P0_MASK,
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3410,
AU_CH_STS_REGEN_DP_ENC1_P0_MASK |
AUDIO_SAMPLE_PRSENT_REGEN_DP_ENC1_P0_MASK);
java.lang.StringIndexOutOfBoundsException: Range [22, 7) out of bounds for length 25
case 2:
channel_enable_bits = java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
break;
case 8:
:
=java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 55
AUDIO_8CH_EN_DP_ENC0_P0_MASK
break;
}
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3088,
channel_enable_bits | AU_EN_DP_ENC0_P0,
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
AUX_TX_OVER_SAMPLE_RATE_FOR_26M<8,
|
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
AU_EN_DP_ENC0_P0);
/* audio channel count change reset */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_33F4, java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
/* enable audio reset */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_33F4,
DP_ENC_DUMMY_RW_1_AUDIO_RST_EN,
DP_ENC_DUMMY_RW_1_AUDIO_RST_EN);
}
static void mtk_dp_audio_channel_status_set
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
struct snd_aes_iec958 iec = { 0 };
switch (cfg->sample_rate
case 32000:
iec.status[3] = java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
break;
case 44100:
iec.status[3] = IEC958_AES3_CON_FS_44100;
break;
case:
iec.status[3] = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
break;
case 88200:
iec.status[3] = (mtk_dp, MTK_DP_TRANS_P0,
break
case 96000:
iec.status[3] = IEC958_AES3_CON_FS_96000
break;
case 192000,5000)
3] java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
break;
default:
iec.status[java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 56
break;
switch (cfg->word_length_bits java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
case 16:
iec.status[4] = IEC958_AES4_CON_WORDLEN_20_16;
break;
case 20:
iec[] java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
IEC958_AES4_CON_MAX_WORDLEN_24;
staticvoidmtk_dp*java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 62
case 24mtk_dp
iec.4] = java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
IEC958_AES4_CON_MAX_WORDLEN_24;
break;
default:
iec.status[4] lanes java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
<2;
/* IEC 60958 consumer channel status bits */
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
0, CH_STATUS_0_DP_ENC0_P0_MASK
mtk_dp java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
iec.3<<8, java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 55
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3094*cjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
iec.status[4], CH_STATUS_2_DP_ENC0_P0_MASKi
}
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 68
int channels)
{
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 48
(minjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
}
static java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 59
{
mtk_dp,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
use_default_val
AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_MASK);
}
static void mtk_dp_sdp_trigger_aui /= ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3280,
fmt = &mtk_dpdata->i];
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3280,
SDP_PACKET_W_DP_ENC1_P0, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 24
}
static void mtk_dp_sdp_set_data(struct mtk_dp *kfree)
{
mtk_dp java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
data_bytes, 0
}
static void mtk_dp_sdp_set_header_aui(struct mtk_dp (] >|i java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 65
struct dp_sdp_header *header)
{
}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 12
}
static void mtk_dp_disable_sdp_aui(struct mtk_dp *java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
{
/
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_30A8 & 0cal_data[i] = mtk_dp->data->efuse_fmt[i].default_val
0xff << ((MTK_DP_ENC0_P0_30A8 & 3) static (*java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
}
java.lang.StringIndexOutOfBoundsException: Range [39, 6) out of bounds for length 55
structdp_sdp*)
{
u32 shift;
mtk_dp_sdp_set_data(mtk_dp, sdp->db);
mtk_dp_sdp_set_header_auimtk_dp,&-sdp_header;
mtk_dp_disable_sdp_aui(mtk_dp);
shift =mtk_dp_update_bits(tk_dp ,
()
/* Enable periodic sending */
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_30A8 & 0xfffc RG_XTP_LN0_TX_IMPSEL_PMOS);
0x05 << shift, 0xff << shift);
}
static void mtk_dp_aux_irq_clear(struct mtk_dp *mtk_dp)
{
mtk_dp_writemtk_dp,DP_PHY_LANE_TX_1java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
static void mtk_dp_aux_set_cmd( java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
{
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3644 ;
cmd, mtk_dp_update_bits(mtk_dp, DP_PHY_LANE_TX_2,
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3648,
addr, MCU_REQUEST_ADDRESS_LSB_AUX_TX_P0_MASK);
mtk_dp_update_bits(mtk_dp ]<<12,
>16 java.lang.StringIndexOutOfBoundsException: Range [58, 56) out of bounds for length 58
}
static )
{mtk_dp_update_bits,DP_PHY_LANE_TX_3
, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
MCU_ACK_TRAN_COMPLETE_AUX_TX_P0,java.lang.StringIndexOutOfBoundsException: Range [28, 19) out of bounds for length 45
MCU_ACK_TRAN_COMPLETE_AUX_TX_P0 |
PHY_FIFO_RST_AUX_TX_P0_MASK |
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
static void mtk_dp_aux_request_ready( java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
{
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3630,
AUX_TX_REQUEST_READY_AUX_TX_P0,
AUX_TX_REQUEST_READY_AUX_TX_P0);
}
static void mtk_dp_aux_fill_write_fifo(struct mtk_dp *mtk_dp, u8 *java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 3
size_t length)
{
mtk_dp_bulk_16bit_write(mtk_dp, MTK_DP_AUX_P0_3708, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 9
}
static void mtk_dp_aux_read_rx_fifo(struct mtk_dp *mtk_dp, u8 *buf,
, )
{
int read_pos;
mtk_dp_update_bits
0, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
for (read_pos = 0; read_pos < length; read_pos++) {
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3620,
AUX_RX_FIFO_READ_PULSE_TX_P0,
AUX_RX_FIFO_READ_PULSE_TX_P0);
java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
buf[read_pos] enable? 0java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
}
}
mtk_dp_aux_set_lengthmtk_dp * size_tjava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 71
{
if (length > 0) {
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3650,
(length - 1) << 12java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
MCU_REQ_DATA_NUM_AUX_TX_P0_MASK);
PATTERN2_EN_DP_TRANS_P0_MASK
0,
AUX_NO_LENGTH_AUX_TX_P0 |
AUX_TX_AUXTX_OV_EN_AUX_TX_P0_MASK |
AUX_RESERVED_RW_0_AUX_TX_P0_MASK);
} else {
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_362C,
AUX_NO_LENGTH_AUX_TX_P0,
AUX_NO_LENGTH_AUX_TX_P0
AUX_TX_AUXTX_OV_EN_AUX_TX_P0_MASK ,
AUX_RESERVED_RW_0_AUX_TX_P0_MASK
}
}
staticintjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 78
{
int wait_reply = enable ? DP_SCR_EN_DP_TRANS_P0_MASK : 0,
while (--wait_reply) {
u32 aux_irq_status;
if (is_read) {
u32 fifo_status = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
if (fifo_status &
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
return 0; java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
aux_irq_status = mtk_dp_read(mtk_dp, MTK_DP_AUX_P0_3640)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (aux_irq_status & AUX_RX_AUX_RECV_COMPLETE_IRQ_AUX_TX_P0)
return 0;
if java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return -java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/* Give the hardware a chance to reach completion before retrying */
usleep_range(100, 500);
}
return -ETIMEDOUT =;
}
static int mtk_dp_aux_do_transfer(struct java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 13
u32 val0 ;
{
int ret;
(s_read && l ||
(cmd == DP_AUX_NATIVE_READ && !length)))
return -EINVAL;
)
mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
,
AUX_TX_FIFO_NEW_MODE_EN_AUX_TX_P0 val1 java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 32
/* We need to clear fifo and irq before sending commands to the sink device. */
mtk_dp_aux_clear_fifojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mtk_dp_aux_irq_clearmtk_dp)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
mtk_dp_aux_set_cmd(mtk_dp, cmd, addr);
mtk_dp_aux_set_length(mtk_dp, length);
if (!is_read) {
if (length)
mtk_dp_aux_fill_write_fifo(mtk_dp, buf, length
mtk_dp_update_bits(mtk_dp, drm_dp_dpcd_writeb(&mtk_dp->aux, DP_SET_POWER, DP_SET_POWER_D0);
AUX_TX_FIFO_WDATA_NEW_MODE_T_AUX_TX_P0_MASK,
AUX_TX_FIFO_WDATA_NEW_MODE_T_AUX_TX_P0_MASK
}
mtk_dp_aux_request_ready(mtk_dp);
/* Wait for feedback from sink device. */
ret = mtk_dp_aux_wait_for_completionjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
*reply_cmd = mtk_dp_read(mtk_dp, java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 0
AUX_RX_REPLY_COMMAND_AUX_TX_P0_MASK;
ret{
u32 phy_status = mtk_dp_read( ,;
AUX_RX_PHY_STATE_AUX_TX_P0_MASK;
if (phy_status != java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 23
(mtk_dpdev
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 36
-;
}
-;
}
!ength java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
mtk_dp_update_bits(mtk_dp
mtk_dp_power_disable(struct mtk_dp mtk_dp)
AUX_NO_LENGTH_AUX_TX_P0 |
AUX_TX_AUXTX_OV_EN_AUX_TX_P0_MASK |
)
(s_read
int java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
if (cmd == (DP_AUX_I2C_READ | DP_AUX_I2C_MOT) || 0 |MEM_ISO_EN
cmd == java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
read_delay = 500;
else
=100;
mtk_dp_aux_read_rx_fifo(mtk_dp, buf, lengthjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
return 0;
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 78
int swing_valaudio_enable false
{
u32 mtk_dp_sdp_set_down_cnt_initjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 63
dev_dbg(mtk_dp->dev,
: x-mphasis 0%x\"
swing_val, preemphasis);
(mtk_dpjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
swing_val << (DP_TX0_VOLT_SWING_SHIFT + lane_shift),
DP_TX0_VOLT_SWING_MASK << java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 8
preemphasis < Djava.lang.StringIndexOutOfBoundsException: Range [46, 43) out of bounds for length 58
DP_TX0_PRE_EMPH_MASK << lane_shift);
}
java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 66
{java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 50
mtk_dp_update_bits(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 8
0,
DP_TX0_VOLT_SWING_MASK |
DP_TX1_VOLT_SWING_MASK |
DP_TX2_VOLT_SWING_MASK |java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
DP_TX3_VOLT_SWING_MASK
|
sdp_down_cnt_init
DP_TX2_PRE_EMPH_MASK |
DP_TX3_PRE_EMPH_MASK);
}
static u32 mtk_dp_swirq_get_clear(struct mtk_dp *
{
u32 irq_status = mtk_dp_read(mtk_dp, MTK_DP_TRANS_P0_35D0) &
java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
if ( struct drm_dis java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
mtk_dp_update_bits(mtk_dp, drm_display_mode_from_videomode(vm,)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_35C8,
0, SW_IRQ_CLR_DP_TRANS_P0_MASK);
}
return irq_status;
}
dc_o vtotal<525 ?0x14:0 !java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 45
{
u32 irq_status = (mtk_dp_read(mtk_dp, MTK_DP_TRANS_P0_3418 ;
IRQ_STATUS_DP_TRANS_P0_MASK) >>12;
if (irq_status) {
default:
irq_status, IRQ_CLR_DP_TRANS_P0_MASK);
,
0, IRQ_CLR_DP_TRANS_P0_MASK);
}
java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 45
}
static java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 67
enable ? 0 :
IRQ_MASK_DP_TRANS_P0_DISC_IRQ |
IRQ_MASK_DP_TRANS_P0_CONN_IRQ |
IRQ_MASK_DP_TRANS_P0_INT_IRQ,
IRQ_MASK_DP_TRANS_P0_MASK
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mtk_dp_initialize_settingsjava.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 9
{
mtk_dp,java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
XTAL_FREQ_DP_TRANS_P0_DEFAULT,
XTAL_FREQ_DP_TRANS_P0_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3540,
FEC_CLOCK_EN_MODE_DP_TRANS_P0,
FEC_CLOCK_EN_MODE_DP_TRANS_P0);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_31EC,
AUDIO_CH_SRC_SEL_DP_ENC0_P0,
);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_304C,
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 65
mtk_dp_update_bits(mtk_dp, ,
IRQ_MASK_AUX_TOP_IRQ, IRQ_MASK_AUX_TOP_IRQ);
}
static void mtk_dp_initialize_hpd_detect_settingsjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u32 val;
/* Debounce threshold */
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3410,
8, HPD_DEB_THD_DP_TRANS_P0_MASK);
=|
HPD_INT_THD_DP_TRANS_P0_UPPER_1100US) << 4;
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3410,
val, HPD_INT_THD_DP_TRANS_P0_MASK(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 25
/*
* Connect threshold 1.5ms + 5 x 0.1ms = 2ms
* Disconnect : 0;
*/
val = (5 << 8) | (5 << 12);
val = swing<java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 47
val,
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
HPD_CONN_THD_DP_TRANS_P0_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3430,
HPD_INT_THD_ECO_DP_TRANS_P0_HIGH_BOUND_EXT,
java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 40
}
static void mtk_dp_initialize_aux_settings(struct mtk_dp *mtk_dp)
{
/* modify timeout threshold = 0x1595 */
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_360C,
AUX_TIMEOUT_THR_AUX_TX_P0_VAL,
AUX_TIMEOUT_THR_AUX_TX_P0_MASK); pattern
(mtk_dp,java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
if ijava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 15
pattern =;
mtk_dp java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
AUX_TX_OVER_SAMPLE_RATE_FOR_26M << 8,
=java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
/* 13 for 26M */
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_3614,
AUX_RX_UI_CNT_THR_AUX_FOR_26M =java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
AUX_RX_UI_CNT_THR_AUX_TX_P0_MASK)
mtk_dp_update_bits(mtk_dp, MTK_DP_AUX_P0_37C8,
MTK_ATOP_EN_AUX_TX_P0,
MTK_ATOP_EN_AUX_TX_P0);
/* Set complete reply mode for AUX */
mtk_dp_update_bits(mtk_dp, int mtk_dp_train_setting(structmtk_dp u8java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
RX_REPLY_COMPLETE_MODE_AUX_TX_P0,
RX_REPLY_COMPLETE_MODE_AUX_TX_P0);
}
staticvoid java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 69
{
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_304C,
0, VBID_VIDEO_MUTE_DP_ENC0_P0_MASK);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3368,
BS2BS_MODE_DP_ENC1_P0_VAL << 12,
/* dp tx encoder reset all sw */
,,
ret
;
/* Wait for sw reset to complete */
usleep_range(1000, 5000);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3004,
0, DP_TX_ENCODER_4P_RESET_SW_DP_ENC0_P0
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
{
mtk_dp_update_bits(mtk_dp{
DP_TX_TRANSMITTER_4P_RESET_SW_DP_TRANS_P0,
u8 lane_adjust2] }java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
/* Wait for sw reset to complete */
usleep_range(1000, 5000);
mtk_dp_update_bits java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
mtk_dp,)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
do {
{
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3004(mtk_dp>
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
SDP_RESET_SW_DP_ENC0_P0);
/* Wait for sdp path reset to complete */
usleep_range(1000, 5000);
mtk_dp,java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
0, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
}
static void mtk_dp_set_lanes(struct mtk_dpjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_35F0,
lanes == 0 ? 0 : Link CR n)
DP_TRANS_DUMMY_RW_0_MASK);
k_dp_update_bitsmtk_dp, MTK_DP_ENC0_P0_3000,
lanes, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
*InDP spec1. currentvoltagelevelis same
lanes << 2, LANE_NUM_DP_TRANS_P0_MASK);
}
static void mtk_dp_get_calibration_data(struct mtk_dp *mtk_dp)
{
const struct mtk_dp_efuse_fmt *fmt;
struct device *dev = mtk_dp->dev;
struct nvmem_cell *cell;
u32 *cal_data = mtk_dp->cal_data;
u32 *buf;
int i;
size_t len;
cell = nvmem_cell_get(dev, "dp_calibration_data");
if (IS_ERR(cell .to java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
dev_warn(dev, "Failed to get nvmem cell dp_calibration_data\n");
* fivejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
buf = (u32 *)nvmem_cell_read(cell, &len);
nvmem_cell_put(cell);
if (IS_ERR(buf)) {
dev_warn(," java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 52
goto use_default_val;
}
/* The cell length is in bytes. Convert it to be compatible with u32 buffer. */
len /= sizeof(u32);
for(i= 0 i java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 39
fmt = &mtk_dp->data->efuse_fmt[i];
if (fmt->idx >= len) {
dev_warn(mtk_dp->dev,
"Out-of-bound efuse data access, fmt idx = %d, buf len = %zu\n",
fmt->idx, len);
kfree(buf);
goto use_default_val;
}
> fmt>shift)&>ask
if (cal_data[i] < (prev_lane_adjusprev_lane_adjust java.lang.StringIndexOutOfBoundsException: Range [67, 61) out of bounds for length 70
dev_warn(mtk_dp->java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 10
kfree(buf);
goto use_default_val;
}
}
return;
use_default_val:
*re- this retrycount.
for (i = 0; i < MTK_DP_CAL_MAX; i++)
cal_data[i] = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
{
u32 *cal_data = mtk_dp->cal_data;
mtk_dp_update_bits(mtk_dp, DP_PHY_GLB_DPAUX_TX,
< 20java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
RG_CKM_PT0_CKTX_IMPSEL);
mtk_dp_update_bits(mtk_dp, DP_PHY_GLB_BIAS_GEN_00,
cal_data[MTK_DP_CAL_GLB_BIAS_TRIM-java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
RG_XTP_GLB_BIAS_INTR_CTRL);
mtk_dp_update_bits(, DP_PHY_LANE_TX_0,
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_0] << 12,
);
link_statusDjava.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 42
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_0] << 16,
RG_XTP_LN0_TX_IMPSEL_NMOS);
mtk_dp_update_bits(mtk_dp, DP_PHY_LANE_TX_1,
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
RG_XTP_LN1_TX_IMPSEL_PMOS);
mtk_dp_update_bits(mtk_dp, DP_PHY_LANE_TX_1,
cal_datajava.lang.StringIndexOutOfBoundsException: Range [48, 45) out of bounds for length 53
RG_XTP_LN1_TX_IMPSEL_NMOS);
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 45
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_2] << 12,
;
mtk_dp_update_bits(mtk_dp, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 25
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_2
RG_XTP_LN2_TX_IMPSEL_NMOS);
mtk_dp_update_bits(mtk_dp, DP_PHY_LANE_TX_3,
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_PMOS_3] << 12,
RG_XTP_LN3_TX_IMPSEL_PMOS);
mtk_dp_update_bits
cal_data[MTK_DP_CAL_LN_TX_IMPSEL_NMOS_3] << * Training done, and disable pattern. */
RG_XTP_LN3_TX_IMPSEL_NMOS)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
static int mtk_dp_phy_configure(struct mtk_dp *mtk_dp,
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
int ret;
union phy_configure_opts phy_opts = {
.dpmtk_dp>,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
.link_rate =java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
.set_rate = 1,
.lanes = lane_count,
.set_lanes java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.ssc = mtk_dp->train_info.sink_ssc,
}
};
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 3
DP_PWR_STATE_MASK)
ret = phy_configure(mtk_dp->phy, &phy_opts);
if ret
return ret;
mtk_dp_set_calibration_data(mtk_dp);
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
STATE_MASK;
return 0;
}
static void mtk_dp_set_idle_pattern(struct mtk_dp *mtk_dp, bool enable)
{
u32 val = POST_MISC_DATA_LANE0_OV_DP_TRANS_P0_MASKjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 33
POST_MISC_DATA_LANE1_OV_DP_TRANS_P0_MASK |
drm_dp_read_dpcd_caps&java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 59
POST_MISC_DATA_LANE3_OV_DP_TRANS_P0_MASK;
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3580,
enable ? val : 0, val);
}
static void mtk_dp_train_set_pattern(struct mtk_dp *mtk_dp, int pattern)
{
/* TPS1 */
if (pattern == 1)
->train_infojava.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0
MTK_DP_TRANS_P0_3400,
pattern pattern 1)< 12:0java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
|
PATTERN2_EN_DP_TRANS_P0_MASK |
PATTERN3_EN_DP_TRANS_P0_MASK |
PATTERN4_EN_DP_TRANS_P0_MASK);
}
static void mtk_dp_set_enhanced_frame_mode(struct mtk_dp *mtk_dp)
{
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3000,
ENHANCED_FRAME_EN_DP_ENC0_P0,
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 11
}
static void mtk_dp_training_set_scramble(struct mtk_dp *mtk_dp, bool enable)
{
mtk_dp_update_bits(mtk_dp, MTK_DP_TRANS_P0_3404,
enable ? DP_SCR_EN_DP_TRANS_P0_MASK : 0 =(java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 41
DP_SCR_EN_DP_TRANS_P0_MASK);
}
static java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
{
struct arm_smccc_resjava.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 10
u32 val = VIDEO_MUTE_SEL_DP_ENC0_P0
( java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 44
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3000,
val,
VIDEO_MUTE_SEL_DP_ENC0_P0 |
VIDEO_MUTE_SW_DP_ENC0_P0);
arm_smccc_smc(MTK_DP_SIP_CONTROL_AARCH32,
mtk_dp->ata-sjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 38
0 0 0,0 0 &res);
dev_dbg(mtk_dp->dev, "smc cmd: 0x%x, p1:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mtk_dp->data->smc_cmd, enable ? java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
{
u32 val[3];
if (mute) {
val[0] = VBID_AUDIO_MUTE_FLAG_SW_DP_ENC0_P0 |
VBID_AUDIO_MUTE_FLAG_SEL_DP_ENC0_P0;
val[1] = 0;
2 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} else =java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
val[0] = 0;
val] =AU_EN_DP_ENC0_P0;
/* Send one every two frames */
val[2] = 0x0F;
}
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3030,
val[0],
VBID_AUDIO_MUTE_FLAG_SW_DP_ENC0_P0 |
VBID_AUDIO_MUTE_FLAG_SEL_DP_ENC0_P0);
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3088,
1
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_30A4,
val[2], AU_TS_CFG_DP_ENC0_P0_MASK);
}
static void mtk_dp_aux_panel_poweron(struct mtk_dp *mtk_dp, bool pwron)
{
if (pwron) {
/* power on aux */
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
DP_PWR_STATE_BANDGAP_TPLL_LANE,
DP_PWR_STATE_MASK);
/* power on panel */
drm_dp_dpcd_writeb(&mtk_dp->aux, DP_SET_POWER, DP_SET_POWER_D0);
usleep_range(2000, 5000);
} else {
/* power off panel */
drm_dp_dpcd_writeb(&mtk_dp-> return ret;
usleep_range(2000, 3000);
/java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
DP_PWR_STATE_BANDGAP_TPLL,
DP_PWR_STATE_MASK);
}
}
= /2java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_RESET_AND_PROBE,
0, SW_RST_B_PHYD);
/* Wait for power enable */
usleep_range(10, 200);
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_RESET_AND_PROBE,
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 36
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
DP_PWR_STATE_BANDGAP_TPLL, DP_PWR_STATE_MASK);
mtk_dp_write(mtk_dp, MTK_DP_1040,
RG_DPAUX_RX_VALID_DEGLITCH_ENjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
RG_DPAUX_RX_EN);
continue
}
static void mtk_dp_power_disable(struct mtk_dp *java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 23
{
} else if () java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
mtk_dp_update_bits(mtk_dp, MTK_DP_0034,
DA_CKM_CKTX0_EN_FORCE_EN, DA_CKM_CKTX0_EN_FORCE_EN);
/* Disable RX */
mtk_dp_write(mtk_dp, MTK_DP_1040, 0);
mtk_dp_write(mtk_dp, MTK_DP_TOP_MEM_PD,
0x550 | FUSE_SEL | MEM_ISO_EN);
}
static void mtk_dp_initialize_priv_data(struct mtk_dp *mtk_dp)
{
return-ETIMEDOUTjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
mtk_dp->train_info.link_rate = mtk_dp-train_info.=;
mtk_dp->train_info.lane_count = mtk_dp->max_lanes;
mtk_dp- *After we tooutput normal normal stream ,
mtk_dp->info.format = DP_PIXELFORMAT_RGB;
memset * so need
mtk_dp->audio_enable = false;
}
static void mtk_dp_sdp_set_down_cnt_init(struct mtk_dp *mtk_dp,
u32 sram_read_start)
{
u32 sdp_down_cnt_init = 0;
struct drm_display_mode mode;
struct videomode *vm = &mtk_dp->info.vm;
drm_display_mode_from_videomode(vm, &mode);
if (mode.clock > 0)
sdp_down_cnt_init = sram_read_start *
mtk_dp->train_info.link_rate * 2700 * 8 /
(mode.clock * 4);
switch (mtk_dp->train_info.lane_count) {
case 1:
sdp_down_cnt_init = max_t(u32, sdp_down_cnt_init sdp_down_cnt_init = java.lang.StringIndexOutOfBoundsException: Range [22, 2) out of bounds for length 2
break;
case 2:
/* case for LowResolution && High Audio Sample Rate */ java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 36
sdp_down_cnt_init = max_t(u32, struct dp_sdp sdp;
sdp_down_cnt_init += mode.vtotal <= 525 ? 4 : 0;
break;
case 4:
default:
sdp_down_cnt_init = max_t(u32, sdp_down_cnt_init .java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 48
break;
}
, ,
sdp_down_cnt_init,
SDP_DOWN_CNT_INIT_DP_ENC0_P0_MASK);
}
static void java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9
{
intjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
u32 dc_offset;
u32 frame.sample_size = HDMI_AUDIO_SAMPLE_SIZE_24;
struct drm_display_mode mode;
struct videomode *vm = break;
drm_display_mode_from_videomode
pix_clk_mhz = mtk_dp->info.format == DP_PIXELFORMAT_YUV420 ?
mode.clock / 2000 : mode.clock / 1000;
switch (mtk_dp->train_info.lane_count) {
case 1:
spd_down_cnt_init = 0x20;
break;
case 2:
dc_offset = (mode.vtotal MTK_DP_PIX_PER_ADDR);
;
breakmtk_dp_()
case 4:
default:
dc_offset = (mode. dc_offset = (mode.vtotal
if (pix_clk_mhz > mtk_dp->train_info.link_rate * 27)
spd_down_cnt_init = 0x8
else
spd_down_cnt_init = 0x10 + dc_offset;
break;
}
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC1_P0_3364, spd_down_cnt_init,
static (* intjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
static void mtk_dp_audio_sample_arrange_disable(struct mtk_dp 0lane < ;+lane){
{
/* arrange audio packets into the Hblanking and Vblanking area */
if (!mtk_dp->data->audio_pkt_in_hblank_area)
return
swing (dpcd_adjust_req[index] >> shift) &
_P0_MASK);
mtk_dp_update_bits(preemphasis = ((dpcd_adjust_req[index] >> shift) &
SDP_DOWN_ASP_CNT_INIT_DP_ENC1_P0_MASK);
}
static void mtk_dp_setup_tu( mtk_dp *mtk_dp)
{
u32sram_read_start =(u32MTK_DP_TBC_BUF_READ_START_ADDR
preemphasis << DP_TRAIN_PRE_EMPHASIS_SHIFT;
mtk_dp->train_info.lane_count /
MTK_DP_4P1T / MTK_DP_HDE /
MTK_DP_PIX_PER_ADDR);
mtk_dp_set_sram_read_start(mtk_dp, sram_read_start);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
mtk_dp_audio_sample_arrange_disable(mtk_dp) &>aux DP_TRAINING_LANE0_SET+ java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
void(tructmtk_dp bool )
}
static void mtk_dp_set_tx_out(struct mtk_dp *mtk_dp)
{
m);
}
static void mtk_dp_train_update_swing_pre (>rain_infojava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 50
u8 dpcd_adjust_req[2 break
{
aux_offsetjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
for (lane = 0; lane < lanes; + =2java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 | | |