sna: Remove the flush after waking up between clients
In the normal command processing stream, we will have lots of opportunity to ask whether we should be batching requests together. If we wakeup without doing any work, then we will check inside the block handler whether the GPU is idle and flush then. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
db82617464
commit
7ae299be60
|
|
@ -1013,8 +1013,7 @@ static inline uint32_t pixmap_size(PixmapPtr pixmap)
|
|||
|
||||
bool sna_accel_init(ScreenPtr sreen, struct sna *sna);
|
||||
void sna_accel_create(struct sna *sna);
|
||||
void sna_accel_block_handler(struct sna *sna, struct timeval **tv);
|
||||
void sna_accel_wakeup_handler(struct sna *sna);
|
||||
void sna_accel_block(struct sna *sna, struct timeval **tv);
|
||||
void sna_accel_watch_flush(struct sna *sna, int enable);
|
||||
void sna_accel_flush(struct sna *sna);
|
||||
void sna_accel_enter(struct sna *sna);
|
||||
|
|
|
|||
|
|
@ -18068,7 +18068,7 @@ void sna_accel_close(struct sna *sna)
|
|||
kgem_cleanup_cache(&sna->kgem);
|
||||
}
|
||||
|
||||
void sna_accel_block_handler(struct sna *sna, struct timeval **tv)
|
||||
void sna_accel_block(struct sna *sna, struct timeval **tv)
|
||||
{
|
||||
sigtrap_assert_inactive();
|
||||
|
||||
|
|
@ -18148,22 +18148,6 @@ set_tv:
|
|||
}
|
||||
}
|
||||
|
||||
void sna_accel_wakeup_handler(struct sna *sna)
|
||||
{
|
||||
DBG(("%s: nbatch=%d, need_retire=%d, need_purge=%d\n", __FUNCTION__,
|
||||
sna->kgem.nbatch, sna->kgem.need_retire, sna->kgem.need_purge));
|
||||
|
||||
if (!sna->kgem.nbatch)
|
||||
return;
|
||||
|
||||
if (kgem_is_idle(&sna->kgem)) {
|
||||
DBG(("%s: GPU idle, flushing\n", __FUNCTION__));
|
||||
_kgem_submit(&sna->kgem);
|
||||
}
|
||||
|
||||
sigtrap_assert_inactive();
|
||||
}
|
||||
|
||||
void sna_accel_free(struct sna *sna)
|
||||
{
|
||||
DBG(("%s\n", __FUNCTION__));
|
||||
|
|
|
|||
|
|
@ -708,7 +708,7 @@ sna_block_handler(BLOCKHANDLER_ARGS_DECL)
|
|||
sna->BlockHandler(BLOCKHANDLER_ARGS);
|
||||
|
||||
if (*tv == NULL || ((*tv)->tv_usec | (*tv)->tv_sec) || has_shadow(sna))
|
||||
sna_accel_block_handler(sna, tv);
|
||||
sna_accel_block(sna, tv);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -730,8 +730,6 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL)
|
|||
|
||||
sna->WakeupHandler(WAKEUPHANDLER_ARGS);
|
||||
|
||||
sna_accel_wakeup_handler(sna);
|
||||
|
||||
if (FD_ISSET(sna->kgem.fd, (fd_set*)read_mask)) {
|
||||
sna_mode_wakeup(sna);
|
||||
/* Clear the flag so that subsequent ZaphodHeads don't block */
|
||||
|
|
|
|||
Loading…
Reference in New Issue