Commit 3eab7916 authored by Shirish S's avatar Shirish S Committed by Alex Deucher
Browse files

drm/amd/display: make FBC configurable option



Currently FBC is guarded with ENABLE_FBC macro,
which needs to be manually enabled in Makefile.

This patch moves it to Kconfig so that there
wont be any need to additional patch to be carried
for enabling or disabling on every SoC.

Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 96687275
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -17,6 +17,16 @@ config DRM_AMD_DC_PRE_VEGA
	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
	  and Hawaii.

config DRM_AMD_DC_FBC
	bool "AMD FBC - Enable Frame Buffer Compression"
	depends on DRM_AMD_DC
	help
	  Choose this option if you want to use frame buffer compression
	  support.
	  This is a power optimisation feature, check its availability
	  on your hardware before enabling this option.


config DRM_AMD_DC_DCN1_0
	bool "DCN 1.0 Raven family"
	depends on DRM_AMD_DC && X86
+1 −1
Original line number Diff line number Diff line
@@ -507,7 +507,7 @@ static bool construct(struct dc *dc,

	dc_version = resource_parse_asic_id(init_params->asic_id);
	dc->ctx->dce_version = dc_version;
#ifdef ENABLE_FBC
#if defined(CONFIG_DRM_AMD_DC_FBC)
	dc->ctx->fbc_gpu_addr = init_params->fbc_gpu_addr;
#endif
	/* Resource should construct all asic specific resources.
+2 −2
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ struct dc {
	struct dm_pp_display_configuration prev_display_config;

	/* FBC compressor */
#ifdef ENABLE_FBC
#if defined(CONFIG_DRM_AMD_DC_FBC)
	struct compressor *fbc_compressor;
#endif
};
@@ -293,7 +293,7 @@ struct dc_init_data {

	struct dc_config flags;
	uint32_t log_mask;
#ifdef ENABLE_FBC
#if defined(CONFIG_DRM_AMD_DC_FBC)
	uint64_t fbc_gpu_addr;
#endif
};
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ struct dc_context {
	bool created_bios;
	struct gpio_service *gpio_service;
	struct i2caux *i2caux;
#ifdef ENABLE_FBC
#if defined(CONFIG_DRM_AMD_DC_FBC)
	uint64_t fbc_gpu_addr;
#endif
};
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ void dce110_compressor_construct(struct dce110_compressor *compressor,
	compressor->base.lpt_channels_num = 0;
	compressor->base.attached_inst = 0;
	compressor->base.is_enabled = false;
#ifdef ENABLE_FBC
#if defined(CONFIG_DRM_AMD_DC_FBC)
	compressor->base.funcs = &dce110_compressor_funcs;

#endif
Loading