Commit 6ef39a62 authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: use configurable FBC option in dm

Replace ENABLE_FBC macro with config option CONFIG_DRM_AMD_DC_FBC
in dm. DC code has been already updated the same way.
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarShirish Shankarappa <Shirish.S@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6a5a8ca9
...@@ -344,7 +344,7 @@ static void hotplug_notify_work_func(struct work_struct *work) ...@@ -344,7 +344,7 @@ static void hotplug_notify_work_func(struct work_struct *work)
drm_kms_helper_hotplug_event(dev); drm_kms_helper_hotplug_event(dev);
} }
#ifdef ENABLE_FBC #if defined(CONFIG_DRM_AMD_DC_FBC)
#include "dal_asic_id.h" #include "dal_asic_id.h"
/* Allocate memory for FBC compressed data */ /* Allocate memory for FBC compressed data */
/* TODO: Dynamic allocation */ /* TODO: Dynamic allocation */
...@@ -422,7 +422,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -422,7 +422,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
else else
init_data.log_mask = DC_MIN_LOG_MASK; init_data.log_mask = DC_MIN_LOG_MASK;
#ifdef ENABLE_FBC #if defined(CONFIG_DRM_AMD_DC_FBC)
if (adev->family == FAMILY_CZ) if (adev->family == FAMILY_CZ)
amdgpu_dm_initialize_fbc(adev); amdgpu_dm_initialize_fbc(adev);
init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr; init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr;
......
...@@ -72,7 +72,7 @@ struct irq_list_head { ...@@ -72,7 +72,7 @@ struct irq_list_head {
struct work_struct work; struct work_struct work;
}; };
#ifdef ENABLE_FBC #if defined(CONFIG_DRM_AMD_DC_FBC)
struct dm_comressor_info { struct dm_comressor_info {
void *cpu_addr; void *cpu_addr;
struct amdgpu_bo *bo_ptr; struct amdgpu_bo *bo_ptr;
...@@ -142,7 +142,7 @@ struct amdgpu_display_manager { ...@@ -142,7 +142,7 @@ struct amdgpu_display_manager {
* Caches device atomic state for suspend/resume * Caches device atomic state for suspend/resume
*/ */
struct drm_atomic_state *cached_state; struct drm_atomic_state *cached_state;
#ifdef ENABLE_FBC #if defined(CONFIG_DRM_AMD_DC_FBC)
struct dm_comressor_info compressor; struct dm_comressor_info compressor;
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment