From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: Synchronization between a crtc mode_set and page_flip? Date: Wed, 2 Apr 2014 15:22:47 +0530 Message-ID: <533BDDEF.1050900@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E0816EA28 for ; Wed, 2 Apr 2014 02:53:34 -0700 (PDT) Received: from dbdlxv05.itg.ti.com ([172.24.171.60]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s329rWoj015982 for ; Wed, 2 Apr 2014 04:53:33 -0500 Received: from DBDE72.ent.ti.com (dbdmailx.itg.ti.com [172.24.171.97]) by dbdlxv05.itg.ti.com (8.14.3/8.13.8) with ESMTP id s329rUEG032373 for ; Wed, 2 Apr 2014 15:23:31 +0530 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org Hi, I was trying to figure out how we are supposed to manage synchronization between a mode_set and a page_flip called on a crtc. Say, if a mode_set is immediately followed by a page_flip. The driver can't process the page_flip straight away since the hardware is still completing the mode_set. What is the driver supposed to do? Should it return -EBUSY? Or should it somehow queue the page_flip task internally? A lot of libdrm applications seem to call mode_set, and call a page_flip soon after it. They tend to bail out if page_flip returns an error, they don't try to do another page_flip if it fails the first time. Is this okay behaviour? Thanks, Archit