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

Commit 5091f7f4 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: fix debugfs creation order issues" into msm-4.9

parents bc76e326 09e64bf5
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static int sde_debugfs_core_irq_show(struct seq_file *s, void *v)

DEFINE_SDE_DEBUGFS_SEQ_FOPS(sde_debugfs_core_irq);

static int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
		struct dentry *parent)
{
	sde_kms->irq_obj.debugfs_file = debugfs_create_file("core_irq", 0644,
@@ -330,20 +330,20 @@ static int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
	return 0;
}

static void sde_debugfs_core_irq_destroy(struct sde_kms *sde_kms)
void sde_debugfs_core_irq_destroy(struct sde_kms *sde_kms)
{
	debugfs_remove(sde_kms->irq_obj.debugfs_file);
	sde_kms->irq_obj.debugfs_file = NULL;
}

#else
static int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
		struct dentry *parent)
{
	return 0;
}

static void sde_debugfs_core_irq_destroy(struct sde_kms *sde_kms)
void sde_debugfs_core_irq_destroy(struct sde_kms *sde_kms)
{
}
#endif
@@ -385,8 +385,6 @@ void sde_core_irq_preinstall(struct sde_kms *sde_kms)
		atomic_set(&sde_kms->irq_obj.enable_counts[i], 0);
		atomic_set(&sde_kms->irq_obj.irq_counts[i], 0);
	}

	sde_debugfs_core_irq_init(sde_kms, sde_debugfs_get_root(sde_kms));
}

int sde_core_irq_postinstall(struct sde_kms *sde_kms)
@@ -411,8 +409,6 @@ void sde_core_irq_uninstall(struct sde_kms *sde_kms)
	}
	priv = sde_kms->dev->dev_private;

	sde_debugfs_core_irq_destroy(sde_kms);

	sde_power_resource_enable(&priv->phandle, sde_kms->core_client, true);
	for (i = 0; i < sde_kms->irq_obj.total_irqs; i++)
		if (atomic_read(&sde_kms->irq_obj.enable_counts[i]) ||
+16 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 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
@@ -135,4 +135,19 @@ int sde_core_irq_unregister_callback(
		int irq_idx,
		struct sde_irq_callback *irq_cb);

/**
 * sde_debugfs_core_irq_init - register core irq debugfs
 * @sde_kms: pointer to kms
 * @parent: debugfs directory root
 * @Return: 0 on success
 */
int sde_debugfs_core_irq_init(struct sde_kms *sde_kms,
		struct dentry *parent);

/**
 * sde_debugfs_core_irq_destroy - deregister core irq debugfs
 * @sde_kms: pointer to kms
 */
void sde_debugfs_core_irq_destroy(struct sde_kms *sde_kms);

#endif /* __SDE_CORE_IRQ_H__ */
+1 −1
Original line number Diff line number Diff line
@@ -2652,7 +2652,7 @@ static int _sde_crtc_init_debugfs(struct drm_crtc *crtc)
		return -EINVAL;

	sde_crtc->debugfs_root = debugfs_create_dir(sde_crtc->name,
			sde_debugfs_get_root(sde_kms));
			crtc->dev->primary->debugfs_root);
	if (!sde_crtc->debugfs_root)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -1569,7 +1569,7 @@ static int _sde_encoder_init_debugfs(struct drm_encoder *drm_enc)

	/* create overall sub-directory for the encoder */
	sde_enc->debugfs_root = debugfs_create_dir(name,
					sde_debugfs_get_root(sde_kms));
			drm_enc->dev->primary->debugfs_root);
	if (!sde_enc->debugfs_root)
		return -ENOMEM;

+4 −2
Original line number Diff line number Diff line
@@ -302,8 +302,9 @@ static int _sde_debugfs_init(struct sde_kms *sde_kms)
	/* allow debugfs_root to be NULL */
	debugfs_create_x32(SDE_DEBUGFS_HWMASKNAME, 0644, debugfs_root, p);

	sde_debugfs_danger_init(sde_kms, debugfs_root);
	sde_debugfs_vbif_init(sde_kms, debugfs_root);
	(void) sde_debugfs_danger_init(sde_kms, debugfs_root);
	(void) sde_debugfs_vbif_init(sde_kms, debugfs_root);
	(void) sde_debugfs_core_irq_init(sde_kms, debugfs_root);

	rc = sde_core_perf_debugfs_init(&sde_kms->perf, debugfs_root);
	if (rc) {
@@ -320,6 +321,7 @@ static void _sde_debugfs_destroy(struct sde_kms *sde_kms)
	if (sde_kms) {
		sde_debugfs_vbif_destroy(sde_kms);
		sde_debugfs_danger_destroy(sde_kms);
		sde_debugfs_core_irq_destroy(sde_kms);
	}
}
#else
Loading