mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
drm/etnaviv: add function to load the initial PTA state
On GPUs with the security feature the MTLB config is stored in the PTA. Add a function to trigger the initial PTA load through the FE. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
@@ -215,6 +215,24 @@ u16 etnaviv_buffer_config_mmuv2(struct etnaviv_gpu *gpu, u32 mtlb_addr, u32 safe
|
||||
return buffer->user_size / 8;
|
||||
}
|
||||
|
||||
u16 etnaviv_buffer_config_pta(struct etnaviv_gpu *gpu)
|
||||
{
|
||||
struct etnaviv_cmdbuf *buffer = &gpu->buffer;
|
||||
|
||||
lockdep_assert_held(&gpu->lock);
|
||||
|
||||
buffer->user_size = 0;
|
||||
|
||||
CMD_LOAD_STATE(buffer, VIVS_MMUv2_PTA_CONFIG,
|
||||
VIVS_MMUv2_PTA_CONFIG_INDEX(0));
|
||||
|
||||
CMD_END(buffer);
|
||||
|
||||
buffer->user_size = ALIGN(buffer->user_size, 8);
|
||||
|
||||
return buffer->user_size / 8;
|
||||
}
|
||||
|
||||
void etnaviv_buffer_end(struct etnaviv_gpu *gpu)
|
||||
{
|
||||
struct etnaviv_cmdbuf *buffer = &gpu->buffer;
|
||||
|
||||
Reference in New Issue
Block a user