Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1082949lqs; Wed, 6 Mar 2024 06:02:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWAV1w2wl9NDoiHbIOZl1Jr6qrObh/MlFUbTf4TfYXZQgHJSSFCfoqNAhZ9b+n2l78xL2dvLSj6qocmG6h2KfWkIFCdi8pS+LsqnoM2Eg== X-Google-Smtp-Source: AGHT+IFLOvYQ5pSSO3xoPJrcfppQvhZ0fUtknpLez85Cvq5MTl5zuLSoqrmiKWgdgZOmRyqxF9si X-Received: by 2002:a05:6a20:c312:b0:1a1:4519:fab3 with SMTP id dk18-20020a056a20c31200b001a14519fab3mr4093836pzb.34.1709733720229; Wed, 06 Mar 2024 06:02:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709733720; cv=pass; d=google.com; s=arc-20160816; b=vfgaQ208zxtw9DDQ1BHaogl/ppb7w4xeTLgg1D0nbS273fSieWTakmXyR4ye2hQL+A sc5SsPcXBYlAEA80mEygS/5k0HBDhV1ImeooUE0Wt1HKdD37eoeFWCNxTbhPrNQ63Qyc RLglfcaMdewnJzexmzETPyqKFaA7N9uB3ey984JcNfc75fa1T2J3x376eNy28uDVBOw0 atLu5FuvpCmDSxwvBhzPHHztLXykvC/clrcWUYZD8Qkcsw/r4FqjXepTTSyzRv/gqF7l Oz44knYSYrtV22Rs9d5fAH1Fv+Agikzj5cKJbswYVrP+tHkkzdzNPDnSJ/YQvXUG0OGY 2vSQ== 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=JXoQqib0ov0aI5VfB7sg8XcyAN9y4/ZAnzGM2CXP2HM=; fh=SqxknKxRgLrxE6Bxa4HIYLabG+OV8zhOOZlqBTS4vfs=; b=x0z6Te9obDgRLX1imm3A8vOvlHDUh+/5QTu5tBtzq1IUUTRBNYnFNsQTgS69ZLT2q0 C2Yuyy3YQSjpVjptvsIAVBsGm638dTyk+z6Bl3DIBHFe4acCtK9lBrW6AFMMTToAZRht k9MmVUu4Xn8BKqEORpqmrP1b/7YrPVZFQQHgq3nD2WKkOM2n0WalE7xDj+ycxM09dw5O KrHXHaGAOMyyR5OtaM+sWOK5Jjr6drvFZZjtQD/rKUbcxd8fgHEeaMDyO6kLTkF3d/MP 5RNSZk1qhTQNcA/heoMyVPBgOGFO/ao9OnoqdYB1AdTr8oKhFUWn9tvlDqtfoTfp8a2b HicQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Q9wVm5eL; 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-94007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c6-20020a6566c6000000b005dc8f60cdf9si11855856pgw.302.2024.03.06.06.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 06:02:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Q9wVm5eL; 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-94007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94007-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 62CB1B20F83 for ; Wed, 6 Mar 2024 14:01:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D96D7132468; Wed, 6 Mar 2024 14:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Q9wVm5eL" 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 596A11E519; Wed, 6 Mar 2024 14:01:21 +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=1709733683; cv=none; b=gKzDapIUaY8YojBcHv1agU7R2zGhEpIWQAd1APctni57X0BATyCYAaR+WJid5jw4U/bkfYNfMwrecbWJkEYOcW05pCzvsc0UjwTlYD2fh0IEsoPAPnb6sllw/yR2MMMCFHmyek5oUClQcMtb68Hs6O+cjA6WQkv7AHnpQDJZ2L4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709733683; c=relaxed/simple; bh=OL16fx6KjUVBqodWcez5kPju6qteSkdvY8c4p+ZXvLI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TAgMNT3uf56XYymU4i/pUoCRqC6msvWb0mcT2zhq/o3NEwBYcKvnDBVyPZCd3mNcGkh5nH+OPu+F/8ILruFkOHOHebvqFEKxfgizWNJEAvll68hpg9eu3qTLnuCg6XvCu+lFgsHBwatUaw95AOp9W0Qa/j/iqrvzkvBjgWBrSXA= 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=Q9wVm5eL; 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=1709733673; bh=OL16fx6KjUVBqodWcez5kPju6qteSkdvY8c4p+ZXvLI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Q9wVm5eLpkVFAhVCMsjJ/hcOI1icOPvyOHKdr9rvAH0/Rrb6hMjHXePH37OnLUEHl Nu0mINsbRFk0gOe1fWLv4nBRKJIuXRMirkx9EwomEPFn5OGXYTBrHgyNXoElkd8EVt 7BNRcXUNKRa4tjUhjCNrfDE+fp5jLKbiU+e3ZwxkRwCmRdUunG98rB2Lbep7D2MW6C XwDq/ILuj44uJTQuPKle3N1RGORioEzlmYkXZcd8snpXeiM7UflTk2negWjWViyO/Z i4kRhXezOUkaAPvnig3EQCe7eDAxgS4LgQdaoW9LgSjiqDwh9y6k+UHjpBqk46X1MA jqPWrGSQhkv5g== 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 9B09037813B6; Wed, 6 Mar 2024 14:01:12 +0000 (UTC) Message-ID: <66a2307a-1420-4cea-aab3-53ac81f8c246@collabora.com> Date: Wed, 6 Mar 2024 15:01:11 +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 v2] media: mediatek: vcodec: support 36 bits physical address Content-Language: en-US To: Yunfei Dong , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Sebastian Fricke , 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: <20240306121902.25069-1-yunfei.dong@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20240306121902.25069-1-yunfei.dong@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 06/03/24 13:19, Yunfei Dong ha scritto: > The physical address on the MT8188 platform is larger than 32 bits, > change the type from unsigned int to dma_addr_t to be able to access > the high bits of the address. > > Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno > --- > compare with v1: > - change address type from unsigned long to dma_addr_t > - change vp8 address type > --- > .../media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_if.c | 2 +- > .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_if.c > index 19407f9bc773..987b3d71b662 100644 > --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_if.c > +++ b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp8_if.c > @@ -449,7 +449,7 @@ static int vdec_vp8_decode(void *h_vdec, struct mtk_vcodec_mem *bs, > inst->frm_cnt, y_fb_dma, c_fb_dma, fb); > > inst->cur_fb = fb; > - dec->bs_dma = (unsigned long)bs->dma_addr; > + dec->bs_dma = (uint64_t)bs->dma_addr; > dec->bs_sz = bs->size; > dec->cur_y_fb_dma = y_fb_dma; > dec->cur_c_fb_dma = c_fb_dma; > 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..eea709d93820 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; > + dma_addr_t pa; > 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 = bs->dma_addr + offset; > tb = instance->tile.va; > for (i = 0; i < rows; i++) { > for (j = 0; j < cols; j++) {