aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun R Murthy <[email protected]>2022-09-06 09:48:06 +0530
committerAnimesh Manna <[email protected]>2023-05-22 17:44:38 +0530
commit937859485aefed1d9df72feb6ea74a84ff5cfa46 (patch)
tree47ef3b1a7b27f414586a27ff048770631716cc8e
parent861601ff7f757f34f0584dc1f78ebb7a1f541e77 (diff)
drm/i915: Support Async Flip on Linear buffers
Starting from Gen12 Async Flip is supported on linear buffers. This patch enables support for async on linear buffer. UseCase: In Hybrid graphics, for hardware unsupported pixel formats it will be converted to linear memory and then composed. v2: Added use case v3: Added FIXME for ICL indicating the restrictions Signed-off-by: Arun R Murthy <[email protected]> Reviewed-by: Stanislav Lisovskiy <[email protected]> Signed-off-by: Animesh Manna <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/display/intel_display.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 09320e14d75c..0490c6412ab5 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5995,6 +5995,20 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
* this selectively if required.
*/
switch (new_plane_state->hw.fb->modifier) {
+ case DRM_FORMAT_MOD_LINEAR:
+ /*
+ * FIXME: Async on Linear buffer is supported on ICL as
+ * but with additional alignment and fbc restrictions
+ * need to be taken care of. These aren't applicable for
+ * gen12+.
+ */
+ if (DISPLAY_VER(i915) < 12) {
+ drm_dbg_kms(&i915->drm,
+ "[PLANE:%d:%s] Modifier does not support async flips\n",
+ plane->base.base.id, plane->base.name);
+ return -EINVAL;
+ }
+
case I915_FORMAT_MOD_X_TILED:
case I915_FORMAT_MOD_Y_TILED:
case I915_FORMAT_MOD_Yf_TILED: