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@xxxxxxxxxxxx> > > > > 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