All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Use cachable mapping for i915 opregion.
@ 2011-01-23 17:23 Michael Karcher
  2011-01-23 17:41 ` Chris Wilson
  2011-01-23 18:45 ` Chris Wilson
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Karcher @ 2011-01-23 17:23 UTC (permalink / raw)
  To: chris, airlied, dri-devel, linux-kernel

The opregion is a shared memory region between ACPI and the graphics
driver. As the ACPI mapping has been changed to cachable in commit
6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
non-cachable now fails. As no bus-master hardware is involved in the
opregion, cachable map should do no harm.

Tested on a Fujitsu Lifebook P8010.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
---
 drivers/gpu/drm/i915/intel_opregion.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index f295a7a..dfaccd5 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -476,7 +476,7 @@ int intel_opregion_setup(struct drm_device *dev)
 		return -ENOTSUPP;
 	}
 
-	base = ioremap(asls, OPREGION_SIZE);
+	base = ioremap_cache(asls, OPREGION_SIZE);
 	if (!base)
 		return -ENOMEM;
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
  2011-01-23 17:23 [PATCH 1/1] Use cachable mapping for i915 opregion Michael Karcher
@ 2011-01-23 17:41 ` Chris Wilson
  2011-01-23 18:45 ` Chris Wilson
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2011-01-23 17:41 UTC (permalink / raw)
  To: Michael Karcher, airlied, Rafael J. Wysocki; +Cc: linux-kernel, dri-devel

On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> The opregion is a shared memory region between ACPI and the graphics
> driver. As the ACPI mapping has been changed to cachable in commit
> 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> non-cachable now fails. As no bus-master hardware is involved in the
> opregion, cachable map should do no harm.

Presumably these instances in the driver also need to be
acpi_os_ioremap()?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
  2011-01-23 17:23 [PATCH 1/1] Use cachable mapping for i915 opregion Michael Karcher
  2011-01-23 17:41 ` Chris Wilson
@ 2011-01-23 18:45 ` Chris Wilson
  2011-01-23 20:52     ` Rafael J. Wysocki
  1 sibling, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2011-01-23 18:45 UTC (permalink / raw)
  To: Michael Karcher, airlied, dri-devel, linux-kernel

On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> The opregion is a shared memory region between ACPI and the graphics
> driver. As the ACPI mapping has been changed to cachable in commit
> 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> non-cachable now fails. As no bus-master hardware is involved in the
> opregion, cachable map should do no harm.

Satisfied myself that is indeed equivalent to use the newly introduced
acpi_os_ioremap for this purpose and applied to -fixes.
Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
  2011-01-23 18:45 ` Chris Wilson
@ 2011-01-23 20:52     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2011-01-23 20:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Michael Karcher, airlied, dri-devel, linux-kernel

On Sunday, January 23, 2011, Chris Wilson wrote:
> On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> > The opregion is a shared memory region between ACPI and the graphics
> > driver. As the ACPI mapping has been changed to cachable in commit
> > 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> > non-cachable now fails. As no bus-master hardware is involved in the
> > opregion, cachable map should do no harm.
> 
> Satisfied myself that is indeed equivalent to use the newly introduced
> acpi_os_ioremap for this purpose and applied to -fixes.

However, it might be better to use acpi_os_ioremap() in case we decide to
go back to ioremap() for some reason.  For now, ioremap_cache() seems fine,
but ...

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
@ 2011-01-23 20:52     ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2011-01-23 20:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: linux-kernel, dri-devel, Michael Karcher

On Sunday, January 23, 2011, Chris Wilson wrote:
> On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> > The opregion is a shared memory region between ACPI and the graphics
> > driver. As the ACPI mapping has been changed to cachable in commit
> > 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> > non-cachable now fails. As no bus-master hardware is involved in the
> > opregion, cachable map should do no harm.
> 
> Satisfied myself that is indeed equivalent to use the newly introduced
> acpi_os_ioremap for this purpose and applied to -fixes.

However, it might be better to use acpi_os_ioremap() in case we decide to
go back to ioremap() for some reason.  For now, ioremap_cache() seems fine,
but ...

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
  2011-01-23 20:52     ` Rafael J. Wysocki
  (?)
@ 2011-01-23 20:58     ` Chris Wilson
  2011-01-23 21:35       ` Rafael J. Wysocki
  -1 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2011-01-23 20:58 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Michael Karcher, airlied, dri-devel, linux-kernel

On Sun, 23 Jan 2011 21:52:27 +0100, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> On Sunday, January 23, 2011, Chris Wilson wrote:
> > On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> > > The opregion is a shared memory region between ACPI and the graphics
> > > driver. As the ACPI mapping has been changed to cachable in commit
> > > 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> > > non-cachable now fails. As no bus-master hardware is involved in the
> > > opregion, cachable map should do no harm.
> > 
> > Satisfied myself that is indeed equivalent to use the newly introduced
> > acpi_os_ioremap for this purpose and applied to -fixes.
> 
> However, it might be better to use acpi_os_ioremap() in case we decide to
> go back to ioremap() for some reason.  For now, ioremap_cache() seems fine,
> but ...

Great minds think a like, but fools rarely differ...
http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git;a=commit;h=94b3eb7a71fe62f19c91c39dd94c83786108d626
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] Use cachable mapping for i915 opregion.
  2011-01-23 20:58     ` Chris Wilson
@ 2011-01-23 21:35       ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2011-01-23 21:35 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Michael Karcher, airlied, dri-devel, linux-kernel

On Sunday, January 23, 2011, Chris Wilson wrote:
> On Sun, 23 Jan 2011 21:52:27 +0100, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> > On Sunday, January 23, 2011, Chris Wilson wrote:
> > > On Sun, 23 Jan 2011 18:23:34 +0100, Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> wrote:
> > > > The opregion is a shared memory region between ACPI and the graphics
> > > > driver. As the ACPI mapping has been changed to cachable in commit
> > > > 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion
> > > > non-cachable now fails. As no bus-master hardware is involved in the
> > > > opregion, cachable map should do no harm.
> > > 
> > > Satisfied myself that is indeed equivalent to use the newly introduced
> > > acpi_os_ioremap for this purpose and applied to -fixes.
> > 
> > However, it might be better to use acpi_os_ioremap() in case we decide to
> > go back to ioremap() for some reason.  For now, ioremap_cache() seems fine,
> > but ...
> 
> Great minds think a like, but fools rarely differ...
> http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git;a=commit;h=94b3eb7a71fe62f19c91c39dd94c83786108d626

Cool, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-23 21:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-23 17:23 [PATCH 1/1] Use cachable mapping for i915 opregion Michael Karcher
2011-01-23 17:41 ` Chris Wilson
2011-01-23 18:45 ` Chris Wilson
2011-01-23 20:52   ` Rafael J. Wysocki
2011-01-23 20:52     ` Rafael J. Wysocki
2011-01-23 20:58     ` Chris Wilson
2011-01-23 21:35       ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.