Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp655403rdb; Thu, 1 Feb 2024 22:48:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJt0GQsAdT4zUEVKUfCcVx6gVL0gUpKVoI0/fjzyNRA4qEqtVjG5BeMuL8mc2C1GxLq/Ji X-Received: by 2002:a67:cf0c:0:b0:46b:30d:483d with SMTP id y12-20020a67cf0c000000b0046b030d483dmr6930041vsl.0.1706856498939; Thu, 01 Feb 2024 22:48:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706856498; cv=pass; d=google.com; s=arc-20160816; b=KYZ5WnPMaLwoKL7B0qosCploER4D7BO04f+A/4PZRllq7iLhf9lKhESDOZtF5AkT0Y ARMpGWdB6V5EvJ1OovdUnyk+8XgCglBhPCD4V7KbV5aa9hIY6WW5eu9GTgwWTjbpi7Vu FTzYtDji4IPh8k9eMCR2dkKCnVSfmunlW3LXiGBpJM5A4k3f/ZbIKtSTYqljjImyk86U odmSZtUOBJscMXF7iC0xZr4TykEHypH+q3J0MJYOdTioG7XJ6txQv8ltYJvUAm/2sMpk AX5/gxCtmlDfjgDjHalWR2P8sp+ZxCIdZd5SZs/6Gv4+qZ0EGOzM5EI4VFJxY7Ocv1+L uF+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=yJ2N3/HVGxJA0MGmEiSpJS8Lev4/X5f6v9PbC3nQxsU=; fh=JFtrEmyAQ9FS9RA7GnnYJwgTh10pfwcL56HRVblvzUE=; b=UHcSGhAuhASUuUOGwK0FEEBPOK14FQk6QXMkubQrbS91RM5smGO8D0vRmyVqTo3tJo rgUzGBZd7tij9SEpx6JnpjKA9/LUrTa3+AcwBstCmsaytpRYm23CrOEnwIyNiAfux+jp 8LxUK9GG6YwG9V6bzxK4El4zy3ZcCBU5oMERSRvsjKDxoV+LCinefkRu4Ozn7WqTkIZl AHsdU9X33cf1gOJIe2Yibu7clKmOEJWH1NKXI7n6zFEF7VFXmJzl0vYgrVJykQimgkzo PSShQ9r/BOi2KzLxjId9mA0dpI4MOgTpCfWcTwbJPfXeLfyZ1gLWRu4nkKp9mvqza1eN Juhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=JDQge6j0; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-49303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com X-Forwarded-Encrypted: i=1; AJvYcCXQpU7kBe+y/XmpBLGPpsHPYKSk29WmgOENFK6Jz1A21nw+o2LeZ+TlyK8GIvUtVY2vyBC6Y+nnGvaiSuaHAA+wIsOynVFg9ekt69geQQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x11-20020a0ce0cb000000b0068c51c729b1si1349416qvk.551.2024.02.01.22.48.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 22:48:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=JDQge6j0; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-49303-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49303-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AD2AB1C2538A for ; Fri, 2 Feb 2024 06:48:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8CF248782; Fri, 2 Feb 2024 06:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="JDQge6j0" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0178481B4 for ; Fri, 2 Feb 2024 06:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856228; cv=none; b=INNlsXaCiBfepO0avJgRNA9l9rhNrzFRcjPSxejcpStP25b1Id/9oERNnjXJIl9+zZogJsCYgi2qidbl318TkZub86J1THDVOLfjntq7IwvgTfDhFv4KhPSHpGg7UqluX3uCx7Mz20Yz0jU/4fiCv0szbfvbpMswY5q+hxDR+0c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856228; c=relaxed/simple; bh=AT0D06dEnCX3xAFZpn1FFCz1gETYrTU97dZV26IIREo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=G5pbIkPWpi0a7jQMBl+f4vi4GPU73cYuZLs4sj8FZbAZCIMrxTISbIP3X0xlxDKZD+evvCDTiuBEw3ifrgAIyyRHAwWI9z9TRj1seHV6o3vFIA3Sv+m4ioIBNYbdBNZRDuAGMiNpMooUJyQAP048GEwdwccs9Jqn43u24h7ef70= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=JDQge6j0; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1134) id 4597320B2000; Thu, 1 Feb 2024 22:43:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4597320B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706856227; bh=yJ2N3/HVGxJA0MGmEiSpJS8Lev4/X5f6v9PbC3nQxsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JDQge6j0N748zAX3m40uBjCAofdEIZ3yaeynY2aCazTw07uwLOJStak9RvU57N2nB xoyU8AZgWNF+KwYqVPJcCO3VOiAA3OGEzS2cgwoBZQ+GTMxR6EHoPlkGqkcOsWfgsQ DN0ZpUT6L7+m8E6ocHeGZSEiIkaw6wQKXDKzYCEo= From: Shradha Gupta To: linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Saurabh Singh Sengar Cc: Shradha Gupta , Shradha Gupta Subject: [PATCH v4, 2/2] drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes Date: Thu, 1 Feb 2024 22:43:44 -0800 Message-Id: <1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1706856176-9483-1-git-send-email-shradhagupta@linux.microsoft.com> References: <1706856176-9483-1-git-send-email-shradhagupta@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 --- Changes in v4 * Clubbed this patch with similar patches and added a cover letter --- drivers/gpu/drm/drm_probe_helper.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index bd76603dc387..30e6063535cd 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -622,8 +622,12 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, 0); } - /* Re-enable polling in case the global poll config changed. */ - drm_kms_helper_poll_enable(dev); + /* + * Re-enable polling in case the global poll config changed but polling + * is still initialized. + */ + if (dev->mode_config.poll_enabled) + drm_kms_helper_poll_enable(dev); if (connector->status == connector_status_disconnected) { DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", -- 2.34.1