Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1008772imu; Wed, 9 Jan 2019 09:59:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN5qYV2SMRu3gkZZ1yxTPmGZiI76GSxX/8p89xiOJHxMD3qS+eEQxDLAx5pIJuHVJowZUVoO X-Received: by 2002:a17:902:b83:: with SMTP id 3mr6693331plr.42.1547056761903; Wed, 09 Jan 2019 09:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547056761; cv=none; d=google.com; s=arc-20160816; b=Gzxt2d2RN1S3J7M3cbhTLqDslvn5XwtfgDLNTJ+qyliqUYdQMC9amhHjRbyK2Usuk4 rKEkg6pHdRL8upr9cuzwLf8pUmzUo5Yrfywhcv8K0VVUJfpL47U/qN1cad81vfukW+pS QYC9PDYHNNDLm35ubSlpgcrClK7KlmxBjgyGa5eCdXUpch3NC8vdwTs+c9M/xYwkNgWt N1LEln72W6P36Kf8ivcorByeUSdq7T94n3vls1Y1oOOnLaJOYyS6C/mRadQMPIDE25zE Go3kMCRD0ljS+9Ji6oB/L37TnIjxy8XutmsIYqA4G/NcsEHmjqTAslC8vWCRrEiakKqb qW5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=5rrQlSiXXcgkF3C2iJ/0vpfDzZJpTV6UHPESi2T9hWk=; b=iPLPnWseA3ZF61Z0FGZIY47eep5xhRkMcTHY9r2vIZh7y1z+RBt1LO9jw37+Qj+lyU riGiRfgw2wjszy13mV2/dbqMpV6/s40pWGmaMJvgynMvzX665jXO1EcpSrzc+KLeGmIZ +0/X2j8BstPUuKP0QOULXx9RIf7sgxU/kW6xVoyO4zb1QrKLaWgheYRjeiCGOTbgzPaO /38oqeHS1+jwG9xDFQeRVTOi6DEWsZ2nMCQ+Yh5x+dmyyxS0eteeYzwNMthJrsfHpOU4 jW0hZ8vvBB8vnj1DUHmseYUiTavAD25OMIblLXoQEu211Fv0B2m9KiCY7tL8CF/roHDh POcw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si9625426pld.229.2019.01.09.09.59.06; Wed, 09 Jan 2019 09:59:21 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732155AbfAIOyr (ORCPT + 99 others); Wed, 9 Jan 2019 09:54:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2403 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731733AbfAIOyq (ORCPT ); Wed, 9 Jan 2019 09:54:46 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 5879EC07015A; Wed, 9 Jan 2019 14:54:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-203.ams2.redhat.com [10.36.116.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2527608DD; Wed, 9 Jan 2019 14:54:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D664C16E03; Wed, 9 Jan 2019 15:54:43 +0100 (CET) Date: Wed, 9 Jan 2019 15:54:43 +0100 From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, David Airlie , andr2000@gmail.com, David Airlie , open list , "open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" Subject: Re: [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin Message-ID: <20190109145443.l5yus2pgvxcl4zbt@sirius.home.kraxel.org> References: <20190108112519.27473-1-kraxel@redhat.com> <20190108112519.27473-16-kraxel@redhat.com> <20190109101044.GS21184@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190109101044.GS21184@phenom.ffwll.local> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 09 Jan 2019 14:54:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 11:10:44AM +0100, Daniel Vetter wrote: > On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote: > > The buffer object must be reserved before calling > > ttm_bo_validate for pinning/unpinning. > > > > Signed-off-by: Gerd Hoffmann > > Seems a bit a bisect fumble in your series here: legacy kms code reserved > the ttm bo before calling boch_bo_pin/unpin, your atomic code doesn't. I > think pushing this into bochs_bo_pin/unpin makes sense for atomic, but to > avoid bisect fail I think you need to have these temporarily in your > cleanup/prepare_plane functions too. I think I've sorted that. Have some other changes too, will probably send v3 tomorrow. > Looked through the entire series, this here is the only issue I think > should be fixed before merging (making atomic_enable optional can be done > as a follow-up if you feel like it). With that addressed on the series: > > Acked-by: Daniel Vetter Thanks. While being at it: I'm also looking at dma-buf export and import support for the qemu drivers. Right now both qxl and virtio have gem_prime_get_sg_table and gem_prime_import_sg_table handlers which throw a WARN_ONCE() and return an error. If I understand things correctly it is valid to set all import/export callbacks (prime_handle_to_fd, prime_fd_to_handle, gem_prime_get_sg_table, gem_prime_import_sg_table) to NULL when not supporting dma-buf import/export and still advertise DRIVER_PRIME to indicate the other prime callbacks are supported (so generic fbdev emulation can use gem_prime_vmap etc). Is that correct? On exporting: TTM_PL_TT should be easy, just pin the buffer, grab the pages list and feed that into drm_prime_pages_to_sg. Didn't try yet though. Is that approach correct? Is it possible to export TTM_PL_VRAM objects (with backing storage being a pci memory bar)? If so, how? On importing: Importing into TTM_PL_TT object looks easy again, at least when the object is actually stored in RAM. What if not? Importing into TTM_PL_VRAM: Impossible I think, without copying over the data. Should that be done? If so, how? Or is it better to just not support import then? thanks, Gerd