<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/vmwgfx, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-08T15:30:35Z</updated>
<entry>
<title>drm/vmwgfx: Fix error paths when mapping framebuffer</title>
<updated>2016-07-08T15:30:35Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-07-07T18:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58541f7a6458e17ab417321b284f0090f530aa91'/>
<id>urn:sha1:58541f7a6458e17ab417321b284f0090f530aa91</id>
<content type='text'>
Rather than returning immediately, make sure to unlock the
mutexes first.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Charmaine Lee &lt;charmainel@vmware.com&gt;
Reported-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Fix corner case screen target management</title>
<updated>2016-07-01T17:47:51Z</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2016-06-29T20:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=beca4cf55323147ca9c8a98de1871be6e4fe8f34'/>
<id>urn:sha1:beca4cf55323147ca9c8a98de1871be6e4fe8f34</id>
<content type='text'>
When the surface backing a framebuffer doesn't match the framebuffer's
dimensions, the screen target code would test the framebuffer dimensions
rather than the surface dimensions when deciding whether to bind the
surface as a screen target directly. This causes a screen target -
surface dimension mismatch and a subsequent device error.

Fix this by testing against the surface dimension.

v2: Fix review comments by Sinclair Yeh.

Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set</title>
<updated>2016-07-01T17:47:50Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-06-29T20:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5f1a291e32309324a8c481ed84b5c118d1360ea'/>
<id>urn:sha1:d5f1a291e32309324a8c481ed84b5c118d1360ea</id>
<content type='text'>
For the Screen Object display unit, we need to reserve a
guest-invisible region equal to the size of the framebuffer for
the host.  This region can only be reserved in VRAM, whereas
the guest-visible framebuffer can be reserved in either VRAM or
GMR.

As such priority should be given to the guest-invisible
region otherwise in a limited VRAM situation, we can fail to
allocate this region.

This patch makes it so that vmw_sou_backing_alloc() is called
before the framebuffer is pinned.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
---
This is the last patch of a 3-patch series to fix console black
screen issue on Ubuntu 16.04 server
</content>
</entry>
<entry>
<title>drm/vmwgfx: Check pin count before attempting to move a buffer</title>
<updated>2016-07-01T17:47:50Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-06-29T20:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ed7e2242b637bc4af0416e4aa9f945db30fb44a'/>
<id>urn:sha1:4ed7e2242b637bc4af0416e4aa9f945db30fb44a</id>
<content type='text'>
In certain scenarios, e.g. when fbdev is enabled, we can get into
a situation where a vmw_framebuffer_pin() is called on a buffer
that is already pinned.

When this happens, ttm_bo_validate() will unintentially remove the
TTM_PL_FLAG_NO_EVICT flag, thus unpinning it, and leaving no way
to actually pin the buffer again.

To prevent this, if a buffer is already pinned, then instead of
calling ttm_bo_validate(), just make sure the proposed placement is
compatible with the existing placement.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
---
This is the 2nd patch in a 3-patch series to fix a console black
screen issue on Ubuntu 16.04 server.  This fixes a BUG_ON()
condition where a pinned buffer gets accidentally put onto the
LRU list.
</content>
</entry>
<entry>
<title>drm/vmwgfx: Add an option to change assumed FB bpp</title>
<updated>2016-07-01T17:47:48Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-06-29T19:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04319d89fbec72dfd60738003c3813b97c1d5f5a'/>
<id>urn:sha1:04319d89fbec72dfd60738003c3813b97c1d5f5a</id>
<content type='text'>
Offer an option for advanced users who want larger modes at 16bpp.

This becomes necessary after the fix: "Work around mode set
failure in 2D VMs."  Without this patch, there would be no way
for existing advanced users to get to a high res mode, and the
regression is they will likely get a black screen after a software
update on their current VM.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Work around mode set failure in 2D VMs</title>
<updated>2016-07-01T17:47:48Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-06-29T18:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c20d213dd3cd6295bf9162730e7a368af957854'/>
<id>urn:sha1:7c20d213dd3cd6295bf9162730e7a368af957854</id>
<content type='text'>
In a low-memory 2D VM, fbdev can take up a large percentage of
available memory, making them unavailable for other DRM clients.

Since we do not take fbdev into account when filtering modes,
we end up claiming to support more modes than we actually do.

As a result, users get a black screen when setting a mode too
large for current available memory.  In a low-memory VM
configuration, users can get a black screen for a mode as low
as 1024x768.

The current mode filtering mechanism keys off of
SVGA_REG_SUGGESTED_GBOBJECT_MEM_SIZE_KB, i.e. the maximum amount
of surface memory we have.  Since this value is a performance
suggestion, not a hard limit, and since there should not be much
of a performance impact for a 2D VM, rather than filtering out
more modes, we will just allow ourselves to exceed the SVGA's
performance suggestion.

Also changed assumed bpp to 32 from 16 to make sure we can
actually support all the modes listed.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Add a check to handle host message failure</title>
<updated>2016-07-01T17:47:47Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-06-29T23:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9cd9c044aa90ba2b31d1bf3e3432f38fb1d25fe'/>
<id>urn:sha1:a9cd9c044aa90ba2b31d1bf3e3432f38fb1d25fe</id>
<content type='text'>
Discovered by static code analysis tool.  If for some reason communication
with the host fails more than preset number of retries, return an error
instead of return garbage.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Charmaine Lee &lt;charmainel@vmware.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
</content>
</entry>
<entry>
<title>objtool, drm/vmwgfx: Fix "duplicate frame pointer save" warning</title>
<updated>2016-06-08T13:36:18Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@redhat.com</email>
</author>
<published>2016-05-26T18:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b0d81e3b7334897da9b2e3ffee860c2046f7bc0'/>
<id>urn:sha1:0b0d81e3b7334897da9b2e3ffee860c2046f7bc0</id>
<content type='text'>
objtool reports the following warnings:

  drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_send_msg()+0x107: duplicate frame pointer save
  drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_host_get_guestinfo()+0x252: duplicate frame pointer save

To quote Linus:

 "The reason is that VMW_PORT_HB_OUT() uses a magic instruction sequence
  (a "rep outsb") to communicate with the hypervisor (it's a virtual GPU
  driver for vmware), and %rbp is part of the communication. So the
  inline asm does a save-and-restore of the frame pointer around the
  instruction sequence.

  I actually find the objtool warning to be quite reasonable, so it's
  not exactly a false positive, since in this case it actually does
  point out that the frame pointer won't be reliable over that
  instruction sequence.

  But in this particular case it just ends up being the wrong thing -
  the code is what it is, and %rbp just can't have the frame information
  due to annoying magic calling conventions."

Silence the warnings by telling objtool to ignore the two functions
which use the VMW_PORT_HB_{IN,OUT} macros.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: DRI &lt;dri-devel@lists.freedesktop.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/20160526184343.fdtjjjg67smmeekt@treble
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Report vmwgfx version to vmware.log</title>
<updated>2016-05-20T15:40:07Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-04-28T02:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f921791314811afa00bb7fbbd40f51bd3b8eff01'/>
<id>urn:sha1:f921791314811afa00bb7fbbd40f51bd3b8eff01</id>
<content type='text'>
When tracking down a customer issue, it is useful to know exactly
which version of the vmwgfx they are using.  Since vmware.log is
often the only available debug log, report vmwgfx version in there.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
</content>
</entry>
<entry>
<title>drm/vmwgfx: Add VMWare host messaging capability</title>
<updated>2016-05-20T15:12:33Z</updated>
<author>
<name>Sinclair Yeh</name>
<email>syeh@vmware.com</email>
</author>
<published>2016-04-28T02:10:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89da76fde68de1205756707133508e930be4f389'/>
<id>urn:sha1:89da76fde68de1205756707133508e930be4f389</id>
<content type='text'>
This patch adds capabilities for a VMWare guest to send and
receive messages from the host, and adds functions to sending log
messages to vmware.log and to request device settings that aren't
available through the virtual hardware, e.g. certain settings in
the VMX file.

Signed-off-by: Sinclair Yeh &lt;syeh@vmware.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
</content>
</entry>
</feed>
