From patchwork Tue Jun 18 15:25:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 1949247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W3VvL0nSjz20XR for ; Wed, 19 Jun 2024 01:25:50 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sJaiO-0002Iy-Fl; Tue, 18 Jun 2024 15:25:44 +0000 Received: from mail.tpi.com ([50.126.108.186]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sJaiK-0002FQ-GH for kernel-team@lists.ubuntu.com; Tue, 18 Jun 2024 15:25:40 +0000 Received: from mail.tpi.om (63-225-179-81.tukw.qwest.net [63.225.179.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: timg) by mail.tpi.com (Postfix) with ESMTPSA id F19F62C0CAA; Tue, 18 Jun 2024 08:25:38 -0700 (PDT) From: Tim Gardner To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes Date: Tue, 18 Jun 2024 08:25:36 -0700 Message-Id: <20240618152536.404577-3-timg@tpi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618152536.404577-1-timg@tpi.com> References: <20240618152536.404577-1-timg@tpi.com> MIME-Version: 1.0 Received-SPF: pass client-ip=50.126.108.186; envelope-from=timg@tpi.com; helo=mail.tpi.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Shradha Gupta BugLink: https://bugs.launchpad.net/bugs/2069749 commit 048a36d8a6085bbd8ab9e5794b713b92ac986450 upstream. In function drm_helper_probe_single_connector_modes() when we enable polling again, if it is already uninitialized, a warning is reported. This patch fixes the warning message by checking if poll is initialized before enabling it. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401191128.db8423f1-oliver.sang@intel.com Signed-off-by: Shradha Gupta Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 2ac168c67267185e7e08c5fe4173bcd049aa4cfe 5.15.y) Signed-off-by: Tim Gardner --- drivers/gpu/drm/drm_probe_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 08d75590fdc0..e79bb93072dd 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -498,7 +498,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, } /* Re-enable polling in case the global poll config changed. */ - if (drm_kms_helper_poll != dev->mode_config.poll_running) + if (dev->mode_config.poll_enabled && + (drm_kms_helper_poll != dev->mode_config.poll_running)) drm_kms_helper_poll_enable(dev); dev->mode_config.poll_running = drm_kms_helper_poll;