intel_gpu_drv: fix build errors with -std=gnu++20

Fixes #4883
This commit is contained in:
Christian Prochaska 2023-05-16 07:41:09 +02:00 committed by Christian Helmuth
parent 74734b7dd9
commit b696439a67
3 changed files with 23 additions and 27 deletions

View File

@ -115,11 +115,9 @@ namespace Genode { namespace Trait {
template <unsigned long _ACCESS_WIDTH> template <unsigned long _ACCESS_WIDTH>
struct Genode::Register struct Genode::Register
{ {
enum { static constexpr size_t ACCESS_WIDTH = _ACCESS_WIDTH;
ACCESS_WIDTH = _ACCESS_WIDTH, static constexpr size_t ACCESS_WIDTH_LOG2 = Trait::Uint_width<ACCESS_WIDTH>::WIDTH_LOG2;
ACCESS_WIDTH_LOG2 = Trait::Uint_width<ACCESS_WIDTH>::WIDTH_LOG2, static constexpr size_t BITFIELD_WIDTH = ACCESS_WIDTH;
BITFIELD_WIDTH = ACCESS_WIDTH,
};
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t; typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
@ -228,12 +226,12 @@ struct Genode::Bitset_2
{ {
typedef _BITS_0 Bits_0; typedef _BITS_0 Bits_0;
typedef _BITS_1 Bits_1; typedef _BITS_1 Bits_1;
enum {
WIDTH = Bits_0::BITFIELD_WIDTH + static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
Bits_1::BITFIELD_WIDTH, Bits_1::BITFIELD_WIDTH;
BITFIELD_WIDTH = WIDTH, static constexpr size_t BITFIELD_WIDTH = WIDTH;
ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH, static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
};
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t; typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
typedef Bitset_2<Bits_0, Bits_1> Bitset_2_base; typedef Bitset_2<Bits_0, Bits_1> Bitset_2_base;
@ -297,13 +295,13 @@ struct Genode::Bitset_3
typedef _BITS_1 Bits_1; typedef _BITS_1 Bits_1;
typedef _BITS_2 Bits_2; typedef _BITS_2 Bits_2;
typedef Bitset_2<Bits_0, Bits_1> Bits_0_1; typedef Bitset_2<Bits_0, Bits_1> Bits_0_1;
enum {
WIDTH = Bits_0::BITFIELD_WIDTH + static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
Bits_1::BITFIELD_WIDTH + Bits_1::BITFIELD_WIDTH +
Bits_2::BITFIELD_WIDTH, Bits_2::BITFIELD_WIDTH;
BITFIELD_WIDTH = WIDTH, static constexpr size_t BITFIELD_WIDTH = WIDTH;
ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH, static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
};
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t; typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
typedef Bitset_3<Bits_0, Bits_1, Bits_2> Bitset_3_base; typedef Bitset_3<Bits_0, Bits_1, Bits_2> Bitset_3_base;

View File

@ -637,11 +637,11 @@ class Genode::Register_set : Noncopyable
typedef typename T::Bitset_3_base::Bits_1 Bits_1; typedef typename T::Bitset_3_base::Bits_1 Bits_1;
typedef typename T::Bitset_3_base::Bits_2 Bits_2; typedef typename T::Bitset_3_base::Bits_2 Bits_2;
typedef typename T::Bitset_3_base::access_t access_t; typedef typename T::Bitset_3_base::access_t access_t;
enum {
BITS_0_WIDTH = Bits_0::BITFIELD_WIDTH, static constexpr size_t BITS_0_WIDTH = Bits_0::BITFIELD_WIDTH;
BITS_1_WIDTH = Bits_1::BITFIELD_WIDTH, static constexpr size_t BITS_1_WIDTH = Bits_1::BITFIELD_WIDTH;
V1_SHIFT = BITS_0_WIDTH + BITS_1_WIDTH, static constexpr size_t V1_SHIFT = BITS_0_WIDTH + BITS_1_WIDTH;
};
access_t const v0 = read<Bitset_2<Bits_0, Bits_1> >(); access_t const v0 = read<Bitset_2<Bits_0, Bits_1> >();
access_t const v1 = read<Bits_2>(); access_t const v1 = read<Bits_2>();
return v0 | (v1 << V1_SHIFT); return v0 | (v1 << V1_SHIFT);

View File

@ -472,10 +472,8 @@ struct Igd::Device
template <typename CONTEXT> template <typename CONTEXT>
struct Engine struct Engine
{ {
enum { static constexpr size_t CONTEXT_PAGES = CONTEXT::CONTEXT_PAGES;
CONTEXT_PAGES = CONTEXT::CONTEXT_PAGES, static constexpr size_t RING_PAGES = CONTEXT::RING_PAGES;
RING_PAGES = CONTEXT::RING_PAGES,
};
Ggtt_map_memory ctx; /* context memory */ Ggtt_map_memory ctx; /* context memory */
Ggtt_map_memory ring; /* ring memory */ Ggtt_map_memory ring; /* ring memory */