All of lore.kernel.org
 help / color / mirror / Atom feed
* Shared memory management
@ 2012-01-06  8:30 Yegor Yefremov
  2012-01-06 16:18 ` Eric Anholt
  0 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov @ 2012-01-06  8:30 UTC (permalink / raw)
  To: intel-gfx

I need to know how to allocate 1Gb video memory. My system:

CPU: Intel Core i5-520M
Chipset: Intel QM57
OS: Ubuntu 11.10 64-bit
Kernel: Linux user-desktop 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7
14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

almost the same question was asked here:
http://lists.freedesktop.org/archives/intel-gfx/2011-February/009476.html.
But it is not answered. I've googled for this info and found some
threads, but still no valuable information on how Video RAM setting
can be changed from user space:

http://superuser.com/questions/371335/intel-vga-shared-memory
http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/

etc.

As far as I can see there is no such info as (==) intel(0): VideoRam:
262144 KB in xorg.log. The only info I have is lspci output:

00:02.0 VGA compatible controller: Intel Corporation Core Processor
Integrated Graphics Controller (rev 18) (prog-if 00 [VGA controller])
        Flags: bus master, fast devsel, latency 0, IRQ 46
        Memory at fe000000 (64-bit, non-prefetchable) [size=4M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f160 [size=8]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [a4] PCI Advanced Features
        Kernel driver in use: i915
        Kernel modules: i915

According to this thread
http://forums.pcpitstop.com/index.php?/topic/139320-setting-intel-shared-video-memory-on-laptop-suse-102/,
DVMT 2.0 allocates video ram as needed. But how can I see current
video memory usage? Customer application relies on having 1Gb video
RAM.

Thank you in advance.

Regards,
Yegor

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

* Re: Shared memory management
  2012-01-06  8:30 Yegor Yefremov
@ 2012-01-06 16:18 ` Eric Anholt
  2012-01-06 16:40   ` Ben Widawsky
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Anholt @ 2012-01-06 16:18 UTC (permalink / raw)
  To: Yegor Yefremov, intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]

On Fri, 6 Jan 2012 09:30:13 +0100, Yegor Yefremov <yegorslists@googlemail.com> wrote:
> I need to know how to allocate 1Gb video memory. My system:

Applications can allocate arbitrary amounts of buffers that are
dynamically bound to the GPU.  The limit of what can be bound at for a
single draw call is defined by the hardware, so there are no user
controls.  The only information you get on that limit is:

dmesg | grep agp:
[    2.283526] agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable

so this system can map 2GB at once.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: Shared memory management
  2012-01-06 16:18 ` Eric Anholt
@ 2012-01-06 16:40   ` Ben Widawsky
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Widawsky @ 2012-01-06 16:40 UTC (permalink / raw)
  To: Yegor Yefremov; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 753 bytes --]

On Fri, Jan 06, 2012 at 08:18:22AM -0800, Eric Anholt wrote:
> On Fri, 6 Jan 2012 09:30:13 +0100, Yegor Yefremov <yegorslists@googlemail.com> wrote:
> > I need to know how to allocate 1Gb video memory. My system:
> 
> Applications can allocate arbitrary amounts of buffers that are
> dynamically bound to the GPU.  The limit of what can be bound at for a
> single draw call is defined by the hardware, so there are no user
> controls.  The only information you get on that limit is:
> 
> dmesg | grep agp:
> [    2.283526] agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
> 
> so this system can map 2GB at once.

mount debugfs
cat /sys/kernel/debug/dri/0/i915_gem_gtt
Will show how much is being used.


[-- Attachment #1.2: Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: Shared memory management
@ 2012-03-01 16:41 Michal Mocny
  2012-03-03 10:04 ` Ben Widawsky
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Mocny @ 2012-03-01 16:41 UTC (permalink / raw)
  To: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 436 bytes --]

Hello,

I am trying to measure video memory usage as per Ben Widawsky's
instructions from a while back:

mount debugfs
cat /sys/kernel/debug/dri/0/i915_gem_gtt

However, the numbers are difficult to read/draw conclusions from.  Can I
get some insight into the meaning of the various column values?
 Specifically, if I would like to measure the actual current physical
memory usage, should any of the values be ignored?

Thanks,
-Michal

[-- Attachment #1.2: Type: text/html, Size: 751 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: Shared memory management
  2012-03-01 16:41 Shared memory management Michal Mocny
@ 2012-03-03 10:04 ` Ben Widawsky
  2012-03-03 10:53   ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Widawsky @ 2012-03-03 10:04 UTC (permalink / raw)
  To: Michal Mocny; +Cc: intel-gfx

On Thu, Mar 01, 2012 at 11:41:53AM -0500, Michal Mocny wrote:
> Hello,
> 
> I am trying to measure video memory usage as per Ben Widawsky's
> instructions from a while back:
> 
> mount debugfs
> cat /sys/kernel/debug/dri/0/i915_gem_gtt
> 
> However, the numbers are difficult to read/draw conclusions from.  Can I
> get some insight into the meaning of the various column values?
>  Specifically, if I would like to measure the actual current physical
> memory usage, should any of the values be ignored?
> 
> Thanks,
> -Michal

At the bottom you should see something like:
Total 370 objects, 35368960 bytes, 35368960 GTT size

The number in bytes (not sure offhand how it differs from GTT) is the
current physical memory usage of GEM objects. While it does not account
for internal data structures, or currently locked user pages (which
could be very large at various times), it is a good approximation.

I've since learned Eugeni Dodonov has written a tool to make this more
readable. I'm not sure what you get if you use that instead.

~Ben

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

* Re: Shared memory management
  2012-03-03 10:04 ` Ben Widawsky
@ 2012-03-03 10:53   ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2012-03-03 10:53 UTC (permalink / raw)
  To: Ben Widawsky, Michal Mocny; +Cc: intel-gfx

On Sat, 3 Mar 2012 10:04:09 +0000, Ben Widawsky <ben@bwidawsk.net> wrote:
> At the bottom you should see something like:
> Total 370 objects, 35368960 bytes, 35368960 GTT size
> 
> The number in bytes (not sure offhand how it differs from GTT)

On gen2 and gen3 devices the amount of aperture space taken up by an
object by more than the sum of its pages due to fencing.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

end of thread, other threads:[~2012-03-03 10:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 16:41 Shared memory management Michal Mocny
2012-03-03 10:04 ` Ben Widawsky
2012-03-03 10:53   ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2012-01-06  8:30 Yegor Yefremov
2012-01-06 16:18 ` Eric Anholt
2012-01-06 16:40   ` Ben Widawsky

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.