From patchwork Mon Mar 23 23:08:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roland Scheidegger X-Patchwork-Id: 11454115 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4248F1392 for ; Mon, 23 Mar 2020 23:09:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 22B6420409 for ; Mon, 23 Mar 2020 23:09:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XgSxhNb2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22B6420409 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FE016E3EF; Mon, 23 Mar 2020 23:09:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id A45D16E3EB for ; Mon, 23 Mar 2020 23:09:08 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id b2so19243985wrj.10 for ; Mon, 23 Mar 2020 16:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nzveIRW2GmoBia4K/xiiAJEiKM6pSIRJP7YoEzWFeRE=; b=XgSxhNb2pY2OvNhze0kvBTzsnFOsxAPvZWPTD7NKHhuBMM2oZHchveMbqHP1hQa12j wRbIlPJPuE9I4r+kRbu2i31WIjrWt5OSbI5cQkA8/nQwI8V+Ur0t0MJZRJlr6Be6gU4e 9V3GtgRPiViWqn4+zSR1vjXeIKeC69RwJBDkpfEACuh/ybCcgOnpr58sLN2CSQDJiRSb 6fYe8iPuhaDEInLVKNUA0An2AzPxKU7AsS2ZT/ctA4JElwjQlSqyeEGNBUvd1YL2Nm1o wUS1h5/kmBLQM+oXlsgsM51KeUje3UPKv0Z5z2oXjX/q9715EssnzexbWpue0zP2gjFA Pozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nzveIRW2GmoBia4K/xiiAJEiKM6pSIRJP7YoEzWFeRE=; b=o7ZE16mfpmFH9YkGbCF9/56eWmT5bmnYnxAqRiSBGamqCO993UxfFoFDbpsiUup2fH LZJI7/eNAaDNYYh9NmIq7EKKLXcBg/24TE6z38I9tMetYQqoX1yZ0WFlaq3/mP5kfrv/ iK4XioHu5S4jJylfOYphSwFja9/4UmL1ftZ9iZjE1PQzpnhGZaIQQCpPRDyALli2SCiv egl/BXJcLnQgrluOLmmMTPOfRoVL7OlfA68M/sBKKBcGH2cXc4fY11OlozviVHx566zi SuSc4ABYmwI1Xm3xbtfPxc4bLYnz2XeTYeYHW5Jt87DzKWThY1gIQ9VIr/AGVEwBNW6O 3APg== X-Gm-Message-State: ANhLgQ0F95StmhqdxqTobt1YmPw/IqZnBdUD/4WEsBFIe36a5sX0QvYI S5mGpTxkCntWeV94uV4DmFjGu1oS X-Google-Smtp-Source: ADFU+vtEPRZ6WwphyfdxZBZ/lj0m+hLzWREVkJuv5/gQJDGqjs0A6ofeEsSFEGnmZWhn033Ppxxi1g== X-Received: by 2002:adf:df8a:: with SMTP id z10mr4465510wrl.278.1585004947054; Mon, 23 Mar 2020 16:09:07 -0700 (PDT) Received: from sroland-t5810.vmware.com (46-126-183-173.dynamic.hispeed.ch. [46.126.183.173]) by smtp.gmail.com with ESMTPSA id q185sm1641937wme.10.2020.03.23.16.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 16:09:06 -0700 (PDT) From: Roland Scheidegger X-Google-Original-From: Roland Scheidegger To: dri-devel@lists.freedesktop.org, airlied@redhat.com, daniel@ffwll.ch Subject: [PATCH v2 01/17] drm/vmwgfx: Also check for SVGA_CAP_DX before reading DX context support Date: Tue, 24 Mar 2020 00:08:45 +0100 Message-Id: <20200323230901.13302-2-sroland@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200323230901.13302-1-sroland@vmware.com> References: <20200323230901.13302-1-sroland@vmware.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-graphics-maintainer@vmware.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Deepak Rawat Virtual device consider SVGA_CAP_DX and SVGA3D_DEVCAP_DXCONTEXT independent of each other. Some of the commands in cmd_buf depends on SVGA_CAP_DX, so better to check for that as well. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellström (VMware) Reviewed-by: Roland Scheidegger Signed-off-by: Roland Scheidegger --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 4f58364421ce..f976dabe18de 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -883,7 +883,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) } } - if (dev_priv->has_mob) { + if (dev_priv->has_mob && (dev_priv->capabilities & SVGA_CAP_DX)) { spin_lock(&dev_priv->cap_lock); vmw_write(dev_priv, SVGA_REG_DEV_CAP, SVGA3D_DEVCAP_DXCONTEXT); dev_priv->has_dx = !!vmw_read(dev_priv, SVGA_REG_DEV_CAP);