2017-06-15 20:27:42 +00:00
|
|
|
/* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-06-01 22:35:54 +00:00
|
|
|
#ifndef __DC_MPCC_H__
|
|
|
|
#define __DC_MPCC_H__
|
2017-06-15 20:27:42 +00:00
|
|
|
|
2017-06-01 22:35:54 +00:00
|
|
|
#include "dc_hw_types.h"
|
2017-07-21 21:46:50 +00:00
|
|
|
#include "opp.h"
|
2017-06-15 20:27:42 +00:00
|
|
|
|
2017-06-01 22:35:54 +00:00
|
|
|
struct mpcc_cfg {
|
2017-09-11 20:56:51 +00:00
|
|
|
int dpp_id;
|
|
|
|
int opp_id;
|
|
|
|
struct mpc_tree_cfg *tree_cfg;
|
2017-07-21 21:46:50 +00:00
|
|
|
unsigned int z_index;
|
|
|
|
|
|
|
|
struct tg_color black_color;
|
2017-06-01 22:35:54 +00:00
|
|
|
bool per_pixel_alpha;
|
2017-06-05 19:08:10 +00:00
|
|
|
bool pre_multiplied_alpha;
|
2017-06-15 20:27:42 +00:00
|
|
|
};
|
|
|
|
|
2017-07-21 21:46:50 +00:00
|
|
|
struct mpc {
|
|
|
|
const struct mpc_funcs *funcs;
|
2017-06-01 22:35:54 +00:00
|
|
|
struct dc_context *ctx;
|
2017-06-15 20:27:42 +00:00
|
|
|
};
|
|
|
|
|
2017-07-21 21:46:50 +00:00
|
|
|
struct mpc_funcs {
|
2017-09-11 20:56:51 +00:00
|
|
|
int (*add)(struct mpc *mpc, struct mpcc_cfg *cfg);
|
2017-10-05 18:27:27 +00:00
|
|
|
|
2017-07-21 21:46:50 +00:00
|
|
|
void (*remove)(struct mpc *mpc,
|
2017-09-11 20:56:51 +00:00
|
|
|
struct mpc_tree_cfg *tree_cfg,
|
|
|
|
int opp_id,
|
2017-07-21 21:46:50 +00:00
|
|
|
int mpcc_inst);
|
2017-10-05 18:27:27 +00:00
|
|
|
|
2017-07-21 21:46:50 +00:00
|
|
|
void (*wait_for_idle)(struct mpc *mpc, int id);
|
2017-10-05 18:27:27 +00:00
|
|
|
|
2017-09-14 22:01:40 +00:00
|
|
|
void (*update_blend_mode)(struct mpc *mpc, struct mpcc_cfg *cfg);
|
2017-10-05 18:27:27 +00:00
|
|
|
|
2017-06-15 20:27:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|