From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "nhebert@chromium.org" <nhebert@chromium.org>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"nicolas.dufresne@collabora.com" <nicolas.dufresne@collabora.com>,
"benjamin.gaignard@collabora.com"
<benjamin.gaignard@collabora.com>,
"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
"sebastian.fricke@collabora.com" <sebastian.fricke@collabora.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"nfraprado@collabora.com" <nfraprado@collabora.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"frkoenig@chromium.org" <frkoenig@chromium.org>,
"stevecho@chromium.org" <stevecho@chromium.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"hsinyi@chromium.org" <hsinyi@chromium.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] media: mediatek: vcodec: support 36 bits physical address
Date: Fri, 12 Apr 2024 03:59:52 +0000 [thread overview]
Message-ID: <26acb3d0aad64d629c794867b4428c50ef9f97a6.camel@mediatek.com> (raw)
In-Reply-To: <d230b840-471b-4f77-b9f4-34a4063f1db9@xs4all.nl>
Hi Hans,
Thanks for your advice.
Send the fix patch again => media: mediatek: vcodec: Fix unreasonable
data conversion
Best Regards,
Yunfei Dong
On Thu, 2024-04-11 at 09:11 +0200, Hans Verkuil wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 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 <yunfei.dong@mediatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> > ---
> > 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_la
> t_if.c
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_la
> t_if.c
> > index cf48d09b78d7..eea709d93820 100644
> > ---
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_la
> t_if.c
> > +++
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_la
> t_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++) {
>
>
prev parent reply other threads:[~2024-04-12 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 7:01 Yunfei Dong
2024-04-11 7:11 ` Hans Verkuil
2024-04-12 3:59 ` Yunfei Dong (董云飞) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26acb3d0aad64d629c794867b4428c50ef9f97a6.camel@mediatek.com \
--to=yunfei.dong@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=frkoenig@chromium.org \
--cc=hsinyi@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nfraprado@collabora.com \
--cc=nhebert@chromium.org \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
--cc=stevecho@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®