Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CC2E6C001E0 for ; Thu, 20 Jul 2023 04:21:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A31B910E557; Thu, 20 Jul 2023 04:21:28 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id B362610E553 for ; Thu, 20 Jul 2023 04:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689826881; x=1721362881; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GVt+qcpb6ExS+OAGVcx8qqubopJKKpA4wtDnDzjZJsI=; b=FjJSFCMljSdWro3PBKUrJxdSzC8mWazehyElsDPGupE88YxtmubZa8EN B8UbIaWO7W9wL34nbAu4ItLgSKLARPNb7jyPZpUDBWyHjK70uqr+y3dUO oO1abnjtIFssMEu99p7/WJqzkv0ZcCRaeSIYwIzVsewy45z2zUytL0NTt qm2SPW4ElW2TrUXle7Uswhue5n3B1lcnB7p79309oGRi5h75WBM7qGSMN 7xvf6gBgnF5grETzZDbZXEnMOxnAB6qVlY24EE464RURKsTBhAS/CwvCk 5+Vo4Ws37Xc7rrV0TuwqP4A7Hx3hdgOOnX3Tq5ISrRMHNHxEUI7a2iNHe g==; X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="366661716" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="366661716" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 21:21:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10776"; a="724245056" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="724245056" Received: from lstrano-desk.jf.intel.com ([10.24.89.184]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 21:21:19 -0700 From: Matthew Brost To: Date: Wed, 19 Jul 2023 21:21:14 -0700 Message-Id: <20230720042115.119494-7-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230720042115.119494-1-matthew.brost@intel.com> References: <20230720042115.119494-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH v3 6/7] drm/xe: Combine destroy_cb and destroy_work in xe_vma into union X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" The callback kicks the worker thus mutually exclusive execution, combining saves a bit of space in xe_vma. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_vm_types.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h index 268d2475f2ae..809cfe734d43 100644 --- a/drivers/gpu/drm/xe/xe_vm_types.h +++ b/drivers/gpu/drm/xe/xe_vm_types.h @@ -60,11 +60,12 @@ struct xe_vma { struct list_head destroy; } combined_links; - /** @destroy_cb: callback to destroy VMA when unbind job is done */ - struct dma_fence_cb destroy_cb; - - /** @destroy_work: worker to destroy this BO */ - struct work_struct destroy_work; + union { + /** @destroy_cb: callback to destroy VMA when unbind job is done */ + struct dma_fence_cb destroy_cb; + /** @destroy_work: worker to destroy this BO */ + struct work_struct destroy_work; + }; /** @userptr: user pointer state */ struct { -- 2.34.1