lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87lfpzj1eb.fsf@intel.com>
Date:   Wed, 22 Jan 2020 11:17:32 +0200
From:   Jani Nikula <jani.nikula@...el.com>
To:     Lyude Paul <lyude@...hat.com>, intel-gfx@...ts.freedesktop.org
Cc:     Perry Yuan <pyuan@...hat.com>,
        AceLan Kao <acelan.kao@...onical.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Ville Syrjälä <ville.syrjala@...ux.intel.com>,
        Lee Shawn C <shawn.c.lee@...el.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] drm/i915: Don't use VBT for detecting DPCD backlight controls

On Fri, 17 Jan 2020, Lyude Paul <lyude@...hat.com> wrote:
> Despite the fact that the VBT appears to have a field for specifying
> that a system is equipped with a panel that supports standard VESA
> backlight controls over the DP AUX channel, so far every system we've
> spotted DPCD backlight control support on doesn't actually set this
> field correctly and all have it set to INTEL_BACKLIGHT_DISPLAY_DDI.
>
> While we don't know the exact reason for this VBT misuse, talking with
> some vendors indicated that there's a good number of laptop panels out
> there that supposedly support both PWM backlight controls and DPCD
> backlight controls as a workaround until Intel supports DPCD backlight
> controls across platforms universally. This being said, the X1 Extreme
> 2nd Gen that I have here (note that Lenovo is not the hardware vendor
> that informed us of this) PWM backlight controls are advertised, but
> only DPCD controls actually function. I'm going to make an educated
> guess here and say that on systems like this one, it's likely that PWM
> backlight controls might have been intended to work but were never
> really tested by QA.
>
> Since we really need backlights to work without any extra module
> parameters, let's take the risk here and rely on the standard DPCD caps
> to tell us whether AUX backlight controls are supported or not. We still
> check the VBT, just so we can print a debugging message on systems that
> advertise DPCD backlight support on the panel but not in the VBT.
>
> Changes since v3:
> * Print a debugging message if we enable DPCD backlight control on a
>   device which doesn't report DPCD backlight controls in it's VBT,
>   instead of warning on custom panel backlight interfaces.
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112376
> Cc: Jani Nikula <jani.nikula@...el.com>
> Cc: Perry Yuan <pyuan@...hat.com>
> Cc: AceLan Kao <acelan.kao@...onical.com>

Thanks for the patch, pushed to dinq, fingers crossed! ;)

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 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 77a759361c5c..0f8edc775375 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -328,15 +328,16 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
>  int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
>  {
>  	struct intel_panel *panel = &intel_connector->panel;
> -	struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev);
> +	enum intel_backlight_type type =
> +		to_i915(intel_connector->base.dev)->vbt.backlight.type;
>  
>  	if (i915_modparams.enable_dpcd_backlight == 0 ||
>  	    (i915_modparams.enable_dpcd_backlight == -1 &&
> -	    dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE))
> +	     !intel_dp_aux_display_control_capable(intel_connector)))
>  		return -ENODEV;
>  
> -	if (!intel_dp_aux_display_control_capable(intel_connector))
> -		return -ENODEV;
> +	if (type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE)
> +		DRM_DEBUG_DRIVER("Ignoring VBT backlight type\n");
>  
>  	panel->backlight.setup = intel_dp_aux_setup_backlight;
>  	panel->backlight.enable = intel_dp_aux_enable_backlight;

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ