diff options
| author | Thomas Gleixner <[email protected]> | 2020-06-11 15:17:57 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2020-06-11 15:17:57 +0200 | 
| commit | f77d26a9fc525286bcef3d4f98b52e17482cf49c (patch) | |
| tree | 6b179c9aa84787773cb601a14a64255e2912154b /drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | |
| parent | b6bea24d41519e8c31e4798f1c1a3f67e540c5d0 (diff) | |
| parent | f0178fc01fe46bab6a95415f5647d1a74efcad1b (diff) | |
Merge branch 'x86/entry' into ras/core
to fixup conflicts in arch/x86/kernel/cpu/mce/core.c so MCE specific follow
up patches can be applied without creating a horrible merge conflict
afterwards.
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 31 | 
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c index 2ad5c28c6e66..a19be9de2df7 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c @@ -50,6 +50,7 @@  #include "dce/dce_hwseq.h"  #include "dce80/dce80_hw_sequencer.h"  #include "dce100/dce100_resource.h" +#include "dce/dce_panel_cntl.h"  #include "reg_helper.h" @@ -266,6 +267,18 @@ static const struct dce_stream_encoder_mask se_mask = {  		SE_COMMON_MASK_SH_LIST_DCE80_100(_MASK)  }; +static const struct dce_panel_cntl_registers panel_cntl_regs[] = { +	{ DCE_PANEL_CNTL_REG_LIST() } +}; + +static const struct dce_panel_cntl_shift panel_cntl_shift = { +	DCE_PANEL_CNTL_MASK_SH_LIST(__SHIFT) +}; + +static const struct dce_panel_cntl_mask panel_cntl_mask = { +	DCE_PANEL_CNTL_MASK_SH_LIST(_MASK) +}; +  #define opp_regs(id)\  [id] = {\  	OPP_DCE_80_REG_LIST(id),\ @@ -728,6 +741,23 @@ struct link_encoder *dce80_link_encoder_create(  	return &enc110->base;  } +static struct panel_cntl *dce80_panel_cntl_create(const struct panel_cntl_init_data *init_data) +{ +	struct dce_panel_cntl *panel_cntl = +		kzalloc(sizeof(struct dce_panel_cntl), GFP_KERNEL); + +	if (!panel_cntl) +		return NULL; + +	dce_panel_cntl_construct(panel_cntl, +			init_data, +			&panel_cntl_regs[init_data->inst], +			&panel_cntl_shift, +			&panel_cntl_mask); + +	return &panel_cntl->base; +} +  struct clock_source *dce80_clock_source_create(  	struct dc_context *ctx,  	struct dc_bios *bios, @@ -909,6 +939,7 @@ static void dce80_destroy_resource_pool(struct resource_pool **pool)  static const struct resource_funcs dce80_res_pool_funcs = {  	.destroy = dce80_destroy_resource_pool,  	.link_enc_create = dce80_link_encoder_create, +	.panel_cntl_create = dce80_panel_cntl_create,  	.validate_bandwidth = dce80_validate_bandwidth,  	.validate_plane = dce100_validate_plane,  	.add_stream_to_ctx = dce100_add_stream_to_ctx,  |