From 8930b90be637972ccbc683887353e71c52a918d9 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 14 May 2024 16:45:45 -0400 Subject: [PATCH 1370/1625] drm/amdgpu: fix Kconfig for ISP v2 Add new config option and set proper dependencies for ISP. v2: add missed guards, drop separate Kconfig Reviewed-by: Pratap Nirujogi Signed-off-by: Alex Deucher Cc: Pratap Nirujogi --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 18738ad06980..137a88b8de45 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -112,7 +112,9 @@ #include "amdgpu_xcp.h" #include "amdgpu_seq64.h" #include "amdgpu_reg_state.h" +#if defined(CONFIG_DRM_AMD_ISP) #include "amdgpu_isp.h" +#endif #define MAX_GPU_INSTANCE 64 @@ -1048,8 +1050,10 @@ struct amdgpu_device { /* display related functionality */ struct amdgpu_display_manager dm; +#if defined(CONFIG_DRM_AMD_ISP) /* isp */ struct amdgpu_isp isp; +#endif /* mes */ bool enable_mes; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index b2b9498851a1..05031bfd0acf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -106,7 +106,9 @@ #include "jpeg_v5_0_0.h" #include "amdgpu_vpe.h" +#if defined(CONFIG_DRM_AMD_ISP) #include "amdgpu_isp.h" +#endif #define FIRMWARE_IP_DISCOVERY "amdgpu/ip_discovery.bin" MODULE_FIRMWARE(FIRMWARE_IP_DISCOVERY); @@ -713,10 +715,12 @@ static void amdgpu_discovery_read_from_harvest_table(struct amdgpu_device *adev, adev->sdma.sdma_mask &= ~(1U << harvest_info->list[i].number_instance); break; +#if defined(CONFIG_DRM_AMD_ISP) case ISP_HWID: adev->isp.harvest_config |= ~(1U << harvest_info->list[i].number_instance); break; +#endif default: break; } @@ -2384,6 +2388,7 @@ static int amdgpu_discovery_set_umsch_mm_ip_blocks(struct amdgpu_device *adev) static int amdgpu_discovery_set_isp_ip_blocks(struct amdgpu_device *adev) { +#if defined(CONFIG_DRM_AMD_ISP) switch (amdgpu_ip_version(adev, ISP_HWIP, 0)) { case IP_VERSION(4, 1, 0): case IP_VERSION(4, 1, 1): @@ -2392,6 +2397,7 @@ static int amdgpu_discovery_set_isp_ip_blocks(struct amdgpu_device *adev) default: break; } +#endif return 0; } -- 2.52.0