From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] uxa/glamor: Fallback to new glamor pixmap if failed to create textured pixmap. Date: Fri, 16 Dec 2011 09:21:24 +0000 Message-ID: References: <1324021195-30697-1-git-send-email-zhigang.gong@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 608EFA0BFC for ; Fri, 16 Dec 2011 01:21:28 -0800 (PST) In-Reply-To: <1324021195-30697-1-git-send-email-zhigang.gong@linux.intel.com> 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: zhigang.gong@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 16 Dec 2011 15:39:55 +0800, zhigang.gong@linux.intel.com wrote: > +fallback_glamor: > + /* Create textured pixmap failed means glamor failed to > + * create a texture from current BO for some reasons. We turn > + * to create a new glamor pixmap and clean up current one. > + * One thing need to be noted, this new pixmap doesn't > + * has a priv and bo attached to it. It's glamor's responsbility > + * to take care it. > + */ This then fails intel_uxa_is_offscreen() and we can no longer fallback to swrast correctly as uxa_prepare_access() becomes a no-op. > + if (usage & INTEL_CREATE_PIXMAP_DRI2) { > + xf86DrvMsg(scrn->scrnIndex, X_WARNING, > + "Failed to create textured DRI2 pixmap."); > + return pixmap; At which point we really do need a better means for integrating glamor and UXA ops... > + } > + new_pixmap = intel_glamor_create_pixmap(screen, w, h, > + depth, usage); > dri_bo_unreference(priv->bo); > fallback_priv: > free(priv); > fallback_pixmap: > fbDestroyPixmap(pixmap); > - return fbCreatePixmap(screen, w, h, depth, usage); > + if (new_pixmap) > + return new_pixmap; > + else > + return fbCreatePixmap(screen, w, h, depth, usage); > } Otherwise, it does look to be a step in the right direction. -Chris -- Chris Wilson, Intel Open Source Technology Centre