From patchwork Fri Oct 7 11:39:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Govindapillai X-Patchwork-Id: 13001019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93472C433FE for ; Fri, 7 Oct 2022 11:40:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC14A10E951; Fri, 7 Oct 2022 11:40:26 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E83D10E950 for ; Fri, 7 Oct 2022 11:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665142821; x=1696678821; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Stlk5cqArVCUpO0WYUQBjJYO+Q5Rnh7z6fpMThzLMDw=; b=O7J3Y/So1SvxC8MJ5pz6fS24RL3Ty1YmPqBgFmagyuyMh7TZ5ijCRyZW qdJ71xkF2DKQ1dxSKNu3Rq9o5tqUfXhjDO1udRQlQZqDqeRw2yrHFyPR5 o7ef/tUuLG7S7npFR+UDl/go6VmERlcAPyVHSs9xGGd5nuQEOwu/8Zf1I Q9RQMAo0yE9yDvl+pTsaGLKdlWndSFj27Vy6y01M0ez6X91yjOmm5V91t cOAuMvlQCNE2lsmt5soadJDC/vJXlLbVAg41KO2JXoZd6NV8SrZCIRHwM zuLfBZgUliY6y5514GIZ8CmAx4B2R2EVZrz0gPFtsmTmh5X0uTQQfHD4y A==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="304715027" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="304715027" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:40:21 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="714247911" X-IronPort-AV: E=Sophos;i="5.95,166,1661842800"; d="scan'208";a="714247911" Received: from tmelzer-mobl.ger.corp.intel.com (HELO vgovind2-mobl3.intel.com) ([10.252.61.59]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 04:40:19 -0700 From: Vinod Govindapillai To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Oct 2022 14:39:58 +0300 Message-Id: <20221007113958.1890779-3-vinod.govindapillai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221007113958.1890779-1-vinod.govindapillai@intel.com> References: <20221007113958.1890779-1-vinod.govindapillai@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH 2/2] drm/i915: debugfs entry to control ignore long hpd flag X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Knob to control ignoring the long hpds. Set this to true will start ignoring the long HPDs generated by the displays. Useful for use cases like CI systems where we dont expect to disconnect the panels. Signed-off-by: Vinod Govindapillai --- drivers/gpu/drm/i915/display/intel_hotplug.c | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 352a1b53b63e..45c67f0f1c9f 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -936,6 +936,29 @@ static const struct file_operations i915_hpd_short_storm_ctl_fops = { .write = i915_hpd_short_storm_ctl_write, }; +static int i915_ignore_long_hpd_set(void *data, u64 val) +{ + struct drm_i915_private *i915 = data; + + drm_dbg_kms(&i915->drm, "Ignoring long HPDs: %s\n", str_yes_no(val)); + + i915->display.hotplug.ignore_long_hpd = val; + + return 0; +} + +static int i915_ignore_long_hpd_get(void *data, u64 *val) +{ + struct drm_i915_private *i915 = data; + + *val = i915->display.hotplug.ignore_long_hpd; + + return 0; +} + +DEFINE_SIMPLE_ATTRIBUTE(i915_ignore_long_hpd_fops, i915_ignore_long_hpd_get, + i915_ignore_long_hpd_set, "%llu\n"); + void intel_hpd_debugfs_register(struct drm_i915_private *i915) { struct drm_minor *minor = i915->drm.primary; @@ -944,4 +967,6 @@ void intel_hpd_debugfs_register(struct drm_i915_private *i915) i915, &i915_hpd_storm_ctl_fops); debugfs_create_file("i915_hpd_short_storm_ctl", 0644, minor->debugfs_root, i915, &i915_hpd_short_storm_ctl_fops); + debugfs_create_file("i915_ignore_long_hpd", 0644, minor->debugfs_root, + i915, &i915_ignore_long_hpd_fops); }