From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92CE62FB63D; Mon, 20 Oct 2025 10:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760954689; cv=none; b=ZUantBufCsJCeCHhNylvVpgdUIfmwWRTkeUSFqunkexV0cpP49FFe04U7OakPmgxI50vezYUNtHoB/fOJFE6aDpjJ2Y7bItwAGJ6TONVyVTnErwqLqNZKdsKQVRmcBUzU5NcWtHcApJWGvVorLCy3133T4NWdCN5Tk3gWsIJ4a8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760954689; c=relaxed/simple; bh=ARtDZwsdCFqaJMeHgUn82RRxg6fZeKD7Hzqi7I3KSJA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KgQkCO354ejTtWdEu4D4PaiAawLGrWBid8cfnqVWusmkL+H5h7hmycS0M9o6s3fZCXfaEgbdTbRbjG+04FTS+1rdVj9/im3o0k6GqHGMAJshT5+hUohnPdjcQNb3XdAv2cHGI5hkndcSIRSPeJOvG5OeqZuCgQTpJhxSQvtwRE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=cH2jcxgG; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="cH2jcxgG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1760954686; bh=ARtDZwsdCFqaJMeHgUn82RRxg6fZeKD7Hzqi7I3KSJA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cH2jcxgGTWXbL5Uj9plnlDcSy1rIpK6H0scnSzyf3uB+Y6IVZjH5SpJIZMPQ6J82p AlZFZK26tN47zUgLf/JSIF15au/EParWh5QZ1QqcG+p0xF1xLetq4VtSgqjidZvY8O RUXUtIqGo8f2xt3wrohwYKbmKJY0RtCb7jDlUELVaec2A75/e4777hmbpQ4z2JwZdz Ap1oab188MzOSS48fZvU71C55N4t5SCGnAvArZcvQoI7HfSlrq6ISEAAZ+5P9nlf5c ABovrbf1C68PpMuMneDeIEK8ifEP0dleQanTHIzgAj0WOp5w8518XbmCM46HhhTt6i PMH3MFhCB0cqw== Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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 bali.collaboradmins.com (Postfix) with ESMTPSA id 611DC17E0FAD; Mon, 20 Oct 2025 12:04:45 +0200 (CEST) Message-ID: Date: Mon, 20 Oct 2025 12:04:44 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 02/20] mailbox: mtk-cmdq: Refine DMA address handling for the command buffer To: Jason-JH Lin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Chun-Kuang Hu , Mauro Carvalho Chehab Cc: Matthias Brugger , Nicolas Dufresne , Nancy Lin , Singo Chang , Paul-PL Chen , Moudy Ho , Xiandong Wang , Sirius Wang , Fei Shao , Chen-yu Tsai , Project_Global_Chrome_Upstream_Group@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org References: <20251017065028.1676930-1-jason-jh.lin@mediatek.com> <20251017065028.1676930-3-jason-jh.lin@mediatek.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20251017065028.1676930-3-jason-jh.lin@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 17/10/25 08:44, Jason-JH Lin ha scritto: > GCE can only fetch the command buffer address from a 32-bit register. > Some SoCs support a 35-bit command buffer address for GCE, which > requires a right shift of 3 bits before setting the address into > the 32-bit register. A comment has been added to the header of > cmdq_get_shift_pa() to explain this requirement. > > To prevent the GCE command buffer address from being DMA mapped beyond > its supported bit range, the DMA bit mask for the device is set during > initialization. > > Additionally, to ensure the correct shift is applied when setting or > reading the register that stores the GCE command buffer address, > new APIs, cmdq_convert_gce_addr() and cmdq_revert_gce_addr(), have > been introduced for consistent operations on this register. > > The variable type for the command buffer address has been standardized > to dma_addr_t to prevent handling issues caused by type mismatches. > > Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform") > Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno