linux/drivers/media
Jagadeesh Kona ec9a652e51 venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6
The Venus driver requires vcodec GDSC to be ON in SW mode for clock
operations and move it back to HW mode to gain power benefits. Earlier,
as there is no interface to switch the GDSC mode from GenPD framework,
the GDSC is moved to HW control mode as part of GDSC enable callback and
venus driver is writing to its POWER_CONTROL register to keep the GDSC ON
from SW whereever required. But the POWER_CONTROL register addresses
are not constant and can vary across the variants.

Also as per the HW recommendation, the GDSC mode switching needs to be
controlled from respective GDSC register and this is a uniform approach
across all the targets. Hence use dev_pm_genpd_set_hwmode() API which
controls GDSC mode switching using its respective GDSC register.

In venus V6 variants, the vcodec gdsc gets enabled in SW mode by default
with new HW_CTRL_TRIGGER flag and there is no need to switch it to SW
mode again after enable, hence add check to avoid switching gdsc to SW mode
again after gdsc enable. Similarly add check to avoid switching GDSC to HW
mode before disabling the GDSC, so GDSC gets enabled in SW mode in the next
enable.

Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Link: https://lore.kernel.org/r/20240624044809.17751-6-quic_jkona@quicinc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-07-09 12:59:58 +02:00
..
cec Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
common media: common: saa7146: Use min macro 2024-05-03 11:11:57 +01:00
dvb-core media: dvbdev: Initialize sbuf 2024-04-08 13:48:19 +02:00
dvb-frontends I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
mc media: mc: mark the media devnode as registered from the, start 2024-04-22 11:41:04 +02:00
mmc media: mmc: siano: simplify module initialization 2024-04-08 13:48:19 +02:00
pci media: intel/ipu6: Don't print user-triggerable errors to kernel log 2024-05-10 11:20:02 +02:00
platform venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6 2024-07-09 12:59:58 +02:00
radio media: radio-shark2: Avoid led_names truncations 2024-04-08 13:48:19 +02:00
rc Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
spi media: cxd2880: Replaze kmalloc with kzalloc 2024-04-15 13:42:38 +02:00
test-drivers media: v4l2: Add mem2mem helpers for REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
tuners media: tunner: xc5000: Refactor firmware load 2024-04-15 13:42:38 +02:00
usb I2C core removes an argument from the i2c_mux_add_adapter() call to 2024-05-20 08:55:18 -07:00
v4l2-core Revert "media: v4l2-ctrls: show all owned controls in log_status" 2024-05-10 11:20:02 +02:00
Kconfig
Makefile