Re: [PATCH 2/5] drm/vmwgfx: move null mem checks outside move notifies

2020-10-07 Thread Zack Rusin
> On Oct 5, 2020, at 20:06, Dave Airlie wrote: > > From: Dave Airlie > > Both fns checked mem == NULL, just move the check outside. > > Signed-off-by: Dave Airlie That’s a nice cleanup. Reviewed-by: Zack Rusin ___ dri-d

Re: [PATCH 3/5] drm/vmwgfx: add a move callback.

2020-10-07 Thread Zack Rusin
it? i.e. how is it going to be different? Reviewed-by: Zack Rusin ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/vmwgfx: return value from inserting in thp mode.

2020-09-29 Thread Zack Rusin
> On Sep 29, 2020, at 22:07, Dave Airlie wrote: > > From: Dave Airlie > > This seems to fix the failure I'm seeing with 5.9-rc7 under > vmplayer. > > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] ttm: ttm_bo_swapout_all doesn't use it's argument.

2020-07-28 Thread Zack Rusin
ine with the other drivers). For the patch: Reviewed-by: Zack Rusin z ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2 3/8] drm/vmwgfx: Switch to a managed drm device

2020-12-01 Thread Zack Rusin
To cleanup some of the error handling and prepare for some other work lets switch to a managed drm device. It will let us get a better handle on some of the error paths. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx

Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev

2020-12-03 Thread Zack Rusin
> On Dec 3, 2020, at 10:12, Daniel Vetter wrote: > > On Thu, Dec 03, 2020 at 03:06:20AM +0000, Zack Rusin wrote: >> >> >>> On Dec 2, 2020, at 11:03, Daniel Vetter wrote: >>> >>> On Wed, Dec 2, 2020 at 4:37 PM Zack Rusin wrote: >>

[PATCH 4/8] drm/vmwgfx: Cleanup fifo mmio handling

2020-12-01 Thread Zack Rusin
. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 29 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 31 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 24 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 83

[PATCH 3/8] drm/vmwgfx: Switch to a managed drm device

2020-12-01 Thread Zack Rusin
To cleanup some of the error handling and prepare for some other work lets switch to a managed drm device. It will let us get a better handle on some of the error paths. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx

[PATCH 7/8] drm/vmwgfx: Cleanup the cmd/fifo split

2020-12-01 Thread Zack Rusin
buffers) as _cmd_ and functions which operate on the MMIO based commands as FIFO to match the SVGA device naming. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 52

[PATCH 2/8] drm/vmwgfx: Remove stealth mode

2020-12-01 Thread Zack Rusin
s our code a lot cleaner. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 31 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 - 2 files changed, 10 insertions(+), 26 deletions(-)

[PATCH 6/8] drm/vmwgfx: Remove the throttling code

2020-12-01 Thread Zack Rusin
Throttling was used before fencing to implement early vsync support in the xorg state tracker a long time ago. The xorg state tracker has been removed years ago and no one else has ever used throttling. It's time to remove this code, it hasn't been used or tested in years. Signed-off-by: Zack

[PATCH 1/8] drm/vmwgfx: add Zack Rusin as maintainer

2020-12-01 Thread Zack Rusin
From: Roland Scheidegger Reviewed-by: Zack Rusin Signed-off-by: Roland Scheidegger Signed-off-by: Zack Rusin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2daa6ee673f7..55e3e2ef5f18 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5712,6

[PATCH 5/8] drm/vmwgfx: Cleanup pci resource allocation

2020-12-01 Thread Zack Rusin
Instead of doing it in multiple spots lets centralize the code to handle pci resources. This also cleans up the error handling a bit and will make it a lot easier to add additional svga versions to the driver. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger

[PATCH 8/8] drm/vmwgfx: Fix display register usage for some older configs

2020-12-01 Thread Zack Rusin
We can't be setting the display_id register to an invalid value because that makes our device reset the fb which causes nasty flicker (due to destruction and creation of a new fb). Also we can't be using the BITS_PER_PIXEL register if the 8BIT_EMULATION is not supported. Signed-off-by: Zack Rusin

Re: [PATCH 4/7] drm/vmwgfx: switch to ttm_sg_tt_init

2020-11-30 Thread Zack Rusin
ittle bit more info would be much appreciated, it’s hard to tell from the message log what’s going on. Is the assumption that since vmwgfx doesn’t support dmabuf it will never use ttm_bo_type_sg or TTM_PAGE_FLAG_SG and ttm_sg_tt_init will still endup calling ttm_dma_tt_alloc_page_directory to setup the ttm_tt::pa

Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev

2020-11-30 Thread Zack Rusin
vmwgfx/vmwgfx_cmdbuf.c | 8 > drivers/gpu/drm/vmwgfx/vmwgfx_drv.c| 27 +- > drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- Reviewed-by: Zack Rusin z ___ dri-devel mailing list dri-devel@lists.freedesktop.org http

Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev

2020-12-02 Thread Zack Rusin
> On Dec 2, 2020, at 11:03, Daniel Vetter wrote: > > On Wed, Dec 2, 2020 at 4:37 PM Zack Rusin wrote: >> >> >> >>> On Dec 2, 2020, at 09:27, Thomas Zimmermann wrote: >>> >>> Hi >>> >>> Am 02.12.20 um 09:01 schrieb

Re: [PATCH 14/15] drm/vmwgfx: Remove references to struct drm_device.pdev

2020-12-02 Thread Zack Rusin
> On Dec 2, 2020, at 09:27, Thomas Zimmermann wrote: > > Hi > > Am 02.12.20 um 09:01 schrieb Thomas Zimmermann: >> Hi >> Am 30.11.20 um 21:59 schrieb Zack Rusin: >>> >>> >>>> On Nov 24, 2020, at 06:38, Thomas Zimmermann wrote: >&

[PATCH v2 4/8] drm/vmwgfx: Cleanup fifo mmio handling

2021-01-05 Thread Zack Rusin
. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 29 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 31 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 24 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 83

[PATCH v2 7/8] drm/vmwgfx: Cleanup the cmd/fifo split

2021-01-05 Thread Zack Rusin
buffers) as _cmd_ and functions which operate on the MMIO based commands as FIFO to match the SVGA device naming. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 52

[PATCH v2 1/8] drm/vmwgfx: add Zack Rusin as maintainer

2021-01-05 Thread Zack Rusin
From: Roland Scheidegger Reviewed-by: Zack Rusin Signed-off-by: Roland Scheidegger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 17b92e6a0f06..f07dec22121c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5739,6 +5739,7 @@ F:drivers

[PATCH v2 8/8] drm/vmwgfx: Fix display register usage for some older configs

2021-01-05 Thread Zack Rusin
We can't be setting the display_id register to an invalid value because that makes our device reset the fb which causes nasty flicker (due to destruction and creation of a new fb). Also we can't be using the BITS_PER_PIXEL register if the 8BIT_EMULATION is not supported. Signed-off-by: Zack Rusin

[PATCH v2 5/8] drm/vmwgfx: Cleanup pci resource allocation

2021-01-05 Thread Zack Rusin
Instead of doing it in multiple spots lets centralize the code to handle pci resources. This also cleans up the error handling a bit and will make it a lot easier to add additional svga versions to the driver. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger

[PATCH v2 6/8] drm/vmwgfx: Remove the throttling code

2021-01-05 Thread Zack Rusin
Throttling was used before fencing to implement early vsync support in the xorg state tracker a long time ago. The xorg state tracker has been removed years ago and no one else has ever used throttling. It's time to remove this code, it hasn't been used or tested in years. Signed-off-by: Zack

[PATCH v2 0/8] Misc cleanups and fixes for vmwgfx

2021-01-05 Thread Zack Rusin
drm/vmwgfx: add Zack Rusin as maintainer Zack Rusin (7): drm/vmwgfx: Remove stealth mode drm/vmwgfx: Switch to a managed drm device drm/vmwgfx: Cleanup fifo mmio handling drm/vmwgfx: Cleanup pci resource allocation drm/vmwgfx: Remove the throttling code drm/vmwgfx: Cleanup the cmd/fifo spl

[PATCH v2 2/8] drm/vmwgfx: Remove stealth mode

2021-01-05 Thread Zack Rusin
s our code a lot cleaner. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 31 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 - 2 files changed, 10 insertions(+), 26 deletions(-)

[PATCH v2 3/8] drm/vmwgfx: Switch to a managed drm device

2021-01-05 Thread Zack Rusin
To cleanup some of the error handling and prepare for some other work lets switch to a managed drm device. It will let us get a better handle on some of the error paths. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx

Re: [PATCH 1/3] drm/vmwgfx: Drop svga_lock

2021-01-14 Thread Zack Rusin
Looks good. Thanks! Reviewed-by: Zack Rusin > On Jan 12, 2021, at 03:49, Daniel Vetter wrote: > > Hi Roland, > > Hopefully you had a nice start into the new year! Ping for some > review/testing on this series. > > Thanks, Daniel > > On Fri, Dec 11, 2020 a

Re: [PATCH] drm/vmwgfx/vmwgfx_drv: Fix an error path in vmw_setup_pci_resources()

2021-01-25 Thread Zack Rusin
/vmwgfx: Cleanup fifo mmio handling") > Signed-off-by: Dan Carpenter Thanks, Dan. I have a patch based on your report that fixes that too but it comes with a refactoring. I’d be happy to rebase it on top of yours just to get yours in before. If you’d like I can push your patch through drm-mis

Re: [PATCH 00/29] [Set 15] Finally rid W=1 warnings from GPU!

2021-01-19 Thread Zack Rusin
> On Jan 19, 2021, at 03:29, Lee Jones wrote: > > On Mon, 18 Jan 2021, Daniel Vetter wrote: > >> On Mon, Jan 18, 2021 at 03:09:45PM +, Lee Jones wrote: >>> On Mon, 18 Jan 2021, Daniel Vetter wrote: >>> >>>> On Fri, Jan 15, 2021 at 06:27:15

[PATCH] drm/vmwgfx: Make sure we unpin no longer needed buffers

2021-01-19 Thread Zack Rusin
but 57fcd550eb15bce14a7154736379dfd4ed60ae81 introduced a WARN_ON which was filling up the kernel logs rather quickly. Quite frankly internal usage of vmw_buffer_object and in general pinning needs to be refactored in vmwgfx but for now this makes it work. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev

Re: [PATCH v4 5/6] drm/vmwgfx: Remove reference to struct drm_device.pdev

2021-01-18 Thread Zack Rusin
x: Switch to a managed drm device") > Cc: Zack Rusin > Cc: Martin Krastev > Cc: Roland Scheidegger > Cc: VMware Graphics > Cc: dri-devel@lists.freedesktop.org > --- > drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/dr

[PATCH v3 3/8] drm/vmwgfx: Switch to a managed drm device

2021-01-13 Thread Zack Rusin
To cleanup some of the error handling and prepare for some other work lets switch to a managed drm device. It will let us get a better handle on some of the error paths. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx

[PATCH v3 2/8] drm/vmwgfx: Remove stealth mode

2021-01-13 Thread Zack Rusin
s our code a lot cleaner. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 31 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 - 2 files changed, 10 insertions(+), 26 deletions(-)

[PATCH v3 6/8] drm/vmwgfx: Remove the throttling code

2021-01-13 Thread Zack Rusin
Throttling was used before fencing to implement early vsync support in the xorg state tracker a long time ago. The xorg state tracker has been removed years ago and no one else has ever used throttling. It's time to remove this code, it hasn't been used or tested in years. Signed-off-by: Zack

[PATCH v3 8/8] drm/vmwgfx: Fix display register usage for some older configs

2021-01-13 Thread Zack Rusin
We can't be setting the display_id register to an invalid value because that makes our device reset the fb which causes nasty flicker (due to destruction and creation of a new fb). Also we can't be using the BITS_PER_PIXEL register if the 8BIT_EMULATION is not supported. Signed-off-by: Zack Rusin

[PATCH v3 1/8] drm/vmwgfx: add Zack Rusin as maintainer

2021-01-13 Thread Zack Rusin
From: Roland Scheidegger Reviewed-by: Zack Rusin Signed-off-by: Roland Scheidegger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 389abcf847c8..d082757ca672 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5784,6 +5784,7 @@ F:drivers

[PATCH v3 7/8] drm/vmwgfx: Cleanup the cmd/fifo split

2021-01-13 Thread Zack Rusin
buffers) as _cmd_ and functions which operate on the MMIO based commands as FIFO to match the SVGA device naming. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 52

[PATCH v3 4/8] drm/vmwgfx: Cleanup fifo mmio handling

2021-01-13 Thread Zack Rusin
. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 37 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 31 +- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 24 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 83

[PATCH v3 0/8] Misc cleanups and fixes for vmwgfx

2021-01-13 Thread Zack Rusin
This is the same set I've sent earlier in the week. CI found a warning and I wanted to give the systems a chance to compile/run the fixed version before submitting it. Roland Scheidegger (1): drm/vmwgfx: add Zack Rusin as maintainer Zack Rusin (7): drm/vmwgfx: Remove stealth mode drm

[PATCH v3 5/8] drm/vmwgfx: Cleanup pci resource allocation

2021-01-13 Thread Zack Rusin
Instead of doing it in multiple spots lets centralize the code to handle pci resources. This also cleans up the error handling a bit and will make it a lot easier to add additional svga versions to the driver. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger

Re: [PATCH 00/40] [Set 14] Rid W=1 warnings from GPU

2021-01-15 Thread Zack Rusin
r all the vmwgfx bits: Reviewed-by: Zack Rusin z ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 00/29] [Set 15] Finally rid W=1 warnings from GPU!

2021-01-15 Thread Zack Rusin
x86. Thanks! For all the vmwgfx bits: Reviewed-by: Zack Rusin z ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/vmwgfx: Fix some memory leaks on errors

2021-01-28 Thread Zack Rusin
eanup pci resource allocation") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Reported-by: kernel test robot Reported-by: Dan Carpenter --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-02 Thread Zack Rusin
Looks good. There’s probably not much reason to call it ttm_memory anymore as it only deals with ttm_mem_glob, we’ll likely fold it in after you submit. Thanks. Reviewed-by: Zack Rusin z > On Feb 2, 2021, at 08:04, Christian König wrote: > > Ping? > > Especially Roland

Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-02 Thread Zack Rusin
21, at 12:42, Zack Rusin wrote: > > Ah, yes, sorry, I missed that. I just double checked and it fails with: > > kobject_add_internal failed for memory_accounting (error: -2 parent: card0) > > which breaks the probe and the driver won’t load. I won’t have time to look > into

Re: [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-02 Thread Zack Rusin
:16, Christian König wrote: > > Hi Zack, > > can you also give it a quick smoke test? > > I'm not sure if I wired up all the sysfs magic correctly inside vmwgfx, but I > currently don't have a setup where I can test this. > > Thanks, > Christian. > > Am 02.02.21 um

[PATCH 2/9] drm/vmwgfx: Introduce VMware mks-guest-stats

2021-06-09 Thread Zack Rusin
controlling the instrumentation of vmwgfx for kernelspace mks-guest-stats counters * Instrument vmwgfx vmw_execbuf_ioctl to collect mks-guest-stats according to DRM_VMWGFX_MKSSTATS Signed-off-by: Martin Krastev Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin --- drivers/gpu/drm/vmwgfx

[PATCH 1/9] drm/vmwgfx: Simplify devcaps code

2021-06-09 Thread Zack Rusin
with register write races because we only read the devcaps at initialization. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c | 6 +- drivers/gpu/drm/vmwgfx

[PATCH 8/9] drm/vmwgfx: Remove vmw_chipset

2021-06-09 Thread Zack Rusin
vmw_chipset was duplicating pci_id. They are exactly the same variable just with two different names. Becuase pci_id was already used to detect the SVGA version, there's no point in having vmw_chipset and thus we can remove it. All references to vmw_chipset should use pci_id. Signed-off-by: Zack

[PATCH 0/9] Adding support for mks-stats and some cleanups/fixes

2021-06-09 Thread Zack Rusin
vmw_mksstat_remove_ioctl to expect pgid match with vmw_mksstat_add_ioctl to authorise removal. Zack Rusin (7): drm/vmwgfx: Simplify devcaps code drm/vmwgfx: Fix subresource updates with new contexts drm/vmwgfx: Fix some static checker warnings drm/vmwgfx: remove code that was using physical page

[PATCH 7/9] drm/vmwgfx: Refactor vmw_mksstat_remove_ioctl to expect pgid match with vmw_mksstat_add_ioctl to authorise removal.

2021-06-09 Thread Zack Rusin
from arbitrary processes interrupting an ongoing mks-guest-stats. Reviewed-by: Zack Rusin Signed-off-by: Martin Krastev Signed-off-by: Zack Rusin --- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 32 - 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/drivers

[PATCH 9/9] drm/vmwgfx: Fix implicit declaration error

2021-06-09 Thread Zack Rusin
The declarations of ttm_range_man_init and ttm_range_man_fini have been moved to ttm_range_manager.h so we have to add it to the include list. Signed-off-by: Zack Rusin Reported-by: Randy Dunlap Fixes: 3eb7d96e9415 ("drm/ttm: flip over the range manager to self allocated nodes") Cc:

[PATCH 4/9] drm/vmwgfx: Fix some static checker warnings

2021-06-09 Thread Zack Rusin
Fix some minor issues that Coverity spotted in the code. None of that are serious but they're all valid concerns so fixing them makes sense. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/ttm_memory.c| 2 ++ drivers

[PATCH 3/9] drm/vmwgfx: Fix subresource updates with new contexts

2021-06-09 Thread Zack Rusin
or newer is available to the device. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm

[PATCH 5/9] drm/vmwgfx: remove code that was using physical page addresses

2021-06-09 Thread Zack Rusin
better to just force coherent TTM pages via the force_coherent module parameter making this code pointless. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c| 7 +-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 1 - drivers/gpu/drm/vmwgfx

[PATCH 6/9] drm/vmwgfx: inline access to the pages from the piter

2021-06-09 Thread Zack Rusin
The indirection doesn't make sense because we always go through the same function pointer. Instead of the extra indirection lets inline the access to the current page. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 3 +-- drivers/gpu/drm

Re: [PATCH 3/9] drm/vmwgfx: Fix subresource updates with new contexts

2021-06-10 Thread Zack Rusin
On 6/10/21 2:49 AM, Thomas Hellström (Intel) wrote: Hi, On 6/9/21 7:23 PM, Zack Rusin wrote: The has_dx variable was only set during the initialization which meant that UPDATE_SUBRESOURCE was never used. We were emulating it with UPDATE_GB_IMAGE but that's always been a stop-gap. Instead

Re: Peculiarity in vmwgfx_mob.c

2021-06-13 Thread Zack Rusin
33:53 +0200 353) vmw_bo_fence_single(bo, NULL); 2ef4fb92363c4 (Zack Rusin2021-03-22 13:04:11 -0400 354) ttm_bo_unpin(bo); 3530bdc35e99c (Thomas Hellstrom 2012-11-21 10:49:52 +0100 355) ttm_bo_unreserve(bo); 3530bdc35e99c (Thomas Hellstrom 2012-11-21 10:49:52 +0100 356

[PATCH 4/5] drm/vmwgfx: Fix a bad merge in otable batch takedown

2021-06-15 Thread Zack Rusin
the original change was removing. Fixed by removing the incorrect buffer unpin - it has already been unpinned two lines above. Fixes: 68a32ba14177 ("Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drive

[PATCH 5/5] drm/vmwgfx: Fix build issues in mksGuestStats discovered by the kernel test robot

2021-06-15 Thread Zack Rusin
From: Martin Krastev Fixes for ARCH i386 * printk format specifier warnings * inconsistent operand constraints in an ‘asm’ errors arm64 * not targeted by the commit being fixed Reviewed-by: Zack Rusin Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-

[PATCH 3/5] drm/vmwgfx: Fix a 64bit regression on svga3

2021-06-15 Thread Zack Rusin
Register accesses are always 4bytes, accidently this was changed to a void pointer whwqich badly breaks 64bit archs when running on top of svga3. Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev --- drivers/gpu/

[PATCH 1/5] MAINTAINERS: update vmwgfx info

2021-06-15 Thread Zack Rusin
Roland will be focusing on lavapipe over the next few months and won't have time for vmwgfx. vmwgfx is now maintained within drm-misc. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b

[PATCH 5/6] drm/vmwgfx: Add basic support for SVGA3

2021-05-05 Thread Zack Rusin
. v2: Fixes all the static analyzer warnings Signed-off-by: Zack Rusin Cc: Martin Krastev Reviewed-by: Roland Scheidegger --- .../gpu/drm/vmwgfx/device_include/svga_reg.h | 55 ++- drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 2

Re: [PATCH][V2][next] drm/vmwgfx: Fix memory allocation check and a leak of object fifo

2021-05-14 Thread Zack Rusin
On 5/14/21 10:49 AM, Colin King wrote: From: Colin Ian King The allocation of fifo is lacking an allocation failure check, so fix this by adding one. In the case where fifo->static_buffer fails to be allocated the error return path neglects to kfree the fifo object. Fix this by adding in the

Re: [PATCH -next] drm/vmwgfx: Fix return value check in vmw_setup_pci_resources()

2021-05-14 Thread Zack Rusin
On 5/14/21 4:28 AM, Qiheng Lin wrote: In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. After that, the error code -ENOMEM should be returned. Reported-by: Hulk Robot Signed-off-by:

Re: ttm_resource_manager::use_tt

2021-05-28 Thread Zack Rusin
On 5/22/21 3:13 AM, Christian König wrote: Hi Zack, IIRC that was for the VMW_PL_GMR type, wasn't it? As far as I have seen that backend was just giving out unique numbers and it looked questionable that we allocated pages for that. E.g. when you set that flag then for each allocation we

ttm_resource_manager::use_tt

2021-05-21 Thread Zack Rusin
Hi, Christian. I was just going over some old patches and I was just looking at your series introducing use_tt: https://patchwork.freedesktop.org/series/80078/ and the change https://patchwork.freedesktop.org/patch/382079/?series=80078=1 Do you happen to remember what was the worry behind the

Re: [PATCH] drm/vmwgfx: Convert to Linux IRQ interfaces

2021-07-06 Thread Zack Rusin
to struct drm_device.irq. Use irq value of struct pci_dev instead. Signed-off-by: Thomas Zimmermann Looks great. Thank you. Reviewed-by: Zack Rusin

Re: [PATCH v4 25/27] drm/vmwgfx: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Zack Rusin
immermann > Reviewed-by: Laurent Pinchart > Acked-by: Daniel Vetter Looks good. Reviewed-by: Zack Rusin

Re: [PATCH v1] fix vmwgfx compilation error due to a missing include

2021-07-09 Thread Zack Rusin
On 7/9/21 4:04 PM, Dave Airlie wrote: cc'ing Christian to fix this I assume it was ttm refactor? Yes, but it's on me because after fixing it I kept forgetting to queue it up for a merge. It's now in drm-misc/drm-misc-next-fixes. Thomas, if you could make sure your next drm-misc-next-fixes

Re: [PATCH -next] drm: vmwgfx: add header file for ttm_range_manager

2021-06-30 Thread Zack Rusin
ove available_caching") > Fixes: a343160235f5 ("drm/vmwgfx/ttm: fix the non-THP cleanup path.") > Signed-off-by: Randy Dunlap > Cc: "VMware Graphics" > Cc: Roland Scheidegger > Cc: Zack Rusin > Cc: dri-devel@lists.freedesktop.org > Cc: Dave

Re: [PATCH] drm/ttm: remove special handling for non GEM drivers

2021-04-22 Thread Zack Rusin
On 4/22/21 7:59 AM, Christian König wrote: Zack or Roland any objections to this? There shouldn't be any functional change. Sorry, that looks good. I wanted us to add gem support for a while now, this just adds more reasons to do it for next merge window. Reviewed-by: Zack Rusin

[PATCH 0/6] drm/vmwgfx: SVGA v3 and arm64 support

2021-05-04 Thread Zack Rusin
there. Thomas Hellstrom (2): drm/vmwgfx: Mark a surface gpu-dirty after the SVGA3dCmdDXGenMips command drm/vmwgfx: Fix cpu updates of coherent multisample surfaces Zack Rusin (4): drm/vmwgfx: Fix incorrect enum usage drm/vmwgfx: Remove the reservation semaphore drm/vmwgfx: Add basic support

[PATCH 3/6] drm/vmwgfx: Fix cpu updates of coherent multisample surfaces

2021-05-04 Thread Zack Rusin
Fixes: 9ca7d19ff8ba ("drm/vmwgfx: Add surface dirty-tracking callbacks") Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Roland Scheidegger Signed-off-by: Zack Rusin --- .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 8 ++-- drivers/gpu/

[PATCH 6/6] drm/vmwgfx: Port vmwgfx to arm64

2021-05-04 Thread Zack Rusin
-off-by: Zack Rusin Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/Kconfig| 3 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 31 ++- drivers/gpu/drm/vmwgfx

[PATCH 2/6] drm/vmwgfx: Mark a surface gpu-dirty after the SVGA3dCmdDXGenMips command

2021-05-04 Thread Zack Rusin
command has been submitted. This fixes the piglit getteximage-formats test run with SVGA_FORCE_COHERENT=1 Fixes: a9f58c456e9d ("drm/vmwgfx: Be more restrictive when dirtying resource") Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Roland Scheidegger Signed-of

[PATCH 4/6] drm/vmwgfx: Remove the reservation semaphore

2021-05-04 Thread Zack Rusin
-off-by: Zack Rusin Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/ttm_lock.c | 194 drivers/gpu/drm/vmwgfx/ttm_lock.h | 218 -- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c

[PATCH 1/6] drm/vmwgfx: Fix incorrect enum usage

2021-05-04 Thread Zack Rusin
incorrect. Lets use the correct enum when setting SVGA_REG_ENABLE. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx

[PATCH 5/6] drm/vmwgfx: Add basic support for SVGA3

2021-05-04 Thread Zack Rusin
. Signed-off-by: Zack Rusin Cc: Martin Krastev Reviewed-by: Roland Scheidegger --- .../gpu/drm/vmwgfx/device_include/svga_reg.h | 55 ++- drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c | 114 +++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 136 ++ drivers/gpu

Re: [PATCH] drm/ttm: fix error handling if no BO can be swapped out v4

2021-04-22 Thread Zack Rusin
; - int ret = -EBUSY; + int ret = 0; Looks good to me. Updating the comment above that function to note it returns either tge number of pages swapped out or an error might be a good idea because it's not obvious from the name. Reviewed-by: Zack Rusin

Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-08 Thread Zack Rusin
> On Feb 8, 2021, at 08:35, Christian König wrote: > > Hi Zack, > > ok we figured out how to do this correctly. > > Basically using the pdev->kobj instead of the drm->primary->kdev->kobj > pointer worked quite well. > > I've just send the latest patches to the mailing list. If you don't

Re: [Linux-graphics-maintainer] [PATCH 2/3] drm/ttm: move memory accounting into vmwgfx v3

2021-02-08 Thread Zack Rusin
> On Feb 8, 2021, at 15:23, Christian König wrote: > > Am 08.02.21 um 21:21 schrieb Zack Rusin: >>> On Feb 8, 2021, at 08:35, Christian König wrote: >>> >>> Hi Zack, >>> >>> ok we figured out how to do this correctly. >>> >&

[PATCH 1/2] drm/vmwgfx: Correctly set the name of the preferred mode

2021-02-09 Thread Zack Rusin
on). This allows one to quickly validate the modes set by the open-vm-tools. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/dr

[PATCH 2/2] drm/vmwgfx: Remove pointless code

2021-02-09 Thread Zack Rusin
There's no need to check for the presence of the hotplug property just to return because this is the end of the function so we're returning either way. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 1

Re: vmwgfx leaking bo pins?

2021-03-11 Thread Zack Rusin
> On Mar 11, 2021, at 05:46, Thomas Hellström (Intel) > wrote: > > Hi, > > I tried latest drm-fixes today and saw a lot of these: Fallout from ttm > rework? Yes, I fixed this in d1a73c641afd2617bd80bce8b71a096fc5b74b7e it was in drm-misc-next in the drm-misc tree for a while but hasn’t

Re: vmwgfx leaking bo pins?

2021-03-11 Thread Zack Rusin
> On Mar 11, 2021, at 17:35, Thomas Hellström (Intel) > wrote: > > Hi, Zack > > On 3/11/21 10:07 PM, Zack Rusin wrote: >>> On Mar 11, 2021, at 05:46, Thomas Hellström (Intel) >>> wrote: >>> >>> Hi, >>> >>>

Re: vmwgfx leaking bo pins?

2021-03-16 Thread Zack Rusin
On 3/15/21 6:35 PM, Thomas Hellström (Intel) wrote: On 3/15/21 9:38 PM, Daniel Vetter wrote: On Mon, Mar 15, 2021 at 6:57 PM Zack Rusin wrote: On 3/12/21 5:06 AM, Thomas Hellström (Intel) wrote: On 3/12/21 12:02 AM, Zack Rusin wrote: On Mar 11, 2021, at 17:35, Thomas Hellström (Intel

Re: [PATCH 1/2] locking/rwsem: Add down_write_interruptible

2021-03-09 Thread Zack Rusin
On 3/9/21 3:49 AM, Peter Zijlstra wrote: On Mon, Mar 08, 2021 at 03:54:55PM -0500, Zack Rusin wrote: Add an interruptible version of down_write. It's the other side of the already implemented down_read_interruptible. It allows drivers which used custom locking code to support interruptible rw

Re: [PATCH] drm/vmwgfx: Fix a typo

2021-03-21 Thread Zack Rusin
on my next series. Unless of course you want to push it through a different tree in which case: Reviewed-by: Zack Rusin z ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/vmwgfx: fix spinlock initialization in vmw_driver_load()

2021-03-21 Thread Zack Rusin
> On Mar 21, 2021, at 10:56, Tetsuo Handa > wrote: > > Since vmw_write() from vmw_detect_version() from vmw_driver_load() calls > spin_lock(_priv->hw_lock), spin_lock_init(_priv->hw_lock) has to > be called before vmw_detect_version() is called, or lockdep gets disabled. > > INFO: trying to

Re: vmwgfx leaking bo pins?

2021-03-15 Thread Zack Rusin
On 3/12/21 5:06 AM, Thomas Hellström (Intel) wrote: On 3/12/21 12:02 AM, Zack Rusin wrote: On Mar 11, 2021, at 17:35, Thomas Hellström (Intel) wrote: Hi, Zack On 3/11/21 10:07 PM, Zack Rusin wrote: On Mar 11, 2021, at 05:46, Thomas Hellström (Intel) wrote: Hi, I tried latest drm

Re: [RFC PATCH] drm/vkms: Add support for virtual hardware mode

2021-02-25 Thread Zack Rusin
On 2/25/21 4:09 AM, Daniel Vetter wrote: On Wed, Feb 24, 2021 at 11:55 AM Sumera Priyadarsini wrote: Add a virtual hardware or vblank-less mode as a module to enable VKMS to emulate virtual graphic drivers. This mode can be enabled by setting enable_virtual_hw=1 at the time of loading VKMS.

[PATCH] drm/vmwgfx: Bump the patch level version and cleanup logging

2021-02-24 Thread Zack Rusin
We should advertise the reworked fifo/cmd handling and huge pages support. Also while bumping the version number lets cleanup the logging, there's no point in logging whether we're atomic (we always are) or what repo we use (it's always in kernel now). Signed-off-by: Zack Rusin Reviewed

[PATCH 2/2] drm/vmwgfx: Remove custom locking code

2021-03-08 Thread Zack Rusin
vmwgfx used a custom locking code to support semantics of a interruptible rwsem. Now with down_(read|write)_interruptible implemented in the rwsem we can completely remove the custom locking code. It also allows us to remove the hacks we needed to support proper waits for write resources before

[PATCH 1/2] locking/rwsem: Add down_write_interruptible

2021-03-08 Thread Zack Rusin
Add an interruptible version of down_write. It's the other side of the already implemented down_read_interruptible. It allows drivers which used custom locking code to support interruptible rw semaphores to switch over to rwsem. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc:

[PATCH 0/2] locking/rwsem: Add down_write_interruptible and use it

2021-03-08 Thread Zack Rusin
Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Martin Krastev Cc: Roland Scheidegger Cc: linux-ker...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Zack Rusin (2): locking/rwsem: Add down_write_interruptible drm/vmwgfx: Remove custom locking code drivers/gpu/drm/vmwgfx/Makefile

Re: [patch 2/7] drm/vmgfx: Replace kmap_atomic()

2021-03-04 Thread Zack Rusin
usage with the given pgprot. > > Remove the NULL pointer check for the map. These functions return a valid > address for valid pages and the return was bogus anyway as it would have > left preemption and pagefaults disabled. > > Signed-off-by: Thomas Gleixner > Cc: VMware Grap

[PATCH 1/2] drm/vmwgfx: Fix the lockdep breakage

2021-04-08 Thread Zack Rusin
Krastev Reviewed-by: Roland Scheidegger Cc: Tetsuo Handa Cc: dri-devel@lists.freedesktop.org Signed-off-by: Zack Rusin Fixes: 8772c0bb58bbf98a ("drm/vmwgfx: Cleanup pci resource allocation") --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 17 - drivers/gpu/drm/vmwgfx/vmwgfx_

[PATCH 2/2] drm/vmwgfx: Make sure unpinning handles reservations

2021-04-08 Thread Zack Rusin
dri-devel@lists.freedesktop.org Signed-off-by: Zack Rusin --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 17 - drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 8 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vm

  1   2   3   4   5   6   >