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

Commit 11a48b62 authored by Kyle Piefer's avatar Kyle Piefer
Browse files

msm: kgsl: Fix compilation issues



Fix a couple compiler errors that static analysis missed
while KGSL build was disabled.

CRs-Fixed: 2017390
Change-Id: I0f309f5a1ceb204432be8566306bfbeb340b97b5
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 2ce06168
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1434,7 +1434,7 @@ static void a6xx_llc_configure_gpuhtw_scid(struct adreno_device *adreno_dev)
	gpuhtw_scid = adreno_llc_get_scid(adreno_dev->gpuhtw_llc_slice);

	gpu_cx_reg = ioremap(A6XX_GPU_CX_REG_BASE, A6XX_GPU_CX_REG_SIZE);
	extregrmw(gpu_cx_reg + A6XX_GPU_CX_MISC_SYSTEM_CACHE_CNTL_1,
	_reg_rmw(gpu_cx_reg + A6XX_GPU_CX_MISC_SYSTEM_CACHE_CNTL_1,
			A6XX_GPUHTW_LLC_SCID_MASK,
			gpuhtw_scid << A6XX_GPUHTW_LLC_SCID_SHIFT);
	iounmap(gpu_cx_reg);
@@ -1603,7 +1603,7 @@ struct adreno_gpudev adreno_a6xx_gpudev = {
	.enable_64bit = a6xx_enable_64bit,
	.llc_configure_gpu_scid = a6xx_llc_configure_gpu_scid,
	.llc_configure_gpuhtw_scid = a6xx_llc_configure_gpuhtw_scid,
	.llc_enable_overrides = a6xx_llc_enable_overrides
	.llc_enable_overrides = a6xx_llc_enable_overrides,
	.oob_set = a6xx_oob_set,
	.oob_clear = a6xx_oob_clear,
	.rpmh_gpu_pwrctrl = a6xx_rpmh_gpu_pwrctrl,
+19 −0
Original line number Diff line number Diff line
@@ -94,6 +94,25 @@ struct gmu_iommu_context gmu_ctx[] = {
static struct gmu_memdesc gmu_kmem_entries[GMU_KERNEL_ENTRIES];
static unsigned long gmu_kmem_bitmap;

/*
 * kgsl_gmu_isenabled() - Check if there is a GMU and it is enabled
 * @device: Pointer to the KGSL device that owns the GMU
 *
 * Check if a GMU has been found and successfully probed. Also
 * check that the feature flag to use a GMU is enabled. Returns
 * true if both of these conditions are met, otherwise false.
 */
bool kgsl_gmu_isenabled(struct kgsl_device *device)
{
	struct gmu_device *gmu = &device->gmu;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (gmu->pdev && ADRENO_FEATURE(adreno_dev, ADRENO_GPMU))
		return true;

	return false;
}

static int _gmu_iommu_fault_handler(struct device *dev,
		unsigned long addr, int flags, const char *name)
{
+1 −20
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#ifndef __KGSL_GMU_H
#define __KGSL_GMU_H

#include "adreno.h"
#include "kgsl_hfi.h"

#define FW_VER_MAJOR(ver)		(((ver)>>28) & 0xFF)
@@ -224,25 +223,7 @@ struct gmu_device {
	unsigned int idle_level;
};

/**
 * kgsl_gmu_isenabled() - Check if there is a GMU and it is enabled
 * @device: Pointer to the KGSL device that owns the GMU
 *
 * Check if a GMU has been found and successfully probed. Also
 * check that the feature flag to use a GMU is enabled. Returns
 * true if both of these conditions are met, otherwise false.
 */
static inline bool kgsl_gmu_isenabled(struct kgsl_device *device)
{
	struct gmu_device *gmu = &device->gmu;
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);

	if (gmu->pdev && ADRENO_FEATURE(adreno_dev, ADRENO_GPMU))
		return true;

	return false;
}

bool kgsl_gmu_isenabled(struct kgsl_device *device);
int gmu_probe(struct kgsl_device *device);
void gmu_remove(struct kgsl_device *device);
int allocate_gmu_image(struct gmu_device *gmu, unsigned int size);