From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lee Shawn C <shawn.c.lee@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Cooper Chiou <cooper.chiou@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: set min brightness for aux backlight interface.
Date: Wed, 21 Apr 2021 12:42:55 +0300 [thread overview]
Message-ID: <875z0g9dnk.fsf@intel.com> (raw)
In-Reply-To: <20210419151718.22979-1-shawn.c.lee@intel.com>
On Mon, 19 Apr 2021, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> Min brightness level for aux backlight interface is always zero.
> Driver should refer to VBT's setting to configure proper minimum
> level just like PWM backlight interface.
Unfortunately this change makes it harder for Lyude to extract the dpcd
backlight code from i915 to drm helpers, and I think the min brightness
should be handled after or in connection with that change.
BR,
Jani.
>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Cooper Chiou <cooper.chiou@intel.com>
>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 +-
> drivers/gpu/drm/i915/display/intel_panel.c | 2 +-
> drivers/gpu/drm/i915/display/intel_panel.h | 1 +
> 3 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 4f8337c7fd2e..efd8fa155105 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -571,7 +571,7 @@ static int intel_dp_aux_vesa_setup_backlight(struct intel_connector *connector,
> if (!panel->backlight.max)
> return -ENODEV;
>
> - panel->backlight.min = 0;
> + panel->backlight.min = get_backlight_min_vbt(connector);
> panel->backlight.level = intel_dp_aux_vesa_get_backlight(connector, pipe);
> panel->backlight.enabled = intel_dp_aux_vesa_backlight_dpcd_mode(connector) &&
> panel->backlight.level != 0;
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 551fcaa77c2c..6d58ec192a04 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -1614,7 +1614,7 @@ static u32 get_backlight_max_vbt(struct intel_connector *connector)
> /*
> * Note: The setup hooks can't assume pipe is set!
> */
> -static u32 get_backlight_min_vbt(struct intel_connector *connector)
> +u32 get_backlight_min_vbt(struct intel_connector *connector)
> {
> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> struct intel_panel *panel = &connector->panel;
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.h b/drivers/gpu/drm/i915/display/intel_panel.h
> index 1d340f77bffc..63da4e355585 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.h
> +++ b/drivers/gpu/drm/i915/display/intel_panel.h
> @@ -53,6 +53,7 @@ void intel_panel_set_pwm_level(const struct drm_connector_state *conn_state, u32
> u32 intel_panel_invert_pwm_level(struct intel_connector *connector, u32 level);
> u32 intel_panel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
> u32 intel_panel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);
> +u32 get_backlight_min_vbt(struct intel_connector *connector);
>
> #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> int intel_backlight_device_register(struct intel_connector *connector);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-04-21 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 15:17 [Intel-gfx] [PATCH] drm/i915: set min brightness for aux backlight interface Lee Shawn C
2021-04-19 15:43 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2021-04-19 16:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-19 19:30 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-04-21 9:42 ` Jani Nikula [this message]
2021-04-23 14:23 ` [Intel-gfx] [PATCH] " Lee, Shawn C
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=875z0g9dnk.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=cooper.chiou@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shawn.c.lee@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