/* * Copyright 2012-20 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 *
*/
/* Programming guide suggests CURSOR_REQ_MODE = 1 for SubVP: * For Pstate change using the MALL with sub-viewport buffering, * the cursor does not use the MALL (USE_MALL_FOR_CURSOR is ignored) * and sub-viewport positioning by Display FW has to avoid the cursor * requests to DRAM (set CURSOR_REQ_MODE = 1 to minimize this exclusion). * * CURSOR_REQ_MODE = 1 begins fetching cursor data at the beginning of display prefetch. * Setting this should allow the sub-viewport position to always avoid the cursor because * we do not allow the sub-viewport region to overlap with display prefetch (i.e. during blank).
*/
REG_UPDATE(CURSOR_CONTROL, CURSOR_REQ_MODE, enable);
}
/* For phantom pipe enable, disable GSL */
REG_UPDATE(DCSURF_FLIP_CONTROL2, SURFACE_GSL_ENABLE, 0);
REG_UPDATE(DCHUBP_CNTL, HUBP_BLANK_EN, 1);
reg_val = REG_READ(DCHUBP_CNTL); if (reg_val) { /* init sequence workaround: in case HUBP is * power gated, this wait would timeout. * * we just wrote reg_val to non-0, if it stay 0 * it means HUBP is gated
*/
REG_WAIT(DCHUBP_CNTL,
HUBP_NO_OUTSTANDING_REQ, 1,
1, 200);
}
}
REG_SET_2(CURSOR_SETTINGS, 0, /* no shift of the cursor HDL schedule */
CURSOR0_DST_Y_OFFSET, 0, /* used to shift the cursor chunk request deadline */
CURSOR0_CHUNK_HDL_ADJUST, 3);
switch (attr->color_format) { case CURSOR_MODE_MONO:
cursor_size /= 2; break; case CURSOR_MODE_COLOR_1BIT_AND: case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA: case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA:
cursor_size *= 4; break;
case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED: case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED: default:
cursor_size *= 8; break;
}
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.