summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-08-31 21:18:41 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-08-31 21:18:38 -0700
commitf93ed45f07691208e73d8fcfc18ebaa42166d109 (patch)
tree3bdd92cb055897a12f124cc7c16a9101d60565ac /drivers/gpu
parent4036bbe404a42dba9a7853da89b83053b2202cd1 (diff)
parentbf99dc3bbf78033378040b332079f55a3df601ad (diff)
Merge "drm: msm: sde: Fix SMMU fault during DRM test"
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/sde/sde_splash.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_splash.c b/drivers/gpu/drm/msm/sde/sde_splash.c
index e5231c4b1aae..2ff1483955e2 100644
--- a/drivers/gpu/drm/msm/sde/sde_splash.c
+++ b/drivers/gpu/drm/msm/sde/sde_splash.c
@@ -25,6 +25,7 @@
#include "sde_rm.h"
#include "dsi_display.h"
#include "sde_hdmi.h"
+#include "sde_crtc.h"
#define MDP_SSPP_TOP0_OFF 0x1000
#define DISP_INTF_SEL 0x004
@@ -879,11 +880,60 @@ int sde_splash_free_resource(struct msm_kms *kms,
}
/*
+ * Below function will detach all the pipes of the mixer
+ */
+static int _sde_splash_clear_mixer_blendstage(struct msm_kms *kms,
+ struct drm_atomic_state *state)
+{
+ struct drm_crtc *crtc;
+ struct sde_crtc *sde_crtc;
+ struct sde_crtc_mixer *mixer;
+ int i;
+ struct sde_splash_info *sinfo;
+ struct sde_kms *sde_kms = to_sde_kms(kms);
+
+ sinfo = &sde_kms->splash_info;
+
+ if (!sinfo) {
+ SDE_ERROR("%s(%d): invalid splash info\n", __func__, __LINE__);
+ return -EINVAL;
+ }
+
+ for (i = 0; i < state->dev->mode_config.num_crtc; i++) {
+ crtc = state->crtcs[i];
+ if (!crtc) {
+ SDE_ERROR("CRTC is NULL");
+ continue;
+ }
+ sde_crtc = to_sde_crtc(crtc);
+ if (!sde_crtc) {
+ SDE_ERROR("SDE CRTC is NULL");
+ return -EINVAL;
+ }
+ mixer = sde_crtc->mixers;
+ if (!mixer) {
+ SDE_ERROR("Mixer is NULL");
+ return -EINVAL;
+ }
+ for (i = 0; i < sde_crtc->num_mixers; i++) {
+ if (mixer[i].hw_ctl->ops.clear_all_blendstages)
+ mixer[i].hw_ctl->ops.clear_all_blendstages(
+ mixer[i].hw_ctl,
+ sinfo->handoff,
+ sinfo->reserved_pipe_info,
+ MAX_BLOCKS);
+ }
+ }
+ return 0;
+}
+
+/*
* Below function will notify LK to stop display splash.
*/
int sde_splash_lk_stop_splash(struct msm_kms *kms,
struct drm_atomic_state *state)
{
+ int error = 0;
struct sde_splash_info *sinfo;
struct sde_kms *sde_kms = to_sde_kms(kms);
@@ -902,8 +952,10 @@ int sde_splash_lk_stop_splash(struct msm_kms *kms,
_sde_splash_notify_lk_stop_splash(sde_kms->hw_intr);
sinfo->display_splash_enabled = false;
+
+ error = _sde_splash_clear_mixer_blendstage(kms, state);
}
mutex_unlock(&sde_splash_lock);
- return 0;
+ return error;
}