Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp225319lqg; Thu, 11 Apr 2024 00:12:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvzVxfIzk7VHoaWHtZmouOO5ruxLxzxS9gEMAl5Ab5h+PgOE6p26dzMPkGBwzQHW69QcypY4g3pkbWqnPFTns9SSU3MLu9N6GhYu94ZA== X-Google-Smtp-Source: AGHT+IEpAYYohXTMYO+842KdJnxN55fC8bRLrNgqEW4NhBCD0opxTsHjnlTY6x/JAK3r1EuTVKho X-Received: by 2002:a17:906:6702:b0:a51:98df:f664 with SMTP id a2-20020a170906670200b00a5198dff664mr2850837ejp.76.1712819573685; Thu, 11 Apr 2024 00:12:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712819573; cv=pass; d=google.com; s=arc-20160816; b=m4zm0gD1D2EUfD0ohhaoaO6ywbl4Rhw8GndzB1ib6SnIPfajpT7MW2ddMaPg+HLgw6 N3PySVLHUrFuR5SUk5v1EYR1ed+PeXQMmcVCSjOjBxtKxDcjbrTAubLC01QuSJypKzzo qkxPE+JyQ245g/gfRv/Mm0wQ+wo8fT9LUzw+75l4ICvmqzjO/4OWgdTQlnSz+XS6BH2o 8T0FJOkSTAu1Ci+imun+/HhTYefl63oIbogLveHFqmmmQO9XpRIT/5GPCFYCpmyWfl7I z0IoKzLcNb8L0v4IGSy6zUBor1SFbKAY39jAdBEsw8BD0JdzG/3IsmDg+x45Dr+bKlmu EsCA== 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; bh=6hoCjNmEiVFfOvc3If3IVRL3z8wqSiSiN5ImHcrjZWA=; fh=xMYcSHDcsbAp+ycCm4VGsGpm+WqXSjf5wEaq2q4JEls=; b=VWQU1JFfXe4ZzhCqU0oGjptOFhmg41dDsFD7xRleZ71vogvGOEm+F4tnLdewBGWdnL z/lpABdWMggmSSnMO33IHeRitjB1EY4LduvJBPyQD0C1cyW7Gg0Xp6r1QmJ4sypR0kjB e2Tcl6UABL86srKu9rTRMZsCdFBqwp7rNZa0wN7DQYH5lUH5SC0NR7Pv39+sG13HWBu0 DkpBTqcp8B2vu0KUZWttokgBG2vMPxAmJH5SBV7WteENS0WuxOhJNdFwT0VGwZ5mwo/t RvUfzxxgIPPpxjvPNsi5WNz1JRy/w4JpoeY1y+c7BPBmrUMO6ojrzfiAmDs4WXPP4AeO 4SWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-139941-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id jx26-20020a170906ca5a00b00a51c19bee31si474401ejb.924.2024.04.11.00.12.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 00:12:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139941-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-139941-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl 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 6B4E81F21716 for ; Thu, 11 Apr 2024 07:12:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6788C13E023; Thu, 11 Apr 2024 07:11:15 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D924713DBA0; Thu, 11 Apr 2024 07:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712819474; cv=none; b=QRivoBlXPAHnKEPR+vK9MUtrYh7ok8Vvg4Psko77HKB7hIjf0iWUQc+G13Q+U0tMj7+DPBHPVJmCl12PgBLgFCSdIBXikrCgeuIV07oagdZHKqGrEhzWIIDWBv2YCjarl9n/jODj3fFIzOoHJXelZwMLIADqXDHw+tT0KFMrxmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712819474; c=relaxed/simple; bh=mHFt/G53hAFEMBRtvSArbsest/5VtPkry0VDRfUuA1M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bNOsnGaQdhZI+l8QFgs+0MD42auRWKpphyqbp5gvkgCa5S4JKSIr32OZ6rnDSorWMOOP9LqY2lIq75eJTbSJg+KKConFSaUvmGYARvioaPxq1v/EDDCdn7Rv53rm26VQCe/b2htBgwtJmg1Aor0lKYEXGa1mrGwpzwq1hsaWOSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A9FAC433F1; Thu, 11 Apr 2024 07:11:10 +0000 (UTC) Message-ID: Date: Thu, 11 Apr 2024 09:11:08 +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 v3] media: mediatek: vcodec: support 36 bits physical address Content-Language: en-US, nl To: Yunfei Dong , Mauro Carvalho Chehab , =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert , Sebastian Fricke 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: <20240411070127.12384-1-yunfei.dong@mediatek.com> From: Hans Verkuil In-Reply-To: <20240411070127.12384-1-yunfei.dong@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Yunfei, Since the v2 patch is now merged in mainline as-is, you need to make a patch on top of that. So just post a new patch that applies to the mainline. Regards, Hans On 11/04/2024 09:01, Yunfei Dong wrote: > 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 > --- > compared with v2: > - remove unless cast > --- > .../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 9649f4ec1f2a..5f848691cea4 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 = 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++) {