Re: [PATCH v3] drm/i915: Check backlight type while doing eDP backlight initializaiton

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 25 Jun 2019, "Lee, Shawn C" <shawn.c.lee@xxxxxxxxx> wrote:
> On Tue, 25 Jun 2019, Jani Nikula <jani.nikula@xxxxxxxxx> wrote:
>>On Thu, 20 Jun 2019, Lee Shawn C <shawn.c.lee@xxxxxxxxx> 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.
>>>
>>> v2: access dev_priv->vbt.backlight.type directly and remove unused function.
>>> v3: 1. Modify i915.enable_dpcd_backlight type from bool to int and give default
>>>        value as 0 (disable).
>>
>>I was thinking we'd change the default to -1 to trust the VBT, but might be just as well to start with this and change the default later.
>>
>>CI flagged errors for some reasons, I've queued a retest. I don't think it was caused by this patch.
>>
>>Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>
>>
>
> Agree with your comments. That's why we keep the default value to 0. We can change the default in the future if necessary.
> Thanks for review.

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

>
>>
>>>     2. Add a judgement to check LFP backlight type was aux interface or not.
>>>
>>> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>>> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
>>> Cc: Jose Roberto de Souza <jose.souza@xxxxxxxxx>
>>> Cc: Cooper Chiou <cooper.chiou@xxxxxxxxx>
>>>
>>> Signed-off-by: Lee Shawn C <shawn.c.lee@xxxxxxxxx>
>>> ---
>>>  drivers/gpu/drm/i915/display/intel_bios.h             | 1 +
>>>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 5 ++++-
>>>  drivers/gpu/drm/i915/i915_params.c                    | 5 +++--
>>>  drivers/gpu/drm/i915/i915_params.h                    | 2 +-
>>>  4 files changed, 9 insertions(+), 4 deletions(-)
>>>
>>> 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..6b0b73479fb8 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
>>> @@ -264,8 +264,11 @@ 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);
>>>  
>>> -	if (!i915_modparams.enable_dpcd_backlight)
>>> +	if (i915_modparams.enable_dpcd_backlight == 0 ||
>>> +	    (i915_modparams.enable_dpcd_backlight == -1 &&
>>> +	    dev_priv->vbt.backlight.type != 
>>> +INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE))
>>>  		return -ENODEV;
>>>  
>>>  	if (!intel_dp_aux_display_control_capable(intel_connector))
>>> diff --git a/drivers/gpu/drm/i915/i915_params.c 
>>> b/drivers/gpu/drm/i915/i915_params.c
>>> index 5b07766a1c26..296452f9efe4 100644
>>> --- a/drivers/gpu/drm/i915/i915_params.c
>>> +++ b/drivers/gpu/drm/i915/i915_params.c
>>> @@ -169,8 +169,9 @@ i915_param_named_unsafe(inject_load_failure, uint, 0400,
>>>  	"Force an error after a number of failure check points (0:disabled 
>>> (default), N:force failure at the Nth failure check point)");  #endif
>>>  
>>> -i915_param_named(enable_dpcd_backlight, bool, 0600,
>>> -	"Enable support for DPCD backlight control (default:false)");
>>> +i915_param_named(enable_dpcd_backlight, int, 0600,
>>> +	"Enable support for DPCD backlight control"
>>> +	"(-1=use per-VBT LFP backlight type setting, 0=disabled [default], 
>>> +1=enabled)");
>>>  
>>>  #if IS_ENABLED(CONFIG_DRM_I915_GVT)
>>>  i915_param_named(enable_gvt, bool, 0400, diff --git 
>>> a/drivers/gpu/drm/i915/i915_params.h 
>>> b/drivers/gpu/drm/i915/i915_params.h
>>> index a4770ce46bd2..d29ade3b7de6 100644
>>> --- a/drivers/gpu/drm/i915/i915_params.h
>>> +++ b/drivers/gpu/drm/i915/i915_params.h
>>> @@ -64,6 +64,7 @@ struct drm_printer;
>>>  	param(int, reset, 2) \
>>>  	param(unsigned int, inject_load_failure, 0) \
>>>  	param(int, fastboot, -1) \
>>> +	param(int, enable_dpcd_backlight, 0) \
>>>  	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \
>>>  	/* leave bools at the end to not create holes */ \
>>>  	param(bool, alpha_support, 
>>> IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \ @@ -76,7 +77,6 @@ struct drm_printer;
>>>  	param(bool, verbose_state_checks, true) \
>>>  	param(bool, nuclear_pageflip, false) \
>>>  	param(bool, enable_dp_mst, true) \
>>> -	param(bool, enable_dpcd_backlight, false) \
>>>  	param(bool, enable_gvt, false)
>>>  
>>>  #define MEMBER(T, member, ...) T member;
>>
>>--
>>Jani Nikula, Intel Open Source Graphics Center
>>

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux