All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zack Rusin <zack@kde.org>
To: dri-devel@lists.freedesktop.org
Cc: krastevm@vmware.com, mombasawalam@vmware.com
Subject: [PATCH 3/8] drm/vmwgfx: Print capabilities early during the initialization
Date: Wed,  2 Mar 2022 10:24:21 -0500	[thread overview]
Message-ID: <20220302152426.885214-4-zack@kde.org> (raw)
In-Reply-To: <20220302152426.885214-1-zack@kde.org>

From: Zack Rusin <zackr@vmware.com>

Capabilities were logged at the end of initialization so any early errors
would make them not appear in the logs. Which is also when they're needed
the most.
Print the the capabilities right after fetching them, before the init
code starts using them to make sure they always show up in the logs.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Maaz Mombasawala <mombasawalam@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 621231c66fd4..f43afd56915e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -848,12 +848,16 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id)
 
 
 	dev_priv->capabilities = vmw_read(dev_priv, SVGA_REG_CAPABILITIES);
-
+	vmw_print_bitmap(&dev_priv->drm, "Capabilities",
+			 dev_priv->capabilities,
+			 cap1_names, ARRAY_SIZE(cap1_names));
 	if (dev_priv->capabilities & SVGA_CAP_CAP2_REGISTER) {
 		dev_priv->capabilities2 = vmw_read(dev_priv, SVGA_REG_CAP2);
+		vmw_print_bitmap(&dev_priv->drm, "Capabilities2",
+				 dev_priv->capabilities2,
+				 cap2_names, ARRAY_SIZE(cap2_names));
 	}
 
-
 	ret = vmw_dma_select_mode(dev_priv);
 	if (unlikely(ret != 0)) {
 		drm_info(&dev_priv->drm,
@@ -939,14 +943,6 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id)
 		 "MOB limits: max mob size = %u kB, max mob pages = %u\n",
 		 dev_priv->max_mob_size / 1024, dev_priv->max_mob_pages);
 
-	vmw_print_bitmap(&dev_priv->drm, "Capabilities",
-			 dev_priv->capabilities,
-			 cap1_names, ARRAY_SIZE(cap1_names));
-	if (dev_priv->capabilities & SVGA_CAP_CAP2_REGISTER)
-		vmw_print_bitmap(&dev_priv->drm, "Capabilities2",
-				 dev_priv->capabilities2,
-				 cap2_names, ARRAY_SIZE(cap2_names));
-
 	ret = vmw_dma_masks(dev_priv);
 	if (unlikely(ret != 0))
 		goto out_err0;
-- 
2.32.0


  parent reply	other threads:[~2022-03-02 15:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 15:24 [PATCH 0/8] drm/vmwgfx: 3D on arm64 and large cursor support Zack Rusin
2022-03-02 15:24 ` [PATCH 1/8] drm/vmwgfx: Add support for CursorMob and CursorBypass 4 Zack Rusin
2022-03-02 15:24 ` [PATCH 2/8] drm/vmwgfx: Cleanup multimon initialization code Zack Rusin
2022-03-02 15:24 ` Zack Rusin [this message]
2022-03-02 15:24 ` [PATCH 4/8] drm/vmwgfx: Fix fencing on SVGAv3 Zack Rusin
2022-03-02 15:24 ` [PATCH 5/8] drm/vmwgfx: Allow querying of the SVGA PCI id from the userspace Zack Rusin
2022-03-02 15:24 ` [PATCH 6/8] drm/vmwgfx: Initialize drm_mode_fb_cmd2 Zack Rusin
2022-03-02 15:24   ` Zack Rusin
2022-03-02 15:24 ` [PATCH 7/8] drm/vmwgfx: Implement MSI/MSI-X support for IRQs Zack Rusin
2022-03-03  0:34   ` kernel test robot
2022-03-03  0:34     ` kernel test robot
2022-03-07 16:24   ` [PATCH v2] " Zack Rusin
2022-03-02 15:24 ` [PATCH 8/8] drm/vmwgfx: Stop using surface dma commands on most configurations Zack Rusin

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=20220302152426.885214-4-zack@kde.org \
    --to=zack@kde.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krastevm@vmware.com \
    --cc=mombasawalam@vmware.com \
    --cc=zackr@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.