Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp655073rdb; Thu, 1 Feb 2024 22:47:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHN/winFqZzjomGd5yF0Bnhda2JUftclXaqiEp24WH71Hy4D/34vEp9El9Vbztd992PVWH X-Received: by 2002:a50:ec8d:0:b0:55f:fdd3:ffe9 with SMTP id e13-20020a50ec8d000000b0055ffdd3ffe9mr131882edr.34.1706856431870; Thu, 01 Feb 2024 22:47:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706856431; cv=pass; d=google.com; s=arc-20160816; b=BdX9kEh96TbFgUmB1+4a7yhXPG7KTgJpsYTdGfBwaAh/iB9NNFc/oCpF8QOwykeqUm quVOcYX10JtPlaEColmRVYIjE1gyuC0uo30IVc0ggZ5uvEld0O3xaaphloGLY4Iw/16z BXj7tweEedZjcLgQsor4PCelXonfbQEVfWMdDWXGbExWsFGV/lR+jF3N+qPdRM3PNe0H t0jF6Ox5n4tEUMaK+LlfaCgYlEano3LPuO89ekGdCdddnkxrNiwMOJK7Fs20npFBqQBh qbFeZ4SLKwhg1yg2KxWE+jQsagE9XUIbQez/48tgHE+RSZV1S/NXZitXIFmvgt27ElKz 5d9Q== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=o0pt0AvQb9QH1NVN0Ep+6Z4WzLV/a6EZfES4iiGUlsM=; fh=MXBkqeIDB5+fnICRisP1WSdgMsbD4DUjiXU1/klhKvE=; b=jy5bqtB7Z70rnG7ui6gnTX2hy3X66pQ7sjt5rf845MVn1tHs6WnxkMZbQhS9Qxvm/D zwOtOkVo29BLCoZF/8f5mKbVtgcEHjy9rD7uH+fJKC0aCzjfFwI0726gzjlSLHKPe/RV 1BmO7aUBfxYov2Mt4Rs5lZJDC66EOxlqX4w0zuJIR/AlVopXNpW92FEl25OFdoqluaF3 /8vWiDDhoOVj4Du9AP4t4phRRB6XdAs/lf+/ACIZvlDVCbjC7ulaRuj801WotFCYRHzG z2U5uehID1y2QgZjDst7pwOcGjJxmgT3QMdcfhuLR51EQZZARt97dURLVZGNzt9uyHpT u2pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KmCC8OM2; 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-49299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49299-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; AJvYcCWJkiUJ5rwk0v5AXIJ3h7LCRW8RQC93Yl1tQm3B640GTPgz/4RS5pxVL20j8gmY7ZINZh5r+y/Jy2zBKsq/3z9hoid/UT5wsw0LG9SPGg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j7-20020a508a87000000b0055f66c3c1f9si527297edj.268.2024.02.01.22.47.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 22:47:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KmCC8OM2; 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-49299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49299-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7EF481F22EDA for ; Fri, 2 Feb 2024 06:47:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 829841865A; Fri, 2 Feb 2024 06:43:07 +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="KmCC8OM2" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4887C18639 for ; Fri, 2 Feb 2024 06:43:05 +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=1706856186; cv=none; b=dPojef16b88IgJtRenJ4kRJXvWcrj4wKNQhMskU70dTRt2itmmEAOg4Pj9OeUhiIRlEqzi6maDojbWA/uHPwW07hJTWieHXa60ajvuj/ynrDOrffPbY1zCKtnsB37tX/jjSvLHa3ocOCXH/wVmEXYBpbQJuuowwsPANTJ33FoXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856186; c=relaxed/simple; bh=IeuTYvT2kSfyJRGh2TcyQfdT8Kl0+V+dExn2BrFG6SU=; h=From:To:Cc:Subject:Date:Message-Id; b=MsAsiUZas2JJbjE5y4AG49/oF/XleeJABZcSHp86G3093uhXL8e42pPuo6DWXeIA5V4RJceJAj+851A/twIp8rENvTaPeAw4G6SIlrn68TNs76XLJl8v2tLbBPkOG/NvyOWKFG9/oe0yC3MNSsNTrNn23J7OeBjG3BWqxmuUycM= 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=KmCC8OM2; 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 C6F3F20B2000; Thu, 1 Feb 2024 22:43:04 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6F3F20B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1706856184; bh=o0pt0AvQb9QH1NVN0Ep+6Z4WzLV/a6EZfES4iiGUlsM=; h=From:To:Cc:Subject:Date:From; b=KmCC8OM2S7hF8N3oCUViQyTPIoi55pJb5EwGKN7K4YZ47h0ZEGrNIxp/xvusZqom8 1Lqtpe1qoUbzw5Y5PGkgmExh6VcK8kcOgymjVNH0g+/4wpgkI4SNCf/gsuLbK0Xfdq dZXHWtA1OOWy7ZaA4PlqFGbAw/8w8W3jRahWpn6I= 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 0/2] drm: Check polling initialized before Date: Thu, 1 Feb 2024 22:42:56 -0800 Message-Id: <1706856176-9483-1-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This patchset consists of sanity checks before enabling/disabling output polling to make sure we do not call polling enable and disable functions when polling for the device is not initialized or is now uninitialized(by drm_kms_helper_poll_fini() function) The first patch consists of these checks in drm_kms_helper_poll_disable() and drm_kms_helper_poll_enable() calls. It further flags a warning if a caller violates this. It also adds these checks in drm_mode_config_helper_resume() and drm_mode_config_helper_suspend() calls to avoid this warning. The second patch adds a similar missing check in drm_helper_probe_single_connector_modes() function that is exposed by the new warning introduced in the first patch. Shradha Gupta (2): drm: Check output polling initialized before disabling drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes drivers/gpu/drm/drm_modeset_helper.c | 19 ++++++++++++++++--- drivers/gpu/drm/drm_probe_helper.c | 21 +++++++++++++++++---- 2 files changed, 33 insertions(+), 7 deletions(-) -- 2.34.1