[v4,2/2] drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes
Message ID | 1706856224-9725-1-git-send-email-shradhagupta@linux.microsoft.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-49303-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp248249dyc; Thu, 1 Feb 2024 22:49:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyDfeTY+rcWQx2R8ODotMHtznXUOTT4Ssr9KGqW87uMww6uoSRqWkSnSjL34YlNwKh+cHw X-Received: by 2002:a05:6a20:c123:b0:19c:b4f1:596f with SMTP id bh35-20020a056a20c12300b0019cb4f1596fmr6616078pzb.22.1706856553753; Thu, 01 Feb 2024 22:49:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706856553; cv=pass; d=google.com; s=arc-20160816; b=cxSQhfNcGohxnZTS7eO39+BRrGVKazXH3T+JXAToT4jWgccCUF89Mlyr+LcqTCxqb0 A5sP5uQplmmbu8ynVLTQe8ptin7LmK9Uy6k7t7HD8x0uC6ApaKquiRn5A7FC8f0V8FyS nIBTaZdIuSf/I6HP2aMsN9Ed1e9oxyXjH0dOuX6Uey7PgCm8QVP6SZe9vZTNaBsmNyAo vvgRMFupdKkm+F/9d+WveNgUuKXD7xtelzO199gEhcS95U8ltgtsKM+doacMSWKI6pFd CTpQ6djw2wLB7Yua8UFTN+f7/QbNveNbeno2Wdc6XJhPcHUAeEknSmKRRALrH3jUG5Fc TDgw== 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=TtpEG5SttAXRlxsKyOx/r0FNxInA3Ypld7IESrgiUac=; b=yorbyVEfXrYDPyo/kp5zPTTE9U6Ms9w97lRyOGYxKOTGD0FCR4tZcUJ0UESxe2Ugun mAgBj8qeAPvi6+ODXLMMQ+RGH32wJQ5XXOConMHR0h28WI7hMIzEpgBA6KUVH8g9VtPL BQ1Cv/Bgu7k4/DhO+qOywtPo+otqGnii0roFdNyzjKw7u2wgnPvnEACQg5LfcM/7YvXV 6QWlmUU5ezXvps5BxofaR28VGV+AvCObjxrgt6hiSrvDM2U5q6sipgFHfzl7LTXJu42e naLaY+oPli9AjvRHSwp4Z5oEkyRZgbhfz7iJbFFsW1FwiuzyEy/SOeCps3u/5qDfEfr1 kXTg==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49303-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com X-Forwarded-Encrypted: i=1; AJvYcCX9sNtCXOwBjxhoSUJh5qwiJ7Ry1iQv5Mu00cN2ivkio1Z6Ubyx47P0u0qTv0sTth+07LZw85CKW1dg8wrwP6nciLiCiQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ix3-20020a170902f80300b001d9586d5d78si1168136plb.233.2024.02.01.22.49.13 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 22:49:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49303-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49303-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A850128331D for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 06:48:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 804E54879F; Fri, 2 Feb 2024 06:43:51 +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 <linux-kernel@vger.kernel.org>; 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 <shradhagupta@linux.microsoft.com> To: linux-kernel@vger.kernel.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.dev>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org, Saurabh Singh Sengar <ssengar@linux.microsoft.com> Cc: Shradha Gupta <shradhagupta@linux.microsoft.com>, Shradha Gupta <shradhagupta@microsoft.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789768817594532822 X-GMAIL-MSGID: 1789768817594532822 |
Series |
drm: Check polling initialized before
|
|
Commit Message
Shradha Gupta
Feb. 2, 2024, 6:43 a.m. UTC
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 <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202401191128.db8423f1-oliver.sang@intel.com
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
---
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",