[PATCH 12/14] MAINTAINERS: Add maintainer entry for the VMWGFX DRM driver

2016-04-25 Thread Sinclair Yeh
On Sun, Apr 24, 2016 at 11:12:28AM +0100, Emil Velikov wrote: > On 22 April 2016 at 15:22, Sinclair Yeh wrote: > > Hi, > > > > On Fri, Apr 22, 2016 at 12:04:00AM +0100, Emil Velikov wrote: > >> Thomas is one of the original authors of the driver, with recent > &

[PATCH 1/3] drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION

2016-04-27 Thread Sinclair Yeh
From: Charmaine Lee Fixes piglit tests nv_conditional_render-* crashes. Signed-off-by: Charmaine Lee Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx

[PATCH 2/3] drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands.

2016-04-27 Thread Sinclair Yeh
From: Charmaine Lee Instead of calling vmw_cmd_ok, call vmw_cmd_dx_cid_check to validate the context id for query commands. Signed-off-by: Charmaine Lee Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 3/3] drm/vmwgfx: Fix order of operation

2016-04-27 Thread Sinclair Yeh
mode->hdisplay * (var->bits_per_pixel + 7) gets evaluated before the division, potentially making the pitch larger than it should be. Since the original intention is to do a div-round-up, just use the macro instead. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/g

[PATCH 3/3] drm/vmwgfx: Fix order of operation

2016-04-27 Thread Sinclair Yeh
mode->hdisplay * (var->bits_per_pixel + 7) gets evaluated before the division, potentially making the pitch larger than it should be. Since the original intention is to do a div-round-up, just use the macro instead. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom --- drivers/g

[PATCH 1/2] drm/vmwgfx: Add VMWare host messaging capability

2016-04-27 Thread Sinclair Yeh
+ * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PU

[PATCH 2/2] drm/vmwgfx: Report vmwgfx version to vmware.log

2016-04-27 Thread Sinclair Yeh
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 Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/.gitignore

[git pull] vmwgfx-fixes

2016-04-28 Thread Sinclair Yeh
fx: Enable SVGA_3D_CMD_DX_SET_PREDICATION drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. Sinclair Yeh (1): drm/vmwgfx: Fix order of operation drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 10 +- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)

[PATCH 0215/1285] Replace numeric parameter like 0444 with macro

2016-08-04 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Tue, Aug 02, 2016 at 06:50:25PM +0800, Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission

[Intel-gfx] [PATCH 05/11] drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait

2016-10-05 Thread Sinclair Yeh
r. The only challenge are > >> those callers that wish to differentiate the error code between the > >> nonblocking busy check and potentially blocking wait. > >> > >> Signed-off-by: Chris Wilson > >> Cc: Sinclair Yeh > >> Cc: Thomas Hellstrom > >

[git pull] vmwgfx-fixes

2016-10-17 Thread Sinclair Yeh
Hi Dave, The following changes since commit 90fd68dcf9a763f7e575c8467415bd8a66d073f4: drm/udl: fix line iterator in damage handling (2016-09-28 13:29:18 +1000) are available in the git repository at: ssh://people.freedesktop.org/~syeh/repos_linux drm-vmwgfx-fixes for you to fetch changes u

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

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'. >

[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 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") > > [...]

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 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: [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 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: [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 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

[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] 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

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

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 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] 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-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,

[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 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

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: [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] 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: [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 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

[PATCH v2] drm: move allocation out of drm_get_format_name()

2016-11-07 Thread Sinclair Yeh
Thomas has already acked the earlier version, but in case you need it for this one, too. vmwgfx portion: Acked-by: Sinclair Yeh On Mon, Nov 07, 2016 at 12:48:09AM +, Eric Engestrom wrote: > Fixes: 90844f00049e9f42573fd31d7c32e8fd31d3fd07 > > drm: make drm_get_format_name th

[PATCH] drm/vmwgfx : Fix NULL pointer comparison

2016-11-08 Thread Sinclair Yeh
Thanks! Reviewed-by: Sinclair Yeh On Tue, Nov 08, 2016 at 05:30:31PM +0530, Ravikant Bijendra Sharma wrote: > From: Ravikant B Sharma > > Replace direct comparisons to NULL i.e. > 'x == NULL' with '!x'. As per coding standard. > > Signed-off-by: Ravik

[PATCH] drm/vmwgfx: avoid gcc-7 parentheses warning

2016-11-16 Thread Sinclair Yeh
Looks good to me, thanks! I'll incorporate this into the next pull request. Reviewed-by: Sinclair Yeh On Wed, Nov 16, 2016 at 03:19:31PM +0100, Arnd Bergmann wrote: > gcc-7 warns about slightly suspicious code in vmw_cmd_invalid: > > drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.

[PATCH 14/37] drm/vmwgfx: Populate fb->pixel_format

2016-11-21 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Fri, Nov 18, 2016 at 09:52:50PM +0200, ville.syrjala at linux.intel.com wrote: > From: Ville Syrjälä > > Stuff something semi-reasonable into fb->pixel_format. I had to guess > as to which formats we should pick. Did I guess correctly? > &g

[PATCH 12/37] drm/vmwgfx: Populate fb->dev before drm_framebuffer_init()

2016-11-21 Thread Sinclair Yeh
Minor typo below. Reviewed-by: Sinclair Yeh On Fri, Nov 18, 2016 at 09:52:48PM +0200, ville.syrjala at linux.intel.com wrote: > From: Ville Syrjälä > > drm_framebuffer_init() will start to check that fb->dev is already > populated, so let's to that manually sinc

[PATCH] drm/vmwgfx: Fix handling of errors returned by 'vmw_cotable_alloc()'

2016-11-29 Thread Sinclair Yeh
Good catch. Reviewed-by: Sinclair Yeh On Tue, Nov 29, 2016 at 07:49:19AM +0100, Christophe JAILLET wrote: > 'vmw_cotable_alloc()' returns an error pointer on error, not NULL. > Propagate the error code, instead of returning -ENOMEM unconditionally > > Signed-off-

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] 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 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: [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 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] 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

[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

[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 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 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 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 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 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 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 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 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

[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 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

[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 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 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

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 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: [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 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

[PATCH 3/3] drm/vmwgfx: Adjust checks for null pointers in 13 functions

2016-09-26 Thread Sinclair Yeh
This series looks good to me: Reviewed-by: Sinclair Yeh Thanks! On Fri, Sep 23, 2016 at 06:39:04PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 23 Sep 2016 17:53:49 +0200 > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer

[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 v2 12/14] MAINTAINERS: Add maintainer entry for the VMWGFX DRM driver

2016-05-03 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Tue, May 03, 2016 at 12:15:39AM +0100, Emil Velikov wrote: > Thomas is one of the original authors of the driver, with recent > contributions from Sinclair and Brian. > > v2: Add Sinclair as maintainer. Add Sinclair+Thomas's tree, use > Supporte

[PATCH] drm/vmwgfx: Avoid compiler warning

2016-06-03 Thread Sinclair Yeh
Looks good to me. Thanks! Reviewed-by: Sinclair Yeh On Fri, Jun 03, 2016 at 05:47:13PM +0200, Thierry Reding wrote: > From: Thierry Reding > > While the current code is correct and the compiler's DCE pass should > remove either of the branches depending on the width of DMA

[PATCH v2] drm/core: Change declaration for gamma_set.

2016-06-07 Thread Sinclair Yeh
Acked-by: Sinclair Yeh On Tue, Jun 07, 2016 at 12:49:30PM +0200, Maarten Lankhorst wrote: > Change return value to int to propagate errors from gamma_set, > and remove start parameter. Updates always use the full size, > and some drivers even ignore the start parameter altogether. >

[PATCH 1/6] drm/vmwgfx: Stop checking minor type directly

2016-06-24 Thread Sinclair Yeh
Thanks! Reviewed-by: Sinclair Yeh On Fri, Jun 24, 2016 at 06:15:15PM +0100, Frank Binns wrote: > Use the appropriate drm minor type helper instead. > > Cc: Sinclair Yeh > Cc: Thomas Hellstrom > Signed-off-by: Frank Binns > --- > drivers/gpu/drm/vmwgfx/vmwgfx_dr

[PATCH v3 14/15] drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info()

2016-06-27 Thread Sinclair Yeh
This patch looks good to me: Reviewed-by: Sinclair Yeh On Thu, Jun 09, 2016 at 02:32:18AM +0300, Laurent Pinchart wrote: > The driver is the last users of the drm_fb_get_bpp_depth() function. It > should ideally be converted to use struct drm_mode_fb_cmd2 instead of > the lega

[git pull] vmwgfx-fixes

2016-07-04 Thread Sinclair Yeh
for you to fetch changes up to beca4cf55323147ca9c8a98de1871be6e4fe8f34: drm/vmwgfx: Fix corner case screen target management (2016-07-01 10:47:51 -0700) ---- Sinclair Yeh (6): drm/vmwgfx: Add a check to handle host message fail

[PATCH 3/3] drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set

2016-07-05 Thread Sinclair Yeh
Argh, you're right. I'll send out a patch. Thanks for catching this! Sinclair On Mon, Jul 04, 2016 at 04:51:52PM +0100, Emil Velikov wrote: > Hi Sinclair, > > On 1 July 2016 at 19:24, wrote: > > From: Sinclair Yeh > > > > For the Screen Object display

[PATCH] drm/vmwgfx: Fix error paths when mapping framebuffer

2016-07-07 Thread Sinclair Yeh
Rather than returning immediately, make sure to unlock the mutexes first. Signed-off-by: Sinclair Yeh Reviewed-by: Charmaine Lee Reported-by: Emil Velikov Cc: --- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx

[git pull] vmwgfx-fixes

2016-07-08 Thread Sinclair Yeh
tory at: git://people.freedesktop.org/~syeh/repos_linux drm-vmwgfx-fixes for you to fetch changes up to 58541f7a6458e17ab417321b284f0090f530aa91: drm/vmwgfx: Fix error paths when mapping framebuffer (2016-07-08 08:30:35 -0700) -------- Sinclair Yeh

[PATCH] drm/vmwgfx: Delete an unnecessary check before the function call "vfree"

2016-07-22 Thread Sinclair Yeh
Looks good. Thanks! Reviewed-by: Sinclair Yeh On Fri, Jul 22, 2016 at 01:45:40PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 22 Jul 2016 13:31:00 +0200 > > The vfree() function performs also input parameter validation. > Thus the test around the cal

[PATCH] drm/doc: Document uapi requirements in DRM

2016-08-26 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Fri, Aug 19, 2016 at 10:50:38PM +0200, Daniel Vetter wrote: > Everyone knows them, except all the new folks joining from the ARM > side haven't lived through all the pain of the past years and are > entirely surprised when I raise this. Definitely ti

[PATCH 5/5] drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-26 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh On Thu, Aug 11, 2016 at 03:46:22PM +0100, Chris Wilson wrote: > Since fence_wait_timeout_reservation_object_wait_timeout_rcu() with a > timeout of 0 becomes reservation_object_test_signaled_rcu(), we do not > need to handle such conversion in the caller.

[PATCH] drm/vmwgfx: Switch to mode_cmd2

2016-12-01 Thread Sinclair Yeh
One defect below otherwise: Reviewed-by: Sinclair Yeh On Wed, Nov 30, 2016 at 06:00:04PM +0100, Daniel Vetter wrote: > Surprisingly few changes needed to make it happen. Compile-tested > only. The idea is that this replaces the 2 patches from Ville's big > fb->format patch

[PATCH] gpu: vmwgfx: Use dma_pool_zalloc

2016-12-01 Thread Sinclair Yeh
Applied. Thanks. Reviewed-by: Sinclair Yeh On Fri, Dec 02, 2016 at 01:25:45AM +0530, Souptick Joarder wrote: > We should use dma_pool_zalloc instead of dma_pool_alloc/memset > > Signed-off-by: Souptick joarder > --- > drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 10 -- &g

[PATCH] drm/vmwgfx: Switch to mode_cmd2

2016-12-02 Thread Sinclair Yeh
On Fri, Dec 02, 2016 at 08:00:22AM +0100, Daniel Vetter wrote: > On Thu, Dec 01, 2016 at 03:09:40PM -0800, Sinclair Yeh wrote: > > One defect below otherwise: Reviewed-by: Sinclair Yeh > > > > On Wed, Nov 30, 2016 at 06:00:04PM +0100, Daniel Vetter wrote: > > > S

[PATCH v3 01/13] drm: Don't include in

2016-12-02 Thread Sinclair Yeh
vmwgfx part: Reviewed-by: Sinclair Yeh On Tue, Nov 29, 2016 at 11:04:31AM +0200, Laurent Pinchart wrote: > used to define most of the in-kernel KMS API. It has > now been split into separate files for each object type, but still > includes most other KMS headers to avoid breaki

[git pull] vmwgfx-fixes

2016-12-13 Thread Sinclair Yeh
Hi Dave, The following changes since commit ab7cd8d83e5dba13027de66f1b008b08b30b71a4: Merge tag 'drm-intel-fixes-2016-12-01' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes (2016-12-04 06:31:26 +1000) are available in the git repository at: git://people.freedesktop.org/~syeh

[PATCH] drm/vmwgfx: use designated initializers

2016-12-19 Thread Sinclair Yeh
Reviewed-by: Sinclair Yeh thanks! On Fri, Dec 16, 2016 at 05:04:02PM -0800, Kees Cook wrote: > Prepare to mark sensitive kernel structures for randomization by making > sure they're using designated initializers. These were identified during > allyesconfig builds of x86, arm, a

[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-

[PATCH 1/7] drm/ttm: don't wait for BO on initial allocation

2016-04-06 Thread Sinclair Yeh
I don't know much about AMD gpu. Patches 1-6 look good to me. On Wed, Apr 06, 2016 at 11:12:02AM +0200, Christian König wrote: > From: Christian König > > When we use an extern reservation object that otherwise waits for every > fence registered with it. > > Signed-off-by: Christian König

[PATCH 1/7] drm/ttm: don't wait for BO on initial allocation

2016-04-13 Thread Sinclair Yeh
rb for 1-6. I can't really comment on 7. On Wed, Apr 13, 2016 at 07:38:22PM +0200, Christian König wrote: > Am 06.04.2016 um 18:06 schrieb Sinclair Yeh: > >I don't know much about AMD gpu. Patches 1-6 look good to me. > > Does that count as a Reviewed-by or at least

[PATCH 12/14] MAINTAINERS: Add maintainer entry for the VMWGFX DRM driver

2016-04-22 Thread Sinclair Yeh
Hi, On Fri, Apr 22, 2016 at 12:04:00AM +0100, Emil Velikov wrote: > Thomas is one of the original authors of the driver, with recent > contributions from Sinclair and Brian. > > Cc: Sinclair Yeh > Cc: Thomas Hellstrom > Cc: Brian Paul > Cc: "VMware Graphics"

[PATCH 24/24] drm/vmwgfx: add extern C guard for the UAPI header

2016-04-22 Thread Sinclair Yeh
Are these going to be ported over to corresponding files in libdrm? Reviewed-by: Sinclair Yeh On Thu, Apr 21, 2016 at 08:42:45PM +0100, Emil Velikov wrote: > Cc: Sinclair Yeh > Cc: Thomas Hellstrom > Cc: Brian Paul > Signed-off-by: Emil Velikov > --- > include/uapi/dr

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 -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

  1   2   >