Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp512lfn; Tue, 15 Feb 2022 07:40:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzK6u8vSDanytKFg+BxNEXIHbQJ4g0hIUEiLTPtdCMD894Z76Tlh5swJYRf98mQ0ym/Dsq2 X-Received: by 2002:a17:906:7387:: with SMTP id f7mr3545561ejl.139.1644939620724; Tue, 15 Feb 2022 07:40:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644939620; cv=none; d=google.com; s=arc-20160816; b=gr00UVMzTZLgz49ZfO72SssS2nxWXtLY0RRYmFMtWH3O92wRYkiFGxXOZfKWlH6M9h /U+tpzwNE/AZGOh0MkC75DlMOtrIje2OooeN6qGQBKpVwz65MvR/7wD6yoetZ+rCf0wH 5kIYM18y4hfQ/7dfdCuNxsO9i/uK79Zd9TNxYfLHEkKW5ptXk1Ct1DyDmnjL4qk41ihF +3DBqr+VAQ54xNFiafNlFY9+WfwV4O3N9me6Iru66oVKukXmeGtGYcDkVUsOedNxVn5a vza6e2OZMvh01l1Pk+TXcUczE7rCW08dm90lAITqw/E2x5H47NqEhmEnJMSzZ5J0q4rq d2gg== 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=c3kmyPJXvlg9lcaM5u0L3jJg748HUC9fzO1NSFJJEaU=; b=KbU2oV+NWx8Wwbc83yMKMwN1HZfSO8VzHI4ePIS767vQnyhTCW+2tEEL6ASfgOfmpV MIdDk/jVdNYyu8IFkvjUkpaVZhiWi+dA1vQiF9UJNjd250aQYlirSvIzIRuuFtxOd39e /+F3v9rSJOuI2+xIfBhZawOkVQ2TJYEoU70qSH9NVwf9EMgYLO+fEq6+XkID/OgapA+B OQztonspLhyaGhUUcWluDqx0ZeHVDMjrsA41CzsrWGJ9rK2z/QVUNcyYOR2W8lo4eJts OhQqIo0fJEHb/2U3RPsfyEj0QF4eeXv1hKR4a4GGR4TCRZy4DUsV1RFT4jLmy8r7lNCc p1fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bJPM+pbQ; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id au5si586605ejc.871.2022.02.15.07.39.57; Tue, 15 Feb 2022 07:40:20 -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=@collabora.com header.s=mail header.b=bJPM+pbQ; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235993AbiBOJli (ORCPT + 99 others); Tue, 15 Feb 2022 04:41:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235992AbiBOJlg (ORCPT ); Tue, 15 Feb 2022 04:41:36 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890C92608; Tue, 15 Feb 2022 01:41:25 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 399F71F424E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644918083; bh=yq8iJBJC4x3GV++oabST32A8rclogMDfHMgxC/dI6Yk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bJPM+pbQ2xVrL8VVd8LmIbEPyp0Lpi/YQCkn68h72V1EcuKipsmZsB+E4h2GLgPnR F1pnpIK5gYzRDOsVv8RUB8tC7BdroPQ0Hlro8BdXYxX4KjHnq3V06s+D51yp09xsCU vXR4BUZKXCojHE8TUc+w2nXHJRE1ku174kHK6TMkBgONYMuZW0GF1z0AKBUNZzs7mg NrlEMtfjzC2prSETr+0GKJtYOJ6tiPCk8tR+84W/nem1LRGuAILxr4V7L65ecbiaHE mMLIhUi9o4X7hog9f5OWjIqQKZ7B5m06IHyZIFWA1Z9HME2mjt6Ilkpu0dPLQuyCe/ S2W2AEDvnf7Lg== Message-ID: <15a24b12-e296-9d4e-211f-55553ac8f7da@collabora.com> Date: Tue, 15 Feb 2022 10:41:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v4] media: mtk-vpu: Ensure alignment of 8 for DTCM buffer Content-Language: en-US To: linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Courbot , kernel@collabora.com, dafna3@gmail.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, minghsiu.tsai@mediatek.com, houlong.wei@mediatek.com, mchehab@kernel.org, matthias.bgg@gmail.com, hverkuil@xs4all.nl References: <20210920170408.1561-1-dafna.hirschfeld@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20210920170408.1561-1-dafna.hirschfeld@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 20/09/21 19:04, Dafna Hirschfeld 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 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: Enric Balletbo i Serra > Signed-off-by: Dafna Hirschfeld > Reviewed-by: Houlong Wei Reviewed-by: AngeloGioacchino Del Regno I acknowledge that this patch is getting very old and stale, but after some testing on MT8173, we were able to verify that it is essential for MediaTek MDP functionality, along with some other patches. Without this one, it won't work. Keeping this in mind, I would propose to get this one picked before it gets completely stale and requiring a rewrite. Cheers, Angelo