if (psRetOUT->eError != PVRSRV_OK)
return 0;
- if (ps2DQueryBltsCompleteIN->type == _PVR_SYNC_WAIT_FLIP) {
+ if (ps2DQueryBltsCompleteIN->type == _PVR_SYNC_WAIT_FLIP ||
+ ps2DQueryBltsCompleteIN->type == _PVR_SYNC_WAIT_UPDATE) {
if (pvr_flip_event_req(priv,
(long)ps2DQueryBltsCompleteIN->
hKernSyncInfo,
+ ps2DQueryBltsCompleteIN->type,
ps2DQueryBltsCompleteIN->user_data))
psRetOUT->eError = PVRSRV_ERROR_OUT_OF_MEMORY;
#include "pvr_events.h"
#include "servicesint.h"
+#include "sgx_bridge.h"
#include <linux/wait.h>
#include <linux/sched.h>
}
int pvr_flip_event_req(struct PVRSRV_FILE_PRIVATE_DATA *priv,
- unsigned int overlay, u64 user_data)
+ unsigned int overlay,
+ enum pvr_sync_wait_seq_type type, u64 user_data)
{
struct pvr_pending_flip_event *e;
struct timeval now;
if (e == NULL)
return -ENOMEM;
- e->event.base.type = PVR_EVENT_FLIP;
+ switch (type) {
+ case _PVR_SYNC_WAIT_FLIP:
+ e->event.base.type = PVR_EVENT_FLIP;
+ e->dss_event = OMAP_DSS_NOTIFY_GO_OVL;
+ break;
+ case _PVR_SYNC_WAIT_UPDATE:
+ e->event.base.type = PVR_EVENT_UPDATE;
+ e->dss_event = OMAP_DSS_NOTIFY_UPDATE_OVL;
+ break;
+ default:
+ BUG();
+ }
e->event.base.length = sizeof(e->event);
e->base.event = &e->event.base;
e->event.overlay = overlay;
spin_unlock_irqrestore(&event_lock, flags);
- return omap_dss_request_notify(OMAP_DSS_NOTIFY_GO_OVL, overlay);
+ return omap_dss_request_notify(e->dss_event, overlay);
}
static bool pvr_dequeue_event(struct PVRSRV_FILE_PRIVATE_DATA *priv,
unsigned long flags;
long overlay = (long) data;
- if (event != OMAP_DSS_NOTIFY_GO_OVL)
- return 0;
-
do_gettimeofday(&now);
spin_lock_irqsave(&event_lock, flags);
list_for_each_entry_safe(e, t, &flip_wait_list, base.link) {
+ if (!(e->dss_event & event))
+ continue;
if (e->event.overlay != overlay)
continue;
#define PVR_EVENT_SYNC 0x01
#define PVR_EVENT_FLIP 0x02
+#define PVR_EVENT_UPDATE 0x03 /* also uses struct pvr_event_flip */
/*
* Every buffer used as a render target has a 'PVRSRV_KERNEL_SYNC_INFO'
struct pvr_pending_flip_event {
struct pvr_pending_event base;
struct pvr_event_flip event;
+ unsigned int dss_event;
};
+enum pvr_sync_wait_seq_type;
+
void pvr_init_events(void);
void pvr_exit_events(void);
const struct PVRSRV_KERNEL_SYNC_INFO *sync_info,
u64 user_data);
int pvr_flip_event_req(struct PVRSRV_FILE_PRIVATE_DATA *priv,
- unsigned int overlay, u64 user_data);
+ unsigned int overlay,
+ enum pvr_sync_wait_seq_type type, u64 user_data);
ssize_t pvr_read(struct file *filp, char __user *buf, size_t count,
loff_t *off);
unsigned int pvr_poll(struct file *filp, struct poll_table_struct *wait);
_PVR_SYNC_WAIT_NONBLOCK,
_PVR_SYNC_WAIT_EVENT,
_PVR_SYNC_WAIT_FLIP,
+ _PVR_SYNC_WAIT_UPDATE,
};
struct PVRSRV_BRIDGE_IN_2DQUERYBLTSCOMPLETE {