mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-27 09:12:32 +00:00
e37792ce94
The current info implementation (as RPC) is limited in a few ways: * The amount of data that may be transferred is constrained by the underlying base platform * Most information never changes during run time but is copied nonetheless * The information differs depending on the used GPU device and in its current implementation only contains Intel GPU specific details With this commit the 'info' RPC call is replaced with the 'info_dataspace' call that transfers the capability for the dataspace containing the information only. This is complemented by a client local 'attached_info' call that allows for getting typed access to the information. The layout of the information is moved to its own and GPU-specific header file, e.g., 'gpu/info_intel.h' Issue #4265.
67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
/*
|
|
* \brief Gpu session interface.
|
|
* \author Josef Soentgen
|
|
* \date 2021-09-23
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 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_INFO_INTEL_H_
|
|
#define _INCLUDE__GPU_INFO_INTEL_H_
|
|
|
|
#include <gpu_session/gpu_session.h>
|
|
|
|
namespace Gpu {
|
|
|
|
struct Info_intel;
|
|
}
|
|
|
|
|
|
/*
|
|
* Gpu information
|
|
*
|
|
* Used to query information in the DRM backend
|
|
*/
|
|
struct Gpu::Info_intel
|
|
{
|
|
using Chip_id = Genode::uint16_t;
|
|
using Features = Genode::uint32_t;
|
|
using size_t = Genode::size_t;
|
|
using Context_id = Genode::uint32_t;
|
|
|
|
Chip_id chip_id;
|
|
Features features;
|
|
size_t aperture_size;
|
|
Context_id ctx_id;
|
|
|
|
Sequence_number last_completed;
|
|
|
|
struct Revision { Genode::uint8_t value; } revision;
|
|
struct Slice_mask { unsigned value; } slice_mask;
|
|
struct Subslice_mask { unsigned value; } subslice_mask;
|
|
struct Eu_total { unsigned value; } eus;
|
|
struct Subslices { unsigned value; } subslices;
|
|
|
|
Info_intel(Chip_id chip_id, Features features, size_t aperture_size,
|
|
Context_id ctx_id, Sequence_number last,
|
|
Revision rev, Slice_mask s_mask, Subslice_mask ss_mask,
|
|
Eu_total eu, Subslices subslice)
|
|
:
|
|
chip_id(chip_id), features(features),
|
|
aperture_size(aperture_size), ctx_id(ctx_id),
|
|
last_completed(last),
|
|
revision(rev),
|
|
slice_mask(s_mask),
|
|
subslice_mask(ss_mask),
|
|
eus(eu),
|
|
subslices(subslice)
|
|
{ }
|
|
};
|
|
|
|
#endif /* _INCLUDE__GPU_INFO_INTEL_H_ */
|