/* * Copyright 2015 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 *
*/
/* DC interface (public) */ #include"dm_services.h" #include"dc.h"
/* DC core (private) */ #include"core_types.h" #include"transform.h" #include"dpp.h"
void dc_plane_destruct(struct dc_plane_state *plane_state)
{ // no more pointers to free within dc_plane_state
}
/* dc_state is passed in separately since it may differ from the current dc state accessible from plane_state e.g. * if the driver is doing an update from an old context to a new one and the caller wants the pipe mask for the new * context rather than the existing one
*/
uint8_t dc_plane_get_pipe_mask(struct dc_state *dc_state, conststruct dc_plane_state *plane_state)
{
uint8_t pipe_mask = 0; int i;
for (i = 0; i < plane_state->ctx->dc->res_pool->pipe_count; i++) { struct pipe_ctx *pipe_ctx = &dc_state->res_ctx.pipe_ctx[i];
/* ***************************************************************************** * Function: dc_plane_get_status * * @brief * Looks up the pipe context of plane_state and updates the pending status * of the pipe context. Then returns plane_state->status * * @param [in] plane_state: pointer to the plane_state to get the status of *****************************************************************************
*/ conststruct dc_plane_status *dc_plane_get_status( conststruct dc_plane_state *plane_state, union dc_plane_status_update_flags flags)
{ conststruct dc_plane_status *plane_status; struct dc *dc; int i;
if (!plane_state ||
!plane_state->ctx ||
!plane_state->ctx->dc) {
ASSERT(0); return NULL; /* remove this if above assert never hit */
}
plane_status = &plane_state->status;
dc = plane_state->ctx->dc;
if (dc->current_state == NULL) return NULL;
/* Find the current plane state and set its pending bit to false */ for (i = 0; i < dc->res_pool->pipe_count; i++) { struct pipe_ctx *pipe_ctx =
&dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->plane_state != plane_state) continue;
if (pipe_ctx->plane_state && flags.bits.address)
pipe_ctx->plane_state->status.is_flip_pending = false;
break;
}
dc_exit_ips_for_hw_access(dc);
for (i = 0; i < dc->res_pool->pipe_count; i++) { struct pipe_ctx *pipe_ctx =
&dc->current_state->res_ctx.pipe_ctx[i];
if (pipe_ctx->plane_state != plane_state) continue;
if (flags.bits.address)
dc->hwss.update_pending_status(pipe_ctx);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.