Marcin KoĆcielnicki
2010-Feb-08 00:20 UTC
[Nouveau] [PATCH] drm/nouveau: Add proper vgaarb support.
Signed-off-by: Marcin Ko?cielnicki <koriakin at 0x04.net> --- drivers/gpu/drm/nouveau/nouveau_state.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index fcd7610..c538eee 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -310,6 +310,13 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) static unsigned int nouveau_vga_set_decode(void *priv, bool state) { + struct drm_device *dev = priv; + struct drm_nouveau_private *dev_priv = dev->dev_private; + if (dev_priv->chipset >= 0x40) { + nv_wr32(dev, 0x88054, state); + } else { + nv_wr32(dev, 0x1854, state); + } if (state) return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM | VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; -- 1.6.4.1
Maarten Maathuis
2010-Feb-08 17:44 UTC
[Nouveau] [PATCH] drm/nouveau: Add proper vgaarb support.
2010/2/8 Marcin Ko?cielnicki <koriakin at 0x04.net>:> Signed-off-by: Marcin Ko?cielnicki <koriakin at 0x04.net> > --- > ?drivers/gpu/drm/nouveau/nouveau_state.c | ? ?7 +++++++ > ?1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c > index fcd7610..c538eee 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_state.c > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c > @@ -310,6 +310,13 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) > ?static unsigned int > ?nouveau_vga_set_decode(void *priv, bool state) > ?{ > + ? ? ? struct drm_device *dev = priv; > + ? ? ? struct drm_nouveau_private *dev_priv = dev->dev_private; > + ? ? ? if (dev_priv->chipset >= 0x40) { > + ? ? ? ? ? ? ? nv_wr32(dev, 0x88054, state); > + ? ? ? } else { > + ? ? ? ? ? ? ? nv_wr32(dev, 0x1854, state); > + ? ? ? } > ? ? ? ?if (state) > ? ? ? ? ? ? ? ?return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM | > ? ? ? ? ? ? ? ? ? ? ? VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; > -- > 1.6.4.1 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau >If noone complains by tomorrow, i will pick this up. Maarten.
Ben Skeggs
2010-Feb-09 04:54 UTC
[Nouveau] [PATCH] drm/nouveau: Add proper vgaarb support.
On Mon, 2010-02-08 at 18:44 +0100, Maarten Maathuis wrote:> 2010/2/8 Marcin Ko?cielnicki <koriakin at 0x04.net>: > > Signed-off-by: Marcin Ko?cielnicki <koriakin at 0x04.net> > > --- > > drivers/gpu/drm/nouveau/nouveau_state.c | 7 +++++++ > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c > > index fcd7610..c538eee 100644 > > --- a/drivers/gpu/drm/nouveau/nouveau_state.c > > +++ b/drivers/gpu/drm/nouveau/nouveau_state.c > > @@ -310,6 +310,13 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) > > static unsigned int > > nouveau_vga_set_decode(void *priv, bool state) > > { > > + struct drm_device *dev = priv; > > + struct drm_nouveau_private *dev_priv = dev->dev_private; > > + if (dev_priv->chipset >= 0x40) { > > + nv_wr32(dev, 0x88054, state); > > + } else { > > + nv_wr32(dev, 0x1854, state); > > + } > > if (state) > > return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM | > > VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; > > -- > > 1.6.4.1 > > > > _______________________________________________ > > Nouveau mailing list > > Nouveau at lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/nouveau > > > > If noone complains by tomorrow, i will pick this up.I pushed this already today along with some other fixes, had it queued up since yesterday. Ben.> > Maarten. > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau