From patchwork Tue Jan 9 10:05:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13514714 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 94E7AC47073 for ; Tue, 9 Jan 2024 10:05:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE51610E3DA; Tue, 9 Jan 2024 10:05:32 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E70110E36A for ; Tue, 9 Jan 2024 10:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704794731; x=1736330731; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PY78am0WLUAoEkvAx0ruGrHQ+OFNq31Jy3sUNPq4Ch0=; b=U46gYnFI5QDePe9QiZupyGaicrhzluupXvoz4mshrCDHB9Sd5NLVm9He gvb325hXt4ym6hnisd6lctYkDL8hQsUGR1UyBtWeWrLtCTRbG85SrLzD5 RwB8oQH/lq/2eFotc4V3/wzPPE27CCLRV8gDQX8DRSk5Ixh+o5h3BUBSr xsKsO6JdD1TOxJHdNdid/icc18LlIC0m7IBAYtuHP4U/ruv0fwBWt1Pzq H0Eeuey/TZXMEUdDb+6p4OK+3a60c4XhSuYDKCCgYNbMWtOdXB5V4MGMy aAGcVmAcKGAu/H8LeJLRRpP7LjsrPk0EYbrMETOfpDleK+oX+IHg4Tp2p g==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="5517895" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="5517895" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 02:05:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="925194207" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="925194207" Received: from ahuge-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.252.36.112]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 02:05:28 -0800 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Subject: [PATCH 1/2] drm/i915/display: No need for full modeset due to psr Date: Tue, 9 Jan 2024 12:05:16 +0200 Message-Id: <20240109100517.1947414-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240109100517.1947414-1-jouni.hogander@intel.com> References: <20240109100517.1947414-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" There is no specific reason to force full modeset if psr is enabled. Signed-off-by: Jouni Högander Tested-by: Paz Zcharya Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_display.c | 7 ------- drivers/gpu/drm/i915/display/intel_dp.c | 7 ------- 2 files changed, 14 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 31a6a82c1261..0cccf6df6718 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5202,13 +5202,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config, PIPE_CONF_CHECK_CSC(csc); PIPE_CONF_CHECK_CSC(output_csc); - - if (current_config->active_planes) { - PIPE_CONF_CHECK_BOOL(has_psr); - PIPE_CONF_CHECK_BOOL(has_psr2); - PIPE_CONF_CHECK_BOOL(enable_psr2_sel_fetch); - PIPE_CONF_CHECK_I(dc3co_exitline); - } } PIPE_CONF_CHECK_BOOL(double_wide); diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 7e4b7d5606d4..ab415f41924d 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3326,13 +3326,6 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder, fastset = false; } - if (CAN_PSR(intel_dp)) { - drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] Forcing full modeset to compute PSR state\n", - encoder->base.base.id, encoder->base.name); - crtc_state->uapi.mode_changed = true; - fastset = false; - } - return fastset; } From patchwork Tue Jan 9 10:05:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13514713 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 099FCC46CD2 for ; Tue, 9 Jan 2024 10:05:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB75410E36A; Tue, 9 Jan 2024 10:05:32 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id C60C910E36A for ; Tue, 9 Jan 2024 10:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704794732; x=1736330732; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3eLvaupTJHcgElYUCE9F9oGP/9yWGh9ktKKKkusHQ1U=; b=XS1eeL1utC3s1QgV/DvR+4mbCrOmdy1jCAsdo1YfQHrDbkSyqJrlMrfS /V1O7Ofrx7BlfVrwve5ZRoMwwKSzRJjDkR2YWxkEcyPvgee574sEMXl/F Ve1DKXbP/LUJLk1dUIlzopDSIZrmDaJ2Y4diWiaqmv8XvZmQyLr5EvMJI f0NlKjepKSDvO6/e9qvo1wxVKCJ8RI1JXiZAcIx6IddxB7/OhJ2SlC9W5 XcPfNVK9T4ldxzDhUsVhop8F9wTGzohXHICfM9AihQ+0qhCTAzSmz6bm3 e4pPysrOgGH21WBuZQ7pg30L6Uz9H10uZbLNCRhX0DIb/xh1ZqSEXY30z g==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="5517898" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="5517898" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 02:05:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="925194211" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="925194211" Received: from ahuge-mobl.ger.corp.intel.com (HELO jhogande-mobl1.intel.com) ([10.252.36.112]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 02:05:30 -0800 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Subject: [PATCH 2/2] drm/i915/psr: CAN_PSR and CAN_PANEL_REPLAY can be now local defines Date: Tue, 9 Jan 2024 12:05:17 +0200 Message-Id: <20240109100517.1947414-3-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240109100517.1947414-1-jouni.hogander@intel.com> References: <20240109100517.1947414-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" CAN_PSR and CAN_PANEL_REPLAY are not used outside intel_psr.c anymore. Make them as intel_psr.c local defines. Signed-off-by: Jouni Högander Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_psr.c | 6 ++++++ drivers/gpu/drm/i915/display/intel_psr.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 54120b45958b..34c0a5a14455 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -173,6 +173,12 @@ * irrelevant for normal operation. */ +#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \ + (intel_dp)->psr.source_support) + +#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \ + (intel_dp)->psr.source_panel_replay_support) + bool intel_encoder_can_psr(struct intel_encoder *encoder) { if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST) diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h index 143e0595c097..cde781df84d5 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.h +++ b/drivers/gpu/drm/i915/display/intel_psr.h @@ -21,12 +21,6 @@ struct intel_encoder; struct intel_plane; struct intel_plane_state; -#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \ - (intel_dp)->psr.source_support) - -#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \ - (intel_dp)->psr.source_panel_replay_support) - bool intel_encoder_can_psr(struct intel_encoder *encoder); void intel_psr_init_dpcd(struct intel_dp *intel_dp); void intel_psr_pre_plane_update(struct intel_atomic_state *state,