gpu: introduce mapping attributes

The various mapping methods are modelled after the requirements of
the Intel GPUs or rather the Mesa driver back end.

With upcoming support for other driver back ends, we need to
sequeeze their requirements in as well. For now hijack 'map_buffer'
to provide for specifying the kind of attributes the client needs.

For now all buffers mapped in the GGTT for Intel GPUs are treated
as RW.

Issue #4265.
This commit is contained in:
Josef Söntgen
2021-09-23 18:07:56 +02:00
committed by Norman Feske
parent 90e151e2c4
commit cacb83b163
4 changed files with 39 additions and 6 deletions

View File

@ -57,8 +57,9 @@ class Gpu::Session_client : public Genode::Rpc_client<Session>
call<Rpc_free_buffer>(id); }
Genode::Dataspace_capability map_buffer(Buffer_id id,
bool aperture) override {
return call<Rpc_map_buffer>(id, aperture); }
bool aperture,
Mapping_attributes attrs) override {
return call<Rpc_map_buffer>(id, aperture, attrs); }
void unmap_buffer(Buffer_id id) override {
call<Rpc_unmap_buffer>(id); }