summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorClarence Ip <cip@codeaurora.org>2017-03-17 15:22:07 -0400
committerClarence Ip <cip@codeaurora.org>2017-07-21 11:26:47 -0400
commite67107812d4fe6ffd6b872905d1c952628bfbb99 (patch)
tree0466314e3ba8ac9abd125fd690e4c7027fb43946 /drivers/gpu
parent081178b8fd7bbeb104c52670d6251fbb39b58527 (diff)
drm/msm/sde: output black frame during resume operation
This patch provides a module parameter to control whether each plane outputs the previously configured content or a black frame during the resume operation. The default is set to output a black frame. CRs-Fixed: 2019307 Change-Id: I48c1a8edfa1e85252a070bda51228ef67dea041c Signed-off-by: Clarence Ip <cip@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/sde/sde_plane.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index 8ae831e11bf3..6e2ccfa8e428 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -34,6 +34,14 @@
#include "sde_plane.h"
#include "sde_color_processing.h"
+static bool suspend_blank = true;
+module_param(suspend_blank, bool, 0400);
+MODULE_PARM_DESC(suspend_blank,
+ "If set, active planes will force their outputs to black,\n"
+ "by temporarily enabling the color fill, when recovering\n"
+ "from a system resume instead of attempting to display the\n"
+ "last provided frame buffer.");
+
#define SDE_DEBUG_PLANE(pl, fmt, ...) SDE_DEBUG("plane%d " fmt,\
(pl) ? (pl)->base.base.id : -1, ##__VA_ARGS__)
@@ -1726,6 +1734,10 @@ void sde_plane_flush(struct drm_plane *plane)
pp->pipe_hw->ops.setup_csc(pp->pipe_hw, pp->csc_ptr);
}
+ /* force black color fill during suspend */
+ if (msm_is_suspend_state(plane->dev) && suspend_blank)
+ _sde_plane_color_fill(pp, 0x0, 0x0);
+
/* flag h/w flush complete */
if (plane->state)
to_sde_plane_state(plane->state)->pending = false;