From b96defda4774906be74985079c72b12383d8c4fe Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 22 May 2016 01:10:21 +0200 Subject: arm/raspberrypi: Raspberry Pi v2 ALLOCATE_BUFFER VC4 operation returns direct address. --- c/src/lib/libbsp/arm/raspberrypi/misc/vc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'c') 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; -- cgit v1.2.3