Commit 1c1df79c authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.16-2025-05-29' of...

Merge tag 'amd-drm-fixes-6.16-2025-05-29' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-next

amd-drm-fixes-6.16-2025-05-29:

amdgpu:
- UserQ fixes
- SMU 13.x fixes
- VCN fixes
- JPEG fixes
- Misc cleanups
- runtime pm fix
- DCN 4.0.1 fixes
- Misc display fixes
- ISP fix
- VRAM manager fix
- RAS fixes

amdkfd:
- SVM fix
- Misc cleanups
- Ref leak fix
- WPTR BO fix

radeon:
- Misc cleanups

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250529205215.6790-1-alexander.deucher@amd.com
parents 84e2f918 30837a49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ config DRM_AMDGPU_USERPTR

config DRM_AMD_ISP
	bool "Enable AMD Image Signal Processor IP support"
	depends on DRM_AMDGPU
	depends on DRM_AMDGPU && ACPI
	select MFD_CORE
	select PM_GENERIC_DOMAINS if PM
	help
+4 −0
Original line number Diff line number Diff line
@@ -1713,6 +1713,10 @@ static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { retu
static inline bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) { return false; }
#endif

#if defined(CONFIG_DRM_AMD_ISP)
int amdgpu_acpi_get_isp4_dev_hid(u8 (*hid)[ACPI_ID_LEN]);
#endif

void amdgpu_register_gpu_instance(struct amdgpu_device *adev);
void amdgpu_unregister_gpu_instance(struct amdgpu_device *adev);

+31 −1
Original line number Diff line number Diff line
@@ -1532,5 +1532,35 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
	return true;
#endif /* CONFIG_AMD_PMC */
}

#endif /* CONFIG_SUSPEND */

#if IS_ENABLED(CONFIG_DRM_AMD_ISP)
static const struct acpi_device_id isp_sensor_ids[] = {
	{ "OMNI5C10" },
	{ }
};

static int isp_match_acpi_device_ids(struct device *dev, const void *data)
{
	return acpi_match_device(data, dev) ? 1 : 0;
}

int amdgpu_acpi_get_isp4_dev_hid(u8 (*hid)[ACPI_ID_LEN])
{
	struct device *pdev __free(put_device) = NULL;
	struct acpi_device *acpi_pdev;

	pdev = bus_find_device(&platform_bus_type, NULL, isp_sensor_ids,
			       isp_match_acpi_device_ids);
	if (!pdev)
		return -EINVAL;

	acpi_pdev = ACPI_COMPANION(pdev);
	if (!acpi_pdev)
		return -ENODEV;

	strscpy(*hid, acpi_device_hid(acpi_pdev));

	return 0;
}
#endif /* CONFIG_DRM_AMD_ISP */
+3 −0
Original line number Diff line number Diff line
@@ -368,6 +368,9 @@ void amdgpu_amdkfd_free_gtt_mem(struct amdgpu_device *adev, void **mem_obj)
{
	struct amdgpu_bo **bo = (struct amdgpu_bo **) mem_obj;

	if (!bo || !*bo)
		return;

	(void)amdgpu_bo_reserve(*bo, true);
	amdgpu_bo_kunmap(*bo);
	amdgpu_bo_unpin(*bo);
+1 −13
Original line number Diff line number Diff line
@@ -919,7 +919,7 @@ long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout)
	return timeout;
}

void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
static void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
{
	struct amdgpu_ctx *ctx;
	struct idr *idp;
@@ -949,19 +949,7 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)

void amdgpu_ctx_mgr_fini(struct amdgpu_ctx_mgr *mgr)
{
	struct amdgpu_ctx *ctx;
	struct idr *idp;
	uint32_t id;

	amdgpu_ctx_mgr_entity_fini(mgr);

	idp = &mgr->ctx_handles;

	idr_for_each_entry(idp, ctx, id) {
		if (kref_put(&ctx->refcount, amdgpu_ctx_fini) != 1)
			DRM_ERROR("ctx %p is still alive\n", ctx);
	}

	idr_destroy(&mgr->ctx_handles);
	mutex_destroy(&mgr->lock);
}
Loading