1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright 2023 Advanced Micro Devices, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 *
23 */
24
25#ifndef __DML_DISPLAY_RQ_DLG_CALC_H__
26#define __DML_DISPLAY_RQ_DLG_CALC_H__
27
28#include "display_mode_core_structs.h"
29#include "display_mode_lib_defines.h"
30
31struct display_mode_lib_st;
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> fucntions to calculate
36// and then populate the rq_regs struct
37// Input:
38// Assume mode_program is already called
39// Output:
40// rq_regs - struct that holds all the RQ registers field value.
41// See also: <display_rq_regs_st>
42
43void dml_rq_dlg_get_rq_reg(dml_display_rq_regs_st *rq_regs,
44 struct display_mode_lib_st *mode_lib,
45 const dml_uint_t pipe_idx);
46
47// Function: dml_rq_dlg_get_dlg_reg
48// Calculate and return DLG and TTU register struct given the system setting
49// Output:
50// dlg_regs - output DLG register struct
51// ttu_regs - output DLG TTU register struct
52// Input:
53// Assume mode_program is already called
54// pipe_idx - index that identifies the e2e_pipe_param that corresponding to this dlg
55void dml_rq_dlg_get_dlg_reg(dml_display_dlg_regs_st *dlg_regs,
56 dml_display_ttu_regs_st *ttu_regs,
57 struct display_mode_lib_st *mode_lib,
58 const dml_uint_t pipe_idx);
59
60// Function: dml_rq_dlg_get_arb_params
61void dml_rq_dlg_get_arb_params(struct display_mode_lib_st *mode_lib, dml_display_arb_params_st *arb_param);
62
63#endif
64

source code of linux/drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.h