[regression] HDMI breakage just before poweroff

JeffyChen jeffy.chen at rock-chips.com
Wed May 2 20:51:22 PDT 2018


Hi Vincente,

Thanks for your mail.

On 05/03/2018 03:36 AM, Vicente Bergas wrote:
> Hello,
> on rk3399-sapphire there is a missing feature: the poweroff command is
> unable to poweroff the system and the display stays on.
> When the system is halted, power needs to be removed manually.
according to the dtsi, the rk3399-sapphire is using rk808 pimc right?

i think the power off flow would be:
1/ rk808 set the pm_power_off callback:
drivers/mfd/rk808.c
         switch (rk808->variant) {
         case RK805_ID:
	...
                 pm_pwroff_fn = rk805_device_shutdown;
	...

         pm_off = of_property_read_bool(np,
                                 "rockchip,system-power-controller");
         if (pm_off && !pm_power_off) {
                 rk808_i2c_client = client;
                 pm_power_off = pm_pwroff_fn;
         }

2/ the poweroff command would call kernel_power_off:
kernel/reboot.c:
void kernel_power_off(void)
{
...
         machine_power_off();
}

3/ arm64's machine_power_off() would call pm_power_off to let rk808 
cutoff the power.

>
> With Linux kernel 4.16, when reaching the halted state, the HDMI console
> shows the last messages before halting.
if it ends up halted, maybe something wrong during setup the pm_power_off?
kernel/reboot.c:
         /* Instead of trying to make the power_off code look like
          * halt when pm_power_off is not set do it the easy way.
          */
         if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
                 cmd = LINUX_REBOOT_CMD_HALT;

>
> With 4.17.0-rc3, when reaching the halted state, the HDMI console
> shows colorful static noise.
>
we've added a shutdown() to the iommu driver:
https://patchwork.kernel.org/patch/10230817/

any chance related?

> Regards,
>    Vicente.
>
>
>





More information about the Linux-rockchip mailing list