diff options
author | Pavel Pisa <ppisa@pikron.com> | 2016-05-22 01:10:21 +0200 |
---|---|---|
committer | Pavel Pisa <ppisa@pikron.com> | 2016-05-31 10:33:43 +0200 |
commit | b96defda4774906be74985079c72b12383d8c4fe (patch) | |
tree | aab18ebede646a5c2470f2a4ce5832f19374ae10 /c/src/lib/libbsp/arm/raspberrypi | |
parent | arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by raspb... (diff) | |
download | rtems-b96defda4774906be74985079c72b12383d8c4fe.tar.bz2 |
arm/raspberrypi: Raspberry Pi v2 ALLOCATE_BUFFER VC4 operation returns direct address.
Diffstat (limited to 'c/src/lib/libbsp/arm/raspberrypi')
-rw-r--r-- | c/src/lib/libbsp/arm/raspberrypi/misc/vc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c b/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c index 9c89fabc70..54935af1e1 100644 --- a/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c +++ b/c/src/lib/libbsp/arm/raspberrypi/misc/vc.c @@ -124,8 +124,12 @@ bcm2835_mailbox_init_frame_buffer(bcm2835_init_frame_buffer_entries* _entries) _entries->xvirt = buffer.set_virtual_size.body.resp.vwidth; _entries->yvirt = buffer.set_virtual_size.body.resp.vheight; _entries->depth = buffer.set_depth.body.resp.depth; +#if (BSP_IS_RPI2 == 1) + _entries->base = buffer.allocate_buffer.body.resp.base; +#else _entries->base = buffer.allocate_buffer.body.resp.base - BCM2835_VC_MEMORY_MAPPING; +#endif _entries->size = buffer.allocate_buffer.body.resp.size; _entries->pixel_order = buffer.set_pixel_order.body.resp.pixel_order; _entries->alpha_mode = buffer.set_alpha_mode.body.resp.alpha_mode; |