1/*
2 * Copyright 2020 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Authors: AMD
23 *
24 */
25
26#ifndef __DML30_DISPLAY_RQ_DLG_CALC_H__
27#define __DML30_DISPLAY_RQ_DLG_CALC_H__
28
29#include "../display_rq_dlg_helpers.h"
30
31struct display_mode_lib;
32
33// Function: dml_rq_dlg_get_rq_reg
34// Main entry point for test to get the register values out of this DML class.
35// This function calls <get_rq_param> and <extract_rq_regs> functions to calculate
36// and then populate the rq_regs struct
37// Input:
38// pipe_param - pipe source configuration (e.g. vp, pitch, scaling, dest, etc.)
39// Output:
40// rq_regs - struct that holds all the RQ registers field value.
41// See also: <display_rq_regs_st>
42void dml30_rq_dlg_get_rq_reg(struct display_mode_lib *mode_lib,
43 display_rq_regs_st *rq_regs,
44 const display_pipe_params_st *pipe_param);
45
46// Function: dml_rq_dlg_get_dlg_reg
47// Calculate and return DLG and TTU register struct given the system setting
48// Output:
49// dlg_regs - output DLG register struct
50// ttu_regs - output DLG TTU register struct
51// Input:
52// e2e_pipe_param - "compacted" array of e2e pipe param struct
53// num_pipes - num of active "pipe" or "route"
54// pipe_idx - index that identifies the e2e_pipe_param that corresponding to this dlg
55// cstate - 0: when calculate min_ttu_vblank it is assumed cstate is not required. 1: Normal mode, cstate is considered.
56// Added for legacy or unrealistic timing tests.
57void dml30_rq_dlg_get_dlg_reg(struct display_mode_lib *mode_lib,
58 display_dlg_regs_st *dlg_regs,
59 display_ttu_regs_st *ttu_regs,
60 const display_e2e_pipe_params_st *e2e_pipe_param,
61 const unsigned int num_pipes,
62 const unsigned int pipe_idx,
63 const bool cstate_en,
64 const bool pstate_en,
65 const bool vm_en,
66 const bool ignore_viewport_pos,
67 const bool immediate_flip_support);
68
69#endif
70

source code of linux/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.h