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

Commit 7d53011e authored by Shubham Talekar's avatar Shubham Talekar Committed by Gerrit - the friendly Code Review server
Browse files

drm: msm: dp: prevent calling client_register multiple times



Prevent calling drm_client_register function if it is
already registered.

Change-Id: Ie1e91befdeca165ebdf16a917125776863d39102
Signed-off-by: default avatarShubham Talekar <stalek@codeaurora.org>
parent 318c0054
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -479,7 +479,10 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,

	if (!dp_display_framework_ready(dp)) {
		pr_err("%s: dp display framework not ready\n", __func__);
		if (!dp->dp_display.is_bootsplash_en) {
			dp->dp_display.is_bootsplash_en = true;
			drm_client_dev_register(dp->dp_display.drm_dev);
		}
		return ret;
	}

+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, 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
@@ -28,6 +28,7 @@ struct dp_display {
	bool is_primary;
	u32 max_pclk_khz;
	bool yuv_support;
	bool is_bootsplash_en;

	int (*enable)(struct dp_display *dp_display);
	int (*post_enable)(struct dp_display *dp_display);