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

Commit 5b893275 authored by Hareesh Gundu's avatar Hareesh Gundu
Browse files

msm: kgsl: Do not dump GPU LLC slice failures on ENOENT



LLCC enablement is optional on the device. Skip dumping the
LLCC slice failures incase GPU cache slices are not specified
in device tree.

Change-Id: I048e38cfc271850078f7e58a907100b3c2b75033
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 24811cd3
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -1385,21 +1385,19 @@ static int adreno_probe(struct platform_device *pdev)

	/* Get the system cache slice descriptor for GPU */
	adreno_dev->gpu_llc_slice = adreno_llc_getd(&pdev->dev, "gpu");
	if (IS_ERR(adreno_dev->gpu_llc_slice)) {
	if (IS_ERR(adreno_dev->gpu_llc_slice) &&
			PTR_ERR(adreno_dev->gpu_llc_slice) != -ENOENT)
		KGSL_DRV_WARN(device,
			"Failed to get GPU LLC slice descriptor %ld\n",
			PTR_ERR(adreno_dev->gpu_llc_slice));
		adreno_dev->gpu_llc_slice = NULL;
	}

	/* Get the system cache slice descriptor for GPU pagetables */
	adreno_dev->gpuhtw_llc_slice = adreno_llc_getd(&pdev->dev, "gpuhtw");
	if (IS_ERR(adreno_dev->gpuhtw_llc_slice)) {
	if (IS_ERR(adreno_dev->gpuhtw_llc_slice) &&
			PTR_ERR(adreno_dev->gpuhtw_llc_slice) != -ENOENT)
		KGSL_DRV_WARN(device,
			"Failed to get gpuhtw LLC slice descriptor %ld\n",
			PTR_ERR(adreno_dev->gpuhtw_llc_slice));
		adreno_dev->gpuhtw_llc_slice = NULL;
	}

#ifdef CONFIG_INPUT
	if (!device->pwrctrl.input_disable) {
@@ -1476,9 +1474,7 @@ static int adreno_remove(struct platform_device *pdev)
	adreno_profile_close(adreno_dev);

	/* Release the system cache slice descriptor */
	if (adreno_dev->gpu_llc_slice)
	adreno_llc_putd(adreno_dev->gpu_llc_slice);
	if (adreno_dev->gpuhtw_llc_slice)
	adreno_llc_putd(adreno_dev->gpuhtw_llc_slice);

	kgsl_pwrscale_close(device);
@@ -2163,9 +2159,7 @@ static int adreno_stop(struct kgsl_device *device)

	adreno_ocmem_free(adreno_dev);

	if (adreno_dev->gpu_llc_slice)
	adreno_llc_deactivate_slice(adreno_dev->gpu_llc_slice);
	if (adreno_dev->gpuhtw_llc_slice)
	adreno_llc_deactivate_slice(adreno_dev->gpuhtw_llc_slice);

	/* Save active coresight registers if applicable */
+15 −8
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-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
@@ -29,18 +29,21 @@ static inline void *adreno_llc_getd(struct device *dev, const char *name)

static inline void adreno_llc_putd(void *desc)
{
	if (!IS_ERR(desc))
		llcc_slice_putd(desc);
}

static inline int adreno_llc_deactivate_slice(void *desc)
{
	if (IS_ERR(desc))
		return PTR_ERR(desc);
	else
		return llcc_slice_deactivate(desc);
}

static inline int adreno_llc_get_scid(void *desc)
{
	return llcc_get_slice_id(desc);

}

static inline void adreno_llc_setup(struct kgsl_device *device)
@@ -48,18 +51,22 @@ static inline void adreno_llc_setup(struct kgsl_device *device)
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);

	if (adreno_dev->gpu_llc_slice && adreno_dev->gpu_llc_slice_enable)
	if (!IS_ERR(adreno_dev->gpu_llc_slice) &&
			adreno_dev->gpu_llc_slice_enable)
		if (!llcc_slice_activate(adreno_dev->gpu_llc_slice)) {
			if (gpudev->llc_configure_gpu_scid)
				gpudev->llc_configure_gpu_scid(adreno_dev);
		}

	if (adreno_dev->gpuhtw_llc_slice && adreno_dev->gpuhtw_llc_slice_enable)
	if (!IS_ERR(adreno_dev->gpuhtw_llc_slice) &&
			adreno_dev->gpuhtw_llc_slice_enable)
		if (!llcc_slice_activate(adreno_dev->gpuhtw_llc_slice)) {
			if (gpudev->llc_configure_gpuhtw_scid)
				gpudev->llc_configure_gpuhtw_scid(adreno_dev);
		}

	if (adreno_dev->gpu_llc_slice_enable ||
			adreno_dev->gpuhtw_llc_slice_enable)
		if (gpudev->llc_enable_overrides)
			gpudev->llc_enable_overrides(adreno_dev);
}
+1 −1
Original line number Diff line number Diff line
@@ -1178,7 +1178,7 @@ void _enable_gpuhtw_llc(struct kgsl_mmu *mmu, struct kgsl_iommu_pt *iommu_pt)
	int ret;

	/* GPU pagetable walk LLC slice not enabled */
	if (!adreno_dev->gpuhtw_llc_slice)
	if (IS_ERR(adreno_dev->gpuhtw_llc_slice))
		return;

	/* Domain attribute to enable system cache for GPU pagetable walks */