diff options
26 files changed, 64 insertions, 58 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 1e66dfd0e39c..8ab5ccbc14ac 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
| @@ -2274,7 +2274,7 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type) | |||
| 2274 | case CHIP_VEGA10: | 2274 | case CHIP_VEGA10: |
| 2275 | case CHIP_VEGA12: | 2275 | case CHIP_VEGA12: |
| 2276 | case CHIP_VEGA20: | 2276 | case CHIP_VEGA20: |
| 2277 | #ifdef CONFIG_X86 | 2277 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 2278 | case CHIP_RAVEN: | 2278 | case CHIP_RAVEN: |
| 2279 | #endif | 2279 | #endif |
| 2280 | return amdgpu_dc != 0; | 2280 | return amdgpu_dc != 0; |
diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig index 325083b0297e..4c35625eb2c7 100644 --- a/drivers/gpu/drm/amd/display/Kconfig +++ b/drivers/gpu/drm/amd/display/Kconfig | |||
| @@ -9,6 +9,14 @@ config DRM_AMD_DC | |||
| 9 | support for AMDGPU. This adds required support for Vega and | 9 | support for AMDGPU. This adds required support for Vega and |
| 10 | Raven ASICs. | 10 | Raven ASICs. |
| 11 | 11 | ||
| 12 | config DRM_AMD_DC_DCN1_0 | ||
| 13 | bool "DCN 1.0 Raven family" | ||
| 14 | depends on DRM_AMD_DC && X86 | ||
| 15 | default y | ||
| 16 | help | ||
| 17 | Choose this option if you want to have | ||
| 18 | RV family for display engine | ||
| 19 | |||
| 12 | config DEBUG_KERNEL_DC | 20 | config DEBUG_KERNEL_DC |
| 13 | bool "Enable kgdb break in DC" | 21 | bool "Enable kgdb break in DC" |
| 14 | depends on DRM_AMD_DC | 22 | depends on DRM_AMD_DC |
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 34f34823bab5..800f481a6995 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
| @@ -58,9 +58,7 @@ | |||
| 58 | #include <drm/drm_fb_helper.h> | 58 | #include <drm/drm_fb_helper.h> |
| 59 | #include <drm/drm_edid.h> | 59 | #include <drm/drm_edid.h> |
| 60 | 60 | ||
| 61 | #include "modules/inc/mod_freesync.h" | 61 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 62 | |||
| 63 | #ifdef CONFIG_X86 | ||
| 64 | #include "ivsrcid/irqsrcs_dcn_1_0.h" | 62 | #include "ivsrcid/irqsrcs_dcn_1_0.h" |
| 65 | 63 | ||
| 66 | #include "dcn/dcn_1_0_offset.h" | 64 | #include "dcn/dcn_1_0_offset.h" |
| @@ -1192,7 +1190,7 @@ static int dce110_register_irq_handlers(struct amdgpu_device *adev) | |||
| 1192 | return 0; | 1190 | return 0; |
| 1193 | } | 1191 | } |
| 1194 | 1192 | ||
| 1195 | #ifdef CONFIG_X86 | 1193 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 1196 | /* Register IRQ sources and initialize IRQ callbacks */ | 1194 | /* Register IRQ sources and initialize IRQ callbacks */ |
| 1197 | static int dcn10_register_irq_handlers(struct amdgpu_device *adev) | 1195 | static int dcn10_register_irq_handlers(struct amdgpu_device *adev) |
| 1198 | { | 1196 | { |
| @@ -1532,7 +1530,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) | |||
| 1532 | goto fail; | 1530 | goto fail; |
| 1533 | } | 1531 | } |
| 1534 | break; | 1532 | break; |
| 1535 | #ifdef CONFIG_X86 | 1533 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 1536 | case CHIP_RAVEN: | 1534 | case CHIP_RAVEN: |
| 1537 | if (dcn10_register_irq_handlers(dm->adev)) { | 1535 | if (dcn10_register_irq_handlers(dm->adev)) { |
| 1538 | DRM_ERROR("DM: Failed to initialize IRQ\n"); | 1536 | DRM_ERROR("DM: Failed to initialize IRQ\n"); |
| @@ -1716,7 +1714,7 @@ static int dm_early_init(void *handle) | |||
| 1716 | adev->mode_info.num_dig = 6; | 1714 | adev->mode_info.num_dig = 6; |
| 1717 | adev->mode_info.plane_type = dm_plane_type_default; | 1715 | adev->mode_info.plane_type = dm_plane_type_default; |
| 1718 | break; | 1716 | break; |
| 1719 | #ifdef CONFIG_X86 | 1717 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 1720 | case CHIP_RAVEN: | 1718 | case CHIP_RAVEN: |
| 1721 | adev->mode_info.num_crtc = 4; | 1719 | adev->mode_info.num_crtc = 4; |
| 1722 | adev->mode_info.num_hpd = 4; | 1720 | adev->mode_info.num_hpd = 4; |
diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile index 532a515fda9a..aed538a4d1ba 100644 --- a/drivers/gpu/drm/amd/display/dc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/Makefile | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | DC_LIBS = basics bios calcs dce gpio i2caux irq virtual | 26 | DC_LIBS = basics bios calcs dce gpio i2caux irq virtual |
| 27 | 27 | ||
| 28 | ifdef CONFIG_X86 | 28 | ifdef CONFIG_DRM_AMD_DC_DCN1_0 |
| 29 | DC_LIBS += dcn10 dml | 29 | DC_LIBS += dcn10 dml |
| 30 | endif | 30 | endif |
| 31 | 31 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c index 770ff89ba7e1..bbbcef566c55 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | |||
| @@ -55,7 +55,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2( | |||
| 55 | case DCE_VERSION_11_22: | 55 | case DCE_VERSION_11_22: |
| 56 | *h = dal_cmd_tbl_helper_dce112_get_table2(); | 56 | *h = dal_cmd_tbl_helper_dce112_get_table2(); |
| 57 | return true; | 57 | return true; |
| 58 | #ifdef CONFIG_X86 | 58 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
| 59 | case DCN_VERSION_1_0: | 59 | case DCN_VERSION_1_0: |
| 60 | *h = dal_cmd_tbl_helper_dce112_get_table2(); | 60 | *h = dal_cmd_tbl_helper_dce112_get_table2(); |
| 61 | return true; | 61 | return true; |
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile index 416500e51b8d..95f332ee3e7e 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile | |||
| @@ -38,7 +38,7 @@ CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare | |||
| 38 | 38 | ||
| 39 | BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o | 39 | BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o |
| 40 | 40 | ||
| 41 | ifdef CONFIG_X86 | 41 | ifdef CONFIG_DRM_AMD_DC_DCN1_0 |
| 42 | BW_CALCS += dcn_calcs.o dcn_calc_math.o dcn_calc_auto.o | 42 | BW_CALCS += dcn_calcs.o dcn_calc_math.o dcn_calc_auto.o |
| 43 | endif | 43 | endif |
| 44 | 44 | ||
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index d7076807b637..6ae050dc3220 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c | |||
| @@ -487,7 +487,7 @@ static void destruct(struct dc *dc) | |||
| 487 | kfree(dc->bw_dceip); | 487 | kfree(dc->bw_dceip); |
| 488 | dc->bw_dceip = NULL; | 488 | dc->bw_dceip = NULL; |
| 489 | 489 | ||
| 490 | #ifdef CONFIG_X86 | 490 | #ifdef CONFIG_DRM_AMD_DC_DCN1_0 |
| 491 | kfree(dc->dcn_soc); | 491 | kfree(dc->dcn_soc); |
| 492 | dc->dcn_soc = NULL; | 492 | dc->dcn_soc = NULL; |
| 493 | 493 | ||
| @@ -503,7 +503,7 @@ static bool construct(struct dc *dc, | |||
| 503 | struct dc_context *dc_ctx; | 503 | struct dc_context *dc_ctx; |
| 504 | struct bw_calcs_dceip *dc_dceip; | 504 | struct bw_calcs_dceip *dc_dceip; |
| 505 | struct bw_calcs_vbios *dc_vbios; | 505 | struct bw_calcs_vbios *dc_vbios; |
| 506 | #ifdef CONFIG_X86 | 506 | #ifdef CONFIG_DRM_AMD_DC_DCN1_0 |
| 507 | struct dcn_soc_bounding_box *dcn_soc; | 507 | struct dcn_soc_bounding_box *dcn_soc; |
| 508 | struct dcn_ip_params *dcn_ip; | 508 | struct dcn_ip_params *dcn_ip; |
| 509 | #endif | 509 | #endif |
| @@ -525,7 +525,7 @@ static bool construct(struct dc *dc, | |||
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | dc->bw_vbios = dc_vbios; | 527 | dc->bw_vbios = dc_vbios; |
| 528 | #ifdef CONFIG_X86 | 528 | #ifdef CONFIG_DRM_AMD_DC_DCN1_0 |
| 529 | dcn_soc = kzalloc(sizeof(*dcn_soc), GFP_KERNEL); | 529 | dcn_soc = kzalloc(sizeof(*dcn_soc), GFP_KERNEL); |
| 530 | if (!dcn_soc) { | 530 | if (!dcn_soc) { |
