Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1024875lqs; Wed, 6 Mar 2024 04:19:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVS3zEwI2f+2B59keOp4FeQFHmJ3Fh7w1LUjWqAYrRlcxEkt6MQ1wnofRlX+ITt5Lkb4IWp2/+1LO0AZWargH4t9A77htfpWgh3IPZ8MQ== X-Google-Smtp-Source: AGHT+IGNDCcw/2fcbu3CTQJx4dzOFWcEF1SID15N3r53wsbzdW+a3JT9MQ9X/qIURxG3QEY3K7tt X-Received: by 2002:a50:cbcd:0:b0:566:de7:ac4a with SMTP id l13-20020a50cbcd000000b005660de7ac4amr10199761edi.6.1709727565848; Wed, 06 Mar 2024 04:19:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709727565; cv=pass; d=google.com; s=arc-20160816; b=Ah75+Tly/RU1+bbRMz/4u1VdSaViFV5DUDv90jVqdMrKomI1M5L/OEnN+Gx0mZXUD9 oL/IqyJcKHlMtvMWTvWbrk+xjcvmil1oEVzw/yhgsBsB/5RvGjClIkIwIZdyXCJpr3nb UcrBc7zjorKf9E6Q/ugIghcIAVTnHEx0ncKJE9yxXNFVryHcdnJvwPawxZoyiDfzqjN7 kQy4cV3SReGa5zHHvnGKnRiX9Wj0je6UTc/ktFzVST2VTPkq0mAlOprF5uFNW3eXV9RV ALE/PnuNEaziykaevBCZY09pA5hPzhfUHaw98jgqQIeYKKVRxWNEkGtcPvCQOAe4O+/c 8l0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=IImJC9e9Da9C3lUM5dgN5QOlSp2BnbxeAklEtHNsfVk=; fh=TVLezOybcIb6ET4BPfOfEA4i5kVgjRIhKIyQ534BmSQ=; b=soEDr4qMjfTQborX9Q+xu6a4ulMCesXi94Tb4Gv550MCd0rWsV0ciag/OYMoXTraxs 7BW2bY45HNcjLmm9nvluQWB9BX52LIkHooNx8u5CUQBc3/cZFpk2AH7rO2KEgAjAiGA6 +0i1OVeYNO35p6h/hUgtrOqkT9W+IgMJNHMhPl1tfGLiXxQswh15rpf7p+fA1tzKffB7 CtJSqiz0+NT/qilee0t52rg546jiEwhenfxjpvJ3UgLjNJ+Mk0IhdnY4WjmGLgLnEtQ0 RxrXf6dwriYQ6odf8n7g24IQgIlsiDjeWlxhu11cjnRuvICPlPIQ/TehQvNtPoJe1M+M iGnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oTwT5u+6; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-93873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bl7-20020a056402210700b005638b1323ddsi6254206edb.73.2024.03.06.04.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 04:19:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93873-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=@mediatek.com header.s=dk header.b=oTwT5u+6; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-93873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.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 928291F24DA1 for ; Wed, 6 Mar 2024 12:19:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 186DB8003D; Wed, 6 Mar 2024 12:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="oTwT5u+6" Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (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 2DD9B605DC; Wed, 6 Mar 2024 12:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709727555; cv=none; b=TTemu4IzKfKHmX1S56DnmFh85AgcVkSiOC6ol9Ccbre1+aqfh20GyHJ4jmHVdfxQDscZ56XNiai3q9KkoPDgJnykrrpxNByxnaeUSwV4l6mpf69NhuLSFL8BWv5oTaV519Ejvh+LJkG++vqIFXOjkAY2YhbpTvAFzPhgGcvAd3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709727555; c=relaxed/simple; bh=MVqqKIZCSnIGxvz4YPGoem4kx9gkpPGdW6QTNhBVmyk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uObw3VJQzaLNfhs9qrWFUbUyNmH/Goq12LqpdAgqSp83ifh9ExZfLaT1Z1IVUUy7e+RCjBfSUOEU8oZbOVBeJrEKUiRV1sGzxXwZ7AjjF7P93susC6OaldjnSye6bjF2A6eCCea6xdPJMl5kCq+FPMYKR2eKiHdxgk3WFnFMzO8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=oTwT5u+6; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: b9c01e2edbb311ee935d6952f98a51a9-20240306 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=IImJC9e9Da9C3lUM5dgN5QOlSp2BnbxeAklEtHNsfVk=; b=oTwT5u+6ceKN91WgfQKlYtpYIJPanP9fILphVFtsNGhyK9SmADO36Jm5vfQ6nLHcMoXR+jOj28chXZPyU9wWkQl0W2ZKCMA8RUZSgGN7wlWu3yZIX5WSJQaVGpEjmchRPfB1ONT9gbYsjlIMoSPVOixdZ2YWAHodDPQSnhSkfAA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:74bc076d-1554-4d47-9129-7b77c9e01a20,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:6f543d0,CLOUDID:36991690-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: b9c01e2edbb311ee935d6952f98a51a9-20240306 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 515065125; Wed, 06 Mar 2024 20:19:05 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 6 Mar 2024 20:19:04 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 6 Mar 2024 20:19:03 +0800 From: Yunfei Dong To: =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Sebastian Fricke , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert CC: Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , "Yunfei Dong" , , , , , , Subject: [PATCH v2] media: mediatek: vcodec: support 36 bits physical address Date: Wed, 6 Mar 2024 20:19:02 +0800 Message-ID: <20240306121902.25069-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--9.625700-8.000000 X-TMASE-MatchedRID: Fdt1IHAXXPKHTNZBcJlnyHQIOMndeKgETJDl9FKHbrk1LB46LFAAkktH ojrK13E49ypTh0ieeunHCCukuCUtoobqZZp5NyFKXpVEIlJTuP2d2Wz0X3OaLZsoi2XrUn/Jn6K dMrRsL14qtq5d3cxkNWCFMTTr110l3BTbPvva4/GNYa/SjhM7l0EM1EKZ9uM8WvxqZnJiH0w= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--9.625700-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 7DE4977BDE382AA717543D2C2D293FFF5A7F45942B469FFE79BB5F9992F8F79F2000:8 X-MTK: N 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 --- 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++) { -- 2.18.0