Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5487870pxb; Mon, 7 Feb 2022 03:14:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+bmpXUdf3iP/lSQWhtZvAdL6eWhBd2KsR7o6xN3/MhkgvqupCOtIEhA2jaUu/gyRz/xOb X-Received: by 2002:a05:6402:50c8:: with SMTP id h8mr13356630edb.144.1644232462257; Mon, 07 Feb 2022 03:14:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644232462; cv=none; d=google.com; s=arc-20160816; b=NldGRfcO1AEV4ZBW8KLgknzwKPgpiqDEQn8bo0n+7ltIouDEgDwO08mELPOtqUiKKa +ADjvdr7vtVcmHHi+XvsJ5lly8Qp57mZ1o3/sjdGueiBy7KvYF8nbynOy2NLUQcfpHuL 4dNt2GvmxRVE0UiO1tGXNe0tVaXAe4gZAa2T4ZVEwdNDwZPm1sxDJQAtGqm7juOCLnv2 Asz25cDhgHT/n0x1B7spy4LBmrUHJOSajDGyRyn2JL5Zat+q/P6AACYT9eEtkUntO4IH feo9+Z1y3Uo+TvTnaY/USWVkZ1XkIhIszUutXr8gvGD3eJBVNIHXAlNL1ccMVEooMNgA SybA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dhqK+LexBKVRBvGAXiwiJ4MOemzqWPL3dcgosx9OykM=; b=Ota7of1UyFEX5199WGRP9fO7coCIQUVYtldpGLAyqwiSlL5GdtUJZmR6DGC/1Jt/mL N6shAhbujyLWo9IVOY1+ULqhiMv8bKaFp4fwjVYqoLM+F0D2S/I4+YjD3BJbDfXuILSK 8AvM23qlI5nZZTh0HpcXuud5Z9F9mgw88TeaUvB45nkpM7vzimz1HWsJ0VoooJzgGvZ2 pW0SdeMAcVtnQOJ/gw7WEXgfTOrIzzQqqOGO2TOz61r2ktV9uFD4sFIOR9cNwhaTEjKt BeOVu3DRowXnEcs0TYfAR8w66hDH150C5tvxHgN2/Yt/FbPD2mTtThTqQE2VWeaUejz/ Q7TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=knbOgWrb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10si7891915ejy.937.2022.02.07.03.13.56; Mon, 07 Feb 2022 03:14:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=knbOgWrb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233497AbiBDT2S (ORCPT + 99 others); Fri, 4 Feb 2022 14:28:18 -0500 Received: from mga14.intel.com ([192.55.52.115]:4508 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233122AbiBDT2R (ORCPT ); Fri, 4 Feb 2022 14:28:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644002896; x=1675538896; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=/tGio2O+4Nz0M4txcIhkv9RrfgoAhivXZIjNFxQms88=; b=knbOgWrbg5U4REbSuWcEzSk/JKG9jsrReFhtskffxoei3NdsBdQSe0sA fhBI6BPQVEDLFCS0JMqxLizHbFwh5kGCoE1LH2m4uc2+ZSXk+ritFpTfA hGRWys5PGUNqXg7KARSzFPvAJ37b0Hf7JwIffdfgVvR3WOzHsM4u0IcPg 7rvCEWE3rJBlCNjglPZFE5aDY9f+mOb85m/srf8lS2eiY3Y5pWx8s1QZ1 A6FHQHwYEQeSwdhKkwGpaVqeLWhlAkszkmbphK4UVlg+qotTRGIjE7UUJ WkZj2nouBpeorP7b86WjQGekljEma0SFInDU9im7FePdb81+XMLX2B0t3 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10248"; a="248643014" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="248643014" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 11:28:14 -0800 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="498571774" Received: from safernan-mobl2.amr.corp.intel.com (HELO ldmartin-desk2) ([10.212.210.69]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 11:28:14 -0800 Date: Fri, 4 Feb 2022 11:28:08 -0800 From: Lucas De Marchi To: Thomas Zimmermann Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Matthew Brost , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , linux-kernel@vger.kernel.org, Daniele Ceraolo Spurio , Christian =?utf-8?B?S8O2bmln?= , John Harrison Subject: Re: [PATCH 02/19] iosys-map: Add offset to iosys_map_memcpy_to() Message-ID: <20220204192808.dx3wwjfj6sdmj5ze@ldmartin-desk2> X-Patchwork-Hint: comment References: <20220204174436.830121-1-lucas.demarchi@intel.com> <20220204174436.830121-3-lucas.demarchi@intel.com> <59ec3b5a-6e3f-ed8a-4cc1-c0bedb923bb8@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <59ec3b5a-6e3f-ed8a-4cc1-c0bedb923bb8@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 04, 2022 at 07:48:10PM +0100, Thomas Zimmermann wrote: >Hi > >Am 04.02.22 um 18:44 schrieb Lucas De Marchi: >>In certain situations it's useful to be able to write to an >>offset of the mapping. Add a dst_offset to iosys_map_memcpy_to(). >> >>Cc: Sumit Semwal >>Cc: Christian K?nig >>Cc: Thomas Zimmermann >>Cc: dri-devel@lists.freedesktop.org >>Cc: linux-kernel@vger.kernel.org >>Signed-off-by: Lucas De Marchi >>--- >> drivers/gpu/drm/drm_cache.c | 2 +- >> drivers/gpu/drm/drm_fb_helper.c | 2 +- >> include/linux/iosys-map.h | 17 +++++++++-------- >> 3 files changed, 11 insertions(+), 10 deletions(-) >> >>diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c >>index 66597e411764..c3e6e615bf09 100644 >>--- a/drivers/gpu/drm/drm_cache.c >>+++ b/drivers/gpu/drm/drm_cache.c >>@@ -218,7 +218,7 @@ static void memcpy_fallback(struct iosys_map *dst, >> if (!dst->is_iomem && !src->is_iomem) { >> memcpy(dst->vaddr, src->vaddr, len); >> } else if (!src->is_iomem) { >>- iosys_map_memcpy_to(dst, src->vaddr, len); >>+ iosys_map_memcpy_to(dst, 0, src->vaddr, len); >> } else if (!dst->is_iomem) { >> memcpy_fromio(dst->vaddr, src->vaddr_iomem, len); >> } else { >>diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c >>index 238f815cb2a0..bf5cc9a42e5a 100644 >>--- a/drivers/gpu/drm/drm_fb_helper.c >>+++ b/drivers/gpu/drm/drm_fb_helper.c >>@@ -385,7 +385,7 @@ static void drm_fb_helper_damage_blit_real(struct drm_fb_helper *fb_helper, >> iosys_map_incr(dst, offset); /* go to first pixel within clip rect */ >> for (y = clip->y1; y < clip->y2; y++) { >>- iosys_map_memcpy_to(dst, src, len); >>+ iosys_map_memcpy_to(dst, 0, src, len); >> iosys_map_incr(dst, fb->pitches[0]); >> src += fb->pitches[0]; >> } >>diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h >>index f4186f91caa6..edd7fa3be9e9 100644 >>--- a/include/linux/iosys-map.h >>+++ b/include/linux/iosys-map.h >>@@ -220,22 +220,23 @@ static inline void iosys_map_clear(struct iosys_map *map) >> } >> /** >>- * iosys_map_memcpy_to - Memcpy into iosys mapping >>+ * iosys_map_memcpy_to_offset - Memcpy into offset of iosys_map > >'iosys_map_memcpy_to' > >With that fixed: > >Reviewed-by: Thomas Zimmermann thanks, I noticed that, but looks like I squashed to the wrong patch. Lucas De Marchi