From: Imre Deak <imre.deak@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/bxt: add support for setting backlight freq from vbt
Date: Tue, 01 Dec 2015 18:58:44 +0200 [thread overview]
Message-ID: <1448989124.14710.35.camel@intel.com> (raw)
In-Reply-To: <1448958232-26520-1-git-send-email-jani.nikula@intel.com>
On ti, 2015-12-01 at 10:23 +0200, Jani Nikula wrote:
> The only missing piece is the function to convert frequency to PWM
> register value. The PWM is based on 19.2 MHz clock, except for BXT A
> step, which is based on CDCLK, and which we ignore.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
On patch 1 and 2:
Reviewed-by: Imre Deak <imre.deak@intel.com>
For patch 3 we need an another reviewer.
I also tested all three patches and they fix the backlight on BXT,
before it was practically unusable: there was either no backlight at
all or the backlight was flashing rapidly depending on the current
backlight level.
> ---
> drivers/gpu/drm/i915/intel_panel.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c
> b/drivers/gpu/drm/i915/intel_panel.c
> index a24df35e11e7..2d1696386b0d 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -1264,6 +1264,14 @@ static void
> intel_backlight_device_unregister(struct intel_connector *connector)
> #endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
>
> /*
> + * BXT: PWM clock frequency = 19.2 MHz.
> + */
> +static u32 bxt_hz_to_pwm(struct intel_connector *connector, u32
> pwm_freq_hz)
> +{
> + return KHz(19200) / pwm_freq_hz;
> +}
> +
> +/*
> * SPT: This value represents the period of the PWM stream in clock
> periods
> * multiplied by 16 (default increment) or 128 (alternate increment
> selected in
> * SCHICKEN_1 bit 0). PWM clock is 24 MHz.
> @@ -1750,6 +1758,7 @@ intel_panel_init_backlight_funcs(struct
> intel_panel *panel)
> panel->backlight.disable = bxt_disable_backlight;
> panel->backlight.set = bxt_set_backlight;
> panel->backlight.get = bxt_get_backlight;
> + panel->backlight.hz_to_pwm = bxt_hz_to_pwm;
> } else if (HAS_PCH_LPT(dev) || HAS_PCH_SPT(dev)) {
> panel->backlight.setup = lpt_setup_backlight;
> panel->backlight.enable = lpt_enable_backlight;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-12-01 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 8:23 [PATCH 1/3] drm/i915/bxt: add support for setting backlight freq from vbt Jani Nikula
2015-12-01 8:23 ` [PATCH 2/3] drm/i915: use default 200 Hz backlight frequency Jani Nikula
2015-12-01 8:23 ` [PATCH 3/3] drm/i915/bxt: backlight clock gating workaround Jani Nikula
2015-12-01 17:09 ` Ville Syrjälä
2015-12-01 16:58 ` Imre Deak [this message]
2015-12-02 8:28 ` [PATCH 1/3] drm/i915/bxt: add support for setting backlight freq from vbt Jani Nikula
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=1448989124.14710.35.camel@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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