All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Lee, Shawn C" <shawn.c.lee@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Cooper Chiou <cooper.chiou@intel.com>, Lee@freedesktop.org
Subject: Re: [PATCH] drm/i915: Check backlight type while doing eDP backlight initializaiton
Date: Wed, 19 Jun 2019 10:34:02 +0300	[thread overview]
Message-ID: <87lfxym3kl.fsf@intel.com> (raw)
In-Reply-To: <1560913807-10464-1-git-send-email-shawn.c.lee@intel.com>

On Tue, 18 Jun 2019, "Lee, Shawn C" <shawn.c.lee@intel.com> wrote:
> If LFP backlight type setting from VBT was "VESA eDP AUX Interface".
> Driver should check panel capability and try to initialize aux backlight.
> No matter i915_modparams.enable_dpcd_backlight was enabled or not.

The usual thing to do is to set i915.enable_dpcd_backlight initial value
to -1 (i.e. make it an int), and with that default value respect
VBT. Otherwise, respect the value of enable_dpcd_backlight.

>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Jose Roberto de Souza <jose.souza@intel.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_bios.h             |  1 +
>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 11 ++++++++++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.h b/drivers/gpu/drm/i915/display/intel_bios.h
> index 4e42cfaf61a7..0b7be6389a07 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.h
> +++ b/drivers/gpu/drm/i915/display/intel_bios.h
> @@ -42,6 +42,7 @@ enum intel_backlight_type {
>  	INTEL_BACKLIGHT_DISPLAY_DDI,
>  	INTEL_BACKLIGHT_DSI_DCS,
>  	INTEL_BACKLIGHT_PANEL_DRIVER_INTERFACE,
> +	INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE,
>  };
>  
>  struct edp_power_seq {
> 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 7ded95a334db..0cca5b732ccf 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -261,11 +261,20 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
>  	return false;
>  }
>  
> +static bool
> +intel_dp_bios_use_aux_backlight(struct drm_i915_private *dev_priv)
> +{
> +	if (dev_priv->vbt.backlight.type == INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE)
> +		return true;
> +	return false;
> +}

I think I'd just access dev_priv->vbt.backlight.type directly from
intel_dp_aux_init_backlight_funcs.


BR,
Jani.


> +
>  int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
>  {
>  	struct intel_panel *panel = &intel_connector->panel;
>  
> -	if (!i915_modparams.enable_dpcd_backlight)
> +	if (!i915_modparams.enable_dpcd_backlight &&
> +	    !intel_dp_bios_use_aux_backlight(to_i915(intel_connector->base.dev)))
>  		return -ENODEV;
>  
>  	if (!intel_dp_aux_display_control_capable(intel_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

  parent reply	other threads:[~2019-06-19  7:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  3:10 [PATCH] drm/i915: Check backlight type while doing eDP backlight initializaiton Lee, Shawn C
2019-06-19  3:09 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-06-19  7:34 ` Jani Nikula [this message]
2019-06-19  8:43 ` [PATCH v2] " Lee Shawn C
2019-06-19  9:40   ` Jani Nikula
2019-06-20  2:09     ` Lee, Shawn C
2019-06-20  9:00       ` Jani Nikula
2019-06-20 15:44   ` [PATCH v3] " Lee Shawn C
2019-06-25 14:03     ` Jani Nikula
2019-06-25 14:33       ` Lee, Shawn C
2019-06-26 15:04         ` Jani Nikula
2019-06-19  9:26 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Check backlight type while doing eDP backlight initializaiton (rev2) Patchwork
2019-06-19 10:13 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-19 19:41 ` ✓ Fi.CI.IGT: success for drm/i915: Check backlight type while doing eDP backlight initializaiton Patchwork
2019-06-20  1:40 ` ✓ Fi.CI.IGT: success for drm/i915: Check backlight type while doing eDP backlight initializaiton (rev2) Patchwork
2019-06-20 19:34 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Check backlight type while doing eDP backlight initializaiton (rev3) Patchwork
2019-06-20 19:54 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-06-25 14:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Check backlight type while doing eDP backlight initializaiton (rev4) Patchwork
2019-06-25 15:05 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-25 16:33 ` ✓ Fi.CI.IGT: " Patchwork

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=87lfxym3kl.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=Lee@freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.