diff for duplicates of <4e10e2cd5d58321bdd7e5dabf5fb70702f8afc92.camel@mediatek.com> diff --git a/N1/2.bin b/N1/2.bin new file mode 100644 index 0000000..a156153 --- /dev/null +++ b/N1/2.bin @@ -0,0 +1,130 @@ +<html><body><p> +<pre> +On Wed, 2024-12-11 at 11:46 +0800, CK Hu wrote: +> Hi, Jason: +>  +> On Wed, 2024-12-11 at 11:22 +0800, Jason-JH.Lin wrote: +> > To support hardware without subsys IDs on new SoCs, add a programming +> > flow that checks whether the subsys ID is valid. If the subsys ID is +> > invalid, the flow will call 2 alternative CMDQ APIs: +> > cmdq_pkt_assign() and cmdq_pkt_write_s_value() to achieve the same +> > functionality. +> >  +> > Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> +> > --- +> >  drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 34 ++++++++++++++++++++----- +> >  1 file changed, 28 insertions(+), 6 deletions(-) +> >  +> > diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c +> > index edc6417639e6..0792c895526f 100644 +> > --- a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c +> > +++ b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c +> > @@ -66,14 +66,38 @@ struct mtk_ddp_comp_dev { +> >  struct cmdq_client_reg cmdq_reg; +> >  }; +> >   +> > +#if IS_REACHABLE(CONFIG_MTK_CMDQ) +> > +static void mtk_ddp_write_cmdq_pkt(struct cmdq_pkt *cmdq_pkt, struct cmdq_client_reg *cmdq_reg, +> > +   unsigned int offset, unsigned int value, unsigned int mask) +>  +> Drop this function. + +Sorry, it seems cmdq_subsys_is_valid() is used to check the SoC support new API or not. +But I would try to find out a way not to always check using new API or not. + +Regards, +CK + +>  +> > +{ +> > +struct cmdq_client *cl = (struct cmdq_client *)cmdq_pkt->cl; +> > + +> > +offset += cmdq_reg->offset; +> > + +> > +if (cmdq_subsys_is_valid(cl->chan, cmdq_reg->subsys)) { +> > +if (mask == GENMASK(31, 0)) +> > +cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys, offset, value); +> > +else +> > +cmdq_pkt_write_mask(cmdq_pkt, cmdq_reg->subsys, offset, value, mask); +> > +} else { +> > +/* only MMIO access, no need to check mminfro_offset */ +> > +cmdq_pkt_assign(cmdq_pkt, 0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base)); +> > +if (mask == GENMASK(31, 0)) +> > +cmdq_pkt_write_s_value(cmdq_pkt, 0, CMDQ_ADDR_LOW(offset), value); +> > +else +> > +cmdq_pkt_write_s_mask_value(cmdq_pkt, 0, CMDQ_ADDR_LOW(offset), +> > +    value, mask); +> > +} +> > +} +> > +#endif +> > + +> >  void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value, +> >     struct cmdq_client_reg *cmdq_reg, void __iomem *regs, +> >     unsigned int offset) +> >  { +> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ) +> >  if (cmdq_pkt) +> > -cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys, +> > -       cmdq_reg->offset + offset, value); +> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, GENMASK(31, 0)); +>  +> /* only MMIO access, no need to check mminfro_offset */ +> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base)); +> cmdq_pkt_write_s_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset), value); +>  +> >  else +> >  #endif +> >  writel(value, regs + offset); +> > @@ -85,8 +109,7 @@ void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value, +> >  { +> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ) +> >  if (cmdq_pkt) +> > -cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys, +> > -       cmdq_reg->offset + offset, value); +> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, GENMASK(31, 0)); +>  +> /* only MMIO access, no need to check mminfro_offset */ +> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base)); +> cmdq_pkt_write_s_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset), value); +>  +> >  else +> >  #endif +> >  writel_relaxed(value, regs + offset); +> > @@ -98,8 +121,7 @@ void mtk_ddp_write_mask(struct cmdq_pkt *cmdq_pkt, unsigned int value, +> >  { +> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ) +> >  if (cmdq_pkt) { +> > -cmdq_pkt_write_mask(cmdq_pkt, cmdq_reg->subsys, +> > -    cmdq_reg->offset + offset, value, mask); +> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, mask); +>  +> /* only MMIO access, no need to check mminfro_offset */ +> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base)); +> cmdq_pkt_write_s_mask_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset), +>     value, mask); +>  +> CMDQ_XXXREG_0 is defined in cmdq header file. +>  +> Regards, +> CK +>  +> >  } else { +> >  #endif +> >  u32 tmp = readl(regs + offset); +>  + + +</pre> +</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ******************** +The information contained in this e-mail message (including any +attachments) may be confidential, proprietary, privileged, or otherwise +exempt from disclosure under applicable laws. It is intended to be +conveyed only to the designated recipient(s). Any use, dissemination, +distribution, printing, retaining or copying of this e-mail (including its +attachments) by unintended recipient(s) is strictly prohibited and may +be unlawful. If you are not an intended recipient of this e-mail, or believe +that you have received this e-mail in error, please notify the sender +immediately (by replying to this e-mail), delete any and all copies of +this e-mail (including any attachments) from your system, and do not +disclose the content of this e-mail to any other person. Thank you! +</pre><!--}--> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..da1f671 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,3 @@ +Content-Type: text/html; + charset="utf-8" +Content-Transfer-Encoding: base64 diff --git a/a/content_digest b/N1/content_digest index 31c2138..1173b19 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -26,7 +26,7 @@ linux-mediatek@lists.infradead.org <linux-mediatek@lists.infradead.org> " Nancy Lin (\346\236\227\346\254\243\350\236\242) <Nancy.Lin@mediatek.com>" " Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@mediatek.com>\0" - "\00:1\0" + "\01:1\0" "b\0" "On Wed, 2024-12-11 at 11:46 +0800, CK Hu wrote:\n" "> Hi, Jason:\n" @@ -140,5 +140,137 @@ "> > #endif\n" "> > \t\tu32 tmp = readl(regs + offset);\n" > + "\01:2\0" + "b\0" + "<html><body><p>\r\n" + "<pre>\r\n" + "On Wed, 2024-12-11 at 11:46 +0800, CK Hu wrote:\r\n" + "> Hi, Jason:\r\n" + "> \r\n" + "> On Wed, 2024-12-11 at 11:22 +0800, Jason-JH.Lin wrote:\r\n" + "> > To support hardware without subsys IDs on new SoCs, add a programming\r\n" + "> > flow that checks whether the subsys ID is valid. If the subsys ID is\r\n" + "> > invalid, the flow will call 2 alternative CMDQ APIs:\r\n" + "> > cmdq_pkt_assign() and cmdq_pkt_write_s_value() to achieve the same\r\n" + "> > functionality.\r\n" + "> > \r\n" + "> > Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>\r\n" + "> > ---\r\n" + "> >  drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 34 ++++++++++++++++++++-----\r\n" + "> >  1 file changed, 28 insertions(+), 6 deletions(-)\r\n" + "> > \r\n" + "> > diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c\r\n" + "> > index edc6417639e6..0792c895526f 100644\r\n" + "> > --- a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c\r\n" + "> > +++ b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c\r\n" + "> > @@ -66,14 +66,38 @@ struct mtk_ddp_comp_dev {\r\n" + "> >  struct cmdq_client_reg cmdq_reg;\r\n" + "> >  };\r\n" + "> >  \r\n" + "> > +#if IS_REACHABLE(CONFIG_MTK_CMDQ)\r\n" + "> > +static void mtk_ddp_write_cmdq_pkt(struct cmdq_pkt *cmdq_pkt, struct cmdq_client_reg *cmdq_reg,\r\n" + "> > +   unsigned int offset, unsigned int value, unsigned int mask)\r\n" + "> \r\n" + "> Drop this function.\r\n" + "\r\n" + "Sorry, it seems cmdq_subsys_is_valid() is used to check the SoC support new API or not.\r\n" + "But I would try to find out a way not to always check using new API or not.\r\n" + "\r\n" + "Regards,\r\n" + "CK\r\n" + "\r\n" + "> \r\n" + "> > +{\r\n" + "> > +struct cmdq_client *cl = (struct cmdq_client *)cmdq_pkt->cl;\r\n" + "> > +\r\n" + "> > +offset += cmdq_reg->offset;\r\n" + "> > +\r\n" + "> > +if (cmdq_subsys_is_valid(cl->chan, cmdq_reg->subsys)) {\r\n" + "> > +if (mask == GENMASK(31, 0))\r\n" + "> > +cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys, offset, value);\r\n" + "> > +else\r\n" + "> > +cmdq_pkt_write_mask(cmdq_pkt, cmdq_reg->subsys, offset, value, mask);\r\n" + "> > +} else {\r\n" + "> > +/* only MMIO access, no need to check mminfro_offset */\r\n" + "> > +cmdq_pkt_assign(cmdq_pkt, 0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base));\r\n" + "> > +if (mask == GENMASK(31, 0))\r\n" + "> > +cmdq_pkt_write_s_value(cmdq_pkt, 0, CMDQ_ADDR_LOW(offset), value);\r\n" + "> > +else\r\n" + "> > +cmdq_pkt_write_s_mask_value(cmdq_pkt, 0, CMDQ_ADDR_LOW(offset),\r\n" + "> > +    value, mask);\r\n" + "> > +}\r\n" + "> > +}\r\n" + "> > +#endif\r\n" + "> > +\r\n" + "> >  void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value,\r\n" + "> >     struct cmdq_client_reg *cmdq_reg, void __iomem *regs,\r\n" + "> >     unsigned int offset)\r\n" + "> >  {\r\n" + "> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ)\r\n" + "> >  if (cmdq_pkt)\r\n" + "> > -cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys,\r\n" + "> > -       cmdq_reg->offset + offset, value);\r\n" + "> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, GENMASK(31, 0));\r\n" + "> \r\n" + "> /* only MMIO access, no need to check mminfro_offset */\r\n" + "> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base));\r\n" + "> cmdq_pkt_write_s_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset), value);\r\n" + "> \r\n" + "> >  else\r\n" + "> >  #endif\r\n" + "> >  writel(value, regs + offset);\r\n" + "> > @@ -85,8 +109,7 @@ void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value,\r\n" + "> >  {\r\n" + "> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ)\r\n" + "> >  if (cmdq_pkt)\r\n" + "> > -cmdq_pkt_write(cmdq_pkt, cmdq_reg->subsys,\r\n" + "> > -       cmdq_reg->offset + offset, value);\r\n" + "> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, GENMASK(31, 0));\r\n" + "> \r\n" + "> /* only MMIO access, no need to check mminfro_offset */\r\n" + "> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base));\r\n" + "> cmdq_pkt_write_s_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset), value);\r\n" + "> \r\n" + "> >  else\r\n" + "> >  #endif\r\n" + "> >  writel_relaxed(value, regs + offset);\r\n" + "> > @@ -98,8 +121,7 @@ void mtk_ddp_write_mask(struct cmdq_pkt *cmdq_pkt, unsigned int value,\r\n" + "> >  {\r\n" + "> >  #if IS_REACHABLE(CONFIG_MTK_CMDQ)\r\n" + "> >  if (cmdq_pkt) {\r\n" + "> > -cmdq_pkt_write_mask(cmdq_pkt, cmdq_reg->subsys,\r\n" + "> > -    cmdq_reg->offset + offset, value, mask);\r\n" + "> > +mtk_ddp_write_cmdq_pkt(cmdq_pkt, cmdq_reg, offset, value, mask);\r\n" + "> \r\n" + "> /* only MMIO access, no need to check mminfro_offset */\r\n" + "> cmdq_pkt_assign(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_HIGH(cmdq_reg->pa_base));\r\n" + "> cmdq_pkt_write_s_mask_value(cmdq_pkt, CMDQ_XXXREG_0, CMDQ_ADDR_LOW(offset),\r\n" + ">     value, mask);\r\n" + "> \r\n" + "> CMDQ_XXXREG_0 is defined in cmdq header file.\r\n" + "> \r\n" + "> Regards,\r\n" + "> CK\r\n" + "> \r\n" + "> >  } else {\r\n" + "> >  #endif\r\n" + "> >  u32 tmp = readl(regs + offset);\r\n" + "> \r\n" + "\r\n" + "\r\n" + "</pre>\r\n" + "</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************\r\n" + "The information contained in this e-mail message (including any \r\n" + "attachments) may be confidential, proprietary, privileged, or otherwise\r\n" + "exempt from disclosure under applicable laws. It is intended to be \r\n" + "conveyed only to the designated recipient(s). Any use, dissemination, \r\n" + "distribution, printing, retaining or copying of this e-mail (including its \r\n" + "attachments) by unintended recipient(s) is strictly prohibited and may \r\n" + "be unlawful. If you are not an intended recipient of this e-mail, or believe \r\n" + "that you have received this e-mail in error, please notify the sender \r\n" + "immediately (by replying to this e-mail), delete any and all copies of \r\n" + "this e-mail (including any attachments) from your system, and do not\r\n" + "disclose the content of this e-mail to any other person. Thank you!\r\n" + </pre><!--}--> -8d846739009185fa736ac872c0b1745e9dcbd3fd955e20091d00697e8db4e9aa +3d3c9c7bacf0fea6708f5f860ca50fe47f511ac6e63a0e34eef2ec9cd791cab3
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.