genode/repos/os/include/gpu_session/connection.h
Josef Söntgen 198019edca os: add Gpu driver for Intel Gen8 HD graphics
This commit introduces a experimental 3D driver for Intel Gen8 HD
graphics devices as well as the corresponding Gpu session.

Fixes #2507.
2017-08-30 09:59:57 +02:00

52 lines
1.2 KiB
C++

/*
* \brief Connection to Gpu service
* \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__CONNECTION_H_
#define _INCLUDE__GPU_SESSION__CONNECTION_H_
#include <gpu_session/client.h>
#include <base/connection.h>
#include <base/allocator.h>
namespace Gpu { struct Connection; }
struct Gpu::Connection : Genode::Connection<Session>, Session_client
{
/**
* Issue session request
*
* \noapi
*/
Capability<Gpu::Session> _session(Genode::Parent &parent,
char const *label, Genode::size_t quota)
{
return session(parent, "ram_quota=%ld, label=\"%s\"", quota, label);
}
/**
* Constructor
*
* \param quota initial amount of quota used for allocating Gpu
* memory
*/
Connection(Genode::Env &env,
Genode::size_t quota = Session::REQUIRED_QUOTA,
const char *label = "")
:
Genode::Connection<Session>(env, _session(env.parent(), label, quota)),
Session_client(cap())
{ }
};
#endif /* _INCLUDE__GPU_SESSION__CONNECTION_H_ */