From: Jani Nikula <jani.nikula@intel.com>
To: Clint Taylor <clinton.a.taylor@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: rodrigo.vivi@intel.com, kevin.strasser@intel.com, jesse.barnes@intel.com
Subject: Re: [PATCH 3/4] drm/i915/dp: make backlight bl_power control power sequencer backlight
Date: Tue, 19 Aug 2014 08:36:28 +0300 [thread overview]
Message-ID: <87mwb1hwgz.fsf@intel.com> (raw)
In-Reply-To: <53F23B70.4080008@intel.com>
On Mon, 18 Aug 2014, Clint Taylor <clinton.a.taylor@intel.com> wrote:
> On 08/12/2014 07:11 AM, Jani Nikula wrote:
>> This lets the userspace switch off the backlight using the backlight
>> class sysfs bl_power file. The switch is done using the power sequencer;
>> the backlight PWM, and everything else, remains enabled. The display
>> backlight won't draw power, but for maximum power savings the encoder
>> needs to be switched off.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>> index d8baf60ff3fd..f6e3e9a906b0 100644
>> --- a/drivers/gpu/drm/i915/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>> @@ -1453,6 +1453,27 @@ void intel_edp_backlight_off(struct intel_dp *intel_dp)
>> intel_panel_disable_backlight(intel_dp->attached_connector);
>> }
>>
>> +/*
>> + * Hook for controlling the panel power control backlight through the bl_power
>> + * sysfs attribute. Take care to handle multiple calls.
>> + */
>> +static void intel_edp_backlight_power(struct intel_connector *connector,
>> + bool enable)
>> +{
>> + struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
>> + bool is_enabled = ironlake_get_pp_control(intel_dp) & EDP_BLC_ENABLE;
>> +
>> + if (is_enabled == enable)
>> + return;
>> +
>> + DRM_DEBUG_KMS("\n");
>> +
>> + if (enable)
>> + _intel_edp_backlight_on(intel_dp);
>> + else
>> + _intel_edp_backlight_off(intel_dp);
>
> Is there a good reason why we leave the PWM enabled? There is a small
> power requirement to leave the PWM enabled.
Implementation simplicity. If you want to go for max power savings, you
are supposed to switch everything off using KMS, not just backlight.
BR,
Jani.
>
>> +}
>> +
>> static void ironlake_edp_pll_on(struct intel_dp *intel_dp)
>> {
>> struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>> @@ -4579,6 +4600,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>> }
>>
>> intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
>> + intel_connector->panel.backlight_power = intel_edp_backlight_power;
>> intel_panel_setup_backlight(connector);
>>
>> return true;
>>
>
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-08-19 5:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 14:11 [PATCH 0/4] drm/i915: backlight sysfs bl_power and brightness == 0 Jani Nikula
2014-08-12 14:11 ` [PATCH 1/4] drm/i915/dp: split up panel power control from backlight pwm control Jani Nikula
2014-08-18 17:15 ` Clint Taylor
2014-08-19 23:02 ` Clint Taylor
2014-08-12 14:11 ` [PATCH 2/4] drm/i915: add some framework for backlight bl_power support Jani Nikula
2014-08-13 9:10 ` [PATCH v2 " Jani Nikula
2014-08-19 23:04 ` Clint Taylor
2014-08-12 14:11 ` [PATCH 3/4] drm/i915/dp: make backlight bl_power control power sequencer backlight Jani Nikula
2014-08-18 17:44 ` Clint Taylor
2014-08-19 5:36 ` Jani Nikula [this message]
2014-08-19 23:03 ` Clint Taylor
2014-08-12 14:11 ` [PATCH 4/4] drm/i915: switch off backlight for backlight class 0 brightness Jani Nikula
2014-08-19 23:04 ` Clint Taylor
2014-08-25 21:24 ` Daniel Vetter
2014-08-14 1:11 ` [PATCH 0/4] drm/i915: backlight sysfs bl_power and brightness == 0 Clint Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwb1hwgz.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=clinton.a.taylor@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jesse.barnes@intel.com \
--cc=kevin.strasser@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox