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

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

Merge "msm: vidc: enable deferred probe support for Q6"

parents d88c842d a47b94e3
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -280,8 +280,12 @@ static int q6_hfi_init_resources(struct q6_hfi_device *device,

	device->res = res;
	rc = q6_hfi_register_iommu_domains(device);
	if (rc)
		dprintk(VIDC_ERR, "Failed to register iommu domains: %d\n", rc);
	if (rc) {
		if (rc != -EPROBE_DEFER) {
			dprintk(VIDC_ERR,
				"Failed to register iommu domains: %d\n", rc);
		}
	}

	return rc;
}
@@ -356,6 +360,7 @@ static void *q6_hfi_get_device(u32 device_id,

	rc = q6_hfi_init_resources(device, res);
	if (rc) {
		if (rc != -EPROBE_DEFER)
			dprintk(VIDC_ERR, "Failed to init resources: %d\n", rc);
		goto err_fail_init_res;
	}
@@ -363,7 +368,7 @@ static void *q6_hfi_get_device(u32 device_id,

err_fail_init_res:
	q6_hfi_delete_device(device);
	return NULL;
	return ERR_PTR(rc);
}

void q6_hfi_delete_device(void *device)
@@ -1384,6 +1389,12 @@ int q6_hfi_initialize(struct hfi_device *hdev, u32 device_id,
	}
	hdev->hfi_device_data = q6_hfi_get_device(device_id, res, callback);

	if (IS_ERR_OR_NULL(hdev->hfi_device_data)) {
		rc = PTR_ERR(hdev->hfi_device_data);
		rc = !rc ? -EINVAL : rc;
		goto err_hfi_init;
	}

	q6_init_hfi_callbacks(hdev);

err_hfi_init:
+2 −1
Original line number Diff line number Diff line
@@ -3602,7 +3602,7 @@ static void *venus_hfi_add_device(u32 device_id,
	struct venus_hfi_device *hdevice = NULL;
	int rc = 0;

	if (device_id || !res || !callback) {
	if (!res || !callback) {
		dprintk(VIDC_ERR, "Invalid Paramters");
		return NULL;
	}
@@ -3766,6 +3766,7 @@ int venus_hfi_initialize(struct hfi_device *hdev, u32 device_id,

	if (IS_ERR_OR_NULL(hdev->hfi_device_data)) {
		rc = PTR_ERR(hdev->hfi_device_data);
		rc = !rc ? -EINVAL : rc;
		goto err_venus_hfi_init;
	}