/*
* \brief Client-side Gpu session interface
* \author Josef Soentgen
* \date 2017-04-28
*/
/*
* Copyright (C) 2017-2021 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__GPU_SESSION__CLIENT_H_
#define _INCLUDE__GPU_SESSION__CLIENT_H_
/* Genode includes */
#include
#include
namespace Gpu { class Session_client; }
class Gpu::Session_client : public Genode::Rpc_client
{
public:
/**
* Constructor
*
* \param session session capability
*/
Session_client(Session_capability session)
: Genode::Rpc_client(session) { }
/***********************
** Session interface **
***********************/
Genode::Dataspace_capability info_dataspace() const override {
return call(); }
bool complete(Sequence_number seqno) override {
return call(seqno); }
void completion_sigh(Genode::Signal_context_capability sigh) override {
call(sigh); }
Gpu::Sequence_number execute(Vram_id id, Genode::off_t offset) override {
return call(id, offset); }
Genode::Dataspace_capability alloc_vram(Vram_id id, Genode::size_t size) override {
return call(id, size); }
void free_vram(Vram_id id) override {
call(id); }
Vram_capability export_vram(Vram_id id) override {
return call(id); }
void import_vram(Vram_capability cap, Vram_id id) override {
call(cap, id); }
Genode::Dataspace_capability map_cpu(Vram_id id, Mapping_attributes attrs) override {
return call(id, attrs); }
void unmap_cpu(Vram_id id) override {
call(id); }
bool map_gpu(Vram_id id, Genode::size_t size,
Genode::off_t offset, Virtual_address va) override {
return call(id, size, offset, va); }
void unmap_gpu(Vram_id id, Genode::off_t offset, Virtual_address va) override {
call(id, offset, va); }
bool set_tiling_gpu(Vram_id id, Genode::off_t offset, unsigned mode) override {
return call(id, offset, mode); }
};
#endif /* _INCLUDE__GPU_SESSION__CLIENT_H_ */