Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4192940rwd; Tue, 30 May 2023 01:39:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70fBClZTSX7WmU+vmsw/m84fLsl4rd5+dnQi7m5/AY1AlAVx+pXdOIUsvCm99jIXbOBqeP X-Received: by 2002:a17:90b:ed0:b0:24e:3b69:a87f with SMTP id gz16-20020a17090b0ed000b0024e3b69a87fmr1821699pjb.25.1685435964383; Tue, 30 May 2023 01:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685435964; cv=none; d=google.com; s=arc-20160816; b=Aa76Iz2iA5iGhb4T7zSqWUrqroUGCmqwSVruR35ntrgMM1DIz5HboMfjpZyY8dm6uX 6rVdkw8V+FPS+uHqA1QY9OYCun5ulh7ESHKqhin2yNP15sLGKrhpklURdfAotcOZ3mTL LVqVBjUGogXSRWPHwkuT+L7/0TbMqsY0aLHW/zefG9kCpvcYmM6zSosYLfCPNFu/+Vpc DpENbKElHbBlr9fiFImSM15cJwmxStnROsEmQFekrfVMTTpzoWc4K6hFAB+uBxg5OuQx 1r3n4tn3jxziIma+Bsgpm1btZzpYfH75YgM3t7ZMdTWoLxNKC2Dmry5GoHRWv5GUtisj ihjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Fy7SR/HzB92IkMAazWT76QIOXbthJ6EyN1HdPKvysFk=; b=F6eDJc1ssxmh8eAKt8/NaO9zmS4V0nWEi4moK/9T1tQWM6v5qwOdOVQVoKbha7pvF4 qGBIJ6E4HDSoRvS62WxnwCYH/PftmgujmOf3ckEONj+5eKfpvf48ixiRXFZeMfmjopVp ct/V/9RnKfABPSaZbk9ZVYn99IW7bMABNVj2thWZmDgfmhA+CLdg9bpL4pwfcMmUiye6 8ZCEkpNZSWDNWkAzFvkZF9gIJbef+6E5EZ8m+qEHMayUZlxyB4gpuQhtffe0HjznqJm5 Ubh20IEBKfSzCedj9SmEHdYYigNB0/oO4dJ/fmZ6gyxhFYQvehgOVogSQwOBXTWy6b6d 3G1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="CJFljht/"; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a63f114000000b0053ef469282bsi7778315pgi.645.2023.05.30.01.39.10; Tue, 30 May 2023 01:39:24 -0700 (PDT) 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=@chromium.org header.s=google header.b="CJFljht/"; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbjE3IRJ (ORCPT + 99 others); Tue, 30 May 2023 04:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229631AbjE3IRH (ORCPT ); Tue, 30 May 2023 04:17:07 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFDBA9D for ; Tue, 30 May 2023 01:17:04 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-776fdba68ecso120811739f.1 for ; Tue, 30 May 2023 01:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685434624; x=1688026624; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Fy7SR/HzB92IkMAazWT76QIOXbthJ6EyN1HdPKvysFk=; b=CJFljht/URfulrX/BQQogdLgAkSiPQ4armqx1rnpAnDA25GIL1uBk1DT6+MFFy7CFz fHkftFqZFmrOM3xaCf724X834CCsBoi6QqnNS4npXZCuQho58RU6JSyM/c8aZrOUGxpu DCVqYBUTeIi1qwFx3McTy7IiBkpiVVZ+F+/es= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685434624; x=1688026624; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fy7SR/HzB92IkMAazWT76QIOXbthJ6EyN1HdPKvysFk=; b=IpvWYtN75ujoFZDjLYn77wD+rb7VSbuUpeBIjsVM53JgXan0K7hU5aTdE5NuKe/l97 SCnk5USGRwV/cLaqWfi1BraRyWPifVnwOICH/A7YNsD64F/+cjxXC1hzozqRnoWa5vB0 GZWiN62LxVhU703bcvqk5gK0ntHnBSlDNYWPyGHL9SGkW7Mj83K2wK7U+EX3T4c5oz7T Ij3kCenNXObdS3lmlYbDRGugKzvQ/QynYRQ5Qp6PkJesl9W9FuipCcz97bgVwAf9Pw1e vMYIWeZVSRXHfPemG2t2gaXaemLlUD6UjpoI0B05PgKVF/1pZqoe82SvayGp9cywRE9p /xow== X-Gm-Message-State: AC+VfDy0AAmwq5j9uE2LbY/GQ3D4hNlRUZAHTF5Ja+4u8x1HHVOZaP2+ MqWXiUXoIW80UkveDvKJxzjxWt7cn8l03xa2WEMWVA== X-Received: by 2002:a92:d203:0:b0:335:56cb:a3a with SMTP id y3-20020a92d203000000b0033556cb0a3amr1027018ily.16.1685434624188; Tue, 30 May 2023 01:17:04 -0700 (PDT) MIME-Version: 1.0 References: <20230526063149.1801196-1-treapking@chromium.org> <2bae7dea-afc5-96b5-c6d1-f4724bae155c@collabora.com> In-Reply-To: <2bae7dea-afc5-96b5-c6d1-f4724bae155c@collabora.com> From: Pin-yen Lin Date: Tue, 30 May 2023 16:16:53 +0800 Message-ID: Subject: Re: [PATCH v6] media: mtk-vpu: Ensure alignment of 8 for DTCM buffer To: AngeloGioacchino Del Regno Cc: Mauro Carvalho Chehab , Matthias Brugger , Hans Verkuil , Tiffany Lin , linux-mediatek@lists.infradead.org, Andrew-CT Chen , Minghsiu Tsai , Houlong Wei , Yunfei Dong , linux-media@vger.kernel.org, Hsin-Yi Wang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Courbot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Angelo, Thanks for letting me know. Then, this patch is not needed. Regards, Pin-yen On Mon, May 29, 2023 at 4:31=E2=80=AFPM AngeloGioacchino Del Regno wrote: > > Il 26/05/23 08:31, Pin-yen Lin ha scritto: > > From: Alexandre Courbot > > > > When running memcpy_toio: > > memcpy_toio(send_obj->share_buf, buf, len); > > it was found that errors appear if len is not a multiple of 8: > > > > [58.350841] mtk-mdp 14001000.rdma: processing failed: -22 > > > > This is because in ARM64, memcpy_toio does byte-size access > > when the length is not a multiple of 8 while access to the > > vpu iomem must be 4 aligned. > > > > This patch ensures the copy of a multiple of 8 size by calling > > round_up(len, 8) when copying. > > > > Fixes: e6599adfad30 ("media: mtk-vpu: avoid unaligned access to DTCM bu= ffer.") > > Signed-off-by: Alexandre Courbot > > Signed-off-by: Dafna Hirschfeld > > Signed-off-by: Pin-yen Lin > > Reviewed-by: Houlong Wei > > Reviewed-by: AngeloGioacchino Del Regno > > > > --- > > This is a re-send of v5 because it was marked obsolete, but this patch > > is required for MT8173 platforms. > > > > Hello, > I have solved this issue in a different way and the commit was already pi= cked. > > Please check: > ab14c99c035d ("media: platform: mtk-mdp: Fix mdp_ipi_comm structure align= ment") > > Regards, > Angelo >