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

Commit 4dd00411 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Fix compilation issues" into msm-4.9

parents 292d6bec 11a48b62
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line 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);
	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);
	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,
			A6XX_GPUHTW_LLC_SCID_MASK,
			gpuhtw_scid << A6XX_GPUHTW_LLC_SCID_SHIFT);
			gpuhtw_scid << A6XX_GPUHTW_LLC_SCID_SHIFT);
	iounmap(gpu_cx_reg);
	iounmap(gpu_cx_reg);
@@ -1603,7 +1603,7 @@ struct adreno_gpudev adreno_a6xx_gpudev = {
	.enable_64bit = a6xx_enable_64bit,
	.enable_64bit = a6xx_enable_64bit,
	.llc_configure_gpu_scid = a6xx_llc_configure_gpu_scid,
	.llc_configure_gpu_scid = a6xx_llc_configure_gpu_scid,
	.llc_configure_gpuhtw_scid = a6xx_llc_configure_gpuhtw_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_set = a6xx_oob_set,
	.oob_clear = a6xx_oob_clear,
	.oob_clear = a6xx_oob_clear,
	.rpmh_gpu_pwrctrl = a6xx_rpmh_gpu_pwrctrl,
	.rpmh_gpu_pwrctrl = a6xx_rpmh_gpu_pwrctrl,
+19 −0
Original line number Original line 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 struct gmu_memdesc gmu_kmem_entries[GMU_KERNEL_ENTRIES];
static unsigned long gmu_kmem_bitmap;
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,
static int _gmu_iommu_fault_handler(struct device *dev,
		unsigned long addr, int flags, const char *name)
		unsigned long addr, int flags, const char *name)
{
{
+1 −20
Original line number Original line Diff line number Diff line
@@ -13,7 +13,6 @@
#ifndef __KGSL_GMU_H
#ifndef __KGSL_GMU_H
#define __KGSL_GMU_H
#define __KGSL_GMU_H


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


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


/**
bool kgsl_gmu_isenabled(struct kgsl_device *device);
 * 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;
}

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