Patch "drm/atomic: allow no-op FB_ID updates for async flips" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/atomic: allow no-op FB_ID updates for async flips

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-atomic-allow-no-op-fb_id-updates-for-async-flips.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7d6df58868f2725775246b3ae2a4a7f0455ac28f
Author: Simon Ser <contact@xxxxxxxxxxx>
Date:   Wed Jul 31 19:10:20 2024 +0000

    drm/atomic: allow no-op FB_ID updates for async flips
    
    [ Upstream commit 929725bd7eb4eea1f75197d9847f3f1ea5afdad1 ]
    
    User-space is allowed to submit any property in an async flip as
    long as the value doesn't change. However we missed one case:
    as things stand, the kernel rejects no-op FB_ID changes on
    non-primary planes. Fix this by changing the conditional and
    skipping drm_atomic_check_prop_changes() only for FB_ID on the
    primary plane (instead of skipping for FB_ID on any plane).
    
    Fixes: 0e26cc72c71c ("drm: Refuse to async flip with atomic prop changes")
    Signed-off-by: Simon Ser <contact@xxxxxxxxxxx>
    Reviewed-by: André Almeida <andrealmeid@xxxxxxxxxx>
    Tested-by: Xaver Hugl <xaver.hugl@xxxxxxx>
    Cc: Alex Deucher <alexander.deucher@xxxxxxx>
    Cc: Christian König <christian.koenig@xxxxxxx>
    Cc: Michel Dänzer <michel.daenzer@xxxxxxxxxxx>
    Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240731191014.878320-1-contact@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 02b1235c6d619..106292d6ed268 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -1067,23 +1067,16 @@ int drm_atomic_set_property(struct drm_atomic_state *state,
 		}
 
 		if (async_flip &&
-		    prop != config->prop_fb_id &&
-		    prop != config->prop_in_fence_fd &&
-		    prop != config->prop_fb_damage_clips) {
+		    (plane_state->plane->type != DRM_PLANE_TYPE_PRIMARY ||
+		     (prop != config->prop_fb_id &&
+		      prop != config->prop_in_fence_fd &&
+		      prop != config->prop_fb_damage_clips))) {
 			ret = drm_atomic_plane_get_property(plane, plane_state,
 							    prop, &old_val);
 			ret = drm_atomic_check_prop_changes(ret, old_val, prop_value, prop);
 			break;
 		}
 
-		if (async_flip && plane_state->plane->type != DRM_PLANE_TYPE_PRIMARY) {
-			drm_dbg_atomic(prop->dev,
-				       "[OBJECT:%d] Only primary planes can be changed during async flip\n",
-				       obj->id);
-			ret = -EINVAL;
-			break;
-		}
-
 		ret = drm_atomic_plane_set_property(plane,
 				plane_state, file_priv,
 				prop, prop_value);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux