/*
* \brief Client-side Gpu session interface
* \author Josef Soentgen
* \date 2017-04-28
*/
/*
* Copyright (C) 2017 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 **
***********************/
Info info() const override {
return call(); }
void exec_buffer(Genode::Dataspace_capability cap, Genode::size_t size) override {
call(cap, size); }
void completion_sigh(Genode::Signal_context_capability sigh) override {
call(sigh); }
Genode::Dataspace_capability alloc_buffer(Genode::size_t size) override {
return call(size); }
void free_buffer(Genode::Dataspace_capability ds) override {
call(ds); }
Genode::Dataspace_capability map_buffer(Genode::Dataspace_capability ds,
bool aperture) override {
return call(ds, aperture); }
void unmap_buffer(Genode::Dataspace_capability ds) override {
call(ds); }
bool map_buffer_ppgtt(Genode::Dataspace_capability ds,
Gpu::addr_t va) override {
return call(ds, va); }
void unmap_buffer_ppgtt(Genode::Dataspace_capability ds, Gpu::addr_t va) override {
call(ds, va); }
bool set_tiling(Genode::Dataspace_capability ds, unsigned mode) override {
return call(ds, mode); }
};
#endif /* _INCLUDE__GPU_SESSION__CLIENT_H_ */