Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3005033pxk; Sun, 6 Sep 2020 23:35:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/AXXrUjevgBzcd83Jm8p2KEYiugjlmTSAAFQy7HZYB44RZgQaKS01ct+zv9UX2hfSkP+/ X-Received: by 2002:a17:906:ca8f:: with SMTP id js15mr10553447ejb.175.1599460500124; Sun, 06 Sep 2020 23:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599460500; cv=none; d=google.com; s=arc-20160816; b=NEGYhmWKk8pxPSy4u4ZbVZriHGuDLeiBZssuuTJLejiCuKUCTre62Xx9JhfXUPwoDj mlKeMVgW9zj0+kKTj2ZfPzt63t3R1IRBjsJkLNKkScFDNrsetJc3qOUA3EHbqhS61Gde T8SpdrL/YDj6nFqyv2okTU8tVZaHTDM/6vUcOOZoU9jHMA1K4HJn9W5tlP6dl3SQk2w2 rc+et2XXXh8NjjnwtLGfyisMK3YyceB6QGEfZ77k3nanS7X3/A4yIlEYWubRDA4lsPFN EAhdXx9Vq1X66CQz1kOM05i0qWu0zibtmXzSOX2Y8KVEBWLhS6gljDNYa4hA/9qc5j4B ciXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=17hx+uQnRYN37kt9J2TS1rwaCj5ZQT0lilbznWEFqTQ=; b=m/BCnCsDZoyjpERcmsX2SIDuGO3VIXjDwDyOZhwxrxcNL85W7jiwQXmSllyQWoygBq eSrT4ufrZJdKu0uGiB/kpJ29dM8T/Xal0Ji7P/8/SFBz/j6NcNUxSSRFne8RQAYWJ+lj t3HLj9CvgYoPulg3vFGem8XBqSKc59axdeiSHCtXVvW7REQpTZskFd1vNUgeccJOUPOE VWDQsUlvScVaPFdIewPrb7X+vRuKGavO7vg7nQDA48deIAdNZpBEA8nMBqARnmZhuJdj dnDNRHBh68u7g88PEMHRws/1UP0yH/6WgyEP+78lAUfHd0juqM4z+ST3ex1+ETMaR5ln 21Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fL3o6MyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si9915449edl.552.2020.09.06.23.34.37; Sun, 06 Sep 2020 23:35:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fL3o6MyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726733AbgIGGdy (ORCPT + 99 others); Mon, 7 Sep 2020 02:33:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35485 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726278AbgIGGdx (ORCPT ); Mon, 7 Sep 2020 02:33:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599460432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=17hx+uQnRYN37kt9J2TS1rwaCj5ZQT0lilbznWEFqTQ=; b=fL3o6MyIcQsBrTwrd+aE403ajYSyNlvZYCDwbE+xFspZeP39onyqwmrzM+FlcnauDV4n3H I3xoFhfgsxD+Lc2Ko+bFSNPu0pVB7pv1x+JDEgn0ngVzXRUnw69ZKCPtOQH6xB/pXu6QoE CG27XknfRnjQz0UMxYNVEP1mkbV397M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-AZ6I_DA3P3amXemm0ORAjA-1; Mon, 07 Sep 2020 02:33:50 -0400 X-MC-Unique: AZ6I_DA3P3amXemm0ORAjA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74DC480046B; Mon, 7 Sep 2020 06:33:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7101E805E0; Mon, 7 Sep 2020 06:33:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8C06F204A1; Mon, 7 Sep 2020 08:33:44 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: christian.koenig@amd.com, Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 2/2] drm/virtio: set max_segment Date: Mon, 7 Sep 2020 08:33:43 +0200 Message-Id: <20200907063343.18097-3-kraxel@redhat.com> In-Reply-To: <20200907063343.18097-1-kraxel@redhat.com> References: <20200907063343.18097-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When initializing call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. v2: place max_segment in drm driver not gem object. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c index 75d0dc2f6d28..151471acdfcf 100644 --- a/drivers/gpu/drm/virtio/virtgpu_kms.c +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c @@ -167,6 +167,7 @@ int virtio_gpu_init(struct drm_device *dev) DRM_ERROR("failed to alloc vbufs\n"); goto err_vbufs; } + dev->max_segment = virtio_max_dma_size(vgdev->vdev); /* get display info */ virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, -- 2.27.0