Commit 8feabd03 authored by Yue Hin Lau's avatar Yue Hin Lau Committed by Alex Deucher

drm/amd/display: rename struct mem_input to hubp for dcn

Signed-off-by: default avatarYue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0c63c115
...@@ -485,6 +485,7 @@ static void split_stream_across_pipes( ...@@ -485,6 +485,7 @@ static void split_stream_across_pipes(
secondary_pipe->pipe_idx = pipe_idx; secondary_pipe->pipe_idx = pipe_idx;
secondary_pipe->plane_res.mi = pool->mis[secondary_pipe->pipe_idx]; secondary_pipe->plane_res.mi = pool->mis[secondary_pipe->pipe_idx];
secondary_pipe->plane_res.hubp = pool->hubps[secondary_pipe->pipe_idx];
secondary_pipe->plane_res.ipp = pool->ipps[secondary_pipe->pipe_idx]; secondary_pipe->plane_res.ipp = pool->ipps[secondary_pipe->pipe_idx];
secondary_pipe->plane_res.xfm = pool->transforms[secondary_pipe->pipe_idx]; secondary_pipe->plane_res.xfm = pool->transforms[secondary_pipe->pipe_idx];
if (primary_pipe->bottom_pipe) { if (primary_pipe->bottom_pipe) {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "dc_link_ddc.h" #include "dc_link_ddc.h"
#include "dm_helpers.h" #include "dm_helpers.h"
#include "mem_input.h" #include "mem_input.h"
#include "hubp.h"
/******************************************************************************* /*******************************************************************************
......
...@@ -1024,7 +1024,7 @@ static int acquire_first_split_pipe( ...@@ -1024,7 +1024,7 @@ static int acquire_first_split_pipe(
memset(pipe_ctx, 0, sizeof(*pipe_ctx)); memset(pipe_ctx, 0, sizeof(*pipe_ctx));
pipe_ctx->stream_res.tg = pool->timing_generators[i]; pipe_ctx->stream_res.tg = pool->timing_generators[i];
pipe_ctx->plane_res.mi = pool->mis[i]; pipe_ctx->plane_res.hubp = pool->hubps[i];
pipe_ctx->plane_res.ipp = pool->ipps[i]; pipe_ctx->plane_res.ipp = pool->ipps[i];
pipe_ctx->plane_res.xfm = pool->transforms[i]; pipe_ctx->plane_res.xfm = pool->transforms[i];
pipe_ctx->stream_res.opp = pool->opps[i]; pipe_ctx->stream_res.opp = pool->opps[i];
...@@ -1359,6 +1359,7 @@ static int acquire_first_free_pipe( ...@@ -1359,6 +1359,7 @@ static int acquire_first_free_pipe(
pipe_ctx->stream_res.tg = pool->timing_generators[i]; pipe_ctx->stream_res.tg = pool->timing_generators[i];
pipe_ctx->plane_res.mi = pool->mis[i]; pipe_ctx->plane_res.mi = pool->mis[i];
pipe_ctx->plane_res.hubp = pool->hubps[i];
pipe_ctx->plane_res.ipp = pool->ipps[i]; pipe_ctx->plane_res.ipp = pool->ipps[i];
pipe_ctx->plane_res.xfm = pool->transforms[i]; pipe_ctx->plane_res.xfm = pool->transforms[i];
pipe_ctx->stream_res.opp = pool->opps[i]; pipe_ctx->stream_res.opp = pool->opps[i];
......
...@@ -200,7 +200,7 @@ bool dc_stream_set_cursor_attributes( ...@@ -200,7 +200,7 @@ bool dc_stream_set_cursor_attributes(
for (i = 0; i < MAX_PIPES; i++) { for (i = 0; i < MAX_PIPES; i++) {
struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
if (pipe_ctx->stream != stream || !pipe_ctx->plane_res.mi || !pipe_ctx->plane_res.xfm) if (pipe_ctx->stream != stream || !pipe_ctx->plane_res.xfm)
continue; continue;
if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state)
continue; continue;
...@@ -210,10 +210,15 @@ bool dc_stream_set_cursor_attributes( ...@@ -210,10 +210,15 @@ bool dc_stream_set_cursor_attributes(
pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes( pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes(
pipe_ctx->plane_res.ipp, attributes); pipe_ctx->plane_res.ipp, attributes);
if (pipe_ctx->plane_res.mi->funcs->set_cursor_attributes != NULL) if (pipe_ctx->plane_res.hubp != NULL)
pipe_ctx->plane_res.hubp->funcs->set_cursor_attributes(
pipe_ctx->plane_res.hubp, attributes);
if (pipe_ctx->plane_res.mi != NULL)
pipe_ctx->plane_res.mi->funcs->set_cursor_attributes( pipe_ctx->plane_res.mi->funcs->set_cursor_attributes(
pipe_ctx->plane_res.mi, attributes); pipe_ctx->plane_res.mi, attributes);
if (pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes != NULL) if (pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes != NULL)
pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes( pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes(
pipe_ctx->plane_res.xfm, attributes); pipe_ctx->plane_res.xfm, attributes);
...@@ -248,7 +253,7 @@ bool dc_stream_set_cursor_position( ...@@ -248,7 +253,7 @@ bool dc_stream_set_cursor_position(
for (i = 0; i < MAX_PIPES; i++) { for (i = 0; i < MAX_PIPES; i++) {
struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp; struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp;
struct mem_input *mi = pipe_ctx->plane_res.mi; struct hubp *hubp = pipe_ctx->plane_res.hubp;
struct transform *xfm = pipe_ctx->plane_res.xfm; struct transform *xfm = pipe_ctx->plane_res.xfm;
struct dc_cursor_position pos_cpy = *position; struct dc_cursor_position pos_cpy = *position;
struct dc_cursor_mi_param param = { struct dc_cursor_mi_param param = {
...@@ -260,7 +265,7 @@ bool dc_stream_set_cursor_position( ...@@ -260,7 +265,7 @@ bool dc_stream_set_cursor_position(
}; };
if (pipe_ctx->stream != stream || if (pipe_ctx->stream != stream ||
!pipe_ctx->plane_res.mi || (!pipe_ctx->plane_res.mi && !pipe_ctx->plane_res.hubp) ||
!pipe_ctx->plane_state || !pipe_ctx->plane_state ||
!pipe_ctx->plane_res.xfm) !pipe_ctx->plane_res.xfm)
continue; continue;
...@@ -276,11 +281,12 @@ bool dc_stream_set_cursor_position( ...@@ -276,11 +281,12 @@ bool dc_stream_set_cursor_position(
if (ipp->funcs->ipp_cursor_set_position != NULL) if (ipp->funcs->ipp_cursor_set_position != NULL)
ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param); ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param);
if (mi->funcs->set_cursor_attributes != NULL) if (hubp != NULL)
mi->funcs->set_cursor_position(mi, &pos_cpy, &param); hubp->funcs->set_cursor_position(hubp, &pos_cpy, &param);
if (xfm != NULL)
xfm->funcs->set_cursor_position(xfm, &pos_cpy, &param, hubp->curs_attr.width);
if (xfm->funcs->set_cursor_attributes != NULL)
xfm->funcs->set_cursor_position(xfm, &pos_cpy, &param, mi->curs_attr.width);
} }
return true; return true;
......
...@@ -685,9 +685,6 @@ void dce_mem_input_construct( ...@@ -685,9 +685,6 @@ void dce_mem_input_construct(
dce_mi->regs = regs; dce_mi->regs = regs;
dce_mi->shifts = mi_shift; dce_mi->shifts = mi_shift;
dce_mi->masks = mi_mask; dce_mi->masks = mi_mask;
dce_mi->base.mpcc_id = 0xf;
dce_mi->base.opp_id = 0xf;
} }
void dce112_mem_input_construct( void dce112_mem_input_construct(
......
...@@ -1378,15 +1378,14 @@ static enum dc_status apply_single_controller_ctx_to_hw( ...@@ -1378,15 +1378,14 @@ static enum dc_status apply_single_controller_ctx_to_hw(
} }
/* mst support - use total stream count */ /* mst support - use total stream count */
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) if (pipe_ctx->plane_res.mi != NULL) {
if (pipe_ctx->plane_res.mi->funcs->allocate_mem_input != NULL)
#endif
pipe_ctx->plane_res.mi->funcs->allocate_mem_input( pipe_ctx->plane_res.mi->funcs->allocate_mem_input(
pipe_ctx->plane_res.mi, pipe_ctx->plane_res.mi,
stream->timing.h_total, stream->timing.h_total,
stream->timing.v_total, stream->timing.v_total,
stream->timing.pix_clk_khz, stream->timing.pix_clk_khz,
context->stream_count); context->stream_count);
}
pipe_ctx->stream->sink->link->psr_enabled = false; pipe_ctx->stream->sink->link->psr_enabled = false;
...@@ -1556,7 +1555,7 @@ static void set_safe_displaymarks( ...@@ -1556,7 +1555,7 @@ static void set_safe_displaymarks(
SAFE_NBP_MARK, SAFE_NBP_MARK, SAFE_NBP_MARK, SAFE_NBP_MARK }; SAFE_NBP_MARK, SAFE_NBP_MARK, SAFE_NBP_MARK, SAFE_NBP_MARK };
for (i = 0; i < MAX_PIPES; i++) { for (i = 0; i < MAX_PIPES; i++) {
if (res_ctx->pipe_ctx[i].stream == NULL) if (res_ctx->pipe_ctx[i].stream == NULL || res_ctx->pipe_ctx[i].plane_res.mi == NULL)
continue; continue;
res_ctx->pipe_ctx[i].plane_res.mi->funcs->mem_input_program_display_marks( res_ctx->pipe_ctx[i].plane_res.mi->funcs->mem_input_program_display_marks(
...@@ -1565,6 +1564,7 @@ static void set_safe_displaymarks( ...@@ -1565,6 +1564,7 @@ static void set_safe_displaymarks(
max_marks, max_marks,
max_marks, max_marks,
MAX_WATERMARK); MAX_WATERMARK);
if (i == underlay_idx) if (i == underlay_idx)
res_ctx->pipe_ctx[i].plane_res.mi->funcs->mem_input_program_chroma_display_marks( res_ctx->pipe_ctx[i].plane_res.mi->funcs->mem_input_program_chroma_display_marks(
res_ctx->pipe_ctx[i].plane_res.mi, res_ctx->pipe_ctx[i].plane_res.mi,
...@@ -1572,6 +1572,7 @@ static void set_safe_displaymarks( ...@@ -1572,6 +1572,7 @@ static void set_safe_displaymarks(
max_marks, max_marks,
max_marks, max_marks,
MAX_WATERMARK); MAX_WATERMARK);
} }
} }
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#ifndef __DC_MEM_INPUT_DCN10_H__ #ifndef __DC_MEM_INPUT_DCN10_H__
#define __DC_MEM_INPUT_DCN10_H__ #define __DC_MEM_INPUT_DCN10_H__
#include "mem_input.h" #include "hubp.h"
#define TO_DCN10_MEM_INPUT(mi)\ #define TO_DCN10_HUBP(hubp)\
container_of(mi, struct dcn10_mem_input, base) container_of(hubp, struct dcn10_hubp, base)
#define MI_REG_LIST_DCN(id)\ #define MI_REG_LIST_DCN(id)\
SRI(DCHUBP_CNTL, HUBP, id),\ SRI(DCHUBP_CNTL, HUBP, id),\
...@@ -584,15 +584,15 @@ struct dcn_mi_mask { ...@@ -584,15 +584,15 @@ struct dcn_mi_mask {
DCN_MI_REG_FIELD_LIST(uint32_t); DCN_MI_REG_FIELD_LIST(uint32_t);
}; };
struct dcn10_mem_input { struct dcn10_hubp {
struct mem_input base; struct hubp base;
const struct dcn_mi_registers *mi_regs; const struct dcn_mi_registers *mi_regs;
const struct dcn_mi_shift *mi_shift; const struct dcn_mi_shift *mi_shift;
const struct dcn_mi_mask *mi_mask; const struct dcn_mi_mask *mi_mask;
}; };
void hubp1_program_surface_config( void hubp1_program_surface_config(
struct mem_input *mem_input, struct hubp *hubp,
enum surface_pixel_format format, enum surface_pixel_format format,
union dc_tiling_info *tiling_info, union dc_tiling_info *tiling_info,
union plane_size *plane_size, union plane_size *plane_size,
...@@ -601,20 +601,20 @@ void hubp1_program_surface_config( ...@@ -601,20 +601,20 @@ void hubp1_program_surface_config(
bool horizontal_mirror); bool horizontal_mirror);
void hubp1_program_deadline( void hubp1_program_deadline(
struct mem_input *mem_input, struct hubp *hubp,
struct _vcs_dpi_display_dlg_regs_st *dlg_attr, struct _vcs_dpi_display_dlg_regs_st *dlg_attr,
struct _vcs_dpi_display_ttu_regs_st *ttu_attr); struct _vcs_dpi_display_ttu_regs_st *ttu_attr);
void hubp1_program_requestor( void hubp1_program_requestor(
struct mem_input *mem_input, struct hubp *hubp,
struct _vcs_dpi_display_rq_regs_st *rq_regs); struct _vcs_dpi_display_rq_regs_st *rq_regs);
void hubp1_program_pixel_format( void hubp1_program_pixel_format(
struct dcn10_mem_input *mi, struct dcn10_hubp *hubp,
enum surface_pixel_format format); enum surface_pixel_format format);
void hubp1_program_size_and_rotation( void hubp1_program_size_and_rotation(
struct dcn10_mem_input *mi, struct dcn10_hubp *hubp,
enum dc_rotation_angle rotation, enum dc_rotation_angle rotation,
enum surface_pixel_format format, enum surface_pixel_format format,
const union plane_size *plane_size, const union plane_size *plane_size,
...@@ -622,45 +622,38 @@ void hubp1_program_size_and_rotation( ...@@ -622,45 +622,38 @@ void hubp1_program_size_and_rotation(
bool horizontal_mirror); bool horizontal_mirror);
void hubp1_program_tiling( void hubp1_program_tiling(
struct dcn10_mem_input *mi, struct dcn10_hubp *hubp,
const union dc_tiling_info *info, const union dc_tiling_info *info,
const enum surface_pixel_format pixel_format); const enum surface_pixel_format pixel_format);
void hubp1_dcc_control(struct mem_input *mem_input, void hubp1_dcc_control(struct hubp *hubp,
bool enable, bool enable,
bool independent_64b_blks); bool independent_64b_blks);
void hubp1_program_display_marks(
struct mem_input *mem_input,
struct dce_watermarks nbp,
struct dce_watermarks stutter,
struct dce_watermarks urgent,
uint32_t total_dest_line_time_ns);
bool hubp1_program_surface_flip_and_addr( bool hubp1_program_surface_flip_and_addr(
struct mem_input *mem_input, struct hubp *hubp,
const struct dc_plane_address *address, const struct dc_plane_address *address,
bool flip_immediate); bool flip_immediate);
bool hubp1_is_flip_pending(struct mem_input *mem_input); bool hubp1_is_flip_pending(struct hubp *hubp);
void hubp1_cursor_set_attributes( void hubp1_cursor_set_attributes(
struct mem_input *mem_input, struct hubp *hubp,
const struct dc_cursor_attributes *attr); const struct dc_cursor_attributes *attr);
void hubp1_cursor_set_position( void hubp1_cursor_set_position(
struct mem_input *mem_input, struct hubp *hubp,
const struct dc_cursor_position *pos, const struct dc_cursor_position *pos,
const struct dc_cursor_mi_param *param); const struct dc_cursor_mi_param *param);
void hubp1_set_blank(struct mem_input *mem_input, bool blank); void hubp1_set_blank(struct hubp *hubp, bool blank);
void min_set_viewport(struct mem_input *mem_input, void min_set_viewport(struct hubp *hubp,
const struct rect *viewport, const struct rect *viewport,
const struct rect *viewport_c); const struct rect *viewport_c);
void dcn10_mem_input_construct( void dcn10_hubp_construct(
struct dcn10_mem_input *mi, struct dcn10_hubp *hubp1,
struct dc_context *ctx, struct dc_context *ctx,
uint32_t inst, uint32_t inst,
const struct dcn_mi_registers *mi_regs, const struct dcn_mi_registers *mi_regs,
...@@ -684,7 +677,7 @@ struct dcn_hubp_state { ...@@ -684,7 +677,7 @@ struct dcn_hubp_state {
uint32_t qos_level_low_wm; uint32_t qos_level_low_wm;
uint32_t qos_level_high_wm; uint32_t qos_level_high_wm;
}; };
void dcn10_mem_input_read_state(struct dcn10_mem_input *mi, void hubp1_read_state(struct dcn10_hubp *hubp1,
struct dcn_hubp_state *s); struct dcn_hubp_state *s);
#endif #endif
...@@ -704,9 +704,9 @@ static void destruct(struct dcn10_resource_pool *pool) ...@@ -704,9 +704,9 @@ static void destruct(struct dcn10_resource_pool *pool)
if (pool->base.ipps[i] != NULL) if (pool->base.ipps[i] != NULL)
pool->base.ipps[i]->funcs->ipp_destroy(&pool->base.ipps[i]); pool->base.ipps[i]->funcs->ipp_destroy(&pool->base.ipps[i]);
if (pool->base.mis[i] != NULL) { if (pool->base.hubps[i] != NULL) {
kfree(TO_DCN10_MEM_INPUT(pool->base.mis[i])); kfree(TO_DCN10_HUBP(pool->base.hubps[i]));
pool->base.mis[i] = NULL; pool->base.hubps[i] = NULL;
} }
if (pool->base.irqs != NULL) { if (pool->base.irqs != NULL) {
...@@ -753,19 +753,19 @@ static void destruct(struct dcn10_resource_pool *pool) ...@@ -753,19 +753,19 @@ static void destruct(struct dcn10_resource_pool *pool)
kfree(pool->base.pp_smu); kfree(pool->base.pp_smu);
} }
static struct mem_input *dcn10_mem_input_create( static struct hubp *dcn10_hubp_create(
struct dc_context *ctx, struct dc_context *ctx,
uint32_t inst) uint32_t inst)
{ {
struct dcn10_mem_input *mem_inputn10 = struct dcn10_hubp *hubp1 =
kzalloc(sizeof(struct dcn10_mem_input), GFP_KERNEL); kzalloc(sizeof(struct dcn10_hubp), GFP_KERNEL);
if (!mem_inputn10) if (!hubp1)
return NULL; return NULL;
dcn10_mem_input_construct(mem_inputn10, ctx, inst, dcn10_hubp_construct(hubp1, ctx, inst,
&mi_regs[inst], &mi_shift, &mi_mask); &mi_regs[inst], &mi_shift, &mi_mask);
return &mem_inputn10->base; return &hubp1->base;
} }
static void get_pixel_clock_parameters( static void get_pixel_clock_parameters(
...@@ -918,7 +918,7 @@ static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer( ...@@ -918,7 +918,7 @@ static struct pipe_ctx *dcn10_acquire_idle_pipe_for_layer(
idle_pipe->stream_res.tg = head_pipe->stream_res.tg; idle_pipe->stream_res.tg = head_pipe->stream_res.tg;
idle_pipe->stream_res.opp = head_pipe->stream_res.opp; idle_pipe->stream_res.opp = head_pipe->stream_res.opp;
idle_pipe->plane_res.mi = pool->mis[idle_pipe->pipe_idx]; idle_pipe->plane_res.hubp = pool->hubps[idle_pipe->pipe_idx];
idle_pipe->plane_res.ipp = pool->ipps[idle_pipe->pipe_idx]; idle_pipe->plane_res.ipp = pool->ipps[idle_pipe->pipe_idx];
idle_pipe->plane_res.xfm = pool->transforms[idle_pipe->pipe_idx]; idle_pipe->plane_res.xfm = pool->transforms[idle_pipe->pipe_idx];
...@@ -1357,8 +1357,8 @@ static bool construct( ...@@ -1357,8 +1357,8 @@ static bool construct(
if ((pipe_fuses & (1 << i)) != 0) if ((pipe_fuses & (1 << i)) != 0)
continue; continue;
pool->base.mis[j] = dcn10_mem_input_create(ctx, i); pool->base.hubps[j] = dcn10_hubp_create(ctx, i);
if (pool->base.mis[j] == NULL) { if (pool->base.hubps[j] == NULL) {
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
dm_error( dm_error(
"DC: failed to create memory input!\n"); "DC: failed to create memory input!\n");
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "ddc_service_types.h" #include "ddc_service_types.h"
#include "dc_bios_types.h" #include "dc_bios_types.h"
#include "mem_input.h" #include "mem_input.h"
#include "hubp.h"
#if defined(CONFIG_DRM_AMD_DC_DCN1_0) #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
#include "mpc.h" #include "mpc.h"
#endif #endif
...@@ -129,6 +130,7 @@ struct audio_support{ ...@@ -129,6 +130,7 @@ struct audio_support{
struct resource_pool { struct resource_pool {
struct mem_input *mis[MAX_PIPES]; struct mem_input *mis[MAX_PIPES];
struct hubp *hubps[MAX_PIPES];
struct input_pixel_processor *ipps[MAX_PIPES]; struct input_pixel_processor *ipps[MAX_PIPES];
struct transform *transforms[MAX_PIPES]; struct transform *transforms[MAX_PIPES];
struct output_pixel_processor *opps[MAX_PIPES]; struct output_pixel_processor *opps[MAX_PIPES];
...@@ -178,7 +180,7 @@ struct stream_resource { ...@@ -178,7 +180,7 @@ struct stream_resource {
struct plane_resource { struct plane_resource {
struct scaler_data scl_data; struct scaler_data scl_data;
struct hubp *hubp;
struct mem_input *mi; struct mem_input *mi;
struct input_pixel_processor *ipp; struct input_pixel_processor *ipp;
struct transform *xfm; struct transform *xfm;
......
/*
* Copyright 2012-15 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: AMD
*
*/
#ifndef __DAL_HUBP_H__
#define __DAL_HUBP_H__
#include "mem_input.h"
struct hubp {
struct hubp_funcs *funcs;
struct dc_context *ctx;
struct dc_plane_address request_address;
struct dc_plane_address current_address;
int inst;
int opp_id;
int mpcc_id;
struct dc_cursor_attributes curs_attr;
};
struct hubp_funcs {
void (*hubp_setup)(
struct hubp *hubp,
struct _vcs_dpi_display_dlg_regs_st *dlg_regs,
struct _vcs_dpi_display_ttu_regs_st *ttu_regs,
struct _vcs_dpi_display_rq_regs_st *rq_regs,
struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest);
void (*dcc_control)(struct hubp *hubp, bool enable,
bool independent_64b_blks);
void (*mem_program_viewport)(
struct hubp *hubp,
const struct rect *viewport,
const struct rect *viewport_c);
bool (*hubp_program_surface_flip_and_addr)(
struct hubp *hubp,
const struct dc_plane_address *address,
bool flip_immediate);
void (*hubp_program_pte_vm)(
struct hubp *hubp,
enum surface_pixel_format format,
union dc_tiling_info *tiling_info,
enum dc_rotation_angle rotation);
void (*hubp_set_vm_system_aperture_settings)(
struct hubp *hubp,
struct vm_system_aperture_param *apt);
void (*hubp_set_vm_context0_settings)(
struct hubp *hubp,
const struct vm_context0_param *vm0);
void (*hubp_program_surface_config)(
struct hubp *hubp,
enum surface_pixel_format format,
union dc_tiling_info *tiling_info,
union plane_size *plane_size,
enum dc_rotation_angle rotation,
struct dc_plane_dcc_param *dcc,
bool horizontal_mirror);
bool (*hubp_is_flip_pending)(struct hubp *hubp);
void (*hubp_update_dchub)(struct hubp *hubp,
struct dchub_init_data *dh_data);
void (*set_blank)(struct hubp *hubp, bool blank);
void (*set_hubp_blank_en)(struct hubp *hubp, bool blank);
void (*set_cursor_attributes)(
struct hubp *hubp,
const struct dc_cursor_attributes *attr);
void (*set_cursor_position)(
struct hubp *hubp,
const struct dc_cursor_position *pos,
const struct dc_cursor_mi_param *param);
};
#endif
...@@ -69,10 +69,7 @@ struct mem_input { ...@@ -69,10 +69,7 @@ struct mem_input {
struct dc_plane_address request_address; struct dc_plane_address request_address;
struct dc_plane_address current_address; struct dc_plane_address current_address;
int inst; int inst;
int opp_id;
int mpcc_id;
struct stutter_modes stutter_mode; struct stutter_modes stutter_mode;
struct dc_cursor_attributes curs_attr;
}; };
struct vm_system_aperture_param { struct vm_system_aperture_param {
......
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