class MagmaSystemConnection

Defined at line 24 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.h

Public Methods

void MagmaSystemConnection (Owner * owner, std::unique_ptr<msd::Connection> msd_connection_t)

`owner` must outlive the MagmaSystemConnection.

Defined at line 14 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

void ~MagmaSystemConnection ()

Defined at line 20 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status CreateContext (uint32_t context_id)

Defined at line 50 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status CreateContext2 (uint32_t context_id, uint64_t priority)

Defined at line 55 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status DestroyContext (uint32_t context_id)

Defined at line 70 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ExecuteCommandBuffers (uint32_t context_id, std::vector<magma_exec_command_buffer> & command_buffers, std::vector<magma_exec_resource> & resources, std::vector<uint64_t> & wait_semaphores, std::vector<uint64_t> & signal_semaphores, uint64_t flags)

Defined at line 90 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

MagmaSystemContext * LookupContext (uint32_t context_id)

Defined at line 82 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

uint32_t GetDeviceId ()

Defined at line 48 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

bool IsPerformanceCounterAccessAllowed ()

Defined at line 64 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.h

msd::Connection * msd_connection ()

Defined at line 101 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.h

void set_can_access_performance_counters (bool can_access)

Defined at line 103 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.h

magma::Status ImportObject (zx::handle handle, uint64_t flags, fuchsia_gpu_magma::wire::ObjectType object_type, uint64_t client_id)

Defined at line 255 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ReleaseObject (uint64_t object_id, fuchsia_gpu_magma::wire::ObjectType object_type)

Defined at line 286 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status MapBuffer (uint64_t buffer_id, uint64_t hw_va, uint64_t offset, uint64_t length, uint64_t flags)

Defined at line 167 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status UnmapBuffer (uint64_t buffer_id, uint64_t hw_va)

Defined at line 190 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status BufferRangeOp (uint64_t buffer_id, uint32_t op, uint64_t start, uint64_t length)

Defined at line 202 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ExecuteInlineCommands (uint32_t context_id, std::vector<magma_inline_command_buffer> commands)

Defined at line 103 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

void SetNotificationCallback (msd::NotificationHandler * )

Defined at line 216 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status EnablePerformanceCounterAccess (zx::handle access_token)

Defined at line 113 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status EnablePerformanceCounters (const uint64_t * counters, uint64_t counter_count)

Defined at line 306 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status CreatePerformanceCounterBufferPool (std::unique_ptr<msd::PerfCountPoolServer> pool)

Defined at line 314 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ReleasePerformanceCounterBufferPool (uint64_t pool_id)

Defined at line 338 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status AddPerformanceCounterBufferOffsetToPool (uint64_t pool_id, uint64_t buffer_id, uint64_t buffer_offset, uint64_t buffer_size)

Defined at line 358 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status RemovePerformanceCounterBufferFromPool (uint64_t pool_id, uint64_t buffer_id)

Defined at line 377 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status DumpPerformanceCounters (uint64_t pool_id, uint32_t trigger_id)

Defined at line 395 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ClearPerformanceCounters (const uint64_t * counters, uint64_t counter_count)

Defined at line 405 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

void NotificationChannelSend (cpp20::span<uint8_t> data)

msd::NotificationHandler implementation.

Defined at line 226 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

void ContextKilled ()

Defined at line 231 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

void PerformanceCounterReadCompleted (const msd::PerfCounterResult & result)

Defined at line 235 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

async_dispatcher_t * GetAsyncDispatcher ()

Defined at line 250 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ImportBuffer (zx::handle handle, uint64_t id)

Create a buffer from the handle and add it to the map,

on success |id_out| contains the id to be used to query the map

Defined at line 136 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

magma::Status ReleaseBuffer (uint64_t id)

This removes the reference to the shared_ptr in the map

other instances remain valid until deleted

Returns false if no buffer with the given |id| exists in the map

Defined at line 155 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

std::shared_ptr<MagmaSystemBuffer> LookupBuffer (uint64_t id)

Attempts to locate a buffer by |id| in the buffer map and return it.

Returns nullptr if the buffer is not found

Defined at line 412 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

std::shared_ptr<MagmaSystemSemaphore> LookupSemaphore (uint64_t id)

Returns the msd_semaphore for the given |id| if present in the semaphore map.

Defined at line 420 of file ../../src/graphics/magma/lib/magma_service/sys_driver/magma_system_connection.cc

Records