Skip to content

Commit 8930b90

Browse files
committed
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Pratap Nirujogi <[email protected]>
1 parent d232584 commit 8930b90

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

drivers/gpu/drm/amd/amdgpu/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ config DRM_AMDGPU_USERPTR
7171
This option selects CONFIG_HMM and CONFIG_HMM_MIRROR if it
7272
isn't already selected to enabled full userptr support.
7373

74+
config DRM_AMD_ISP
75+
bool "Enable AMD Image Signal Processor IP support"
76+
depends on DRM_AMDGPU
77+
select MFD_CORE
78+
select PM_GENERIC_DOMAINS if PM
79+
help
80+
Choose this option to enable ISP IP support for AMD SOCs.
81+
This adds the ISP (Image Signal Processor) IP driver and wires
82+
it up into the amdgpu driver. It is required for cameras
83+
on APUs which utilize mipi cameras.
84+
7485
config DRM_AMDGPU_WERROR
7586
bool "Force the compiler to throw an error instead of a warning when compiling"
7687
depends on DRM_AMDGPU

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ amdgpu-y += $(AMD_DISPLAY_FILES)
324324
endif
325325

326326
# add isp block
327+
ifneq ($(CONFIG_DRM_AMD_ISP),)
327328
amdgpu-y += amdgpu_isp.o
329+
endif
328330

329331
obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@
112112
#include "amdgpu_xcp.h"
113113
#include "amdgpu_seq64.h"
114114
#include "amdgpu_reg_state.h"
115+
#if defined(CONFIG_DRM_AMD_ISP)
115116
#include "amdgpu_isp.h"
117+
#endif
116118

117119
#define MAX_GPU_INSTANCE 64
118120

@@ -1048,8 +1050,10 @@ struct amdgpu_device {
10481050
/* display related functionality */
10491051
struct amdgpu_display_manager dm;
10501052

1053+
#if defined(CONFIG_DRM_AMD_ISP)
10511054
/* isp */
10521055
struct amdgpu_isp isp;
1056+
#endif
10531057

10541058
/* mes */
10551059
bool enable_mes;

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@
106106
#include "jpeg_v5_0_0.h"
107107

108108
#include "amdgpu_vpe.h"
109+
#if defined(CONFIG_DRM_AMD_ISP)
109110
#include "amdgpu_isp.h"
111+
#endif
110112

111113
#define FIRMWARE_IP_DISCOVERY "amdgpu/ip_discovery.bin"
112114
MODULE_FIRMWARE(FIRMWARE_IP_DISCOVERY);
@@ -713,10 +715,12 @@ static void amdgpu_discovery_read_from_harvest_table(struct amdgpu_device *adev,
713715
adev->sdma.sdma_mask &=
714716
~(1U << harvest_info->list[i].number_instance);
715717
break;
718+
#if defined(CONFIG_DRM_AMD_ISP)
716719
case ISP_HWID:
717720
adev->isp.harvest_config |=
718721
~(1U << harvest_info->list[i].number_instance);
719722
break;
723+
#endif
720724
default:
721725
break;
722726
}
@@ -2384,6 +2388,7 @@ static int amdgpu_discovery_set_umsch_mm_ip_blocks(struct amdgpu_device *adev)
23842388

23852389
static int amdgpu_discovery_set_isp_ip_blocks(struct amdgpu_device *adev)
23862390
{
2391+
#if defined(CONFIG_DRM_AMD_ISP)
23872392
switch (amdgpu_ip_version(adev, ISP_HWIP, 0)) {
23882393
case IP_VERSION(4, 1, 0):
23892394
case IP_VERSION(4, 1, 1):
@@ -2392,6 +2397,7 @@ static int amdgpu_discovery_set_isp_ip_blocks(struct amdgpu_device *adev)
23922397
default:
23932398
break;
23942399
}
2400+
#endif
23952401

23962402
return 0;
23972403
}

0 commit comments

Comments
 (0)