#include "dcn21_hubbub.h"
#include "dcn10/dcn10_resource.h"
#include "dce110/dce110_resource.h"
+#include "dce/dce_panel.h"
#include "dcn20/dcn20_dwb.h"
#include "dcn20/dcn20_mmhubbub.h"
link_regs(4, E),
};
+static const struct dce_panel_registers panel_regs[] = {
+ { DCN_PANEL_REG_LIST() }
+};
+
+static const struct dce_panel_shift panel_shift = {
+ DCE_PANEL_MASK_SH_LIST(__SHIFT)
+};
+
+static const struct dce_panel_mask panel_mask = {
+ DCE_PANEL_MASK_SH_LIST(_MASK)
+};
+
#define aux_regs(id)\
[id] = {\
DCN2_AUX_REG_LIST(id)\
return &enc21->enc10.base;
}
+
+static struct panel *dcn21_panel_create(const struct panel_init_data *init_data)
+{
+ struct dce_panel *panel =
+ kzalloc(sizeof(struct dce_panel), GFP_KERNEL);
+
+ if (!panel)
+ return NULL;
+
+ dce_panel_construct(panel,
+ init_data,
+ &panel_regs[init_data->inst],
+ &panel_shift,
+ &panel_mask);
+
+ return &panel->base;
+}
+
#define CTX ctx
#define REG(reg_name) \
static struct resource_funcs dcn21_res_pool_funcs = {
.destroy = dcn21_destroy_resource_pool,
.link_enc_create = dcn21_link_encoder_create,
+ .panel_create = dcn21_panel_create,
.validate_bandwidth = dcn21_validate_bandwidth,
.populate_dml_pipes = dcn21_populate_dml_pipes_from_context,
.add_stream_to_ctx = dcn20_add_stream_to_ctx,