	.file	"extr_analogix_dp_reg.c_analogix_dp_send_psr_spd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to apply PSR %d\n"
	.text
	.p2align 4
	.globl	analogix_dp_send_psr_spd
	.type	analogix_dp_send_psr_spd, @function
analogix_dp_send_psr_spd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	edi, DWORD PTR IF_EN[rip]
	mov	rsi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	add	rsi, QWORD PTR 8[rbx]
	not	edi
	and	edi, eax
	call	writel@PLT
	mov	rsi, QWORD PTR ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL[rip]
	add	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR PSR_FRAME_UP_TYPE_BURST[rip]
	or	edi, DWORD PTR PSR_CRC_SEL_HARDWARE[rip]
	call	writel@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_HB0[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_HB1[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_HB2[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_HB3[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	xor	edi, edi
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_PB0[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_PB1[rip]
	mov	edi, 22
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_PB2[rip]
	mov	edi, 206
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rsi, QWORD PTR ANALOGIX_DP_SPD_PB3[rip]
	mov	edi, 93
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_VSC_SHADOW_DB0[rip]
	add	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rax]
	call	writel@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR ANALOGIX_DP_VSC_SHADOW_DB1[rip]
	add	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 4[rax]
	call	writel@PLT
	mov	rdi, QWORD PTR ANALOGIX_DP_VIDEO_CTL_3[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	rsi, QWORD PTR ANALOGIX_DP_VIDEO_CTL_3[rip]
	add	rsi, QWORD PTR 8[rbx]
	xor	r12d, r12d
	or	eax, DWORD PTR REUSE_SPD_EN[rip]
	mov	edi, eax
	call	writel@PLT
	mov	rdi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	edi, DWORD PTR IF_EN[rip]
	or	eax, DWORD PTR IF_UP[rip]
	mov	rsi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	add	rsi, QWORD PTR 8[rbx]
	not	edi
	and	edi, eax
	call	writel@PLT
	mov	rdi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	or	eax, DWORD PTR IF_EN[rip]
	mov	rsi, QWORD PTR ANALOGIX_DP_PKT_SEND_CTL[rip]
	mov	edi, eax
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	test	r13d, r13d
	je	.L1
	imul	r9d, DWORD PTR DP_TIMEOUT_PSR_LOOP_MS[rip], 1000
	mov	rax, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	je	.L4
	xor	ecx, ecx
	cmp	QWORD PTR DP_PSR_SINK_ACTIVE_RFB[rip], 0
	sete	cl
.L3:
	mov	edi, DWORD PTR analogix_dp_get_psr_status[rip]
	mov	r8d, 1500
	xor	edx, edx
	mov	rsi, rbx
	call	readx_poll_timeout@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR [rbx]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	xor	ecx, ecx
	cmp	QWORD PTR DP_PSR_SINK_INACTIVE[rip], 0
	sete	cl
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	analogix_dp_send_psr_spd, .-analogix_dp_send_psr_spd
	.comm	analogix_dp_get_psr_status,4,4
	.comm	REUSE_SPD_EN,4,4
	.comm	PSR_FRAME_UP_TYPE_BURST,4,4
	.comm	PSR_CRC_SEL_HARDWARE,4,4
	.comm	IF_UP,4,4
	.comm	IF_EN,4,4
	.comm	DP_TIMEOUT_PSR_LOOP_MS,4,4
	.comm	DP_PSR_SINK_INACTIVE,8,8
	.comm	DP_PSR_SINK_ACTIVE_RFB,8,8
	.comm	ANALOGIX_DP_VSC_SHADOW_DB1,8,8
	.comm	ANALOGIX_DP_VSC_SHADOW_DB0,8,8
	.comm	ANALOGIX_DP_VIDEO_CTL_3,8,8
	.comm	ANALOGIX_DP_SPD_PB3,8,8
	.comm	ANALOGIX_DP_SPD_PB2,8,8
	.comm	ANALOGIX_DP_SPD_PB1,8,8
	.comm	ANALOGIX_DP_SPD_PB0,8,8
	.comm	ANALOGIX_DP_SPD_HB3,8,8
	.comm	ANALOGIX_DP_SPD_HB2,8,8
	.comm	ANALOGIX_DP_SPD_HB1,8,8
	.comm	ANALOGIX_DP_SPD_HB0,8,8
	.comm	ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL,8,8
	.comm	ANALOGIX_DP_PKT_SEND_CTL,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_analogix_dp_reg.c_analogix_dp_send_psr_spd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to apply PSR %d\012\000"
	.text
	.align	2
	.global	analogix_dp_send_psr_spd
	.syntax unified
	.arm
	.fpu softvfp
	.type	analogix_dp_send_psr_spd, %function
analogix_dp_send_psr_spd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r7, .L13
	mov	r4, r0
	ldr	r3, [r7]
	ldr	r0, [r0, #4]
	sub	sp, sp, #12
	add	r0, r0, r3
	mov	r5, r1
	mov	r6, r2
	bl	readl
	ldr	r8, .L13+4
	ldr	r3, [r7]
	ldr	r2, [r8]
	ldr	r1, [r4, #4]
	bic	r0, r0, r2
	add	r1, r1, r3
	bl	writel
	ldr	r2, .L13+8
	ldr	r0, .L13+12
	ldr	r3, .L13+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r4, #4]
	ldr	r0, [r0]
	add	r1, r1, r2
	orr	r0, r0, r3
	bl	writel
	ldr	r3, .L13+20
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	ldr	r0, [r5, #4]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+24
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	ldr	r0, [r5, #8]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+28
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	ldr	r0, [r5, #12]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+32
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	ldr	r0, [r5, #16]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+36
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, #0
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+40
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, #22
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+44
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, #206
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+48
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mov	r0, #93
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L13+52
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r3, [r5]
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	writel
	ldr	r3, .L13+56
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r3, [r5]
	ldr	r9, .L13+60
	add	r1, r1, r2
	ldr	r0, [r3, #4]
	bl	writel
	ldr	r3, [r9]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readl
	ldr	r3, .L13+64
	ldr	r2, [r9]
	ldr	r3, [r3]
	ldr	r1, [r4, #4]
	orr	r0, r0, r3
	add	r1, r1, r2
	bl	writel
	ldr	r3, [r7]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readl
	ldr	r3, .L13+68
	ldr	r2, [r8]
	ldr	r3, [r3]
	ldr	r1, [r4, #4]
	orr	r0, r0, r3
	ldr	r3, [r7]
	bic	r0, r0, r2
	add	r1, r1, r3
	bl	writel
	ldr	r3, [r7]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readl
	ldr	r3, [r7]
	ldr	r2, [r8]
	ldr	r1, [r4, #4]
	orr	r0, r0, r2
	add	r1, r1, r3
	bl	writel
	cmp	r6, #0
	beq	.L1
	ldr	r3, [r5]
	ldr	r2, .L13+72
	ldr	r3, [r3, #4]
	ldr	r0, [r2]
	cmp	r3, #0
	ldrne	r3, .L13+76
	ldreq	r3, .L13+80
	ldr	r2, .L13+84
	ldr	r3, [r3]
	ldr	r2, [r2]
	clz	r3, r3
	rsb	r1, r2, r2, lsl #5
	add	r2, r2, r1, lsl #2
	ldr	r1, .L13+88
	lsl	r2, r2, #3
	stm	sp, {r1, r2}
	lsr	r3, r3, #5
	mov	r2, #0
	mov	r1, r4
	bl	readx_poll_timeout
	subs	r6, r0, #0
	bne	.L12
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	mov	r2, r6
	ldr	r0, [r4]
	ldr	r1, .L13+92
	bl	dev_warn
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L14:
	.align	2
.L13:
	.word	ANALOGIX_DP_PKT_SEND_CTL
	.word	IF_EN
	.word	ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL
	.word	PSR_FRAME_UP_TYPE_BURST
	.word	PSR_CRC_SEL_HARDWARE
	.word	ANALOGIX_DP_SPD_HB0
	.word	ANALOGIX_DP_SPD_HB1
	.word	ANALOGIX_DP_SPD_HB2
	.word	ANALOGIX_DP_SPD_HB3
	.word	ANALOGIX_DP_SPD_PB0
	.word	ANALOGIX_DP_SPD_PB1
	.word	ANALOGIX_DP_SPD_PB2
	.word	ANALOGIX_DP_SPD_PB3
	.word	ANALOGIX_DP_VSC_SHADOW_DB0
	.word	ANALOGIX_DP_VSC_SHADOW_DB1
	.word	ANALOGIX_DP_VIDEO_CTL_3
	.word	REUSE_SPD_EN
	.word	IF_UP
	.word	analogix_dp_get_psr_status
	.word	DP_PSR_SINK_ACTIVE_RFB
	.word	DP_PSR_SINK_INACTIVE
	.word	DP_TIMEOUT_PSR_LOOP_MS
	.word	1500
	.word	.LC0
	.size	analogix_dp_send_psr_spd, .-analogix_dp_send_psr_spd
	.comm	analogix_dp_get_psr_status,4,4
	.comm	REUSE_SPD_EN,4,4
	.comm	PSR_FRAME_UP_TYPE_BURST,4,4
	.comm	PSR_CRC_SEL_HARDWARE,4,4
	.comm	IF_UP,4,4
	.comm	IF_EN,4,4
	.comm	DP_TIMEOUT_PSR_LOOP_MS,4,4
	.comm	DP_PSR_SINK_INACTIVE,4,4
	.comm	DP_PSR_SINK_ACTIVE_RFB,4,4
	.comm	ANALOGIX_DP_VSC_SHADOW_DB1,4,4
	.comm	ANALOGIX_DP_VSC_SHADOW_DB0,4,4
	.comm	ANALOGIX_DP_VIDEO_CTL_3,4,4
	.comm	ANALOGIX_DP_SPD_PB3,4,4
	.comm	ANALOGIX_DP_SPD_PB2,4,4
	.comm	ANALOGIX_DP_SPD_PB1,4,4
	.comm	ANALOGIX_DP_SPD_PB0,4,4
	.comm	ANALOGIX_DP_SPD_HB3,4,4
	.comm	ANALOGIX_DP_SPD_HB2,4,4
	.comm	ANALOGIX_DP_SPD_HB1,4,4
	.comm	ANALOGIX_DP_SPD_HB0,4,4
	.comm	ANALOGIX_DP_PSR_FRAME_UPDATE_CTRL,4,4
	.comm	ANALOGIX_DP_PKT_SEND_CTL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
