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

Commit 1babd706 authored by Jordan Crouse's avatar Jordan Crouse Committed by Rob Clark
Browse files

drm/msm/gpu: Remove unused bus scaling code



Remove the downstream bus scaling code. It isn't needed for for
compatibility with a downstream or vendor kernel. Get it out of the
way to clear space for devfreq support.

Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 156a537d
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -480,13 +480,8 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
	adreno_gpu->rev = config->rev;
	adreno_gpu->rev = config->rev;


	gpu->fast_rate = config->fast_rate;
	gpu->fast_rate = config->fast_rate;
	gpu->bus_freq  = config->bus_freq;
#ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
	gpu->bus_scale_table = config->bus_scale_table;
#endif


	DBG("fast_rate=%u, slow_rate=27000000, bus_freq=%u",
	DBG("fast_rate=%u, slow_rate=27000000", gpu->fast_rate);
			gpu->fast_rate, gpu->bus_freq);


	adreno_gpu_config.ioname = "kgsl_3d0_reg_memory";
	adreno_gpu_config.ioname = "kgsl_3d0_reg_memory";
	adreno_gpu_config.irqname = "kgsl_3d0_irq";
	adreno_gpu_config.irqname = "kgsl_3d0_irq";
+1 −4
Original line number Original line Diff line number Diff line
@@ -129,10 +129,7 @@ struct adreno_gpu {
/* platform config data (ie. from DT, or pdata) */
/* platform config data (ie. from DT, or pdata) */
struct adreno_platform_config {
struct adreno_platform_config {
	struct adreno_rev rev;
	struct adreno_rev rev;
	uint32_t fast_rate, bus_freq;
	uint32_t fast_rate;
#ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
	struct msm_bus_scale_pdata *bus_scale_table;
#endif
};
};


#define ADRENO_IDLE_TIMEOUT msecs_to_jiffies(1000)
#define ADRENO_IDLE_TIMEOUT msecs_to_jiffies(1000)
+0 −39
Original line number Original line Diff line number Diff line
@@ -27,37 +27,6 @@
 * Power Management:
 * Power Management:
 */
 */


#ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
#include <mach/board.h>
static void bs_init(struct msm_gpu *gpu)
{
	if (gpu->bus_scale_table) {
		gpu->bsc = msm_bus_scale_register_client(gpu->bus_scale_table);
		DBG("bus scale client: %08x", gpu->bsc);
	}
}

static void bs_fini(struct msm_gpu *gpu)
{
	if (gpu->bsc) {
		msm_bus_scale_unregister_client(gpu->bsc);
		gpu->bsc = 0;
	}
}

static void bs_set(struct msm_gpu *gpu, int idx)
{
	if (gpu->bsc) {
		DBG("set bus scaling: %d", idx);
		msm_bus_scale_client_update_request(gpu->bsc, idx);
	}
}
#else
static void bs_init(struct msm_gpu *gpu) {}
static void bs_fini(struct msm_gpu *gpu) {}
static void bs_set(struct msm_gpu *gpu, int idx) {}
#endif

static int enable_pwrrail(struct msm_gpu *gpu)
static int enable_pwrrail(struct msm_gpu *gpu)
{
{
	struct drm_device *dev = gpu->dev;
	struct drm_device *dev = gpu->dev;
@@ -143,8 +112,6 @@ static int enable_axi(struct msm_gpu *gpu)
{
{
	if (gpu->ebi1_clk)
	if (gpu->ebi1_clk)
		clk_prepare_enable(gpu->ebi1_clk);
		clk_prepare_enable(gpu->ebi1_clk);
	if (gpu->bus_freq)
		bs_set(gpu, gpu->bus_freq);
	return 0;
	return 0;
}
}


@@ -152,8 +119,6 @@ static int disable_axi(struct msm_gpu *gpu)
{
{
	if (gpu->ebi1_clk)
	if (gpu->ebi1_clk)
		clk_disable_unprepare(gpu->ebi1_clk);
		clk_disable_unprepare(gpu->ebi1_clk);
	if (gpu->bus_freq)
		bs_set(gpu, 0);
	return 0;
	return 0;
}
}


@@ -755,8 +720,6 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
	gpu->pdev = pdev;
	gpu->pdev = pdev;
	platform_set_drvdata(pdev, gpu);
	platform_set_drvdata(pdev, gpu);


	bs_init(gpu);

	gpu->aspace = msm_gpu_create_address_space(gpu, pdev,
	gpu->aspace = msm_gpu_create_address_space(gpu, pdev,
		config->va_start, config->va_end);
		config->va_start, config->va_end);


@@ -826,8 +789,6 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)


	WARN_ON(!list_empty(&gpu->active_list));
	WARN_ON(!list_empty(&gpu->active_list));


	bs_fini(gpu);

	for (i = 0; i < ARRAY_SIZE(gpu->rb); i++) {
	for (i = 0; i < ARRAY_SIZE(gpu->rb); i++) {
		msm_ringbuffer_destroy(gpu->rb[i]);
		msm_ringbuffer_destroy(gpu->rb[i]);
		gpu->rb[i] = NULL;
		gpu->rb[i] = NULL;
+1 −6
Original line number Original line Diff line number Diff line
@@ -108,12 +108,7 @@ struct msm_gpu {
	struct clk **grp_clks;
	struct clk **grp_clks;
	int nr_clocks;
	int nr_clocks;
	struct clk *ebi1_clk, *core_clk, *rbbmtimer_clk;
	struct clk *ebi1_clk, *core_clk, *rbbmtimer_clk;
	uint32_t fast_rate, bus_freq;
	uint32_t fast_rate;

#ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
	struct msm_bus_scale_pdata *bus_scale_table;
	uint32_t bsc;
#endif


	/* Hang and Inactivity Detection:
	/* Hang and Inactivity Detection:
	 */
	 */