Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3381356yba; Mon, 29 Apr 2019 00:59:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYI4v0DICC0DCBSDrE+gVXu3MgHgbWT6JsK1gG9MM/3GJrk2j3yMvpk2+aGD5a3/irjPVi X-Received: by 2002:a63:d709:: with SMTP id d9mr15632804pgg.38.1556524772231; Mon, 29 Apr 2019 00:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556524772; cv=none; d=google.com; s=arc-20160816; b=ZoPX75Qn6fjfCOwhQUg4j7ytWCr8ldwb1qVlp0wqlDu/PuHPAwsxQ2AVSTipNJUeLL B+Xd4IKm7/x+oJnCH+hdKXm1sI6ckX2/5oEIIDsRC4OH/EfYLG08v5lSYUCfkwnNmX/f BJTeDL3M/uSfcZvXm92OFBypVjzv6kDgSW1LIxPvTHYVwj4VXJkMBewTTtDPdJX2zXK/ AChQegSf6BGGZHMQyLAUhcAV14BlU8U9cC/vwU6jzcmskVvCJwuGYz1Fn5L93KzTBqtr ZrgC52feLHxpHa3nl2OoOCp3vMj3lQkmRvbAz4WtrVRSY4GV+VDq3oK1rZ20HTMhF4xt uOOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UeOi90RYK8x7ozYD+9mGxr1il4jAoIstt7bREKCu3cA=; b=peZk7TEFsRCcDHiSn0OgDEVvbNu2XzKJEkDaQPoKSCghdFA1ASxXe13NEJo908X/bD Gw5kCDM27VWXGn31mWl/WXEdjyhGGHoER0vXBo8xMKiEmT0alZ2eLOkJ27IiYc0Z302I NXaR1ASO0conoaLZ6esM9dr+7iK2TDCxqWi27IOpd2JhCBWMU364EHao/hZSDvRFaJOs RZ+93hhhY5AwRakqY2tNQjJc6M+hHo8r5e9Az5XlcFoPFKlqeSGUszb3qqWdflgJLqqU tNyRMqWq3FkQmBCfnXMG+G+uwcHGfg5NEbDX8FWYKCYajvdQcLfSsttzLn0tnMU1sgm2 VC4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=D8ZGXuNP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si10396928pgs.490.2019.04.29.00.59.16; Mon, 29 Apr 2019 00:59:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=D8ZGXuNP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727512AbfD2H62 (ORCPT + 99 others); Mon, 29 Apr 2019 03:58:28 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:53143 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbfD2H61 (ORCPT ); Mon, 29 Apr 2019 03:58:27 -0400 Received: by mail-it1-f195.google.com with SMTP id x132so14901105itf.2 for ; Mon, 29 Apr 2019 00:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UeOi90RYK8x7ozYD+9mGxr1il4jAoIstt7bREKCu3cA=; b=D8ZGXuNPj9TpGPOtq1s2SfKPo8/hGGiu/RdCPTwWh9MfYk3OL8KyrOZNnRvCz92Rb2 d0PMJUqsi8lwo6mK4r6I+8T+rcP2qoGPi52PcZkxlJ3J4OwpJ9igf36ba1TNmUPvpj5b QhnTTh0tqGm70lA32HYjSGl8FLFMHP2IhsoxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UeOi90RYK8x7ozYD+9mGxr1il4jAoIstt7bREKCu3cA=; b=rH3KOQ+CJg10Q7ZJoKGQmS3CJGBU0NEcTB9qrX2H1vbdsRlkHdS4YjnEdh8xu2K04B roB2p7ZT/9bayZd9r0fU+jVpzzA5aGG9oo0gaprcCzXNQXOh+8EQpXVicgUVXoByvK/l /S+qu0jwEWKS5+cot/Z3GFejv74xZuf6mRoOFZyS2D5nJwDS2TkJI9T7Pc8tWEPzKbAG nO4ACIBPJLrvHN3x5GAghvzOVm6V1bZh6V2Ne46JX4vpgWKKEiYnzaZMxKhcvWwQzS+z uCI3TkxEQQcgEo3EBL7zCoKBIVRs2bj1Bg+ffLB+Eup/LyydEOpsgUMJsJZHcPI0ubzk s3sw== X-Gm-Message-State: APjAAAV8fKif4VaNQjo+aXv8FbC0Z7eB/f1O9mlgWI6ogd2Dqpb9fRXI +UE0UHJrNwY0WkcFkg/kRQmt0uXBGEX8+19xMIZYWQ== X-Received: by 2002:a02:a394:: with SMTP id y20mr19482883jak.96.1556524706956; Mon, 29 Apr 2019 00:58:26 -0700 (PDT) MIME-Version: 1.0 References: <20190426053324.26443-1-kraxel@redhat.com> <20190429075413.smcocftjd2viznhv@sirius.home.kraxel.org> In-Reply-To: <20190429075413.smcocftjd2viznhv@sirius.home.kraxel.org> From: Daniel Vetter Date: Mon, 29 Apr 2019 09:58:14 +0200 Message-ID: Subject: Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks" To: Gerd Hoffmann Cc: David Airlie , open list , dri-devel , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , David Airlie Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 9:54 AM Gerd Hoffmann wrote: > > On Fri, Apr 26, 2019 at 04:21:37PM +0200, Daniel Vetter wrote: > > On Fri, Apr 26, 2019 at 7:33 AM Gerd Hoffmann wrote: > > > > > > This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. > > > > > > Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime > > > import/export callbacks". We have to do the same with qxl, > > > for the same reasons (it breaks DRI3). > > > > > > Drop the WARN_ON_ONCE(). > > > > > > Fixes: f4c34b1e2a37d5676180901fa6ff188bcb6371f8 > > > Signed-off-by: Gerd Hoffmann > > > > Maybe we need some helpers for virtual drivers which only allow > > self-reimport and nothing else at all? > > The current gem prime helpers handle this reasonable well, > I don't see a need for that. > > More useful would be some way to signal this self-reimport capability > to userspace somehow. See DRM_PRIME_CAP_LOCAL patch. Userspace is supposed to test whether import/export works for a specific combo, not blindly assume it does and then keel over. I think we need to fix that, not add more flags - there's lots of reasons why a given pair of devices can't share buffers (e.g. all the contiguous allocations stuff on socs). > Right now I have the choice to set DRM_PRIME_CAP_{IMPORT,EXPORT}, in > which case some userspace assumes it can do cross-driver export/import > and trips over that not working. Or I do not set > DRM_PRIME_CAP_{IMPORT,EXPORT}, which breaks DRI3 ... Yeah that's not an option. -Daniel > > I think there's qxl, virgl, > > export is implemented for virgl, and import should be possible too. > > qxl/bochs is simliar to vmgfx, it could be done but dma-bufs would > basically be bounce buffers (need copy from/to vram) so probably not > worth the effort. > > cheers, > Gerd > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch