All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinclair Yeh <syeh@vmware.com>
To: dri-devel@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch, thellstrom@vmware.com
Subject: [PATCH 09/11] drm/vmwgfx: Fixes to vmwgfx_fb
Date: Mon, 27 Mar 2017 15:01:02 -0700	[thread overview]
Message-ID: <1490652064-44817-10-git-send-email-syeh@vmware.com> (raw)
In-Reply-To: <1490652064-44817-1-git-send-email-syeh@vmware.com>

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 <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index e9005b9..7d3d5e3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -434,7 +434,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
 		set.y = 0;
 		set.mode = NULL;
 		set.fb = NULL;
-		set.num_connectors = 1;
+		set.num_connectors = 0;
 		set.connectors = &par->con;
 		ret = drm_mode_set_config_internal(&set);
 		if (ret) {
@@ -822,7 +822,9 @@ int vmw_fb_off(struct vmw_private *vmw_priv)
 	flush_delayed_work(&par->local_work);
 
 	mutex_lock(&par->bo_mutex);
+	drm_modeset_lock_all(vmw_priv->dev);
 	(void) vmw_fb_kms_detach(par, true, false);
+	drm_modeset_unlock_all(vmw_priv->dev);
 	mutex_unlock(&par->bo_mutex);
 
 	return 0;
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-03-27 22:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 22:00 [PATCH 00/11] Enable Atomic Mode Set on vmwgfx Sinclair Yeh
2017-03-27 22:00 ` [PATCH 01/11] drm/vmwgfx: Add universal plane support Sinclair Yeh
2017-03-28  7:07   ` Daniel Vetter
2017-03-27 22:00 ` [PATCH 02/11] drm/vmwgfx: CRTC atomic state Sinclair Yeh
2017-03-27 22:00 ` [PATCH 03/11] drm/vmwgfx: Plane " Sinclair Yeh
2017-03-28  7:33   ` Daniel Vetter
2017-03-27 22:00 ` [PATCH 04/11] drm/vmwgfx: Connector " Sinclair Yeh
2017-03-27 22:00 ` [PATCH 05/11] drm/vmwgfx: Add and connect CRTC helper functions Sinclair Yeh
2017-03-28  7:56   ` Daniel Vetter
2017-03-27 22:00 ` [PATCH 06/11] drm/vmwgfx: Add and connect plane " Sinclair Yeh
2017-03-28  7:40   ` Daniel Vetter
2017-03-27 22:01 ` [PATCH 07/11] drm/vmwgfx: Add and connect connector helper function Sinclair Yeh
2017-03-28  7:41   ` Daniel Vetter
2017-03-27 22:01 ` [PATCH 08/11] drm/vmwgfx: Add and connect atomic state object check/commit Sinclair Yeh
2017-03-28  7:45   ` Daniel Vetter
2017-03-27 22:01 ` Sinclair Yeh [this message]
2017-03-27 22:01 ` [PATCH 10/11] drm/vmwgfx: Switch over to internal atomic API for STDU Sinclair Yeh
2017-03-28  7:49   ` Daniel Vetter
2017-03-29 21:05     ` Sinclair Yeh
2017-03-30  7:42       ` Daniel Vetter
2017-03-27 22:01 ` [PATCH 11/11] drm/vmwgfx: Switch over to internal atomic API for SOU and LDU Sinclair Yeh
2017-03-28  7:51   ` Daniel Vetter
2017-03-28  7:54 ` [PATCH 00/11] Enable Atomic Mode Set on vmwgfx Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490652064-44817-10-git-send-email-syeh@vmware.com \
    --to=syeh@vmware.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thellstrom@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.