Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp176812lqg; Fri, 1 Mar 2024 01:36:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWn58t+a18Hr9wEQ7/Xa8TBP1oXQZv8RbOM7XpGdFqYHaOaIsHSdH2msyYHfpOLlGUrUrfzQmqWaizSEbpA85q+AyRmlmYtXCB0m45kYQ== X-Google-Smtp-Source: AGHT+IEcKdeNayPXwcMQLxsPG5ASxqbFVFTI3JdWWbyjN5m8aR6OXaTTkN3veR9iv0vYrF0/Azxl X-Received: by 2002:a17:906:dfec:b0:a43:fb63:a072 with SMTP id lc12-20020a170906dfec00b00a43fb63a072mr941133ejc.9.1709285784231; Fri, 01 Mar 2024 01:36:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709285784; cv=pass; d=google.com; s=arc-20160816; b=UI6JdfNRb1bnF2fXOm5uBOwNjqlXWGr42iPTvciraZbe7oobKL2OHSeMEIq7xayMUD yv4Pz/qR5kK0IVLFbVI5bSyLwMnKdx5dbRmteAA0ckBEH58Bfzns23WZIiHS8rlG/oyg 5uwu1KrYc7HDQ2Doy7F5LsV8GD7PxgJf7yF6YshmZPUDZHOS7OZqFjP4VGyckI5FTb7C vL4DkQUyo8oJvgBpC8tSMN8xPecph0o8jSO1HmHvNlSiybCQqzbZNP4tpZapt26vRgRC O/SFK0kH6rY35hagD+jub5tKMMNLbk/NrlHy/OwSlroJFDyr5xBZFLRQZ2NZ8igjTmfU yN7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=sXpm3Lxsa/EON1LdUGUiNzJoZa+2X4P6JE4uKIIns20=; fh=274sWFpeApCSDpU9F/iKbtKZ+bNLJO/k2yU/dJEGxOw=; b=sB+Nb/M+tHZ3g1YO64FknDdupyC2x3YSTItmFTAh/uOc6Fl3dYYYJ9JoyBXIZ+y/i6 ol1sn3nwpD+WQa0eSd7EbvydlKmEafW8RVJm0f+uTeglA+L134KyhwDGNbT+WBVmMVbL EHfeaxMjVz2lg8EeHj2pWbGwOKcN5f11JMr5iENnmZGWfYb28jsCkI1KxYlemg5TEhsz V5jZ+HRnmZ4QeeHpCX90f9THuD+x6Xxcv6JP+C7yhob5tUXqRWnfLiLxlmAnmM40e7Ia inyW2YzQ6lXfCxLMoav9g4WYgTkFHKwYkct5y35G45oO/H5sT6llYAKkGmRFoinQ2AHO J1VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ig46G8V0; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s15-20020a170906bc4f00b00a4426362c67si1248577ejv.706.2024.03.01.01.36.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 01:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Ig46G8V0; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-88192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB36B1F28204 for ; Fri, 1 Mar 2024 09:36:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DC8E6A03F; Fri, 1 Mar 2024 09:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Ig46G8V0" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 39E606A356; Fri, 1 Mar 2024 09:36:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709285773; cv=none; b=ausKpaDY5IUSz33MJQuHAFvEho6lRc7wOKD2Rsxu2zmdPWbJ7b0AjlS9aDz4t6hFlLSqWdE3b8a9oVlgc2fIB9sylTHQhriJgmZAzP68xOHg6oEkjTWeoHF7QmPDEoyswHwNpnA3v/gvTwTP3v8sYmocktzn2nua9OBtsDHzdWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709285773; c=relaxed/simple; bh=Gmf0uAuSVCHCNz8dYID/8N8Eng78uQAJL21zEESINHQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=X10kmOS1TUoy4QhukLO/lWenWri9Qsou3TMYld99Fns+CaIfE9cqBOYiA3zWpK0ys2O/I1NZmP0Gl0+plzgHca3XqsEi5HmpIQXVkGxCEVUYYYTvBs8ZuyWUvm6bGbhH9IXOwllEq5yUIAHCfJk3i8krDX3+CPVSypDtB0I93Pg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Ig46G8V0; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709285770; bh=Gmf0uAuSVCHCNz8dYID/8N8Eng78uQAJL21zEESINHQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ig46G8V0pkgNPXWHGVJB/JcKf0H593/uLUmsUXQHbWjQx4kF5UVwVCYRuSoK2aOdw BP3PDLMyaGt+zv3W7kFW1FMQSsNolK0+DaQ4EG4RRDTAJnkA28kNFcs/Utre/aP0eK q+RDgJWxv+p1RjN5fwX5tad13FyU54e2tPc5j+iwYEI5FJUCEjWMO8I5wS+jAD79rG NOn7t+DvE0GrKqvqoFxYDp22QBfde1KIDbxhIJ77KEz1887NulmfZIgyvACmGBGzVU y+DmCWHqEOzCv+QJT68pdrrbES/pVEyoycyNuP2AIWR42ajqEP97BUhealuWYyeiF0 aIbd4jGPtJgGg== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 6783B37810CD; Fri, 1 Mar 2024 09:36:09 +0000 (UTC) Message-ID: <7de218a7-680f-40a8-a002-d6a2c87f53ee@collabora.com> Date: Fri, 1 Mar 2024 10:36:08 +0100 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] media: mediatek: vcodec: support 36bit physical address Content-Language: en-US To: =?UTF-8?B?WXVuZmVpIERvbmcgKOiRo+S6kemjnik=?= , "nhebert@chromium.org" , "benjamin.gaignard@collabora.com" , "nfraprado@collabora.com" , "nicolas.dufresne@collabora.com" , "hverkuil-cisco@xs4all.nl" Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "frkoenig@chromium.org" , "stevecho@chromium.org" , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , "daniel@ffwll.ch" , Project_Global_Chrome_Upstream_Group , "hsinyi@chromium.org" , "linux-arm-kernel@lists.infradead.org" References: <20240301020126.11539-1-yunfei.dong@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Il 01/03/24 10:23, Yunfei Dong (董云飞) ha scritto: > Hi AngeloGioacchino, > > Thanks for you reviewing. > On Fri, 2024-03-01 at 10:03 +0100, AngeloGioacchino Del Regno wrote: >> Il 01/03/24 03:01, Yunfei Dong ha scritto: >>> The physical address is beyond 32bit for mt8188 platform, need >>> to change the type from unsigned int to unsigned long in case of >>> the high bit missing. >>> >>> Signed-off-by: Yunfei Dong >>> --- >>> .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 4 >>> ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git >>> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_ >>> lat_if.c >>> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_ >>> lat_if.c >>> index cf48d09b78d7..85df3e7c2983 100644 >>> --- >>> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_ >>> lat_if.c >>> +++ >>> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_ >>> lat_if.c >>> @@ -1074,7 +1074,7 @@ static int >>> vdec_vp9_slice_setup_tile_buffer(struct vdec_vp9_slice_instance >>> *inst >>> unsigned int mi_row; >>> unsigned int mi_col; >>> unsigned int offset; >>> - unsigned int pa; >>> + unsigned long pa; >> >> If you used the right type from the beginning, you wouldn't have to >> fix that ;-) >> > Yes, you are right, thanks for your remind. >> Is there any reason why you didn't - and still don't use the >> `phys_addr_t` type >> for the `pa` member? >> > pa is also iova, dma address. Change it to dma_addr_t looks much > better. > Ok, dma_addr_t looks good as well. Cheers! > I will change it in next patch. >> Cheers, >> Angelo >> > Best Regards, > Yunfei Dong >>> unsigned int size; >>> struct vdec_vp9_slice_tiles *tiles; >>> unsigned char *pos; >>> @@ -1109,7 +1109,7 @@ static int >>> vdec_vp9_slice_setup_tile_buffer(struct vdec_vp9_slice_instance >>> *inst >>> pos = va + offset; >>> end = va + bs->size; >>> /* truncated */ >>> - pa = (unsigned int)bs->dma_addr + offset; >>> + pa = (unsigned long)bs->dma_addr + offset; >>> tb = instance->tile.va; >>> for (i = 0; i < rows; i++) { >>> for (j = 0; j < cols; j++) { >> >>