Unverified Commit 92cf229c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11126 drm/amd/display: Check pipe offset before setting vblank

parents 3e84c5c1 4d0ed265
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -211,8 +211,12 @@ bool dce110_vblank_set(struct irq_service *irq_service,
						   info->ext_id);
	uint8_t pipe_offset = dal_irq_src - IRQ_TYPE_VBLANK;

	struct timing_generator *tg =
			dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg;
	struct timing_generator *tg;

	if (pipe_offset >= MAX_PIPES)
		return false;

	tg = dc->current_state->res_ctx.pipe_ctx[pipe_offset].stream_res.tg;

	if (enable) {
		if (!tg || !tg->funcs->arm_vert_intr(tg, 2)) {