lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] vga: implements VGA arbitration on Linux
From
Date
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
>



\
 
 \ /
  Last update: 2009-07-17 07:15    [W:0.058 / U:9.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site