public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Tiago Vignatti <tiago.vignatti@nokia.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] vga: implements VGA arbitration on Linux
Date: Fri, 17 Jul 2009 15:12:15 +1000	[thread overview]
Message-ID: <1247807535.6101.5.camel@pasglop> (raw)
In-Reply-To: <1247806842.3572.12.camel@clockmaker.usersys.redhat.com>

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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2009-07-17  5:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 12:57 [PATCH 0/2] VGA arbiter implementation Tiago Vignatti
2009-07-14 12:57 ` [PATCH 1/2] vga: implements VGA arbitration on Linux Tiago Vignatti
2009-07-14 12:57   ` [PATCH 2/2] vga: drops a documentation regarding the VGA arbiter Tiago Vignatti
2009-07-18 11:48     ` Pavel Machek
2009-07-19 18:50       ` Vignatti Tiago (Nokia-D/Helsinki)
2009-07-14 14:35   ` [PATCH 1/2] vga: implements VGA arbitration on Linux Alan Cox
2009-07-15  4:43     ` Dave Airlie
2009-07-16  4:25     ` Dave Airlie
2009-07-16  8:48       ` Alan Cox
2009-07-16 10:38         ` Dave Airlie
2009-07-16 16:25           ` Jesse Barnes
2009-07-17  0:22           ` Benjamin Herrenschmidt
2009-07-17  0:20         ` Benjamin Herrenschmidt
2009-07-17  5:00     ` Dave Airlie
2009-07-17  5:12       ` Benjamin Herrenschmidt [this message]
2009-07-14 16:15   ` Greg KH
2009-07-16  3:54     ` Dave Airlie
2009-07-16  4:02       ` Greg KH
2009-07-16  4:06         ` Dave Airlie
2009-07-16  8:41       ` Alan Cox
2009-07-17  0:24         ` Benjamin Herrenschmidt
2009-07-17  0:23       ` Benjamin Herrenschmidt
2009-07-18 11:47   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247807535.6101.5.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=airlied@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tiago.vignatti@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox