• Paulo Zanoni's avatar
    drm/i915: add i915.pc8_timeout function · 90058745
    Paulo Zanoni authored
    We currently only enter PC8+ after all its required conditions are
    met, there's no rendering, and we stay like that for at least 5
    seconds.
    
    I chose "5 seconds" because this value is conservative and won't make
    us enter/leave PC8+ thousands of times after the screen is off: some
    desktop environments have applications that wake up and do rendering
    every 1-3 seconds, even when the screen is off and the machine is
    completely idle.
    
    But when I was testing my PC8+ patches I set the default value to
    100ms so I could use the bad-behaving desktop environments to
    stress-test my patches. I also thought it would be a good idea to ask
    our power management team to test different values, but I'm pretty
    sure they would ask me for an easy way to change the timeout. So to
    help these 2 cases I decided to create an option that would make it
    easier to change the default value. I also expect people making
    specific products that use our driver could try to find the perfect
    timeout for them.
    
    Anyway, fixing the bad-behaving applications will always lead to
    better power savings than just changing the timeout value: you need to
    stop waking the Kernel, not quickly put it back to sleep again after
    you wake it for nothing. Bad sleep leads to bad mood!
    Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
    Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    90058745
i915_drv.c 34.8 KB