| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.hardware.amlogiccanvas; |
| |
| using zx; |
| |
| enum CanvasFlags : uint32 { |
| READ = 0x1; |
| WRITE = 0x2; |
| }; |
| |
| struct CanvasInfo { |
| uint32 height; |
| uint32 stride_bytes; |
| uint32 wrap; |
| uint32 blkmode; |
| uint32 endianness; |
| uint32 flags; |
| }; |
| |
| [Transport = "Banjo", BanjoLayout = "ddk-protocol"] |
| protocol AmlogicCanvas { |
| /// Configures a canvas. |
| /// Adds a framebuffer to the canvas lookup table. |
| Config(zx.handle:VMO vmo, uint64 offset, CanvasInfo info) -> (zx.status s, uint8 canvas_idx); |
| /// Frees up a canvas. |
| Free(uint8 canvas_idx) -> (zx.status s); |
| }; |