OSDN Git Service

drm/i915: use pch backlight override on hsw too
authorJani Nikula <jani.nikula@intel.com>
Fri, 4 Sep 2015 13:55:13 +0000 (16:55 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Sep 2015 16:27:28 +0000 (18:27 +0200)
commit437b15b8017e0d946453c10794b0c5d4591cf180
tree7a7951bb0978c3f9b5428bd3b8e35692753ca261
parenta7546159718171ba9f2a4df37b574c64b1589b5d
drm/i915: use pch backlight override on hsw too

Currently the difference between backlight control on HSW vs. BDW/SKL is
that on HSW we modify the duty cycle on the CPU register, and have the
hardware pass the changes on to the PCH registers. We still drive the
PCH PWM on both. While HSW and BDW use the same LPT PCH, BDW does not
pass these messages on to the PCH. Therefore on BDW we need to enable
the PCH override bit, and program the PCH directly. (On SPT PCH, this
mode is the default.) We could as well do this on HSW too, and in fact
I've been told this is what a certain other operating system does. So
use PCH backlight override on HSW too.

This simplifies some follow-up code, but it does have the danger of
breaking backlight on HSW machines. It should work, but mysterious are
the ways of backlight.

While at it, name the related backlight hooks according to the PCH
rather than the CPU for clarity.

Cc: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_panel.c