summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorJorgen Nilsson <jorgen.nilsson@stericsson.com>2012-02-06 17:04:49 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:28 +0200
commit57716d2b65bf5fa56f50a5f3d4ebb3a35b2483ab (patch)
tree8b47440bad8bf338431b9baf62ba737ec34b5d95 /include/video
parent809e8bdcb464d4be59d04825873f41ecebf9dc28 (diff)
video: [ANDROID]: b2r2: Add kernel API to b2r2 and more
Brief: As a preparation for the ICS hardware composer solution a kernel API has been added to the b2r2 driver. Some minor stability fixes are also part of this release. The full support for dual b2r2 configuration should be in place, but has yet to be verified with the apropriate hardware. The change should have minor impact on the single core solution. Details: A new logical device for handling the blitter requests has been added. This is roughly the same device as the old blitter the interfaces are therefore the same. From now there is at least two devices - one blitter device and then for each core one additional device (dual configuration is the current target). As a consequence the maximum number of allowed cores has been raised from 1 to 2. When a dual configuration is active the b2r2 driver seamlessly splits requests over available b2r2 cores. Each request is assigned a core_mask defining which cores are doing part of the job. This helps keep track when waiting for the reports. Also, rectangles are now recalculated (based on intersection of destination rectangle and destination image etc.) before splitting the job in order to maximize throughput. Clock and power source can now be configured from devices-dbxxxx.c or equivalent. Minor bug fixes: - Check the return value from clk_enable - Check if the core is valid before serving a IRQ. - Check if the core is enabled (domain_enabled) before adding a new job. - Return actual job_id used for a request (previously always 0) ST-Ericsson ID: 404691 Original Change-Id: Ic3357c4c1e792a84077c1be4ba4c5acdb19da266 Signed-off-by: Jorgen Nilsson <jorgen.nilsson@stericsson.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/b2r2_blt.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/video/b2r2_blt.h b/include/video/b2r2_blt.h
index 0964c95af36..4fdc40ab3b9 100644
--- a/include/video/b2r2_blt.h
+++ b/include/video/b2r2_blt.h
@@ -636,4 +636,55 @@ struct b2r2_blt_report {
#define B2R2_BLT_QUERY_CAP_IOC _IOWR(B2R2_BLT_IOC_MAGIC, 3, \
struct b2r2_blt_query_cap)
+/**
+ * struct b2r2_platform_data - The b2r2 core hardware configuration
+ *
+ * @regulator_id: The name of the b2r2 power source
+ * @clock_id: The name of the b2r2 clock
+ *
+ */
+struct b2r2_platform_data {
+ const char *regulator_id;
+ const char *clock_id;
+};
+
+/**
+ * b2r2_blt_open - Opening a handle for use with the blitter interface
+ *
+ * Returns a handle (0 or greater) to a B2R2 blitter intance on success
+ */
+int b2r2_blt_open(void);
+
+/**
+ * b2r2_blt_close - Free the blitter instance and its resources
+ *
+ * @handle: The B2R2 BLT instance handle
+ *
+ * All active jobs are finished or cancelled and allocated data
+ * is released.
+ *
+ * Returns 0 on success
+ */
+int b2r2_blt_close(int handle);
+
+/**
+ * b2r2_blt_request - Request a blit operation
+ *
+ * @handle: The B2R2 BLT instance handle
+ *
+ * Returns 0 on success
+ */
+int b2r2_blt_request(int handle, struct b2r2_blt_req *user_req);
+
+/**
+ * b2r2_blt_synch - Wait for all or a specified job
+ *
+ * @handle: The B2R2 BLT instance handle
+ * @request_id: If 0, wait for all requests on this instance to finish.
+ * Else wait for the request with the given request id to finish.
+ *
+ * Returns 0 on success
+ */
+int b2r2_blt_synch(int handle, int request_id);
+
#endif /* #ifdef _LINUX_VIDEO_B2R2_BLT_H */