From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 1/2] drm/i915: split page flip queueing into per-chipset functions Date: Tue, 14 Jun 2011 19:20:12 +0100 Message-ID: References: <1308075188-2821-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B63EA02B9 for ; Tue, 14 Jun 2011 11:20:15 -0700 (PDT) In-Reply-To: <1308075188-2821-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 14 Jun 2011 11:13:07 -0700, Jesse Barnes wrote: > @@ -6343,7 +6458,12 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, > /* Offset into the new buffer for cases of shared fbs between CRTCs */ > offset = crtc->y * fb->pitch + crtc->x * fb->bits_per_pixel/8; > > - ret = BEGIN_LP_RING(4); > + if (!dev_priv->display.queue_flip) { > + ret = -ENODEV; > + goto cleanup_objs; > + } > + > + ret = dev_priv->display.queue_flip(dev, crtc, fb, obj); Neil Brown would recommend that we use a default queue_flip that returns -ENODEV which both removes lines of code from this complicated routine and optimises the common case. I agree with him. :) -Chris -- Chris Wilson, Intel Open Source Technology Centre