Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4609913pxj; Wed, 12 May 2021 09:11:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy94vPyTwIf2RcTiFYis1a0uw28cNrT3U/zDe3yFUFi+aljpYGAjaoZ14AkYuR4vP+XeT8C X-Received: by 2002:a1c:f618:: with SMTP id w24mr39275461wmc.93.1620835879807; Wed, 12 May 2021 09:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835879; cv=none; d=google.com; s=arc-20160816; b=0fGWuEpEFHjXQ7Wy5cW2jZlphUGsEUYIoV8QRp3H8nIQ1fgKd9nIWg+YBCVzwt6YK5 8o93vfM/YBkWIwOQCmWZm1HZFcWw3kvlH2OS2xdwhuZ5SKqoSP/8d4ZWIYxr14ar7F+K ZtVnWjGcKDqI1ej1ZY8npD1FNKQAKDmYANKMModD22PlBiyC52SnXuLuAEUm0n8qDHCc RXKyg3m7svxXe5JF3K6IdS7v69SbASs8UndSGXai6IWYC+6r3hHmk6Damy5M/YMYQy2L oKaWwsF0BmfUF6iikc9wnnQm3p5j98Ajez0USb/sQJninCQDczXFv2UeWB872h60ewJz YIHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S7P9fmS2uC6q2Crd0Q67pXm66GgC3gqvXn691RP5EEE=; b=C6bgYDJx/SwGBHrHiskiEXD6OB7SF5l6Dbqj/IsC5SbT1oOdadaIyXtzplFR9F462g 3UQkuw0MU4zZTuyO/mZ8rRPb43Mq7BhIk5lSqC1AUUhXntJJtLRvfAdJD/0qssTU/P23 KTKLkqVtlD9Rb1PmVOAUntuTPbAQO2KyPJpWuO+k7L8lVgWzeOK+C2Ex6CZk1STUGwZ0 4B1UWzI7qEZmzFbqzPNNmwEpyAL1/vVLE/jLDVNihUDpSFLd6cbk2h+geVC4uza0nJe1 mB32S+QN6Y4mT5G8Yao9BQ93qyyGrUpD3NWcNsQsBPRewy2AybbI7d3selO5mUve47nY 7zMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="C72/bFuz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si287926ejh.586.2021.05.12.09.10.55; Wed, 12 May 2021 09:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="C72/bFuz"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239275AbhELQHk (ORCPT + 99 others); Wed, 12 May 2021 12:07:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235636AbhELP2n (ORCPT ); Wed, 12 May 2021 11:28:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5201961428; Wed, 12 May 2021 15:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832466; bh=8uauqwiDWuNi+46mhBTYhX9GY7Yd79pcyntj2cvcRzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C72/bFuzRIMiWXEiHl3hwmJU5mNf1aU08MCRGvWD1awk572J6yHHXBdKRmwDqi31b Ax+mH3n3lSNUdnrUenOhVoPedNpIWCpg9OKy97QIFsDLNTdZG2kOrxcQ1EfgdWiOUw KTzlWBwicfurO7weUtSQr0NXWvQoSQ+9PqVTr84M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Vetter , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Sasha Levin Subject: [PATCH 5.10 290/530] drm/probe-helper: Check epoch counter in output_poll_execute() Date: Wed, 12 May 2021 16:46:40 +0200 Message-Id: <20210512144829.338087430@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Noralf Trønnes [ Upstream commit dc659a4e852b591771fc2e5abb60f4455b0cf316 ] drm_helper_hpd_irq_event() checks the epoch counter to determine connector status change. This was introduced in commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector"). Do the same for output_poll_execute() so it can detect other changes beside connection status value changes. v2: - Add Fixes tag (Daniel) Fixes: 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") Reviewed-by: Daniel Vetter Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-3-noralf@tronnes.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_probe_helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index d6017726cc2a..e5432dcf6999 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -623,6 +623,7 @@ static void output_poll_execute(struct work_struct *work) struct drm_connector_list_iter conn_iter; enum drm_connector_status old_status; bool repoll = false, changed; + u64 old_epoch_counter; if (!dev->mode_config.poll_enabled) return; @@ -659,8 +660,9 @@ static void output_poll_execute(struct work_struct *work) repoll = true; + old_epoch_counter = connector->epoch_counter; connector->status = drm_helper_probe_detect(connector, NULL, false); - if (old_status != connector->status) { + if (old_epoch_counter != connector->epoch_counter) { const char *old, *new; /* @@ -689,6 +691,9 @@ static void output_poll_execute(struct work_struct *work) connector->base.id, connector->name, old, new); + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] epoch counter %llu -> %llu\n", + connector->base.id, connector->name, + old_epoch_counter, connector->epoch_counter); changed = true; } -- 2.30.2