From patchwork Tue Feb 22 14:52:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Vivekanandan, Balasubramani" X-Patchwork-Id: 12755259 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 16DC9C433FE for ; Tue, 22 Feb 2022 14:51:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D692F10E873; Tue, 22 Feb 2022 14:51:42 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 03BAF10E86F; Tue, 22 Feb 2022 14:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645541501; x=1677077501; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=VXtBH/tFxc3NszXBMFoAAgCErLL6P+1p/gA6reiXs/o=; b=ZxOy9J5scci1lwxjfewNb9xEUkJ9nSwL+o7vBQWZ2DLV6Ug5+MM/etQR 0fTfT6OnR2wy2QpgdVq9phyW2DHFGUGWBGJTfQ17xZUsTGsKH2/VG9AL1 h7RGSjT9pza84lxIJ0DX+ezViN3MCayg9f7gLdm/kmr92s+F4FqCyTsH8 pfj1Dh18aZzknVJqtCXvHvfeFobcfW/uw7NaDFyFIJnkFScCc377LPfV5 /JYFlveGqNAyf8PrtCb1fxt1r6GsDQn842WEx7qfYUdmIG9HWlE34kB86 tOCy2N7cDJsJuYdmTETnjJoFTU6ow5AaxvQjRuOTBvBTFTZleBwI1ALau w==; X-IronPort-AV: E=McAfee;i="6200,9189,10265"; a="312440099" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="312440099" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 06:51:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="573453861" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 22 Feb 2022 06:51:40 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 22 Feb 2022 06:51:39 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 22 Feb 2022 06:51:39 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 22 Feb 2022 06:51:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIY9HdSTBL1SUgwsGHKPICdWiutqJXqq/ssPGDEOCjyb17E5dlL80Y7C2uaENHxHATs37JYrqxAyJJXVdwwO/kenExLIWaD/ITBAGJ0HTNdvvUF+9PVVoX+XUPu+KLHCAK9CkYpAK/a3cPtLC/9yuKjwRT+t9+Y/MweRpxcEOJ7F+vgkLHWf1Lrm7okoV7Y7T+iTGGuosXtjPlrSQZXOZU4bvjf8kcyn6o02lkTaw1+xKkCycNnCGvdfoUGBZ/R7nH6sFMhC/ep3BtI77x02CY1xlv8IxkQ9XXCYcRWEsGuDu0k3o9z78yVLwqCA0zImYkdWdRgPDOIwzU5rNaU6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ljaRwhQ3F/uem86iufLcOyS0pYWf6MP1dv4fjaf7Ndw=; b=WVdiza91VdRGbY8xIrAYRTkfbwv2BVPdyjrk7Fe3nDCqsyHv3mryk+HrY/hKuJi0GFKNrFAMlWwupzsrHcxOhO+aXtrtcbcA2EqGTP6PNBrjpsp4HrGOCl2Vcvxa4CSnbkXzyGUxRVPYBqTyeEiAno5S+hk81FBFZhMNX3SXg0gwWghkHRqmM2RWy7wUyTlFcrcoJtL1uqXyATERT3cyJoCz/45zacQOkNWif+o/BdrCCLtD9V0PwSpEIk28gzhRgHFDGjuJ8nByD+4F1RqFZMQiMQ6yhu1aEXGT7YyGUTuk2eeA7f/Y+tBwQtz0E6dLQ/hxeAvhRoyLfmjfqiT7WA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB4894.namprd11.prod.outlook.com (2603:10b6:a03:2d4::5) by BYAPR11MB3221.namprd11.prod.outlook.com (2603:10b6:a03:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21; Tue, 22 Feb 2022 14:51:37 +0000 Received: from SJ0PR11MB4894.namprd11.prod.outlook.com ([fe80::d67:8a16:f4cd:b475]) by SJ0PR11MB4894.namprd11.prod.outlook.com ([fe80::d67:8a16:f4cd:b475%9]) with mapi id 15.20.4995.027; Tue, 22 Feb 2022 14:51:37 +0000 From: Balasubramani Vivekanandan To: , Subject: [PATCH 4/7] drm/i915/guc: use the memcpy_from_wc call from the drm Date: Tue, 22 Feb 2022 20:22:03 +0530 Message-ID: <20220222145206.76118-5-balasubramani.vivekanandan@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220222145206.76118-1-balasubramani.vivekanandan@intel.com> References: <20220222145206.76118-1-balasubramani.vivekanandan@intel.com> X-ClientProxiedBy: BM1PR01CA0113.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::29) To SJ0PR11MB4894.namprd11.prod.outlook.com (2603:10b6:a03:2d4::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 93211441-5f06-4e7a-12c1-08d9f612d402 X-MS-TrafficTypeDiagnostic: BYAPR11MB3221:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bEeuSZUymeQR2+D2g4H+FTEdnLegFQlk59vlBv8dVw3mLNaJrq0aDtTmSjgwysaWwLIsowRAeOeF4hkzbb7ZvcLt2GZk9wDl1hNsPBysugKG0+lj7CqLy5Pci9yJFYD5ZiHWNcjGWYLUBx6iylyphBQ9ti1RMJZyh4jMXI9CmbrJaljugEvPCEBWacheItTFSImXXEIjnot2G4xxi328+bq/v666/Cpw31aHxSs46MSYWefeP1zSsggtYvorcpdAhcn9rgjySWNPBRoB3M01fUWirwWQPbK9pKFPdXz3qS0KqAcHvGTW4luzky9jfFeOUpTgEBsTk1XNuA14Bj14uaFpVXIpajUq84GJwGqTqhb16kUthyOH8UbdqDJr0nttovc901DjbpzMaMDyCj34eKOliT9mFWXfxp7D2mTWYbaGy/7Mykei/n5gV4pd4tNaFNW5zQqUek03KW7zMe8R840e6TeqA/yuTsUUe3FVZVc97sejLMfvpNv8HP2ZjZoSpPgaYaTrkqEm0CPL9shM1vDi7242VDfG5fNqCsdRbvJwmDKANu1Pg0Ow8qqByU1BsfXKNs/6ZQ/EESd4CmU3ug5CgxWMPxbD3MLqDayg0WBmMtKHl7aGoerrVbobjuhiuW/ncIApxzjq/8YIT7OfpyhjTB118YMovfuLVR5odeNo9KUlVwAGUmyJEK5YhaO+zqfJ8p6KQoudlmjDeRwD8g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB4894.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6486002)(2616005)(316002)(66946007)(83380400001)(4326008)(450100002)(8676002)(186003)(1076003)(66476007)(38100700002)(66556008)(26005)(6666004)(6512007)(6506007)(82960400001)(5660300002)(44832011)(8936002)(36756003)(43170500006)(2906002)(508600001)(86362001)(107886003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PNOhlQxpqF06WSdSrJw25kjO6lcz?= =?utf-8?q?c9tCxXip3V1v6v4b15KK0NJvaccCCMPl/U23IytQvX80EYLYH/S9HKdM3zY7keOBo?= =?utf-8?q?KnPVZDylYtFwxNRj35mYUNEGOMB/sPXNySwZjotEcsMnDKmiM0JhrzCicYy0e9Hcq?= =?utf-8?q?KNwfwmMV60u9l/puwo5SinsC/uuaUbPGe/lI8AkX77xFppy1Z0pqc80+Grz5H17VB?= =?utf-8?q?5BocP/tOisKyfAAhUCE6s0N59ZZI/LVWpQ9MmDFX+abNH11RtfwRvYvpDVZrLEs6O?= =?utf-8?q?0p7y+S/J1Vbm++A6Xgrq4jXlzseYEL9yneKszU+jSHVJwxthryBTnB3DJGi1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utf-8?q?3SBIGiwYZmU89anpBcI4rxB3LtFUpfSENRTbBlZmEvuSYnmF/2vzxerszORPKHKoE?= =?utf-8?q?e923ZdkM76fkhQfxTx0eWiWjydWh04hsYmWJPID3Hhq1QvCVY+GIeVAgzJSnrt50d?= =?utf-8?q?SXZLOdS24BcqsUhe+kRG/vZjS3qkO3U8Xf/PEvV4ZpaydT5l6vwenMHVwLxzlRHUL?= =?utf-8?q?y/Kp924y71haM+aAl44klc7XlL3tkbxK5Ly13/QjsdQycUHx/ldU0JYenhSE3oKlq?= =?utf-8?q?QyXJhmRwGH2/zrjp2da9en5lsmFCmo9quFFuyiDp3VLy1PrX1j3sEQJ7Lq6KYUgKu?= =?utf-8?q?Uh0nN9RJc4Ki28jHNtx/8we27FeppXXWgq+dCi6YGfXxqNNXIkGgZZLRpR/UCdJzK?= =?utf-8?q?1DFU9OsrzR/CEkZ2I7c2jEkwsvUTHeeMRNaRUovvARPyFAxslCz+T0OES/8j/ADb2?= =?utf-8?q?BE+MAeouPCRIIxwpu5JrVMB+X3XShdTA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 93211441-5f06-4e7a-12c1-08d9f612d402 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4894.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2022 14:51:37.7635 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TuFmVIGtf4iXlm47gAYX9WN9VKNfGBay0aY/Yq0G/uW9xf0uQlopfXNIhM5o7ObT8bSw1qYVt2evfTFXQjt/rDYXQ3/SHSHarBrAY/FF+i02/cU5MSfte79heKkGlx/R X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3221 X-OriginatorOrg: intel.com 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: michael.cheng@intel.com, Balasubramani Vivekanandan , wayne.boyer@intel.com, casey.g.bowman@intel.com, lucas.demarchi@intel.com, siva.mullati@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" memcpy_from_wc functions in i915_memcpy.c will be removed and replaced by the implementation in drm_cache.c. Updated to use the functions provided by drm_cache.c. Signed-off-by: Balasubramani Vivekanandan --- drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c index b53f61f3101f..1990762f07de 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c @@ -3,6 +3,7 @@ * Copyright © 2014-2019 Intel Corporation */ +#include #include #include "gt/intel_gt.h" @@ -205,6 +206,7 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log) enum guc_log_buffer_type type; void *src_data, *dst_data; bool new_overflow; + struct iosys_map src_map; mutex_lock(&log->relay.lock); @@ -281,14 +283,17 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log) } /* Just copy the newly written data */ + iosys_map_set_vaddr(&src_map, src_data); if (read_offset > write_offset) { - i915_memcpy_from_wc(dst_data, src_data, write_offset); + drm_memcpy_from_wc_vaddr(dst_data, &src_map, + write_offset); bytes_to_copy = buffer_size - read_offset; } else { bytes_to_copy = write_offset - read_offset; } - i915_memcpy_from_wc(dst_data + read_offset, - src_data + read_offset, bytes_to_copy); + iosys_map_incr(&src_map, read_offset); + drm_memcpy_from_wc_vaddr(dst_data + read_offset, &src_map, + bytes_to_copy); src_data += buffer_size; dst_data += buffer_size;