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 6EE0EC5478C for ; Mon, 4 Mar 2024 10:55:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C8D310E486; Mon, 4 Mar 2024 10:55:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VcNx33Ax"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9933B10E486 for ; Mon, 4 Mar 2024 10:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709549727; x=1741085727; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=c2NAZD7gP/Ky/OM8/CpOAh8mZ/08xMq+GgBxkXUfyl0=; b=VcNx33AxOcc+5wh7pe7zCLawW0TxkC1+B7Ia0SPSNPVjfCqaM4TecEY1 jtUaz5MqoOxLE8ejf/NXaRf8++do1plyGAEsm3d37ssfeek+C06F6+55d yvM77NCkcBsgmsMhyR6kF/uhbBfl4YC3t6MTWX9SZUtKtFnTZ2FYN8i6n GXr3aQztB8xNFYW8qAMUTd1iqX0q5RyiHoxIXgpyVbrr2VgH+rQnLB6mm UcuYNbXCWuqdQa6j/Vkntg3j0yrqD91+5V51vaO6F1efh51mxDd921yiM WNoWFVcjqrIYEyJ6La9RlK2mpJzDBEKJK6ATwBIDNQ4mOJtvZHuVIdMb0 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="21493441" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="21493441" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 02:53:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="8867934" Received: from bhanu-nuclab.iind.intel.com ([10.145.169.172]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 02:53:19 -0800 From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Cc: Bhanuprakash Modem Subject: [PATCH i-g-t 1/2] lib/igt_fb: Use engine copy for MC/RC CCS formats Date: Mon, 4 Mar 2024 16:17:09 +0530 Message-ID: <20240304104710.3253030-1-bhanuprakash.modem@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Use Render/Vbox engine to copy FBs with MC-CCS & RC-CCS formats. Signed-off-by: Bhanuprakash Modem --- lib/igt_fb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 0ac2a76b0..0474d8e11 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -3061,7 +3061,12 @@ static void free_linear_mapping(struct fb_blit_upload *blit) igt_nouveau_delete_bo(&linear->fb); } else if (is_xe_device(fd)) { gem_munmap(linear->map, linear->fb.size); - blitcopy(fb, &linear->fb); + + if (blit->ibb) + copy_with_engine(blit, fb, &linear->fb); + else + blitcopy(fb, &linear->fb); + gem_close(fd, linear->fb.gem_handle); } else { gem_munmap(linear->map, linear->fb.size); @@ -3141,7 +3146,10 @@ static void setup_linear_mapping(struct fb_blit_upload *blit) linear->map = igt_nouveau_mmap_bo(&linear->fb, PROT_READ | PROT_WRITE); } else if (is_xe_device(fd)) { - blitcopy(&linear->fb, fb); + if (blit->ibb) + copy_with_engine(blit, &linear->fb, fb); + else + blitcopy(&linear->fb, fb); linear->map = xe_bo_mmap_ext(fd, linear->fb.gem_handle, linear->fb.size, PROT_READ | PROT_WRITE); -- 2.43.0