Re: [PATCH v3 02/18] drm: Add a new helper to validate damage during atomic_check

2018-10-15 Thread Sinclair Yeh
On Wed, Oct 10, 2018 at 05:16:41PM -0700, Deepak Rawat wrote: > This helper function makes sure that damage from plane state is > discarded for full modeset cycle. For some reason, which makes damage > irrelevant, driver might want to do a full plane update for e.g. full > modeset. Such cases must

Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv'

2018-10-05 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Fri, Oct 05, 2018 at 11:36:58AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/vmwgfx/vmwgfx_fence.c: In function > 'vmw_event_fence_action_seq_passed': > drivers/gpu/drm/vm

Re: [PATCH][drm-next] drm/vmwgfx: remove redundant return ret statement

2018-10-04 Thread Sinclair Yeh
Good catch. Reviewed-by: Sinclair Yeh On Thu, Oct 04, 2018 at 06:49:53PM +0100, Colin King wrote: > From: Colin Ian King > > The return statement is redundant as there is a return statement > immediately before it so we have dead code that can be removed. > Also remove the unu

Re: [PATCH v3 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-07 Thread Sinclair Yeh
On Tue, Aug 07, 2018 at 09:03:27AM +0100, Alexandru-Cosmin Gheorghe wrote: > Hi Sinclair, > > Is it ok if I merge this patch through drm-misc-next ? Sure. Thanks for handling this. Sinclair > Thank you, > Alex Gheorghe > > On Mon, Aug 06, 2018 at 09:57:53AM -070

Re: [PATCH v3 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-06 Thread Sinclair Yeh
Acked-by: Sinclair Yeh On Sat, Aug 04, 2018 at 05:15:30PM +0100, Alexandru Gheorghe wrote: > A new helper function(__drm_atomic_helper_plane_reset) has been added > for linking a plane with its state and resetting the core > properties(alpha, rotation, etc.) to their default values. &

Re: [PATCH 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-23 Thread Sinclair Yeh
Hello Alex, other than adding a brief commit message to this patch, Reviewed-by: Sinclair Yeh On Fri, Jul 20, 2018 at 10:15:09PM +0100, Alexandru Gheorghe wrote: > Signed-off-by: Alexandru Gheorghe > --- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 +--- > 1 file changed, 1 ins

Re: [PATCH] drm/ttm: use swap macro in ttm_bo_handle_move_mem

2018-07-13 Thread Sinclair Yeh
On Fri, Jul 13, 2018 at 08:41:37AM +0200, Christian König wrote: > Am 13.07.2018 um 04:37 schrieb Sinclair Yeh: > >On Mon, Jul 09, 2018 at 10:24:47AM -0500, Gustavo A. R. Silva wrote: > >>Make use of the swap macro and remove unnecessary variable *tmp_mem*. > >>This ma

Re: [PATCH] drm/ttm: use swap macro in ttm_bo_handle_move_mem

2018-07-12 Thread Sinclair Yeh
On Mon, Jul 09, 2018 at 10:24:47AM -0500, Gustavo A. R. Silva wrote: > Make use of the swap macro and remove unnecessary variable *tmp_mem*. > This makes the code easier to read and maintain. Also, reduces the > stack usage. > > This code was detected with the help of Coccinelle. > > Signed-off-b

Re: [PATCH 10/10] drm/vmwgfx: Use drm_plane_mask() & co.

2018-07-02 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh I assume you'll upstream this as part of your series? On Tue, Jun 26, 2018 at 10:47:16PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Use drm_{plane,connector}_mask() where appropriate. > > Cc: VMware Graphics > Cc: Sinclair Yeh

Re: [PATCH v2 02/13] drm/vmwgfx: Stop using plane->fb in vmw_kms_helper_dirty()

2018-06-04 Thread Sinclair Yeh
this branch > > of the function. All other callers use drm_modeset_lock_all() somewhere > > higher up, which means accessing plane->state is safe. We'll toss in > > a lockdep assert to catch wrongdoers. > > > > v2: Drop the comment and make the code do what

Re: [PATCH v2 00/13] drm: Eliminate plane->fb/crtc usage for atomic drivers

2018-05-30 Thread Sinclair Yeh
Thanks Ville. This series: Reviewed-by: Sinclair Yeh On Fri, May 25, 2018 at 09:50:32PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Here are again the last (?) bits of eliminating the plane->fb/crtc > usage for atomic drivers. I've pushed everything else (than

Re: [RFC 2/3] drm: Add helper iterator functions to iterate over plane damage.

2018-04-05 Thread Sinclair Yeh
On Wed, Apr 04, 2018 at 04:49:07PM -0700, Deepak Rawat wrote: > With damage property in drm_plane_state, this patch adds helper iterator > to traverse the damage clips. Iterator will return the damage rectangles > in framebuffer, plane or crtc coordinates as need by driver > implementation. > > Si

Re: [Outreachy kernel] [PATCH DRM] drm: Introduce drm_global_item_{get/put}()

2018-03-20 Thread Sinclair Yeh
LGTM thanks! Sinclair On Mon, Mar 19, 2018 at 10:06:20PM +0100, Daniel Vetter wrote: > On Tue, Mar 13, 2018 at 1:02 PM, Haneen Mohammed > wrote: > > For consistency with other reference counting APIs in the kernel, > > introduce drm_global_item_{get/put} functions instead of > > drm_global_ite

Re: [PATCH] drm/vmwgfx: Use kasprintf

2018-03-12 Thread Sinclair Yeh
Thanks! Reviewed-by: Sinclair Yeh On Wed, Mar 07, 2018 at 11:33:22PM +0530, Himanshu Jha wrote: > Use kasprintf instead of combination of kmalloc and sprintf. Also, > remove the local variables used for storing the string length as they > are not required now. > > Signed-off-b

Re: [PATCH DRM] drm/vmwgfx: replace drm_*_unreference with drm_*_put

2018-03-12 Thread Sinclair Yeh
Hi Daniel, On Mon, Mar 12, 2018 at 06:34:43PM +0100, Daniel Vetter wrote: > On Sun, Mar 11, 2018 at 05:33:13PM -0600, Haneen Mohammed wrote: > > This patch replace instances of drm_framebuffer_unreference with _put() > > suffix, because it is shorter and consistent with the kernel use of > > *_ge

Re: [PATCH 2/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc

2018-01-24 Thread Sinclair Yeh
Hi, Sorry, I've been on a leave. Catching up on emails. In case this is still not yet merged, my comment is be consist with the new variable name. In some cases it's "ttm_opt_ctx", in others it's "ctx". I prefer ttm_opt_ctx because it's more descriptive. And yes, some description on why this

Re: [PATCH 5/5] drm: Don't pass clip to drm_atomic_helper_check_plane_state()

2018-01-24 Thread Sinclair Yeh
vmwgfx part: Reviewed-by: Sinclair Yeh On Tue, Jan 23, 2018 at 07:08:57PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Move the plane clip rectangle handling into > drm_atomic_helper_check_plane_state(). Drivers no longer > have to worry about such mundane details. &

Re: [PATCH v.2] 4.15 vmgfx boot warning

2017-12-19 Thread Sinclair Yeh
This looks okay to me. On Mon, Dec 18, 2017 at 07:26:03PM -0500, Woody Suwalski wrote: > The 4.15 drm_atomic_helper driver shows a warning during boot (both 32 and > 64 bit x86) > It is caused by a mismatch between the result of vmw_enable_vblank() and > what the drm_atomic_helper expects: >    /.

Re: [PATCH] 4.15 vmgfx boot warning

2017-12-13 Thread Sinclair Yeh
Hi Woody, On Wed, Nov 22, 2017 at 04:05:50PM -0500, Woody Suwalski wrote: > The 4.15 vmwgfx driver shows a warning during boot (32 bit x86) > It is caused by a mismatch between the result of vmw_enable_vblank() and > what the drm_atomic_helper expects: >    /... >    ret = drm_crtc_vblank_get(crtc

Re: [PATCH] vmwgfx: use monotonic event timestamps

2017-12-13 Thread Sinclair Yeh
This looks okay to me. Although we should change eaction->tv_* type to 64-bit as well. I'll roll this in to our next pull request. thanks, Sinclair On Mon, Nov 27, 2017 at 12:16:19PM +0100, Arnd Bergmann wrote: > DRM_VMW_EVENT_FENCE_SIGNALED (struct drm_vmw_event_fence) and > DRM_EVENT_VBLANK

Re: [PATCH 13/15] drm/vmwgfx: Use drm_mode_get_hv_timing() to populate plane clip rectangle

2017-11-27 Thread Sinclair Yeh
This looks okay to me. Reviewed-by: Sinclair Yeh On Thu, Nov 23, 2017 at 09:05:00PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. > > Note that this replaces crtc_state->adjusted_mode usage with

Re: [PATCH 0/5] drm: drm_plane_helper_check_state() related stuff

2017-11-20 Thread Sinclair Yeh
On Mon, Nov 20, 2017 at 08:34:50AM +0100, Daniel Vetter wrote: > On Fri, Nov 10, 2017 at 11:42:59PM +0200, Ville Syrjälä wrote: > > On Fri, Nov 10, 2017 at 01:26:47PM -0800, Sinclair Yeh wrote: > > > Sorry this took so long. > > > > No worries. > > > &

Re: [PATCH 0/5] drm: drm_plane_helper_check_state() related stuff

2017-11-10 Thread Sinclair Yeh
Sorry this took so long. The vmwgfx part: Reviewed-by: Sinclair Yeh I've done some testing and the vmwgfx part looks good. Has Daniel already taken these or should I put them in my next request? Sinclair On Wed, Nov 01, 2017 at 08:29:15PM +0200, Ville Syrjala wrote: > From: Ville

[Git PULL] vmwgfx-fixes

2017-11-03 Thread Sinclair Yeh
drm-vmwgfx-fixes for you to fetch changes up to cef75036c40408ba3bc308bcb00a3d440da713fc: drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue (2017-11-01 10:56:53 -0700) Arvind Yadav (1): drm/vmwgfx: constify vmw_fence_ops

Re: [PATCH] drm: vmwgfx: constify vmw_fence_ops

2017-08-30 Thread Sinclair Yeh
On Wed, Aug 30, 2017 at 10:30:24AM +0200, Daniel Vetter wrote: > On Wed, Aug 30, 2017 at 08:21:46AM +0200, Thomas Hellstrom wrote: > > On 08/30/2017 07:47 AM, Arvind Yadav wrote: > > > vmw_fence_ops are not supposed to change at runtime. Functions > > > "dma_fence_init" working with const vmw_fenc

[Git PULL] vmwgfx-fixes

2017-08-29 Thread Sinclair Yeh
021aba761f2a6c12158afb9993524c300c01fae2: drm/vmwgfx: Fix F26 Wayland screen update issue (2017-08-29 23:19:03 +0200) Sinclair Yeh (1): drm/vmwgfx: Fix F26 Wayland screen update issue drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 26

[Git PULL] vmwgfx-next

2017-08-28 Thread Sinclair Yeh
drm-vmwgfx-next for you to fetch changes up to d78acfe934e3b9f533f72ee3dde0982935fc2b32: drm/vmwgfx: Bump the version for fence FD support (2017-08-28 17:53:32 +0200) ---- Sinclair Yeh (4): drm/vmwgfx: Prepare to support fence fd

Re: [Git PULL] vmwgfx-next

2017-08-28 Thread Sinclair Yeh
On Tue, Aug 29, 2017 at 06:35:38AM +1000, Dave Airlie wrote: > On 29 August 2017 at 06:22, Sinclair Yeh wrote: > > Hi Dave, > > > > The following changes since commit 7c0059dd832cc686bf0febefdcf8295cdd93007f: > > Just a reminder, -next branches need to be sent befor

[PATCH 5/9] drm/vmwgfx: Prepare to support fence fd

2017-08-09 Thread Sinclair Yeh
Make the fields and flags available. Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 5 - include/uapi/drm/vmwgfx_drm.h | 11 --- 2 files changed, 8 insertions(+), 8 deletions

[PATCH 9/9] drm/vmwgfx: fix comment mistake for vmw_cmd_dx_set_index_buffer()

2017-08-09 Thread Sinclair Yeh
From: Brian Paul Fix comment mistake Signed-off-by: Brian Paul Reviewed-by: Neha Bhende --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 3cd4

[PATCH 7/9] drm/vmwgfx: Add export fence to file descriptor support

2017-08-09 Thread Sinclair Yeh
Added code to link a fence to a out_fence_fd file descriptor and thread out_fence_fd down to vmw_execbuf_copy_fence_user() so it can be copied into the IOCTL reply and be passed back up the the user. v2: Make sure to sync and clean up in case of failure Signed-off-by: Sinclair Yeh Reviewed-by

[PATCH 1/9] drm/vmwgfx: Move irq bottom half processing to threads

2017-08-09 Thread Sinclair Yeh
potential to increase latency for processes that wait on the GPU. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 58 ++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c| 1 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.h| 21

[PATCH 8/9] drm/vmwgfx: Bump the version for fence FD support

2017-08-09 Thread Sinclair Yeh
Minor version bump to indicate support for fence FD Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b

[PATCH 4/9] drm/vmwgfx: Fix incorrect command header offset at restart

2017-08-09 Thread Sinclair Yeh
From: Thomas Hellstrom Sometimes it appears like the device modifies the command header offset member. So explicitly clear it when restarting after an error. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 1 + 1 file changed, 1

[PATCH 6/9] drm/vmwgfx: Add support for imported Fence File Descriptor

2017-08-09 Thread Sinclair Yeh
This allows vmwgfx to wait on a fence created by another device. v2: * Remove special handling for vmwgfx fence and just use dma_fence_wait() * Use interruptible waits * Added function documentation Signed-off-by: Sinclair Yeh Reviewed-by: Deepak Singh Rawat Reviewed-by: Thomas Hellstrom

[PATCH 3/9] drm/vmwgfx: Support the NOP_ERROR command

2017-08-09 Thread Sinclair Yeh
random malformed command so this should be considered safe. At least as safe as it gets. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx

[PATCH 2/9] drm/vmwgfx: Restart command buffers after errors

2017-08-09 Thread Sinclair Yeh
ran the piglit "quick" test suite which generates a couple of device errors and verified that they were handled as intended. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbu

[PATCH 0/9] Queued patches for vmwgfx-next

2017-08-09 Thread Sinclair Yeh
These, along with "drm: Support drivers with threaded irqs", are queued for the next vmwgfx-next pull request. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm: Support drivers with threaded irqs

2017-08-09 Thread Sinclair Yeh
From: Thomas Hellstrom See LWN article at https://lwn.net/Articles/302043/ Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Singh Rawat Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/drm_irq.c | 6 -- include/drm/drm_drv.h | 1 + 2 files changed, 5 insertions(+), 2 deletions

[git pull] vmwgfx-fixes

2017-07-21 Thread Sinclair Yeh
drm/vmwgfx: Fix NULL pointer comparison Sinclair Yeh (3): drm/vmwgfx: Limit max desktop dimensions to 8Kx8K drm/vmwgfx: Fix cursor hotspot issue with Wayland on Fedora drm/vmwgfx: Fix gcc-7.1.1 warning Souptick Joarder (1): drm/vmwgfx: Use dma_pool_zalloc drivers/gpu/drm/vm

Re: [PATCH 2/5] drm: vmwgfx: constify pci_device_id.

2017-07-18 Thread Sinclair Yeh
Thanks. Queued. On Sat, Jul 15, 2017 at 12:44:53PM +0530, Arvind Yadav wrote: > pci_device_id are not supposed to change at runtime. All functions > working with pci_device_id provided by work with > const pci_device_id. So mark the non-const structs as const. > > File size before: >text

Re: [PATCH, RESEND 03/14] drm/vmwgfx: avoid gcc-7 parentheses warning

2017-07-17 Thread Sinclair Yeh
On Fri, Jul 14, 2017 at 10:28:29PM +0200, Arnd Bergmann wrote: > On Fri, Jul 14, 2017 at 9:23 PM, Linus Torvalds > wrote: > > On Fri, Jul 14, 2017 at 12:21 PM, Linus Torvalds > > wrote: > >> > >> NAK. This takes unintentionally insane code and turns it intentionally > >> insane. Any non-zero retu

Re: [Intel-gfx] [PATCH 05/16] drm/vmwgfx: Make check_modeset() use the new atomic iterator macros.

2017-07-12 Thread Sinclair Yeh
s about > > to be removed. > > > > Signed-off-by: Maarten Lankhorst > > Cc: VMware Graphics > > Cc: Sinclair Yeh > > Cc: Thomas Hellstrom > > --- > > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) &

Re: [PATCH 05/16] drm/vmwgfx: Make check_modeset() use the new atomic iterator macros.

2017-07-12 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Wed, Jul 12, 2017 at 10:13:33AM +0200, Maarten Lankhorst wrote: > I don't think the checking of resources in this function is very > atomic-like, but it should definitely not use a macro that's about > to be removed. > > Signed-off-by

Re: [PATCH] drm: ttm: vmwgfx: dma-buf: Constify ttm_place structures.

2017-07-04 Thread Sinclair Yeh
Looks good. Thanks. I've queued this for my next pull request. On Sun, Jul 02, 2017 at 01:26:55PM +0530, Arvind Yadav wrote: > ttm_place are not supposed to change at runtime. All functions > working with ttm_place provided by work > with const ttm_place. So mark the non-const structs as const.

Re: [PATCH 1/2] drm/vmwgfx: Drop drm_vblank_cleanup

2017-07-03 Thread Sinclair Yeh
Thanks! Minor typo "dsiplay", otherwise: Reviewed-by: Sinclair Yeh On Mon, Jun 26, 2017 at 06:19:48PM +0200, Daniel Vetter wrote: > Again stopping the vblank before uninstalling the irq handler is kinda > the wrong way round, but the fb_off stuff should take care of > disab

Re: [PATCH 35/37] drm/vmwgfx: Drop drm_vblank_cleanup

2017-06-02 Thread Sinclair Yeh
disabling the dsiplay at least in most cases. So drop the typo ^ > drm_vblank_cleanup code since it's not really doing anything, it looks > all cargo-culted. > > v2: Appease gcc better. > > Cc: Sinclair Yeh > Cc: Thomas Hellstrom > Signed-off-by: Dan

Re: [PATCH] drm/vmwgfx: fix spelling mistake "exeeds" -> "exceeds"

2017-05-30 Thread Sinclair Yeh
Thanks. Reviewed and queued. On Sat, May 27, 2017 at 07:52:30PM +0100, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistake in DRM_ERROR error message. > > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- > 1 file changed, 1 insert

Re: [PATCH v3] drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI

2017-05-18 Thread Sinclair Yeh
vmwgfx part: Reviewed-by: Sinclair Yeh On Wed, May 17, 2017 at 09:39:11PM -0400, Robert Foss wrote: > Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI > as a convenience. > > Ideally the DRM_ROTATE_ and DRM_REFLECT_ property ids are looked up > through the

Re: [Linux-graphics-maintainer] No mouse cursor since 36cc79bc9077319c04bd3b132edcacaa9a0d9f2b

2017-05-10 Thread Sinclair Yeh
Hi, On Wed, May 10, 2017 at 12:31:39PM +0200, m...@ox.io wrote: > > > Thomas Hellstrom hat am 10. Mai 2017 um 10:35 geschrieben: > > > > Hi, > > > > Thanks for reporting. > > I would have reported earlier if it had not taken 3 days on the vm to bisect. > > > I think there is a fix for this ei

Re: [PATCH] drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()

2017-05-01 Thread Sinclair Yeh
Thanks Dan! Reviewed-by: Sinclair Yeh On Thu, Apr 27, 2017 at 12:12:08PM +0300, Dan Carpenter wrote: > If vmalloc() fails then we need to a bit of cleanup before returning. > > Fixes: fb1d9738ca05 ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU") > Signed-off-by: Da

[git pull] vmwgfx-next

2017-04-21 Thread Sinclair Yeh
Hi Dave, The following changes since commit 6b1462700b4a6a1244c018cdd2fa97ded43090a0: Merge tag 'drm-misc-next-fixes-2017-04-20' of git://anongit.freedesktop.org/git/drm-misc into drm-next (2017-04-21 13:51:59 +1000) are available in the git repository at: git://people.freedesktop.org/~sy

Re: [PATCH v2] kernel: drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()

2017-04-19 Thread Sinclair Yeh
Thanks Vladis! Reviewed-by: Sinclair Yeh On Thu, Apr 06, 2017 at 02:33:40PM +0200, Vladis Dronov wrote: > The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is > a user-controlled 'uint32_t' value which is used as a loop count limit. > This can lead

Re: [PATCH] dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro

2017-04-19 Thread Sinclair Yeh
Minor nits, otherwise the vmwgfx part, Reviewed-by: Sinclair Yeh On Tue, Apr 18, 2017 at 06:17:00PM -0600, Logan Gunthorpe wrote: > Seeing the kunmap_atomic dma_buf_op shares the same name with a macro s^ > in higmem.h, the former can be aliased if a

Re: [PATCH 18/19] drm: Add acquire ctx parameter to ->set_config

2017-04-03 Thread Sinclair Yeh
I missed this one, and looks like it's already in. So a belated: Reviewed-by: Sinclair Yeh for the vmwgfx part On Wed, Mar 22, 2017 at 10:50:57PM +0100, Daniel Vetter wrote: > Surprisingly a lot of legacy drivers roll their own, for > runtime pm and because vmwgfx. > > Al

Re: [git pull] vmwgfx-next

2017-04-03 Thread Sinclair Yeh
On Sun, Apr 02, 2017 at 08:11:12PM +0200, Daniel Vetter wrote: > On Fri, Mar 31, 2017 at 04:32:55PM -0700, Sinclair Yeh wrote: > > Hi Dave, > > > > This series enables atomic mode set for vmwgfx. A number of features and > > larger fixes are also included. > >

Re: [PATCH 12/15] drm: Add acquire ctx to ->gamma_set hook

2017-04-03 Thread Sinclair Yeh
vmwgfx part: Reviewed-by: Sinclair Yeh On Mon, Apr 03, 2017 at 10:33:01AM +0200, Daniel Vetter wrote: > Atomic helpers really want this instead of the hacked-up legacy > backoff trick, which unfortunately prevents drivers from using their > own private drm_modeset_locks. > > A

Re: linux-next: build failure after merge of the drm-misc tree

2017-04-03 Thread Sinclair Yeh
Thanks for this. This and "drm/vmwgfx: merge fixup for set_config API change": Reviewed-by: Sinclair Yeh On Mon, Apr 03, 2017 at 01:31:29PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the drm-misc tree, today's linux-next build (x86_64 > all

Re: [PATCH 4/9] drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro"

2017-04-03 Thread Sinclair Yeh
On Sun, Apr 02, 2017 at 08:54:14AM +0200, Øyvind A. Holm wrote: > On 2017-03-27 15:17:54, Sinclair Yeh wrote: > > From: Øyvind A. Holm > > > > This reverts commit 2d8e60e8b074 ("drm/vmwgfx: Replace numeric > > parameter like 0444 with macro") > > [...]

[git pull] vmwgfx-next

2017-03-31 Thread Sinclair Yeh
:20 -0700) ---- Sinclair Yeh (18): drm/vmwgfx: Removed unused snooper.crtc field drm/vmwgfx: Add universal plane support drm/vmwgfx: CRTC atomic state drm/vmwgfx: Plane atomic state drm/vmwgfx: Connector atomic state

Re: [PATCH] kernel: drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl()

2017-03-31 Thread Sinclair Yeh
Hi Vladis, On Thu, Mar 30, 2017 at 12:27:12PM +0200, Vladis Dronov wrote: > The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is > a user-controlled 'uint32_t' value which is used as a loop count limit. > This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'. >

Re: [PATCH 10/11] drm/vmwgfx: Switch over to internal atomic API for STDU

2017-03-29 Thread Sinclair Yeh
Hi Daniel, On Tue, Mar 28, 2017 at 09:49:38AM +0200, Daniel Vetter wrote: > On Mon, Mar 27, 2017 at 03:01:03PM -0700, Sinclair Yeh wrote: > > Switch over to using internal atomic API for mode set. > > > > This removes the legacy set_config API, replacing it with > > d

[PATCH 8/9] drm/vmwgfx: Support topology greater than texture size

2017-03-27 Thread Sinclair Yeh
tions with more than one 4K monitor. To get past this limitation, we will now allow using a large DMA buf as the framebuffer, and take care of blitting contents from this DMA buf to the display buffer. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_

[PATCH 9/9] drm/vmwgfx: Properly check display/scanout surface size

2017-03-27 Thread Sinclair Yeh
The scanout surface size is the smaller of max texture size and max STDU size. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c| 16 +++- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c

[PATCH 6/9] drm/vmwgfx: Re-implement the stream resource as a simple resource.

2017-03-27 Thread Sinclair Yeh
From: Thomas Hellstrom Provide and document a reference implementation. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 254 --- drivers/gpu/drm/vmwgfx

[PATCH 4/9] drm/vmwgfx: Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro"

2017-03-27 Thread Sinclair Yeh
ed FB bpp") that added another call to module_param_named() where the permissions are written as 0600. Signed-off-by: Øyvind A. Holm Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/dr

[PATCH 5/9] drm/vmwgfx: Introduce a simple resource type

2017-03-27 Thread Sinclair Yeh
From: Thomas Hellstrom The callbacks we need to provide to many resources are very similar, so provide a simple resource type with a number of helpers for these callbacks. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/Makefile | 3

[PATCH 7/9] drm/vmwgfx: Define an overlaid handle_close ioctl.

2017-03-27 Thread Sinclair Yeh
From: Thomas Hellstrom Instead of providing an ioctl for each handle type, provide a single handle_close ioctl, and reuse the UNREF_DMABUF ioctl. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- include/uapi/drm/vmwgfx_drm.h | 24 1 file changed, 24

[PATCH 3/9] drm/vmwgfx: Fix LDU X blank screen until mode change issue

2017-03-27 Thread Sinclair Yeh
vmw_ldu_crtc_helper_commit() is not called if drm_atomic_crtc_needs_modeset() decides nothing related to CRTC timing has changed. So a better place for this code is in vmw_ldu_primary_plane_atomic_update() since we will need to update ld->fb every time the FB is updated. Signed-off-by: Sincl

[0/9] Collection of patches queued up for vmwgfx-next

2017-03-27 Thread Sinclair Yeh
These are a collection of patches currently queued for vmwgfx-next ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 2/9] drm/vmwgfx: Skipping fbdev fb pinning for ldu

2017-03-27 Thread Sinclair Yeh
ff-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index 7d3d5e3..09e120d 100644 --- a/drivers/gp

[PATCH 1/9] drm/vmwgfx: Explicityly track screen target width and height

2017-03-27 Thread Sinclair Yeh
We can no longer make the assumption that vmw_stdu_update_st() will be called when there's a valid display surface attached. So instead of using display_srf for width and height, make a record of these paremeters when the screen target is first defined. Signed-off-by: Sinclair Yeh Review

[PATCH 11/11] drm/vmwgfx: Switch over to internal atomic API for SOU and LDU

2017-03-27 Thread Sinclair Yeh
Switch over to internal atomic API. This completes the atomic internal atomic switch for all the Display Units. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 103 ++--- drivers/gpu/drm/vmwgfx

[PATCH 10/11] drm/vmwgfx: Switch over to internal atomic API for STDU

2017-03-27 Thread Sinclair Yeh
xorg driver bug Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 20 +++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 325 --- 3 files

[PATCH 07/11] drm/vmwgfx: Add and connect connector helper function

2017-03-27 Thread Sinclair Yeh
Since the link between connector and encoder is always fixed in our case, just return the one encoder. These helpers won't be called until we flip on the atomic support flag or set drm_crtc_funcs->set_config to using the atomic helper. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas H

[PATCH 08/11] drm/vmwgfx: Add and connect atomic state object check/commit

2017-03-27 Thread Sinclair Yeh
This connects the main state object check and commit function. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 66 + 1 file changed, 66 insertions(+) diff --git a/drivers

[PATCH 09/11] drm/vmwgfx: Fixes to vmwgfx_fb

2017-03-27 Thread Sinclair Yeh
1. When unsetting a mode, num_connector should be set to zero 2. The pixel_format field needs to be initialized as newer DRM internal functions checks this field 3. Take the drm_modeset_lock_all() because vmw_fb_kms_detach() can change current mode Signed-off-by: Sinclair Yeh Reviewed

[PATCH 05/11] drm/vmwgfx: Add and connect CRTC helper functions

2017-03-27 Thread Sinclair Yeh
g. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 48 ++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 9 +++ drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 79 +++ drivers/gpu/drm/vmwgfx

[PATCH 06/11] drm/vmwgfx: Add and connect plane helper functions

2017-03-27 Thread Sinclair Yeh
pinning of cursor surface * Added a few function headers v3: * Set clip region equal to the destination region * Fixed surface pinning policy * Enable SVGA mode in vmw_sou_primary_plane_prepare_fb Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Reviewed-by: Thomas Hellstrom --- dri

[PATCH 03/11] drm/vmwgfx: Plane atomic state

2017-03-27 Thread Sinclair Yeh
Add plane state handling functions. We have to keep track of a few plane states so we cannot use the DRM helper for this. Created vmw_plane_state along with functions to reset, duplicate, and destroty it. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx

[PATCH 04/11] drm/vmwgfx: Connector atomic state

2017-03-27 Thread Sinclair Yeh
Add connector handling functions. Start tracking is_implicity in the connector state. Eventually, this field should be tracked exclusively in a connector state. Now that plane and connector states have been created, we can also activate the code that use CRTC state. Signed-off-by: Sinclair Yeh

[PATCH 00/11] Enable Atomic Mode Set on vmwgfx

2017-03-27 Thread Sinclair Yeh
This series enables atomic mode set on vmwgfx. Developed in collaboration with Thomas Hellstrom and the VMWare Graphics Team. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 02/11] drm/vmwgfx: CRTC atomic state

2017-03-27 Thread Sinclair Yeh
also in place. This is the first of a series to enable atomic mode set for vmwgfx. The atomic enabling effort was done in collaboration with Thomas Hellstrom and the VMware Graphics Team. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 81

[PATCH 01/11] drm/vmwgfx: Add universal plane support

2017-03-27 Thread Sinclair Yeh
Universal support is prerequisite for atomic mode set. Explicitly create planes for the cursor and the primary FB. With a functional cursor plane, the DRM will no longer use the legacy cursor_set2 and cursor_move entry points. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom

Re: [PATCH] drm/vmwgfx: Check check that number of mip levels is above zero in vmw_surface_define_ioctl()

2017-03-24 Thread Sinclair Yeh
Hi, thank you for this patch. Murray McAllister reported this one a couple of months ago, and this is already in our queue. Sinclair On Fri, Mar 24, 2017 at 04:37:10PM +0100, Vladis Dronov wrote: > In vmw_surface_define_ioctl(), a num_sizes parameter is assigned a > user-controlled value which

Re: [PATCH 3/3] gpu: drm: drivers: Convert printk(KERN_ to pr_

2017-02-28 Thread Sinclair Yeh
For drm/vmwgfx: Acked-by: Sinclair Yeh On Tue, Feb 28, 2017 at 04:55:54AM -0800, Joe Perches wrote: > Use a more common logging style. > > Miscellanea: > > o Coalesce formats and realign arguments > o Neaten a few macros now using pr_ > > Signed-off-by: Joe Perches

Re: [PATCH v2] Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro"

2017-02-24 Thread Sinclair Yeh
On Fri, Feb 24, 2017 at 11:06:03AM -0800, Sinclair Yeh wrote: > Hi Oyvind, > > Thanks for looking at this. > > At this moment, I don't really see a benefit one way or anther, so > I am going to stick with the macro version for now, changing the one > remaining module_p

Re: [PATCH v2] Revert "drm/vmwgfx: Replace numeric parameter like 0444 with macro"

2017-02-24 Thread Sinclair Yeh
Hi Oyvind, Thanks for looking at this. At this moment, I don't really see a benefit one way or anther, so I am going to stick with the macro version for now, changing the one remaining module_param_named() you mentioned to using the macros to keep things consistent. If one day we have a paramter

Re: [PATCH] drm/vmwgfx: Work around drm removal of control nodes

2017-02-21 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Tue, Feb 21, 2017 at 05:42:27PM +0700, Thomas Hellstrom wrote: > vmware tools has a daemon that gets layout information from the GUI and > forwards it to DRM so that the modesetting code can set preferred connector > locations and modes. This daemon

Re: [Intel-gfx] [PATCH v3 4/4] drm: Resurrect atomic rmfb code, v3

2017-02-15 Thread Sinclair Yeh
On Wed, Feb 15, 2017 at 03:56:09PM +0200, Jani Nikula wrote: > On Wed, 25 Jan 2017, Maarten Lankhorst > wrote: > > This was somehow lost between v3 and the merged version in Maarten's > > patch merged as: > > > > commit f2d580b9a8149735cbc4b59c4a8df60173658140 > > Author: Maarten Lankhorst > > D

Re: [PATCH 4/4] drm: Resurrect atomic rmfb code, v2

2017-02-09 Thread Sinclair Yeh
Sent: Thursday, February 9, 2017 4:29:49 AM To: Sinclair Yeh Cc: Thomas Hellstrom; Daniel Vetter; Matt Roper; Daniel Vetter; intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Daniel Vetter Subject: Re: [PATCH 4/4] drm: Resurrect atomic rmfb code, v2 Op 26-01-17 om 19:39 schreef Sinclai

Re: [PATCH v4 1/2] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2017-02-02 Thread Sinclair Yeh
vmwgfx part: Reviewed-by: Sinclair Yeh On Thu, Feb 02, 2017 at 11:44:33AM +, Chris Wilson wrote: > The drm_mm range manager claimed to support top-down insertion, but it > was neither searching for the top-most hole that could fit the > allocation request nor fitting the request to

[git pull] vmwgfx-next

2017-01-30 Thread Sinclair Yeh
-0800) Shyam Saini (1): drm/vmwgfx: Use kmemdup instead of kmalloc and memcpy Sinclair Yeh (1): drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format Thomas Hellstrom (4): drm/vmwgfx: Clear uninitialized fields of a parameter drm/vmwgfx: Annotate ignored r

Re: [PATCH 4/4] drm: Resurrect atomic rmfb code, v2

2017-01-26 Thread Sinclair Yeh
On Thu, Jan 26, 2017 at 10:55:51AM +0100, Maarten Lankhorst wrote: > Op 25-01-17 om 19:05 schreef Sinclair Yeh: > > On Wed, Jan 25, 2017 at 09:36:36AM +0100, Maarten Lankhorst wrote: > >> Op 25-01-17 om 09:09 schreef Thomas Hellstrom: > >>> On 01/25/2017 05:54 AM,

Re: [PATCH] drm/ttm: Make sure BOs being swapped out are cacheable

2017-01-25 Thread Sinclair Yeh
> > >>Cc: sta...@vger.kernel.org > >>Signed-off-by: Michel Dänzer > >Reviewed-by: Thomas Hellstrom > > Reviewed-by: Christian König . Reviewed-by: Sinclair Yeh > > > > >>--- > >> drivers/gpu/drm/ttm/ttm_bo.c | 4 ++-- > >>

Re: [PATCH 4/4] drm: Resurrect atomic rmfb code, v2

2017-01-25 Thread Sinclair Yeh
On Wed, Jan 25, 2017 at 09:36:36AM +0100, Maarten Lankhorst wrote: > Op 25-01-17 om 09:09 schreef Thomas Hellstrom: > > On 01/25/2017 05:54 AM, Daniel Vetter wrote: > >> On Tue, Jan 24, 2017 at 01:44:54PM -0800, Matt Roper wrote: > >>> On Wed, Jan 11, 2017 at 05:15:47PM +0100, Daniel Vetter wrote:

Re: [PATCH 6/6] drm/ttm: revert "add optional LRU removal callback v2"

2017-01-24 Thread Sinclair Yeh
Pathces 1, 2, 5, 6: Reviewed-by: Sinclair Yeh On Fri, Jan 13, 2017 at 10:51:11AM +0100, Christian König wrote: > From: Christian König > > Without the custom LRU management the callback is not used any more. > > Signed-off-by: Christian König > --- > drivers/gpu/drm

Re: [PATCH 5/6] drm/ttm: revert "implement LRU add callbacks v2"

2017-01-24 Thread Sinclair Yeh
Minor typo On Fri, Jan 13, 2017 at 10:51:10AM +0100, Christian König wrote: > From: Christian König > > The additional housekeeping had to much CPU overhead, ^ > let's use the BO priorities instead. > > Signed-off-by: Christian König > --- > drivers/gpu/dr

[git pull] vmwgfx-fixes

2017-01-23 Thread Sinclair Yeh
itializers Shyam Saini (1): drm/vmwgfx: Use kmemdup instead of kmalloc and memcpy Sinclair Yeh (1): drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format Thomas Hellstrom (4): drm/vmwgfx: Clear uninitialized fields of a parameter drm/vmwgfx: Annotate ignored ret

[PATCH] gpu: drm: vmwgfx: Use kmemdup instead of kmalloc and memcpy

2016-12-29 Thread Sinclair Yeh
Thanks, applied. Reviewed-by: Sinclair Yeh On Sat, Dec 24, 2016 at 01:21:10AM +0530, Shyam Saini wrote: > When some other buffer is immediately copied into allocated region. > Replace calls to kmalloc followed by a memcpy with a direct > call to kmemdup. > > Signed-off-

  1   2   >