summaryrefslogtreecommitdiff
path: root/drivers/video/b2r2/b2r2_control.h
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 /drivers/video/b2r2/b2r2_control.h
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 'drivers/video/b2r2/b2r2_control.h')
-rw-r--r--drivers/video/b2r2/b2r2_control.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/video/b2r2/b2r2_control.h b/drivers/video/b2r2/b2r2_control.h
new file mode 100644
index 00000000000..d13d2188618
--- /dev/null
+++ b/drivers/video/b2r2/b2r2_control.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * ST-Ericsson B2R2 internal definitions
+ *
+ * Author: Jorgen Nilsson <jorgen.nilsson@stericsson.com>
+ * for ST-Ericsson.
+ *
+ * License terms: GNU General Public License (GPL), version 2.
+ */
+
+#ifndef _LINUX_DRIVERS_VIDEO_B2R2_CONTROL_H_
+#define _LINUX_DRIVERS_VIDEO_B2R2_CONTROL_H_
+
+#include "b2r2_internal.h"
+
+int b2r2_control_init(struct b2r2_control *cont);
+void b2r2_control_exit(struct b2r2_control *cont);
+int b2r2_control_open(struct b2r2_control_instance *instance);
+int b2r2_control_release(struct b2r2_control_instance *instance);
+
+int b2r2_control_blt(struct b2r2_blt_request *request);
+int b2r2_generic_blt(struct b2r2_blt_request *request);
+int b2r2_control_waitjob(struct b2r2_blt_request *request);
+int b2r2_control_synch(struct b2r2_control_instance *instance,
+ int request_id);
+size_t b2r2_control_read(struct b2r2_control_instance *instance,
+ struct b2r2_blt_request **request_out, bool block);
+size_t b2r2_control_read_id(struct b2r2_control_instance *instance,
+ struct b2r2_blt_request **request_out, bool block,
+ int request_id);
+
+#endif