On Mon, 2021-08-02 at 20:12 +0800, Eizan Miyamoto wrote: > Rather than hanging the MDP master component driver off of the rdma0 > device, make it possible too create a "virtual" device by registering > it with platform_device_register_*() to be probed by the mtk_mdp_core > driver. > > Broadly, three interdependent things are done by this change: > - Make it is possible to search for MDP devices in the device tree > through the grandparent device's of_node. > - v4l-related setup is moved into from the mtk_mdp_core driver to the > mtk_mdp_comp driver. > - Presence of a mediatek,vpu property in an MDP component device node > is used to determine what device to use when dispatching DMA ops > from > the relevant ioctl, and also do V4L2 initialization in this case. > > Signed-off-by: Eizan Miyamoto <eizan@xxxxxxxxxxxx> > --- Reviewed-by: Houlong Wei <houlong.wei@xxxxxxxxxxxx> > Changes in v6: > - Don't propagate errors from clock_on/off as an afterthought. > - Split apart modifying mdp driver to be loadable from mmsys from > actually loading it from mmsys into two changs to make review > easier. > - Update devicetree bindings to reflect no longer needing the > mediatek,vpu property in the mdp_rdma0 device node. > - Some stylistic cleanups. > > Changes in v5: > - rebase and test on 5.13-next @ e2f74b13dbe6 > > Changes in v4: > - rebase and test on 5.13 > - don't depend on > https://patchwork.kernel.org/project/linux-mediatek/list/?series=464873 > > Changes in v3: > - get mdp master from aliases instead of strcmp against of_node->name > > Changes in v2: > - rebased onto Linux 5.12 > - 100 char line length allowance was utilized in a few places > - Removal of a redundant dev_err() print at the end of > mtk_mdp_comp_init() > - Instead of printing errors and ignoring them, I've added a patch to > correctly propagate them. > - Use of C style comments. > - Three additional patches were added to eliminate dependency on the > mediatek,vpu property inside the mdp_rdma0 device node. [...]