[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af0030847bb47370f977d18a18287cdc16192cde.camel@mediatek.com>
Date: Wed, 15 Jan 2025 08:05:56 +0000
From: Paul-pl Chen (陳柏霖) <Paul-pl.Chen@...iatek.com>
To: "robh@...nel.org" <robh@...nel.org>, "krzk+dt@...nel.org"
<krzk+dt@...nel.org>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, "conor+dt@...nel.org"
<conor+dt@...nel.org>, "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC: Sunny Shen (沈姍姍) <Sunny.Shen@...iatek.com>,
Sirius Wang (王皓昱) <Sirius.Wang@...iatek.com>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
Xiandong Wang (王先冬)
<Xiandong.Wang@...iatek.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>, Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"fshao@...omium.org" <fshao@...omium.org>, "p.zabel@...gutronix.de"
<p.zabel@...gutronix.de>, Singo Chang (張興國)
<Singo.Chang@...iatek.com>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
<matthias.bgg@...il.com>, "treapking@...omium.org" <treapking@...omium.org>
Subject: Re: [PATCH 00/12] Add Mediatek Soc DRM support for mt8196
On Mon, 2025-01-13 at 13:50 +0100, AngeloGioacchino Del Regno wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Il 10/01/25 13:33, paul-pl.chen ha scritto:
> > From: "Paul-pl.Chen" <paul-pl.chen@...iatek.com>
> >
> > Add support multiple mmsys instances in the one mediatek-drm
> > instance.
> >
>
> Hello Paul,
>
> EXDMA, BLENDER and OUTPROC seem to have many things in common with
> the current
> mtk_disp_ovl.c driver.
>
> Please commonize code from mtk_disp_ovl to reuse in these three
> components that
> you're adding, as there is a lot of code duplication.
>
Hi Angelo,
Thanks for the review and feedback.
In this patch, we have separated the new EXDMA, BLENDER, and OUTPROC
from the original OVL hardware IP.
While EXDMA, BLENDER, OUTPROC, and OVL share similar functionalities,
they are fundamentally independent hardware components with distinct
register bases and offsets.
Merging them into a single driver would introduce unnecessary
complexity due to these differences,
making maintenance and future development more challenging. For
eample:
1. Register Differences:
Taking EXDMA and OVL as an example:
OVL:// OVL Reset Register #define DISP_REG_OVL_RST 0x0014
EXDMA:// EXDMA Reset Register #define DISP_REG_OVL_RST 0x0024
Although the macro names are similar, the register addresses differ.
This means that any operation involving these registers must account
for different base addresses and offsets.
2. Function Implementation Variations:
These register differences impact function implementations:
OVL Function:
mtk_ovl_config();
EXDMA Function:
mtk_disp_exdma_stop();
Integrating these functions would necessitate conditional logic to
handle the different registers and behaviors,
leading to less readable and maintainable code.
Best, Paul
> Thanks,
> Angelo
//snip
Powered by blists - more mailing lists