Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp162646lqg; Fri, 1 Mar 2024 01:04:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLeB6caiEu1aqxrDqQ+g9gyvsvIBZpJbxyXiTR9vvAWVDr+Q/ppsaCqGiv9rhK2WnlanKCH/cvYxGpQzng31nWiiCtpD6lvDuFWBGp4g== X-Google-Smtp-Source: AGHT+IH6rvgHj9RDuyMyaSA0H4pQXQvXEcu9OuRsAmGhj2s10vgWpDdepaGnXqG4KjLUTvK25vx0 X-Received: by 2002:a17:906:489b:b0:a44:52c3:9003 with SMTP id v27-20020a170906489b00b00a4452c39003mr714457ejq.72.1709283842993; Fri, 01 Mar 2024 01:04:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709283842; cv=pass; d=google.com; s=arc-20160816; b=MuQZcKUFv8UFdh1X+kmbyuMqoHsqSiJYO0stSjPy3vJqvFlyTWcP44kHBiTM9RG2Jf RB6wdGeD7IvIQCS0AQqSrYl+Erid5gx1rONn6gymytZAJszuzt2T99gtGJRFavLc1rwG SS1hlwc5ch3HOxes4KbvXNuGOG7FijcV4TophAxj880jIJFsp44Woe3kgyjypY/U3ufU jOTnyF82wn996Q/3HOodlzrQsQLKBwbutqq5/6UJlAJFFw1a3owXCjYzb0YZv0pvA3VS Xw1BkUToNuxQW+Lbs+oJ6IukjgfdHjnDVQikzYcT28HuXVbpa9SQVD+Qf+G48uMkjFpv cacQ== 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=QVVmJ/uMg5Pqchh28v0bKJUq9CTMqS5B7EfctPG8Qts=; fh=H5kXqGb/CJaUSxsh+vlGVdk704x9BTjKppdpRw25vAQ=; b=INAnojZnfhK4S7baq/FKQJR6I69QkfSYR4s83zKzbAuEpy6bEjwNQeQzujMEbr6PSR bDxiUbgPa0BwyszOlBCexj2vdcKvy+2Z0ooYbomN8QBUALuYIGLKg9faA3LTHhV23FLm aEbU0VUajSdE6sye4+1hwfOdKdrWyl13CgiuNb5bMJKCfJT0rKPbeOiDYYG8mTwR5eY4 Bd6Ck44NOXdO3bRkTYjHLp6Q/5CHV46T6IPRt58JoQVX02oGtV7dkl+gIjIu32ml3p4Y cPxwJ3vOqQKYbAk9mK3+1GMgBXhTEWXie60Ucf5/2E2lvM6sS10KbCis5WgDvdy5WJj5 Alyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BOr0fTGx; 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-88139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88139-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 sa5-20020a1709076d0500b00a443b6eda8csi1347067ejc.445.2024.03.01.01.04.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 01:04:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88139-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=BOr0fTGx; 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-88139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88139-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 B632C1F25CD1 for ; Fri, 1 Mar 2024 09:04:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 495766A03E; Fri, 1 Mar 2024 09:03:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="BOr0fTGx" 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 C7C506A014; Fri, 1 Mar 2024 09:03:50 +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=1709283832; cv=none; b=qbyRyF/30GDh5XYMoG+eZq8Nywysxpf9Ewq5OZARR1CYboPkP+kc6YymEOO88ZwQnPK/wBp9cWIaRwsGFT0Pi4nlE4LpB6s37GtqhhbjvoREdm/bpjmKxu0FJZRmN0/3d/pI1SA8ZziB3ly04apiF1S8BHRFX88CD39g9VfOEg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709283832; c=relaxed/simple; bh=hkf4tHhd3AClvUxsa8LdGdo131B48+hG3jkXyZorL0o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CzYwbMDRGvuNrdXpYXTmjLchfMkA3weFUF0FSJuBfY6GH3nkgDvaaEz57HDRJwex3xMQHxQ0lyFzHt9xmQ29rsd4IQw/NpTiVRhyz+/oouDHa38K9baT91lcsGSHf2CFxvP5O7k/IsTDa+b6e7CL8NezVPK/jXxpBKBeYF1GWgc= 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=BOr0fTGx; 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=1709283829; bh=hkf4tHhd3AClvUxsa8LdGdo131B48+hG3jkXyZorL0o=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BOr0fTGxd8buRCpSPVkD7hu6KavyqqEhPT+mNOfdzEy1d0+snnGQPf+Tv/C1nPpA/ efQNQ/RBTEqjxVoi22f/+U2sx9HEFVfKfqN/aaJy2JNwiZSoNSEan7dv2qxJeq7g4T T3v0G60DqpvGaNRee0haVGps28lrNC1QSV6/YW+v03iIy1bL4O8JllqEOfdskxvysF FMUTmc+PZdcbIQXbAAJ8P6WMxdJ86ABFc4AVz0clDEUO9QMRC28kUUpeNQPDSL0PwU TaVr3OfJt+Kfl2t6AqtP3589GiRQon6ApVy/AG6Zq+d+sZ/cPv5yiiT/7NDjZ5Gvwz d1Rb4OoDlH9dA== 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 4F88637814A4; Fri, 1 Mar 2024 09:03:48 +0000 (UTC) Message-ID: Date: Fri, 1 Mar 2024 10:03:47 +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: Yunfei Dong , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , Hans Verkuil , Benjamin Gaignard , Nathan Hebert Cc: Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20240301020126.11539-1-yunfei.dong@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20240301020126.11539-1-yunfei.dong@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 ;-) Is there any reason why you didn't - and still don't use the `phys_addr_t` type for the `pa` member? Cheers, Angelo > 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++) {