Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbc1e1f4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: ignore last close during cont splash" into msm-4.9

parents d8d5bc2b 2f0444a0
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -947,6 +947,14 @@ static void msm_lastclose(struct drm_device *dev)
	struct msm_kms *kms = priv->kms;
	int i;

	/* check for splash status before triggering cleanup
	 * if we end up here with splash status ON i.e before first
	 * commit then ignore the last close call
	 */
	if (kms && kms->funcs && kms->funcs->check_for_splash
		&& kms->funcs->check_for_splash(kms))
		return;

	/*
	 * clean up vblank disable immediately as this is the last close.
	 */
+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -106,6 +106,8 @@ struct msm_kms_funcs {
			unsigned int domain);
	/* handle continuous splash  */
	int (*cont_splash_config)(struct msm_kms *kms);
	/* check for continuous splash status */
	bool (*check_for_splash)(struct msm_kms *kms);
};

struct msm_kms {
+14 −0
Original line number Diff line number Diff line
@@ -2727,6 +2727,19 @@ static int sde_kms_cont_splash_config(struct msm_kms *kms)
	return rc;
}

static bool sde_kms_check_for_splash(struct msm_kms *kms)
{
	struct sde_kms *sde_kms;

	if (!kms) {
		SDE_ERROR("invalid kms\n");
		return false;
	}

	sde_kms = to_sde_kms(kms);
	return sde_kms->splash_data.cont_splash_en;
}

static int sde_kms_pm_suspend(struct device *dev)
{
	struct drm_device *ddev;
@@ -2927,6 +2940,7 @@ static const struct msm_kms_funcs kms_funcs = {
	.register_events = _sde_kms_register_events,
	.get_address_space = _sde_kms_get_address_space,
	.postopen = _sde_kms_post_open,
	.check_for_splash = sde_kms_check_for_splash,
};

/* the caller api needs to turn on clock before calling it */