	.file	"extr_i915_request.c_i915_request_wait.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	i915_request_wait
	.type	i915_request_wait, @function
i915_request_wait:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	lea	r15, 8[r12]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	r14, rbp
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	ebx, DWORD PTR TASK_INTERRUPTIBLE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	DWORD PTR I915_WAIT_INTERRUPTIBLE[rip], esi
	cmove	ebx, DWORD PTR TASK_UNINTERRUPTIBLE[rip]
	call	might_sleep@PLT
	mov	rdi, rbp
	shr	rdi, 63
	call	GEM_BUG_ON@PLT
	mov	rdi, r15
	call	dma_fence_is_signaled@PLT
	test	rax, rax
	jne	.L1
	test	rbp, rbp
	jne	.L5
	mov	r14, QWORD PTR ETIME[rip]
	neg	r14
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, r13d
	mov	rdi, r12
	call	trace_i915_request_wait_begin@PLT
	mov	rax, QWORD PTR [r12]
	xor	edx, edx
	xor	esi, esi
	mov	ecx, DWORD PTR _THIS_IP_[rip]
	mov	rdi, QWORD PTR [rax]
	call	mutex_acquire@PLT
	mov	rdx, QWORD PTR CONFIG_DRM_I915_SPIN_REQUEST[rip]
	test	rdx, rdx
	jne	.L32
.L6:
	test	DWORD PTR I915_WAIT_PRIORITY[rip], r13d
	jne	.L33
.L8:
	mov	eax, DWORD PTR current[rip]
	mov	r13, rsp
	mov	rdi, r15
	mov	r14, rbp
	mov	edx, DWORD PTR request_wait_wake[rip]
	mov	rsi, r13
	mov	DWORD PTR 4[rsp], eax
	call	dma_fence_add_callback@PLT
	test	rax, rax
	je	.L16
.L7:
	mov	rax, QWORD PTR [r12]
	mov	edx, DWORD PTR _THIS_IP_[rip]
	xor	esi, esi
	mov	rdi, QWORD PTR [rax]
	call	mutex_release@PLT
	mov	rdi, r12
	call	trace_i915_request_wait_end@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR current[rip]
	mov	edi, ebx
	call	signal_pending_state@PLT
	test	rax, rax
	jne	.L34
	test	rbp, rbp
	je	.L35
	mov	rdi, rbp
	call	io_schedule_timeout@PLT
	mov	rbp, rax
.L16:
	mov	edi, ebx
	call	set_current_state@PLT
	mov	rdi, r12
	call	i915_request_completed@PLT
	test	rax, rax
	je	.L12
	mov	rdi, r15
	mov	r14, rbp
	call	dma_fence_signal@PLT
.L13:
	mov	edi, DWORD PTR TASK_RUNNING[rip]
	call	__set_current_state@PLT
	mov	rsi, r13
	mov	rdi, r15
	call	dma_fence_remove_callback@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L32:
	mov	esi, ebx
	mov	rdi, r12
	call	__i915_spin_request@PLT
	test	rax, rax
	je	.L6
	mov	rdi, r15
	call	dma_fence_signal@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, r12
	call	i915_request_started@PLT
	test	eax, eax
	je	.L36
.L10:
	mov	esi, DWORD PTR I915_PRIORITY_WAIT[rip]
	mov	rdi, r12
	call	i915_schedule_bump_priority@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L34:
	mov	r14, QWORD PTR ERESTARTSYS[rip]
	neg	r14
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L35:
	mov	r14, QWORD PTR ETIME[rip]
	neg	r14
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edi, DWORD PTR 12[r12]
	call	INTEL_GEN@PLT
	cmp	eax, 5
	jle	.L10
	mov	rdi, r12
	call	gen6_rps_boost@PLT
	jmp	.L10
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	i915_request_wait, .-i915_request_wait
	.comm	request_wait_wake,4,4
	.comm	current,4,4
	.comm	_THIS_IP_,4,4
	.comm	TASK_UNINTERRUPTIBLE,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	I915_WAIT_PRIORITY,4,4
	.comm	I915_WAIT_INTERRUPTIBLE,4,4
	.comm	I915_PRIORITY_WAIT,4,4
	.comm	ETIME,8,8
	.comm	ERESTARTSYS,8,8
	.comm	CONFIG_DRM_I915_SPIN_REQUEST,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_i915_request.c_i915_request_wait.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	i915_request_wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	i915_request_wait, %function
i915_request_wait:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L37
	sub	sp, sp, #16
	ldr	r3, [r3]
	mov	r4, r2
	tst	r1, r3
	ldr	r3, .L37+4
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldrne	r3, .L37+8
	ldreq	r3, .L37+12
	mov	r9, r1
	ldr	r6, [r3]
	add	r7, r5, #4
	bl	might_sleep
	lsr	r0, r4, #31
	bl	GEM_BUG_ON
	mov	r0, r7
	bl	dma_fence_is_signaled
	subs	r10, r0, #0
	bne	.L1
	cmp	r4, #0
	bne	.L5
	ldr	r3, .L37+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L37+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r1, r9
	mov	r0, r5
	bl	trace_i915_request_wait_begin
	ldr	r8, .L37+20
	ldr	r2, [r5]
	ldr	r3, [r8]
	ldr	r0, [r2]
	mov	r1, r10
	mov	r2, r10
	bl	mutex_acquire
	ldr	r3, .L37+24
	ldr	r2, [r3]
	cmp	r2, #0
	bne	.L32
.L6:
	ldr	r3, .L37+28
	ldr	r3, [r3]
	tst	r9, r3
	bne	.L33
.L8:
	ldr	r9, .L37+32
	ldr	r2, .L37+36
	ldr	r3, [r9]
	mov	r0, r7
	ldr	r2, [r2]
	add	r1, sp, #4
	str	r3, [sp, #8]
	bl	dma_fence_add_callback
	cmp	r0, #0
	beq	.L16
.L7:
	ldr	r3, [r5]
	mov	r1, #0
	ldr	r2, [r8]
	ldr	r0, [r3]
	bl	mutex_release
	mov	r0, r5
	bl	trace_i915_request_wait_end
	b	.L1
.L12:
	mov	r0, r6
	ldr	r1, [r9]
	bl	signal_pending_state
	cmp	r0, #0
	bne	.L34
	cmp	r4, #0
	beq	.L35
	mov	r0, r4
	bl	io_schedule_timeout
	mov	r4, r0
.L16:
	mov	r0, r6
	bl	set_current_state
	mov	r0, r5
	bl	i915_request_completed
	cmp	r0, #0
	beq	.L12
	mov	r0, r7
	bl	dma_fence_signal
.L13:
	ldr	r3, .L37+40
	ldr	r0, [r3]
	bl	__set_current_state
	mov	r0, r7
	add	r1, sp, #4
	bl	dma_fence_remove_callback
	b	.L7
.L32:
	mov	r1, r6
	mov	r0, r5
	bl	__i915_spin_request
	cmp	r0, #0
	beq	.L6
	mov	r0, r7
	bl	dma_fence_signal
	b	.L7
.L33:
	mov	r0, r5
	bl	i915_request_started
	cmp	r0, #0
	beq	.L36
.L10:
	ldr	r3, .L37+44
	mov	r0, r5
	ldr	r1, [r3]
	bl	i915_schedule_bump_priority
	b	.L8
.L34:
	ldr	r3, .L37+48
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L13
.L35:
	ldr	r3, .L37+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L13
.L36:
	ldr	r0, [r5, #8]
	bl	INTEL_GEN
	cmp	r0, #5
	ble	.L10
	mov	r0, r5
	bl	gen6_rps_boost
	b	.L10
.L31:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	I915_WAIT_INTERRUPTIBLE
	.word	.LC0
	.word	TASK_INTERRUPTIBLE
	.word	TASK_UNINTERRUPTIBLE
	.word	ETIME
	.word	_THIS_IP_
	.word	CONFIG_DRM_I915_SPIN_REQUEST
	.word	I915_WAIT_PRIORITY
	.word	current
	.word	request_wait_wake
	.word	TASK_RUNNING
	.word	I915_PRIORITY_WAIT
	.word	ERESTARTSYS
	.size	i915_request_wait, .-i915_request_wait
	.comm	request_wait_wake,4,4
	.comm	current,4,4
	.comm	_THIS_IP_,4,4
	.comm	TASK_UNINTERRUPTIBLE,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	I915_WAIT_PRIORITY,4,4
	.comm	I915_WAIT_INTERRUPTIBLE,4,4
	.comm	I915_PRIORITY_WAIT,4,4
	.comm	ETIME,4,4
	.comm	ERESTARTSYS,4,4
	.comm	CONFIG_DRM_I915_SPIN_REQUEST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
