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

Commit 14601c1c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Map full GPU address range and access shader memory as an offset"

parents 4b75fdf2 2aa27baa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -191,5 +191,7 @@ static const struct adreno_gpu_core adreno_gpulist[] = {
		.pm4_bstrp_size = 0x06,
		.pfp_bstrp_size = 0x28,
		.pfp_bstrp_ver = 0x4ff091,
		.shader_offset = 0x20000,
		.shader_size = 0x10000,
	},
};
+17 −0
Original line number Diff line number Diff line
@@ -1306,6 +1306,23 @@ static int adreno_init(struct kgsl_device *device)

	set_bit(ADRENO_DEVICE_INITIALIZED, &adreno_dev->priv);

	/* Use shader offset and length defined in gpudev */
	if (adreno_dev->gpucore->shader_offset &&
					adreno_dev->gpucore->shader_size) {

		if (device->shader_mem_phys || device->shader_mem_virt)
			KGSL_DRV_ERR(device,
			"Shader memory already specified in device tree\n");
		else {
			device->shader_mem_phys = device->reg_phys +
					adreno_dev->gpucore->shader_offset;
			device->shader_mem_virt = device->reg_virt +
					adreno_dev->gpucore->shader_offset;
			device->shader_mem_len =
					adreno_dev->gpucore->shader_size;
		}
	}

	/* Adjust snapshot section sizes according to core */
	if ((adreno_is_a330(adreno_dev) || adreno_is_a305b(adreno_dev))) {
		gpudev->snapshot_data->sect_sizes->cp_state_deb =
+4 −0
Original line number Diff line number Diff line
@@ -215,6 +215,8 @@ struct adreno_busy_data {
 * @pm4_bstrp_size: Size of the bootstrap loader for PM4 microcode
 * @pfp_bstrp_size: Size of the bootstrap loader for PFP microcde
 * @pfp_bstrp_ver: Version of the PFP microcode that supports bootstraping
 * @shader_offset: Offset of shader from gpu reg base
 * @shader_size: Shader size
 */
struct adreno_gpu_core {
	enum adreno_gpurev gpurev;
@@ -233,6 +235,8 @@ struct adreno_gpu_core {
	unsigned int pm4_bstrp_size;
	unsigned int pfp_bstrp_size;
	unsigned int pfp_bstrp_ver;
	unsigned long shader_offset;
	unsigned int shader_size;
};

struct adreno_device {
+2 −2
Original line number Diff line number Diff line
@@ -4395,7 +4395,7 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
						device->shadermemname);

		if (res == NULL) {
			KGSL_DRV_ERR(device,
			KGSL_DRV_WARN(device,
			"Shader memory: platform_get_resource_byname failed\n");
		}

@@ -4408,7 +4408,7 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
					device->shader_mem_phys,
					device->shader_mem_len,
						device->name)) {
			KGSL_DRV_ERR(device, "request_mem_region_failed\n");
			KGSL_DRV_WARN(device, "request_mem_region_failed\n");
		}
	}