Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2857086rwd; Mon, 29 May 2023 01:48:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CiTVtDuEyLs64rxa6zqFBxtVSZB/UT+lrCeoGvVSjmWO9Ai2sV9eDgiAM5TYSR/y84Uhf X-Received: by 2002:a05:6a20:748b:b0:110:5141:dc8d with SMTP id p11-20020a056a20748b00b001105141dc8dmr6983849pzd.25.1685350082174; Mon, 29 May 2023 01:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685350082; cv=none; d=google.com; s=arc-20160816; b=hRe4b+G/ep8zfZjIlkUAM+llKlmMJ+ZATgGCbTfh9Z0+nmMpS8GaDJAW7A59eIBTAQ ehe6XpF95vLHhHvz4AePyzIHKMqICPPh/T0O5Kr9T3cEzL3c75EKgzQxMwSrR1T9LDC3 SBoVJXef2EDRCbhLh5SOrLYh7rKq7Q1TFuC4ATq1lE6eaX33YVDGCJjIREwviSdrB0hn TFKhxCClYyUhCj7yzLK6q0j3uQxTY1JlVAKtxxzPAFaOK0hC/ILYyntwVuRUv24dVXMG IqlY2YWedWH2GJhZRP0l40hLyWUCzMmu/VnUN3CXtoDLMY4Y1O5eT+iDMcSYKnK4RxMP QhWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nCu7CzzkLxhCYNT4PXl/4UQGZF6Ad67LZdP+y4j7/Co=; b=irE/OQp6m11nh7kAmc8T9n/tqRFMKRUD24JYxviEjKAno6ijL5A6qSEZ0rBndlVKHR eLgNOPfxeZjWJaHHOgyL+DBcz2iTVikvANgxd43c1K8NIGK7HpD7wnsdAFrIZrVmrWXF eSj/JYWxtADKNEX51CdJFfvG/ABeQ19v7FZwL2K2FX1MsERf+9827GLLfY8qs19IMvtv C9VoY6YpccKXOsD0pbKEDOtzSZprYYVcus0jPIcmhvduY8gmMf2eoW5u6W2H9irjMYkL 2yebwlXDKA5SznT6iafewg7nu6JiR4De97Y0igt+UKUkHKh7tTdJbKKznHl5NugiCCot y/fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=K1XiEgSw; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n28-20020a63721c000000b0052c6200e5e1si5035170pgc.649.2023.05.29.01.47.48; Mon, 29 May 2023 01:48:02 -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=@collabora.com header.s=mail header.b=K1XiEgSw; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231454AbjE2IbR (ORCPT + 99 others); Mon, 29 May 2023 04:31:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjE2IbP (ORCPT ); Mon, 29 May 2023 04:31:15 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16B5DA7; Mon, 29 May 2023 01:31:14 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab] (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 01ABC6605961; Mon, 29 May 2023 09:31:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685349072; bh=SgaXQ43zqDd+lRFXqCMttSv2BWRnEkrhM1NPjt8EZ+0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K1XiEgSw6AMo6WNIulUT0UFwL37XiC77QE1vQeZaukNLzYgcvyD5h8gGi9xSNlaZo 1bdajVGwTs45qLcL11net7MloIXbs82Q759SyfRGigi2u28MzanEfKoc2EQuCThng7 kQsvH1ZxCd2DCGBqFwJ8DXXeYRUc9q2y7MMOAAFdxAWxObIicJseZRINCXTFtCM+Z/ YJ9FLdc5+w09UA7kh4v7Fd1W4qjIdfM56oAkNOA+DuGwO51f6HRlvA4uoq3w+fu84g XB9Jk62h8iCtVL+Xjt3bxlPS5a7m9G4sokuNYzYTCvOF2k8Q7UWi/80XnQ9dYTo+/r f9HzdiYrv1o2w== Message-ID: <2bae7dea-afc5-96b5-c6d1-f4724bae155c@collabora.com> Date: Mon, 29 May 2023 10:31:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v6] media: mtk-vpu: Ensure alignment of 8 for DTCM buffer Content-Language: en-US To: Pin-yen Lin , Mauro Carvalho Chehab , Matthias Brugger , Hans Verkuil Cc: 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 References: <20230526063149.1801196-1-treapking@chromium.org> From: AngeloGioacchino Del Regno In-Reply-To: <20230526063149.1801196-1-treapking@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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 buffer.") > 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 picked. Please check: ab14c99c035d ("media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment") Regards, Angelo