<pre>
Hi CK,

On Wed, 2023-10-18 at 02:02 +0000, CK Hu (胡俊光) wrote:
> Hi, Hsiao-chien:
>
> On Mon, 2023-10-16 at 18:40 +0800, Hsiao Chien Sung wrote:
> > Different from OVL, OVL adaptor is a pseudo device so we didn't
> > define it in the device tree, consequently,
> > pm_runtime_resume_and_get()
> > called by .atomic_enable() powers on no device in OVL adaptor and
> > leads to power outage in the corresponding IOMMU.
> >
... snip ...
> > +int mtk_ovl_adaptor_power_on(struct device *dev)
> > +{
> > +int i, ret;
> > +struct mtk_disp_ovl_adaptor *ovl_adaptor =
> > dev_get_drvdata(dev);
> > +
> > +for (i = 0; i < OVL_ADAPTOR_ID_MAX; i++) {
> > +if (!ovl_adaptor->ovl_adaptor_comp[i] ||
> > + !comp_matches[i].funcs->power_on)
> > +continue;
>
> To simplify the code, you could call mtk_ddp_comp_power_on() for all
> sub device, and drop power_on()/power_off() of mdp_rdma.
>
> Regards,
> CK
>

Since ovl_adaptor_comp is a `struct device`, we can't reuse
mtk_ddp_comp_power_on() here. Had submited a new version (v9) and wrap
the power off procedure as a static inline function to reuse it.

Regards,
Shawn



</pre><!--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><!--}-->