From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH v2 1/1] drm/i915: Fix VGA handling using stop_machine() or mmio Date: Mon, 30 Sep 2013 18:10:23 +0300 Message-ID: <20130930151023.GD9395@intel.com> References: <1380550111-31590-1-git-send-email-ville.syrjala@linux.intel.com> <1380550111-31590-2-git-send-email-ville.syrjala@linux.intel.com> <20130930142437.GI744@nuc-i3427.alporthouse.com> <20130930144144.GB9395@intel.com> <20130930145310.GK744@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 1049DE6B3E for ; Mon, 30 Sep 2013 08:10:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130930145310.GK744@nuc-i3427.alporthouse.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: Chris Wilson , intel-gfx@lists.freedesktop.org, Alex Williamson , Dave Airlie List-Id: intel-gfx@lists.freedesktop.org On Mon, Sep 30, 2013 at 03:53:10PM +0100, Chris Wilson wrote: > On Mon, Sep 30, 2013 at 05:41:44PM +0300, Ville Syrj=E4l=E4 wrote: > > On Mon, Sep 30, 2013 at 03:24:37PM +0100, Chris Wilson wrote: > > > On Mon, Sep 30, 2013 at 05:08:31PM +0300, ville.syrjala@linux.intel.c= om wrote: > > > > From: Ville Syrj=E4l=E4 > > > > = > > > > We have several problems with out VGA handling: > > > > - We try to use the GMCH control VGA disable bit even though it may > > > > be locked > > > > - If we manage to disable VGA throuh GMCH control, we're no longer > > > > able to correctly disable the VGA plane > > > > - Taking part in the VGA arbitration is too expensive for X [1] > > > = > > > I'd like to emphasize that X disables DRI if it detects 2 vga cards, > > > effectively breaking all machines with a discrete GPU. Even if one of > > > those is not being used. > > > = > > > > +/* > > > > + * 21 devices with 8 functions per device max on the same bus. > > > > + * We don't need locking for these due to stop_machine(). > > > > + */ > > > > +static u16 vga_cmd[21*8]; > > > > +static u16 vga_ctl[21*8]; > > > = > > > Should we just allocate storage for when we need it? We are now adding > > > several hundred bytes to our module, which is bound to cause us to use > > > an extra page, and they can be passed around through the stop_machine > > > closure rather than static. > > = > > I guess we could do that. Although I do wonder a bit if we'd race with > > hotplug. Not sure there's a way to hotplug stuff onto the root bus... > = > Within stop-machine? I surely hope not! Can we allocate there? I was thinking of allocating before stop_machine(). -- = Ville Syrj=E4l=E4 Intel OTC