Linux Media Controller development
 help / color / mirror / Atom feed
From: "Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>
To: "nhebert@chromium.org" <nhebert@chromium.org>,
	"benjamin.gaignard@collabora.com"
	<benjamin.gaignard@collabora.com>,
	"nfraprado@collabora.com" <nfraprado@collabora.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"nicolas.dufresne@collabora.com" <nicolas.dufresne@collabora.com>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
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] media: mediatek: vcodec: support 36bit physical address
Date: Fri, 1 Mar 2024 09:23:59 +0000	[thread overview]
Message-ID: <c1f489c474e3d00ff8573225c5d282df4d82f9e1.camel@mediatek.com> (raw)
In-Reply-To: <ea7f25bf-2294-4ad4-bc18-226827d49ae8@collabora.com>

Hi AngeloGioacchino,

Thanks for you reviewing.
On Fri, 2024-03-01 at 10:03 +0100, AngeloGioacchino Del Regno wrote:
> 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 <yunfei.dong@mediatek.com>
> > ---
> >   .../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 ;-)
> 
Yes, you are right, thanks for your remind.
> Is there any reason why you didn't - and still don't use the
> `phys_addr_t` type
> for the `pa` member?
> 
pa is also iova, dma address. Change it to dma_addr_t looks much
better.

I will change it in next patch.
> Cheers,
> Angelo
> 
Best Regards,
Yunfei Dong
> >   	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++) {
> 
> 

  reply	other threads:[~2024-03-01  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  2:01 [PATCH] media: mediatek: vcodec: support 36bit physical address Yunfei Dong
2024-03-01  9:03 ` AngeloGioacchino Del Regno
2024-03-01  9:23   ` Yunfei Dong (董云飞) [this message]
2024-03-01  9:36     ` AngeloGioacchino Del Regno
2024-03-01  9:54       ` Sebastian Fricke
2024-03-01  9:52 ` Sebastian Fricke
2024-03-06  8:07   ` Yunfei Dong (董云飞)

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=c1f489c474e3d00ff8573225c5d282df4d82f9e1.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=nfraprado@collabora.com \
    --cc=nhebert@chromium.org \
    --cc=nicolas.dufresne@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