All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: remove need of modeset flag for overlay planes
@ 2018-04-27 10:27 Shirish S
       [not found] ` <1524824823-24271-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Shirish S @ 2018-04-27 10:27 UTC (permalink / raw)
  To: Alexander.Deucher-5C7GfCeVMHo,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	harry.wentland-5C7GfCeVMHo
  Cc: Shirish S

This patch is in continuation to the
"843e3c7 drm/amd/display: defer modeset check in dm_update_planes_state"
where we started to eliminate the dependency on
DRM_MODE_ATOMIC_ALLOW_MODESET to be set by the user space,
which as such is not mandatory.

After deferring, this patch eliminates the dependency on the flag
for overlay planes.

This has to be done in stages as its a pretty complex and requires thorough
testing before we free primary planes as well from dependency on modeset
flag.

Signed-off-by: Shirish S <shirish.s@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 1a63c04..87b661d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4174,7 +4174,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		}
 		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
 
-		if (!pflip_needed) {
+		if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) {
 			WARN_ON(!dm_new_plane_state->dc_state);
 
 			plane_states_constructed[planes_count] = dm_new_plane_state->dc_state;
@@ -4884,7 +4884,8 @@ static int dm_update_planes_state(struct dc *dc,
 
 		/* Remove any changed/removed planes */
 		if (!enable) {
-			if (pflip_needed)
+			if (pflip_needed &&
+			    plane && plane->type != DRM_PLANE_TYPE_OVERLAY)
 				continue;
 
 			if (!old_plane_crtc)
@@ -4931,7 +4932,8 @@ static int dm_update_planes_state(struct dc *dc,
 			if (!dm_new_crtc_state->stream)
 				continue;
 
-			if (pflip_needed)
+			if (pflip_needed &&
+			    plane && plane->type != DRM_PLANE_TYPE_OVERLAY)
 				continue;
 
 			WARN_ON(dm_new_plane_state->dc_state);
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-09 20:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 10:27 [PATCH] drm/amd/display: remove need of modeset flag for overlay planes Shirish S
     [not found] ` <1524824823-24271-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
2018-05-01 19:23   ` Stéphane Marchesin
     [not found]     ` <CADMs+9a0R1dbWyfwK-rtcQ05oTJnUCYa51ZgRDQcUaDfj1znhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-02  2:54       ` S, Shirish
2018-05-02 13:51   ` Harry Wentland
     [not found]     ` <b94fe6bd-5d9b-9f61-42d8-c47df54d9346-5C7GfCeVMHo@public.gmane.org>
2018-05-03  8:00       ` S, Shirish
     [not found]         ` <42b267f5-93c2-1682-af94-0cb9fc42ebb8-5C7GfCeVMHo@public.gmane.org>
2018-05-03 18:11           ` Harry Wentland
     [not found]             ` <67135740-35e6-4090-8f07-a5247c09a4be-5C7GfCeVMHo@public.gmane.org>
2018-05-04 12:57               ` Andrey Grodzovsky
     [not found]                 ` <b3d563a3-31a9-45d1-492d-4d2a1ce9d7bb-5C7GfCeVMHo@public.gmane.org>
2018-05-07 10:12                   ` S, Shirish
2018-05-09 20:53   ` Harry Wentland

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.