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

Commit 5a0661f8 authored by Ujwal Patel's avatar Ujwal Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: prevent excessive logging after shutdown requested



Current frame-buffer driver gets shutdown call back and it turns the
display off. Once shutdown call-back is received, any subsequent
frame-buffer opens are rejected and an error log is generated. Now
user-land display clients are not aware of shutdown and they keep
opening the frame-buffer devices repeatedly ignoring the failures and
notifications sent by the driver. Due to this, excessive logging is
observed which in turn leads to watch-dog bite and a crash. Prevent
this by generating error log only once and keep sending sysfs
notification for every rejected frame-buffer open.

Change-Id: I9df6cb708a2d6c986a31324540a3d040dffbcdfc
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 700e0c78
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2168,8 +2168,9 @@ static int mdss_fb_open(struct fb_info *info, int user)
	struct task_struct *task = current->group_leader;

	if (mfd->shutdown_pending) {
		pr_err("Shutdown pending. Aborting operation. Request from pid:%d name=%s\n",
		pr_err_once("Shutdown pending. Aborting operation. Request from pid:%d name=%s\n",
			pid, task->comm);
		sysfs_notify(&mfd->fbi->dev->kobj, NULL, "show_blank_event");
		return -EPERM;
	}

@@ -2247,8 +2248,8 @@ static int mdss_fb_release_all(struct fb_info *info, bool release_all)
	struct task_struct *task = current->group_leader;

	if (!mfd->ref_cnt) {
		pr_info("try to close unopened fb %d! from %s\n", mfd->index,
			task->comm);
		pr_info("try to close unopened fb %d! from pid:%d name:%s\n",
			mfd->index, pid, task->comm);
		return -EINVAL;
	}