Skip to content

Commit

Permalink
bcmframebuffer: Reject depths other than 16 on RPi 5
Browse files Browse the repository at this point in the history
The Raspberry Pi 5 supports only depth 16 in the firmware.

Issue #511
  • Loading branch information
rsta2 committed Nov 28, 2024
1 parent b955e85 commit a6d8f5e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/bcmframebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// bcmframebuffer.cpp
//
// Circle - A C++ bare metal environment for Raspberry Pi
// Copyright (C) 2014-2020 R. Stange <[email protected]>
// Copyright (C) 2014-2024 R. Stange <[email protected]>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -141,6 +141,14 @@ void CBcmFrameBuffer::SetPalette32 (u8 nIndex, u32 nRGBA)

boolean CBcmFrameBuffer::Initialize (void)
{
#if RASPPI >= 5
// The Raspberry Pi 5 supports only depth 16 in the firmware.
if (m_nDepth != 16)
{
return FALSE;
}
#endif

if (m_nDisplay >= GetNumDisplays ())
{
return FALSE;
Expand Down

0 comments on commit a6d8f5e

Please sign in to comment.