From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 778A7C43461 for ; Mon, 7 Sep 2020 08:40:30 +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 1D7732145D for ; Mon, 7 Sep 2020 08:40:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Lnd5Vtj3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D7732145D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 883536E3C6; Mon, 7 Sep 2020 08:40:29 +0000 (UTC) Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A5BE6E3C6 for ; Mon, 7 Sep 2020 08:40:28 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id w2so13541865wmi.1 for ; Mon, 07 Sep 2020 01:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cJf1kmiWsQZG8IFiIR3q6R3hEFfEZk5imyH5+TkJyPA=; b=Lnd5Vtj3bdjvwakv4ZO/pL5KZE7kSwZH0nHoau2uOrh0hBk2hCL8YO6JlH8QA8pOeH l0AS/mV5iFBnlln7a0ddsvf9/+25wOaJJp+WaFdx3vjrR5/n7CLei4K00D7YKETEpFcQ ZFrL7C4AYrDgU/DxsFzdqmanw5V3xEIpkCzU0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cJf1kmiWsQZG8IFiIR3q6R3hEFfEZk5imyH5+TkJyPA=; b=HsKnTlx9SbA70R0zXukDlP01wpOwPIRyNJIbOuE7P/N2IFBXm9lu/Fb9DA3yW4YFwa 3EHpAxCwF2+YElJM14eINa2cqvxL8J0a5V0UQdgTWwjB6ujGQcoL3BlKbvy21a06bbRF 7p3QOhH1PccOcCAtXmWK3KF/eyxu9twJzlMt18JgwIidiHWo5CAo+yn/iN8CPjWGSO7d HMrXEMXFo9oDiPN0PyEWvboKYTj18Ga6Tk8KHjQOWQ5xQK9dvkVYBnD4aq9g6+kBSR59 0tQKTlP+WS1WstD0+mY3QYGpZP4eL62HBabSBlHnGz4AZktAn+yqpxgWtofIl8IaiA8R gYGQ== X-Gm-Message-State: AOAM530xiaj42VzX9wj/qjMFvbgRhXi2HzTeZgy3p4UsPgjega5eVsi2 I4rp6EEi+hP8M2EU7pcOHwpbZw== X-Google-Smtp-Source: ABdhPJxcceae4ymKyuj2P3/auSOcq/8WOwgttKuu9CM/GDXtd+wBmnh3AulTh4Bg8F0MrHmAz6yH6w== X-Received: by 2002:a7b:cc8f:: with SMTP id p15mr19679857wma.18.1599468027002; Mon, 07 Sep 2020 01:40:27 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id b11sm27220193wrt.38.2020.09.07.01.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 01:40:26 -0700 (PDT) Date: Mon, 7 Sep 2020 10:40:24 +0200 From: Daniel Vetter To: Gerd Hoffmann Subject: Re: [PATCH v3 0/2] drm: fix virtio-gpu + sev Message-ID: <20200907084024.GT2352366@phenom.ffwll.local> References: <20200907063343.18097-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200907063343.18097-1-kraxel@redhat.com> X-Operating-System: Linux phenom 5.7.0-1-amd64 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: christian.koenig@amd.com, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Sep 07, 2020 at 08:33:41AM +0200, Gerd Hoffmann wrote: > virtio-gpu must make sure scatter list segments are not too big. > > Gerd Hoffmann (2): > drm: allow limiting the scatter list size. > drm/virtio: set max_segment So this all feels a bit irky and mid-layer, and why can't the various helpers not just use dma_max_mapping_size(drm_device->dev) directly. And then I read that dma api use in virtio subsystem is a huge mess of hacks, and that it doesn't set up these quirks through the dma api abstraction but throught it's own abstraction on top. So we don't really have any other option I think. I think would be good to add a TODO item to the virtio_max_dma_size call like: TODO: once virtio uses the dma api correctly, remove the explicit max_segment handling na duse dma_max_mapping_size directly everywhere. Or maybe also put that into the @max_segment kerneldoc in the drm_device struct. With that: Reviewed-by: Daniel Vetter on the series. -Daniel > > include/drm/drm_device.h | 8 ++++++++ > include/drm/drm_prime.h | 3 ++- > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ++- > drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++- > drivers/gpu/drm/drm_prime.c | 10 +++++++--- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 3 ++- > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 ++- > drivers/gpu/drm/msm/msm_gem.c | 3 ++- > drivers/gpu/drm/msm/msm_gem_prime.c | 3 ++- > drivers/gpu/drm/nouveau/nouveau_prime.c | 3 ++- > drivers/gpu/drm/radeon/radeon_prime.c | 3 ++- > drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 6 ++++-- > drivers/gpu/drm/tegra/gem.c | 3 ++- > drivers/gpu/drm/vgem/vgem_drv.c | 3 ++- > drivers/gpu/drm/virtio/virtgpu_kms.c | 1 + > drivers/gpu/drm/xen/xen_drm_front_gem.c | 3 ++- > 16 files changed, 44 insertions(+), 17 deletions(-) > > -- > 2.27.0 > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel