mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
16356049f5
Over time chery-picks for KGSL have been skipped or have been resolved differently between branches. As a result, this branch of KGSL has become increasingly difficult to maintain due to merge conflicts. With a few exceptions KGSL should match the msm-3.4 mainline exactly. To rectify the situation, this change brings KGSL up-to-date with the msm-3.4 mainline as a bulk change because cherry-picks are not practical. Change-Id: I53f9f7fbf4942e147dea486ff5dbf179af75ea8c Signed-off-by: Jeff Boody <jboody@codeaurora.org>
99 lines
2.5 KiB
C
99 lines
2.5 KiB
C
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
#ifndef __KGSL_SYNC_H
|
|
#define __KGSL_SYNC_H
|
|
|
|
#include <linux/sync.h>
|
|
#include "kgsl_device.h"
|
|
|
|
struct kgsl_sync_timeline {
|
|
struct sync_timeline timeline;
|
|
unsigned int last_timestamp;
|
|
};
|
|
|
|
struct kgsl_sync_pt {
|
|
struct sync_pt pt;
|
|
unsigned int timestamp;
|
|
};
|
|
|
|
struct kgsl_sync_fence_waiter {
|
|
struct sync_fence_waiter waiter;
|
|
struct sync_fence *fence;
|
|
void (*func)(void *priv);
|
|
void *priv;
|
|
};
|
|
|
|
#if defined(CONFIG_SYNC)
|
|
struct sync_pt *kgsl_sync_pt_create(struct sync_timeline *timeline,
|
|
unsigned int timestamp);
|
|
void kgsl_sync_pt_destroy(struct sync_pt *pt);
|
|
int kgsl_add_fence_event(struct kgsl_device *device,
|
|
u32 context_id, u32 timestamp, void __user *data, int len,
|
|
struct kgsl_device_private *owner);
|
|
int kgsl_sync_timeline_create(struct kgsl_context *context);
|
|
void kgsl_sync_timeline_signal(struct sync_timeline *timeline,
|
|
unsigned int timestamp);
|
|
void kgsl_sync_timeline_destroy(struct kgsl_context *context);
|
|
struct kgsl_sync_fence_waiter *kgsl_sync_fence_async_wait(int fd,
|
|
void (*func)(void *priv), void *priv);
|
|
int kgsl_sync_fence_async_cancel(struct kgsl_sync_fence_waiter *waiter);
|
|
#else
|
|
static inline struct sync_pt
|
|
*kgsl_sync_pt_create(struct sync_timeline *timeline, unsigned int timestamp)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline void kgsl_sync_pt_destroy(struct sync_pt *pt)
|
|
{
|
|
}
|
|
|
|
static inline int kgsl_add_fence_event(struct kgsl_device *device,
|
|
u32 context_id, u32 timestamp, void __user *data, int len,
|
|
struct kgsl_device_private *owner)
|
|
{
|
|
return -EINVAL;
|
|
}
|
|
|
|
static int kgsl_sync_timeline_create(struct kgsl_context *context)
|
|
{
|
|
context->timeline = NULL;
|
|
return 0;
|
|
}
|
|
|
|
static inline void
|
|
kgsl_sync_timeline_signal(struct sync_timeline *timeline,
|
|
unsigned int timestamp)
|
|
{
|
|
}
|
|
|
|
static inline void kgsl_sync_timeline_destroy(struct kgsl_context *context)
|
|
{
|
|
}
|
|
|
|
static inline struct
|
|
kgsl_sync_fence_waiter *kgsl_sync_fence_async_wait(int fd,
|
|
void (*func)(void *priv), void *priv)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline int
|
|
kgsl_sync_fence_async_cancel(struct kgsl_sync_fence_waiter *waiter)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* __KGSL_SYNC_H */
|