dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Roland Scheidegger (VMware)" <rscheidegger.oss@gmail.com>
To: dri-devel@lists.freedesktop.org, airlied@redhat.com, daniel@ffwll.ch
Cc: linux-graphics-maintainer@vmware.com
Subject: [PATCH v2 02/17] drm/vmwgfx: Sync legacy multisampling device capability
Date: Tue, 24 Mar 2020 00:12:23 +0100	[thread overview]
Message-ID: <20200323231238.14839-3-rscheidegger.oss@gmail.com> (raw)
In-Reply-To: <20200323231238.14839-1-rscheidegger.oss@gmail.com>

From: Deepak Rawat <drawat.floss@gmail.com>

In favor of SM4.1 multisampling capability, virtual device deprecated
old multisampling device capability. Mark legacy multisampling device
capability as dead. Rename the function that masks legacy multisample
capability to reflect that now it is masking a deprecated feature.

Signed-off-by: Deepak Rawat <drawat.floss@gmail.com>
Reviewed-by: Thomas Hellström (VMware) <thomas_os@shipmail.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Roland Scheidegger <sroland@vmware.com>
---
 .../gpu/drm/vmwgfx/device_include/svga3d_devcaps.h  | 13 +++++++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c               | 11 +++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h b/drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h
index f256560049bf..2de878b5ba16 100644
--- a/drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h
+++ b/drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h
@@ -163,10 +163,15 @@ typedef enum {
    SVGA3D_DEVCAP_SURFACEFMT_A16B16G16R16           = 67,
    SVGA3D_DEVCAP_SURFACEFMT_UYVY                   = 68,
    SVGA3D_DEVCAP_SURFACEFMT_YUY2                   = 69,
-   SVGA3D_DEVCAP_MULTISAMPLE_NONMASKABLESAMPLES    = 70,
-   SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES       = 71,
-   SVGA3D_DEVCAP_ALPHATOCOVERAGE                   = 72,
-   SVGA3D_DEVCAP_SUPERSAMPLE                       = 73,
+
+   /*
+    * Deprecated.
+    */
+   SVGA3D_DEVCAP_DEAD4                             = 70,
+   SVGA3D_DEVCAP_DEAD5                             = 71,
+   SVGA3D_DEVCAP_DEAD7                             = 72,
+   SVGA3D_DEVCAP_DEAD6                             = 73,
+
    SVGA3D_DEVCAP_AUTOGENMIPMAPS                    = 74,
    SVGA3D_DEVCAP_SURFACEFMT_NV12                   = 75,
    SVGA3D_DEVCAP_SURFACEFMT_AYUV                   = 76,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index a15375eb476e..09b255465f99 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
@@ -126,14 +126,17 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
 	return 0;
 }
 
-static u32 vmw_mask_multisample(unsigned int cap, u32 fmt_value)
+static u32 vmw_mask_legacy_multisample(unsigned int cap, u32 fmt_value)
 {
 	/*
 	 * A version of user-space exists which use MULTISAMPLE_MASKABLESAMPLES
 	 * to check the sample count supported by virtual device. Since there
 	 * never was support for multisample count for backing MOB return 0.
+	 *
+	 * MULTISAMPLE_MASKABLESAMPLES devcap is marked as deprecated by virtual
+	 * device.
 	 */
-	if (cap == SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES)
+	if (cap == SVGA3D_DEVCAP_DEAD5)
 		return 0;
 
 	return fmt_value;
@@ -164,7 +167,7 @@ static int vmw_fill_compat_cap(struct vmw_private *dev_priv, void *bounce,
 	for (i = 0; i < max_size; ++i) {
 		vmw_write(dev_priv, SVGA_REG_DEV_CAP, i);
 		compat_cap->pairs[i][0] = i;
-		compat_cap->pairs[i][1] = vmw_mask_multisample
+		compat_cap->pairs[i][1] = vmw_mask_legacy_multisample
 			(i, vmw_read(dev_priv, SVGA_REG_DEV_CAP));
 	}
 	spin_unlock(&dev_priv->cap_lock);
@@ -220,7 +223,7 @@ int vmw_get_cap_3d_ioctl(struct drm_device *dev, void *data,
 		spin_lock(&dev_priv->cap_lock);
 		for (i = 0; i < num; ++i) {
 			vmw_write(dev_priv, SVGA_REG_DEV_CAP, i);
-			*bounce32++ = vmw_mask_multisample
+			*bounce32++ = vmw_mask_legacy_multisample
 				(i, vmw_read(dev_priv, SVGA_REG_DEV_CAP));
 		}
 		spin_unlock(&dev_priv->cap_lock);
-- 
2.17.1

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

  parent reply	other threads:[~2020-03-23 23:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 23:12 [PATCH v2 00/17] drm/vmwgfx add support for GL4 Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 01/17] drm/vmwgfx: Also check for SVGA_CAP_DX before reading DX context support Roland Scheidegger (VMware)
2020-03-23 23:12 ` Roland Scheidegger (VMware) [this message]
2020-03-23 23:12 ` [PATCH v2 03/17] drm/vmwgfx: Deprecate logic ops commands Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 04/17] drm/vmwgfx: Use enum to represent graphics context capabilities Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 05/17] drm/vmwgfx: Sync virtual device headers for new feature Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 06/17] drm/vmwgfx: Add a new enum for SM5 graphics context capability Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 07/17] drm/vmwgfx: Read new register for GB memory when available Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 08/17] drm/vmwgfx: Support SM5 shader type in command buffer Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 09/17] drm/vmwgfx: Add support for UA view commands Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 10/17] drm/vmwgfx: Add support for indirect and dispatch commands Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 11/17] drm/vmwgfx: Rename stream output target binding tracker struct Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 12/17] drm/vmwgfx: Add support for streamoutput with mob commands Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 13/17] drm/vmwgfx: Split surface metadata from struct vmw_surface Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 14/17] drm/vmwgfx: Refactor surface_define to use vmw_surface_metadata Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 15/17] drm/vmwgfx: Add surface define v4 command Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 16/17] drm/vmwgfx: Add SM5 param for userspace Roland Scheidegger (VMware)
2020-03-23 23:12 ` [PATCH v2 17/17] drm/vmwgfx: Use vmwgfx version 2.18 to signal SM5 compatibility Roland Scheidegger (VMware)
  -- strict thread matches above, loose matches on Subject: below --
2020-03-23 23:08 [PATCH v2 00/17] drm/vmwgfx add support for GL4 Roland Scheidegger
2020-03-23 23:08 ` [PATCH v2 02/17] drm/vmwgfx: Sync legacy multisampling device capability Roland Scheidegger

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=20200323231238.14839-3-rscheidegger.oss@gmail.com \
    --to=rscheidegger.oss@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).