summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-09-05 10:53:53 -0700
committerJon Mayo <jmayo@nvidia.com>2014-03-19 18:05:44 -0700
commit46be5a54e1632d824889c80add9d4c2a3cfd626d (patch)
tree54f5248c9b7add86f9f1b6b4bb11386a65afd7cc /drivers/video/tegra/dc/dc.c
parentad32d404c0b740a1cdc117e63eefa575f35ec7fd (diff)
video: tegra: dc: expose in-kernel fence creation
Needed for ADF hardware fence support Bug 1459374 Change-Id: I8751ca5809998aa13f5c58ef3fc448486f604926 Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Xia Yang <xiay@nvidia.com> Reviewed-on: http://git-master/r/366188 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 1b49d940602d..e39b94cbebde 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -53,6 +53,7 @@
#include <mach/fb.h>
#include <mach/mc.h>
#include <linux/nvhost.h>
+#include <linux/nvhost_ioctl.h>
#include <mach/latency_allowance.h>
#include <mach/pm_domains.h>
@@ -60,6 +61,7 @@
#include "dc_config.h"
#include "dc_priv.h"
#include "dev.h"
+#include "nvhost_sync.h"
#include "nvsd.h"
#include "dp.h"
#include "nvsr.h"
@@ -1233,6 +1235,18 @@ void tegra_dc_incr_syncpt_min(struct tegra_dc *dc, int i, u32 val)
mutex_unlock(&dc->lock);
}
+struct sync_fence *tegra_dc_create_fence(struct tegra_dc *dc, int i, u32 val)
+{
+ struct nvhost_ctrl_sync_fence_info syncpt;
+ struct nvhost_master *host = nvhost_get_host(dc->ndev);
+ u32 id = tegra_dc_get_syncpt_id(dc, i);
+
+ syncpt.id = id;
+ syncpt.thresh = val;
+ return nvhost_sync_create_fence(&host->syncpt, &syncpt, 1,
+ dev_name(&dc->ndev->dev));
+}
+
void
tegra_dc_config_pwm(struct tegra_dc *dc, struct tegra_dc_pwm_params *cfg)
{