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

Commit b57c5ed7 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: add register dumping facility to sde debug"

parents 02fda0ce fc044296
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ msm_drm-y := \
	sde/sde_color_processing.o \
	sde/sde_vbif.o \
	sde/sde_splash.o \
	sde_dbg.o \
	sde_dbg_evtlog.o \
	sde_io_util.o \
	dba_bridge.o \
+14 −4
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>
 *
@@ -293,7 +293,7 @@ static int msm_unload(struct drm_device *dev)
				priv->vram.paddr, &attrs);
	}

	sde_evtlog_destroy();
	sde_dbg_destroy();

	sde_power_client_destroy(&priv->phandle, priv->pclient);
	sde_power_resource_deinit(pdev, &priv->phandle);
@@ -423,11 +423,17 @@ static int msm_component_bind_all(struct device *dev,
}
#endif

static int msm_power_enable_wrapper(void *handle, void *client, bool enable)
{
	return sde_power_resource_enable(handle, client, enable);
}

static int msm_load(struct drm_device *dev, unsigned long flags)
{
	struct platform_device *pdev = dev->platformdev;
	struct msm_drm_private *priv;
	struct msm_kms *kms;
	struct sde_dbg_power_ctrl dbg_power_ctrl = { NULL };
	int ret, i;

	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
@@ -477,9 +483,13 @@ static int msm_load(struct drm_device *dev, unsigned long flags)
	if (ret)
		goto fail;

	ret = sde_evtlog_init(dev->primary->debugfs_root);
	dbg_power_ctrl.handle = &priv->phandle;
	dbg_power_ctrl.client = priv->pclient;
	dbg_power_ctrl.enable_fn = msm_power_enable_wrapper;
	ret = sde_dbg_init(dev->primary->debugfs_root, &pdev->dev,
			&dbg_power_ctrl);
	if (ret) {
		dev_err(dev->dev, "failed to init evtlog: %d\n", ret);
		dev_err(dev->dev, "failed to init sde dbg: %d\n", ret);
		goto fail;
	}

+5 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018, 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
@@ -14,6 +14,7 @@
#include "sde_hwio.h"
#include "sde_hw_catalog.h"
#include "sde_hw_cdm.h"
#include "sde_dbg.h"

#define CDM_CSC_10_OPMODE                  0x000
#define CDM_CSC_10_BASE                    0x004
@@ -79,7 +80,6 @@ static struct sde_cdm_cfg *_cdm_offset(enum sde_cdm cdm,
		if (cdm == m->cdm[i].id) {
			b->base_off = addr;
			b->blk_off = m->cdm[i].base;
			b->length = m->cdm[i].len;
			b->hwversion = m->hwversion;
			b->log_mask = SDE_DBG_MASK_CDM;
			return &m->cdm[i];
@@ -296,6 +296,9 @@ struct sde_hw_cdm *sde_hw_cdm_init(enum sde_cdm idx,
	 */
	sde_hw_cdm_setup_csc_10bit(c, &rgb2yuv_cfg);

	sde_dbg_reg_register_dump_range(SDE_DBG_NAME, cfg->name, c->hw.blk_off,
			c->hw.blk_off + c->hw.length, c->hw.xin_id);

	return c;
}

+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018, 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
@@ -13,6 +13,7 @@
#include <linux/delay.h>
#include "sde_hwio.h"
#include "sde_hw_ctl.h"
#include "sde_dbg.h"

#define   CTL_LAYER(lm)                 \
	(((lm) == LM_5) ? (0x024) : (((lm) - LM_0) * 0x004))
@@ -496,6 +497,9 @@ struct sde_hw_ctl *sde_hw_ctl_init(enum sde_ctl idx,
	c->mixer_count = m->mixer_count;
	c->mixer_hw_caps = m->mixer;

	sde_dbg_reg_register_dump_range(SDE_DBG_NAME, cfg->name, c->hw.blk_off,
			c->hw.blk_off + c->hw.length, c->hw.xin_id);

	return c;
}

+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018, 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
@@ -15,6 +15,7 @@
#include "sde_hw_catalog.h"
#include "sde_hw_dspp.h"
#include "sde_hw_color_processing.h"
#include "sde_dbg.h"

static struct sde_dspp_cfg *_dspp_offset(enum sde_dspp dspp,
		struct sde_mdss_cfg *m,
@@ -112,6 +113,9 @@ struct sde_hw_dspp *sde_hw_dspp_init(enum sde_dspp idx,
	c->cap = cfg;
	_setup_dspp_ops(c, c->cap->features);

	sde_dbg_reg_register_dump_range(SDE_DBG_NAME, cfg->name, c->hw.blk_off,
			c->hw.blk_off + c->hw.length, c->hw.xin_id);

	return c;
}

Loading