[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1247807535.6101.5.camel@pasglop>
Date: Fri, 17 Jul 2009 15:12:15 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Dave Airlie <airlied@...hat.com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Tiago Vignatti <tiago.vignatti@...ia.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] vga: implements VGA arbitration on Linux
On Fri, 2009-07-17 at 15:00 +1000, Dave Airlie wrote:
>
> device doesn't decode VGA: normal io/mem locks always pass, legact
> io/mem locks always fail. don't touch main lock
>
> device decodes VGA: (acts like read/write lock)
Well, my initial idea was that even if you are marked as not decoding
legacy, you could still lock it.
The idea here is that if I'm going to just run a quick BIOS routine, ie
temporarily turn on legacy decoding and back off, I can just lock it, do
that, and unlock it.
No need to globally switch yourself to be a legacy decoder globally for
the arbiter (ie, you lock it so you can't lose it, and you'll have
re-disabled legacy decoding by the time you unlock, so there's no need
in getting notified of loss etc....
But you don't have to support that behaviour :-) I just thought it could
come handy.
> asks for normal mem/io locks: if no locks or only other normal locks
> are
> held by devices that decode VGA, then take main lock as a reader and
> enable decodes. If someone holds lock as a write block waiting for it.
>
> asks for VGA mem/io locks, if no locks are held, take main lock as a
> writer. If main lock has readers already, block waiting for a write
> lock
> on it.
>
> Does this sound sane?
Cursory glance it does.
Cheers,
Ben.
> Dave.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci"
> in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists