From: Daniel Vetter Subject: Re: [PATCH 1/2] intel: Add support for overriding the PCI ID via an environment variable Date: Wed, 22 Feb 2012 09:05:17 +0100 Message-ID: <20120222080517.GA3977@phenom.ffwll.local> References: <1329857978-30626-1-git-send-email-kenneth@whitecape.org> <4F441DDD.5080405@whitecape.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id BA0119E733 for ; Wed, 22 Feb 2012 00:05:06 -0800 (PST) Received: by wera10 with SMTP id a10so5320537wer.36 for ; Wed, 22 Feb 2012 00:05:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <4F441DDD.5080405@whitecape.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: Kenneth Graunke Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Feb 21, 2012 at 02:42:37PM -0800, Kenneth Graunke wrote: > On 02/21/2012 01:11 PM, Chris Wilson wrote: > >On Tue, 21 Feb 2012 12:59:37 -0800, Kenneth Graunke wrote: > >>@@ -1828,6 +1829,9 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used, > >> execbuf.rsvd1 = 0; > >> execbuf.rsvd2 = 0; > >> > >>+ if (getenv("INTEL_DEVID_OVERRIDE")) > >>+ goto skip_execution; > > > >I'm not thrilled about calling getenv() for every execbuffer. > > Good point. I'll have to fix that. > > >And what about the original execbuffer path? > >-Chris > > Does anybody care? I'm not even sure how I'd test it. > > A little bit of background: this is a stepping stone on the way to > simulator support. > > When INTEL_DEVID_OVERRIDE is set, Mesa will generate code/batches > for that system, rather than the current machine. It also > implicitly sets INTEL_NO_HW=1, which makes it avoid calling > execbuf2. This at least allows INTEL_DEBUG=vs,wm,bat style dumps, > which is handy. > > However, our .aub trace file support is in libdrm, so I need Mesa to > execbuf, or I don't get aub file dumps. But I don't want libdrm to > -actually- exec it. What about adding a function to libdrm to stop all execbuf calls from actually calling the kernel ioctl? Something like drm_intel_gem_bufmgr_enable_no_hw() ... Maybe combine it right away with the aub-trace grabbing code. -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48