All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state
Date: Tue,  7 Dec 2021 13:07:19 +0200	[thread overview]
Message-ID: <20211207110721.30409-2-stanislav.lisovskiy@intel.com> (raw)
In-Reply-To: <20211207110721.30409-1-stanislav.lisovskiy@intel.com>

There might be various logical contructs when we might want
to enable async flip, so lets calculate those and set this
flag, so that there is no need in long conditions in other
places.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c  | 2 +-
 drivers/gpu/drm/i915/display/intel_display.c       | 3 +++
 drivers/gpu/drm/i915/display/intel_display_types.h | 3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 023747fb5052..d01768344513 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -490,7 +490,7 @@ void intel_plane_update_arm(struct intel_plane *plane,
 
 	trace_intel_plane_update_arm(&plane->base, crtc);
 
-	if (crtc_state->uapi.async_flip && plane->async_flip)
+	if (plane_state->do_async_flip)
 		plane->async_flip(plane, crtc_state, plane_state, true);
 	else
 		plane->update_arm(plane, crtc_state, plane_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 128d4943a43b..d0552c71a3fd 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5025,6 +5025,9 @@ int intel_plane_atomic_calc_changes(const struct intel_crtc_state *old_crtc_stat
 			 needs_scaling(new_plane_state))))
 		new_crtc_state->disable_lp_wm = true;
 
+	if (new_crtc_state->uapi.async_flip && plane->async_flip)
+		new_plane_state->do_async_flip = true;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index c9c6efadf8b4..e83cb799427b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -634,6 +634,9 @@ struct intel_plane_state {
 
 	struct intel_fb_view view;
 
+	/* Indicates if async flip is required */
+	bool do_async_flip;
+
 	/* Plane pxp decryption state */
 	bool decrypt;
 
-- 
2.24.1.485.gad05a3d8e5


  reply	other threads:[~2021-12-07 11:07 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 11:07 [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane to watermark calculation functions Stanislav Lisovskiy
2021-12-07 11:07 ` Stanislav Lisovskiy [this message]
2021-12-07 11:07 ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 Stanislav Lisovskiy
2021-12-07 17:52   ` kernel test robot
2021-12-07 17:52     ` kernel test robot
2021-12-07 18:12   ` kernel test robot
2021-12-07 18:12     ` kernel test robot
2021-12-07 20:25   ` kernel test robot
2021-12-07 20:25     ` kernel test robot
2021-12-08  2:30   ` [Intel-gfx] [RFC PATCH] drm/i915: dg2_async_flip_optimization() can be static kernel test robot
2021-12-08  2:30     ` kernel test robot
2021-12-08  2:34   ` [Intel-gfx] [PATCH 3/4] drm/i915: Use wm0 only during async flips for DG2 kernel test robot
2021-12-08  2:34     ` kernel test robot
2021-12-07 11:07 ` [Intel-gfx] [PATCH 4/4] drm/i915: Don't allocate extra ddb during async flip " Stanislav Lisovskiy
2021-12-07 11:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Pass plane to watermark calculation functions Patchwork
2021-12-07 11:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-12-07 12:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-07 14:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-09 11:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Pass plane to watermark calculation functions (rev2) Patchwork
2021-12-09 11:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-12-09 11:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-09 16:31 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-13 16:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Pass plane to watermark calculation functions (rev3) Patchwork
2021-12-13 16:09 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-12-13 16:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-13 23:24 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-01-11 16:53 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Pass plane to watermark calculation functions (rev4) Patchwork
2022-01-11 16:54 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-11 17:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-01-12  7:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Pass plane to watermark calculation functions (rev5) Patchwork
2022-01-12  7:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-12  7:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-12 11:01 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2022-01-24  9:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy
2022-01-24  9:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy
2022-01-21  8:06 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy
2022-01-21  8:06 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy
2022-01-21 11:48   ` Ville Syrjälä
2022-01-18 10:48 [Intel-gfx] [PATCH 0/4] Async flip optimization for DG2 Stanislav Lisovskiy
2022-01-18 10:48 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy
2022-01-19 11:35   ` Ville Syrjälä
2021-12-03  9:40 [Intel-gfx] [PATCH 1/4] drm/i915: Pass plane id to watermark calculation functions Stanislav Lisovskiy
2021-12-03  9:40 ` [Intel-gfx] [PATCH 2/4] drm/i915: Introduce do_async_flip flag to intel_plane_state Stanislav Lisovskiy

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=20211207110721.30409-2-stanislav.lisovskiy@intel.com \
    --to=stanislav.lisovskiy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.