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

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

Merge "msm: mdss: smooth splash hand-off LK to kernel"

parents 7e5700c1 f6810b79
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -506,6 +506,8 @@ struct mdss_data_type {
	u32 bcolor1;
	u32 bcolor2;
	struct mdss_scaler_block *scaler_off;

	u32 splash_intf_sel;
};

extern struct mdss_data_type *mdss_res;
+3 −1
Original line number Diff line number Diff line
/*
 * MDSS MDP Interface (used by framebuffer core)
 *
 * Copyright (c) 2007-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2007-2017, The Linux Foundation. All rights reserved.
 * Copyright (C) 2007 Google Incorporated
 *
 * This software is licensed under the terms of the GNU General Public
@@ -2730,6 +2730,8 @@ static int mdss_mdp_probe(struct platform_device *pdev)
		MDSS_MDP_REG_DISP_INTF_SEL);
	split_display = readl_relaxed(mdata->mdp_base +
		MDSS_MDP_REG_SPLIT_DISPLAY_EN);
	mdata->splash_intf_sel = intf_sel;

	if (intf_sel != 0) {
		for (i = 0; i < 4; i++)
			if ((intf_sel >> i*8) & 0x000000FF)
+33 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, 2017 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -241,7 +241,10 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,
{
	struct mdss_overlay_private *mdp5_data;
	struct mdss_mdp_ctl *ctl;
	static u32 splash_mem_addr;
	static u32 splash_mem_size;
	int rc = 0;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();

	if (!mfd)
		return -EINVAL;
@@ -307,8 +310,37 @@ int mdss_mdp_splash_cleanup(struct msm_fb_data_type *mfd,

	mdss_mdp_ctl_splash_finish(ctl, mdp5_data->handoff);

	/* If DSI-1 interface is enabled by LK, free cont_splash_mem for dsi
	 * during the cleanup for DSI-1.
	 */
	if ((mdata->splash_intf_sel & MDSS_MDP_INTF_DSI1_SEL) &&
		mfd->panel_info->pdest == DISPLAY_1) {
		pr_debug("delay cleanup for display %d\n",
						mfd->panel_info->pdest);
		splash_mem_addr = mdp5_data->splash_mem_addr;
		splash_mem_size = mdp5_data->splash_mem_size;

		mdss_mdp_footswitch_ctrl_splash(0);
		goto end;
	}

	if ((mdata->splash_intf_sel & MDSS_MDP_INTF_DSI1_SEL) &&
		mfd->panel_info->pdest == DISPLAY_2 &&
		!mfd->splash_info.iommu_dynamic_attached) {
		pr_debug("free splash mem for display %d\n",
						mfd->panel_info->pdest);
		/* Give back the reserved memory to the system */
		memblock_free(splash_mem_addr, splash_mem_size);
		mdss_free_bootmem(splash_mem_addr, splash_mem_size);

		mdss_mdp_footswitch_ctrl_splash(0);
		goto end;
	}

	if (mdp5_data->splash_mem_addr &&
		!mfd->splash_info.iommu_dynamic_attached) {
		pr_debug("free splash mem for display %d\n",
						mfd->panel_info->pdest);
		/* Give back the reserved memory to the system */
		memblock_free(mdp5_data->splash_mem_addr,
					mdp5_data->splash_mem_size);