Re: [PATCH v3 0/3] Use APIs in gdsc genpd to switch gdsc mode for venus v4 core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/15/2025 5:59 PM, Dmitry Baryshkov wrote:
If only the clock patch or the venus driver patch is merged, the venus
driver will not work properly. Although it does not affect other system
functions, it is still recommended to wait until both the clock patch
and the venus driver patch are reviewed and passed, and then merge them
into the same release by their respective maintainers.
NO! This will not work, as both -media and arm-soc branches will be
broken. Please read about the git-bisect before making such suggestions.

A proper plan would be:
- implement a function which allows one to check that hwmode is
   supported by the genpd driver
- Change Venus to use hwmode for those platforms if it is enabled
- Enable HWMODE support in the clock driver. Clearly identify that this
   patch should be merged together and after Venus changes if all
   maintainers agree with that
- Clean up now-dead code.

Doing it in any other way would result in the broken kernels.
 Thanks for your comment. dev_pm_genpd_set_hwmode() has a check function.
 So I think I can do it like this to add compatibility in venus driver:
 - 1. the dev_pm_genpd_set_hwmode() is used to switch the GDSC mode by
 default.
 - 2. If it fails and dev_pm_genpd_set_hwmode() returns -EOPNOTSUPP, it
 means that the clock driver uses the HW_CTRL flag. At this time, the
 GDSC mode is switched by writing the POWER_CONTROL register.

 In addition, the merged code needs to follow this order.
 - 1. Add compatibility in venus driver.
 - 2. Use the HW_CTRL_TRIGGER flag in clock driver
 - 3. Remove the dead code in venus driver.

--
Best Regards,
Renjiang





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux