<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Patch is</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: David Francis <David.Francis@amd.com></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Nicholas Kazlauskas <nicholas.kazlauskas@amd.com><br>
<b>Sent:</b> June 7, 2019 11:16:55 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Francis, David; Wentland, Harry; Kazlauskas, Nicholas<br>
<b>Subject:</b> [PATCH] drm/amd/display: Enable fast plane updates when state->allow_modeset = true</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Why]<br>
Whenever the a modeset is allowed (but not neccessarily required) we<br>
currently recreate all the planes in the state. Most IGT tests and<br>
legacy IOCTLs create atomic commits with this flag set, so the pipes<br>
are often unnecessarily reprogrammed.<br>
<br>
Poor performance and stuttering can occur when many of these commits<br>
are frequently issued.<br>
<br>
This flag was needed when the appropriate conditions for checking<br>
whether the planes needed a reset were not in place, but<br>
should_reset_plane should cover everything needed now.<br>
<br>
[How]<br>
Drop the check for state->allow_modeset in should_reset_plane.<br>
<br>
All planes on a CRTC should reset in the following conditions:<br>
- The CRTC needs a modeset<br>
- The CRTC degamma changes<br>
- Planes are added or removed to the CRTC<br>
<br>
These conditions are all covered in should_reset_plane.<br>
<br>
We still can't drop the format change check in should_reset_plane since<br>
fill_dc_plane_info_and_addr isn't called when validating the state, so<br>
we can't tell if a FULL update is needed or not.<br>
<br>
Cc: David Francis <david.francis@amd.com><br>
Cc: Harry Wentland <harry.wentland@amd.com><br>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com><br>
---<br>
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 --------<br>
 1 file changed, 8 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
index a698c8f272ed..45f0d5b6c468 100644<br>
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
@@ -6446,14 +6446,6 @@ static bool should_reset_plane(struct drm_atomic_state *state,<br>
         struct drm_crtc_state *new_crtc_state;<br>
         int i;<br>
 <br>
-       /*<br>
-        * TODO: Remove this hack once the checks below are sufficient<br>
-        * enough to determine when we need to reset all the planes on<br>
-        * the stream.<br>
-        */<br>
-       if (state->allow_modeset)<br>
-               return true;<br>
-<br>
         /* Exit early if we know that we're adding or removing the plane. */<br>
         if (old_plane_state->crtc != new_plane_state->crtc)<br>
                 return true;<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>