Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositorBuffer: EventFrame should be 64bit also on 32bit #321

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions definitions/CompositionBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ namespace Exchange {
template <const uint8_t PLANES>
class CompositionBufferType : public ICompositionBuffer, public Core::IResource {
private:
// We need to test this on a 32 bit platform. On 64 bits platforms we do need
// the data to be written into the eventfd to be 64 bits otherwise it does not
// respond!
using EventFrame = uintptr_t;
using EventFrame = uint64_t;

// We need some shared space for data to exchange, and to create a lock..
class SharedStorage {
Expand Down Expand Up @@ -345,11 +342,18 @@ namespace Exchange {
}
uint8_t Descriptors(const uint8_t maxSize, int container[]) const
{
fprintf(stdout, "Descriptors maxSize=%d\n", maxSize));
fflush(stdout);
ASSERT(IsValid() == true);
ASSERT(maxSize > 2);

uint8_t result = 0;

if (maxSize > 2) {

fprintf(stdout, "Descriptors _virtualFd=%d, _eventFd=%d, _planeCount=%d\n", _virtualFd, _eventFd, _planeCount);
fflush(stdout);

container[0] = _virtualFd;
container[1] = _eventFd;
uint8_t count = std::min(_planeCount, static_cast<uint8_t>(maxSize - 2));
Expand Down