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=-11.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 2A691C4363A for ; Thu, 8 Oct 2020 15:36:01 +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 9CB4420657 for ; Thu, 8 Oct 2020 15:36:00 +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="dGDSSLAi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CB4420657 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 EB92B6E3DF; Thu, 8 Oct 2020 15:35:59 +0000 (UTC) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45CEF6E3DF for ; Thu, 8 Oct 2020 15:35:59 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id h7so7132425wre.4 for ; Thu, 08 Oct 2020 08:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=9sM8OV2emicSSgKUYTtCQMaEpJ4acgy1c6O/56Zq6Oo=; b=dGDSSLAihGRqMk4uF3NVxQAfBB8JtG0nhT+TtI+6X82vDcDzVzQJ5rQI0AjYcXav6W /pBJa9zMZbIHT1B+LuM/QnEDSRfeclIyPLqPHH0oSrJIVo3ARvlX364kS/Vz4K40IKqQ 5El1aMMn7ZBwEnRlFrRKx4ELy2cr94LmWLsKLtc5n8/uucnB8FLGlk2vUMJObVCu+rWl pgfGjHVEYLvwz2dn8AqdgqqE8cNzF3tfcJTs+JpYlVGhVfvYLyBOhk1AMOlaNV76OB8K yzCv15Oqzr868GyoPSybw9Y2OQrUGAbcrJGzbR/Izxe7PrbvYKFxYsu3nDx7kXh3JkZ2 4F6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=9sM8OV2emicSSgKUYTtCQMaEpJ4acgy1c6O/56Zq6Oo=; b=JLl6MYpZZe78fjd66ADQF3CGITCpYlxSQflGw9gZJzDge+UqMgzmcs9Oai+lykliPM xF/e5jOvDqQ9uFjayznSkCvWf98Rsm/cbSqTYD6lKyVTn1yZwsYKvv3cWBFuimgMQ8Z9 XIYRqjo7CCDcl2FhciAJYo6C2FSQEmloj6Ctfxky9d9eidneo90I+tUt/17MXrCl5jlh JdfNICzulTgjSnZw2FdlMcDYg80eQDT5JCsF2t3Y/x0rDOkG0W2kDQFwJjB+PImLa/sq q5EQCRWDnUFBJ+8YzZZ7ppFLin2zCbTey/3HPDb481YgS9vr6Iy/6Yg00I5uHOZl12Jg HZEg== X-Gm-Message-State: AOAM531m/aISj6DAOS8tFE+XryS4dxN72gWFu/wuluGi1Kvs8BSLXGL7 rwpaIcHD1x1+MO13Ysqgxl8= X-Google-Smtp-Source: ABdhPJzur3cynY/5Bbw77VfAZaC4C6hT9eyZOSItC+slMlrkZYtvBoIewob3T44rU/3WFalnMKetOw== X-Received: by 2002:adf:eb41:: with SMTP id u1mr2850331wrn.94.1602171357995; Thu, 08 Oct 2020 08:35:57 -0700 (PDT) Received: from [192.168.1.125] (46-126-183-173.dynamic.hispeed.ch. [46.126.183.173]) by smtp.gmail.com with ESMTPSA id o186sm7679110wmb.12.2020.10.08.08.35.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Oct 2020 08:35:57 -0700 (PDT) Subject: Re: [PATCH 3/5] drm/vmwgfx: add a move callback. To: Dave Airlie , dri-devel@lists.freedesktop.org References: <20201006000644.1005758-1-airlied@gmail.com> <20201006000644.1005758-4-airlied@gmail.com> From: Roland Scheidegger Message-ID: Date: Thu, 8 Oct 2020 17:35:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20201006000644.1005758-4-airlied@gmail.com> Content-Language: de-DE 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Both vmwgxf patches look good to me too. Reviewed-by: Roland Scheidegger Am 06.10.20 um 02:06 schrieb Dave Airlie: > From: Dave Airlie > > This just copies the fallback to vmwgfx, I'm going to iterate on this > a bit until it's not the same as the fallback path. > > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > index 2f88d2d79f9a..6e36fc932aeb 100644 > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > @@ -725,6 +725,23 @@ static void vmw_swap_notify(struct ttm_buffer_object *bo) > (void) ttm_bo_wait(bo, false, false); > } > > +static int vmw_move(struct ttm_buffer_object *bo, > + bool evict, > + struct ttm_operation_ctx *ctx, > + struct ttm_resource *new_mem) > +{ > + struct ttm_resource_manager *old_man = ttm_manager_type(bo->bdev, bo->mem.mem_type); > + struct ttm_resource_manager *new_man = ttm_manager_type(bo->bdev, new_mem->mem_type); > + > + if (old_man->use_tt && new_man->use_tt) { > + if (bo->mem.mem_type == TTM_PL_SYSTEM) { > + ttm_bo_assign_mem(bo, new_mem); > + return 0; > + } > + return ttm_bo_move_ttm(bo, ctx, new_mem); > + } else > + return ttm_bo_move_memcpy(bo, ctx, new_mem); > +} > > struct ttm_bo_driver vmw_bo_driver = { > .ttm_tt_create = &vmw_ttm_tt_create, > @@ -735,7 +752,7 @@ struct ttm_bo_driver vmw_bo_driver = { > .ttm_tt_destroy = &vmw_ttm_destroy, > .eviction_valuable = ttm_bo_eviction_valuable, > .evict_flags = vmw_evict_flags, > - .move = NULL, > + .move = vmw_move, > .verify_access = vmw_verify_access, > .move_notify = vmw_move_notify, > .swap_notify = vmw_swap_notify, > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel