Skip to content

Commit 0652ff3

Browse files
deepak-rawatRoland Scheidegger
authored andcommitted
drm/vmwgfx: Sync legacy multisampling device capability
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 <[email protected]> Reviewed-by: Thomas Hellström (VMware) <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Roland Scheidegger <[email protected]>
1 parent ef7c7b7 commit 0652ff3

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

drivers/gpu/drm/vmwgfx/device_include/svga3d_devcaps.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,15 @@ typedef enum {
163163
SVGA3D_DEVCAP_SURFACEFMT_A16B16G16R16 = 67,
164164
SVGA3D_DEVCAP_SURFACEFMT_UYVY = 68,
165165
SVGA3D_DEVCAP_SURFACEFMT_YUY2 = 69,
166-
SVGA3D_DEVCAP_MULTISAMPLE_NONMASKABLESAMPLES = 70,
167-
SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES = 71,
168-
SVGA3D_DEVCAP_ALPHATOCOVERAGE = 72,
169-
SVGA3D_DEVCAP_SUPERSAMPLE = 73,
166+
167+
/*
168+
* Deprecated.
169+
*/
170+
SVGA3D_DEVCAP_DEAD4 = 70,
171+
SVGA3D_DEVCAP_DEAD5 = 71,
172+
SVGA3D_DEVCAP_DEAD7 = 72,
173+
SVGA3D_DEVCAP_DEAD6 = 73,
174+
170175
SVGA3D_DEVCAP_AUTOGENMIPMAPS = 74,
171176
SVGA3D_DEVCAP_SURFACEFMT_NV12 = 75,
172177
SVGA3D_DEVCAP_SURFACEFMT_AYUV = 76,

drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,17 @@ int vmw_getparam_ioctl(struct drm_device *dev, void *data,
126126
return 0;
127127
}
128128

129-
static u32 vmw_mask_multisample(unsigned int cap, u32 fmt_value)
129+
static u32 vmw_mask_legacy_multisample(unsigned int cap, u32 fmt_value)
130130
{
131131
/*
132132
* A version of user-space exists which use MULTISAMPLE_MASKABLESAMPLES
133133
* to check the sample count supported by virtual device. Since there
134134
* never was support for multisample count for backing MOB return 0.
135+
*
136+
* MULTISAMPLE_MASKABLESAMPLES devcap is marked as deprecated by virtual
137+
* device.
135138
*/
136-
if (cap == SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES)
139+
if (cap == SVGA3D_DEVCAP_DEAD5)
137140
return 0;
138141

139142
return fmt_value;
@@ -164,7 +167,7 @@ static int vmw_fill_compat_cap(struct vmw_private *dev_priv, void *bounce,
164167
for (i = 0; i < max_size; ++i) {
165168
vmw_write(dev_priv, SVGA_REG_DEV_CAP, i);
166169
compat_cap->pairs[i][0] = i;
167-
compat_cap->pairs[i][1] = vmw_mask_multisample
170+
compat_cap->pairs[i][1] = vmw_mask_legacy_multisample
168171
(i, vmw_read(dev_priv, SVGA_REG_DEV_CAP));
169172
}
170173
spin_unlock(&dev_priv->cap_lock);
@@ -220,7 +223,7 @@ int vmw_get_cap_3d_ioctl(struct drm_device *dev, void *data,
220223
spin_lock(&dev_priv->cap_lock);
221224
for (i = 0; i < num; ++i) {
222225
vmw_write(dev_priv, SVGA_REG_DEV_CAP, i);
223-
*bounce32++ = vmw_mask_multisample
226+
*bounce32++ = vmw_mask_legacy_multisample
224227
(i, vmw_read(dev_priv, SVGA_REG_DEV_CAP));
225228
}
226229
spin_unlock(&dev_priv->cap_lock);

0 commit comments

Comments
 (0)