Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/7] drm/i915/psr: Configure PIPE_SRCSZ_ERLY_TPT for psr2 early transport
Date: Mon, 18 Dec 2023 19:50:02 +0200	[thread overview]
Message-ID: <20231218175004.52875-6-jouni.hogander@intel.com> (raw)
In-Reply-To: <20231218175004.52875-1-jouni.hogander@intel.com>

There is a new register used to configure selective update area size
for early transport.

Configure PIPE_SRCSZ_ERLY_TPT using calculated selective update area
carried in crtc_state->su_area.

Bspec: 68927

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c  | 10 ++++++++++
 drivers/gpu/drm/i915/display/intel_psr_regs.h |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f1e58163277d..8d250209999a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -104,6 +104,7 @@
 #include "intel_pmdemand.h"
 #include "intel_pps.h"
 #include "intel_psr.h"
+#include "intel_psr_regs.h"
 #include "intel_sdvo.h"
 #include "intel_snps_phy.h"
 #include "intel_tc.h"
@@ -2706,6 +2707,15 @@ static void intel_set_pipe_src_size(const struct intel_crtc_state *crtc_state)
 	 */
 	intel_de_write(dev_priv, PIPESRC(pipe),
 		       PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1));
+
+	if (!crtc_state->enable_psr2_su_region_et)
+		return;
+
+	width = drm_rect_width(&crtc_state->psr2_su_area);
+	height = drm_rect_height(&crtc_state->psr2_su_area);
+
+	intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(pipe),
+		       PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1));
 }
 
 static bool intel_pipe_is_interlaced(const struct intel_crtc_state *crtc_state)
diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h b/drivers/gpu/drm/i915/display/intel_psr_regs.h
index efe4306b37e0..ceefcc70e8f9 100644
--- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
@@ -245,6 +245,11 @@
 #define  ADLP_PSR2_MAN_TRK_CTL_SF_SINGLE_FULL_FRAME		REG_BIT(14)
 #define  ADLP_PSR2_MAN_TRK_CTL_SF_CONTINUOS_FULL_FRAME		REG_BIT(13)
 
+/* PSR2 Early transport */
+#define _PIPE_SRCSZ_ERLY_TPT_A	0x70074
+
+#define PIPE_SRCSZ_ERLY_TPT(trans)	_MMIO_TRANS2(trans, _PIPE_SRCSZ_ERLY_TPT_A)
+
 #define _SEL_FETCH_PLANE_BASE_1_A		0x70890
 #define _SEL_FETCH_PLANE_BASE_2_A		0x708B0
 #define _SEL_FETCH_PLANE_BASE_3_A		0x708D0
-- 
2.34.1


  parent reply	other threads:[~2023-12-18 18:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 17:49 [PATCH 0/7] Early Transport for Panel Replay and PSR Jouni Högander
2023-12-18 17:49 ` [PATCH 1/7] drm: Add eDP 1.5 early transport definition Jouni Högander
2024-01-03 10:46   ` Kahola, Mika
2024-01-10  8:08     ` Hogander, Jouni
2023-12-18 17:49 ` [PATCH 2/7] drm/i915/psr: Extend SU area to cover cursor fully if needed Jouni Högander
2024-01-05 14:07   ` Kahola, Mika
2023-12-18 17:50 ` [PATCH 3/7] drm/i915/psr: Carry su area in crtc_state Jouni Högander
2024-01-05 14:17   ` Kahola, Mika
2023-12-18 17:50 ` [PATCH 4/7] drm/i915/psr: Calculate and configure CUR_POS_ERLY_TPT Jouni Högander
2024-01-09 12:33   ` Kahola, Mika
2023-12-18 17:50 ` Jouni Högander [this message]
2024-01-09 12:50   ` [PATCH 5/7] drm/i915/psr: Configure PIPE_SRCSZ_ERLY_TPT for psr2 early transport Kahola, Mika
2023-12-18 17:50 ` [PATCH 6/7] drm/i915/psr: Enable psr2 early transport as possible Jouni Högander
2024-01-09 12:56   ` Kahola, Mika
2023-12-18 17:50 ` [PATCH 7/7] drm/i915/psr: Disable early transport by default Jouni Högander
2024-01-09 12:57   ` Kahola, Mika
2024-01-10  6:05     ` Hogander, Jouni
2023-12-19  1:02 ` ✗ Fi.CI.CHECKPATCH: warning for Early Transport for Panel Replay and PSR Patchwork
2023-12-19  1:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2023-12-19  1:15 ` ✓ Fi.CI.BAT: success " Patchwork
2023-12-19  4:29 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-09 15:19   ` Hogander, Jouni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231218175004.52875-6-jouni.hogander@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox