Re: [Intel-gfx] [PATCH] [V3] drm/i915: Enable VBT based BL control for DP
Thanks Jani. Best regard Mustamin -Original Message- From: Jani Nikula [mailto:jani.nik...@linux.intel.com] Sent: Wednesday, February 28, 2018 5:42 PM To: Mustaffa, Mustamin B ; intel-gfx@lists.freedesktop.org Cc: Mustaffa, Mustamin B Subject: Re: [Intel-gfx] [PATCH] [V3] drm/i915: Enable VBT based BL control for DP On Tue, 27 Feb 2018, Mustamin B Mustaffa wrote: > Currently, BXT_PP is hardcoded with value '0'. > It practically disabled eDP backlight on MRB (BXT) platform. > > This patch will tell which BXT_PP registers (there are two set of > PP_CONTROL in the spec) to be used as defined in VBT (Video Bios > Timing > table) and this will enabled eDP backlight controller on MRB (BXT) > platform. > > v2: > - Remove unnecessary information in commit message. > - Assign vbt.backlight.controller to a backlight_controller variable and >return the variable value. > v3: > - Rebased to latest code base. > - updated commit title. > > Signed-off-by: Mustamin B Mustaffa Pushed to dinq, thanks for the patch. BR, Jani. > --- > drivers/gpu/drm/i915/intel_dp.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c > b/drivers/gpu/drm/i915/intel_dp.c index 475a19d76a49..20e3fcd2bf7e > 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -655,18 +655,15 @@ bxt_power_sequencer_idx(struct intel_dp > *intel_dp) { > struct drm_i915_private *dev_priv = > to_i915(intel_dp_to_dev(intel_dp)); > > + int backlight_controller = dev_priv->vbt.backlight.controller; > + > lockdep_assert_held(&dev_priv->pps_mutex); > > /* We should never land here with regular DP ports */ > WARN_ON(!intel_dp_is_edp(intel_dp)); > > - /* > - * TODO: BXT has 2 PPS instances. The correct port->PPS instance > - * mapping needs to be retrieved from VBT, for now just hard-code to > - * use instance #0 always. > - */ > if (!intel_dp->pps_reset) > - return 0; > + return backlight_controller; > > intel_dp->pps_reset = false; > > @@ -676,7 +673,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) >*/ > intel_dp_init_panel_power_sequencer_registers(intel_dp, false); > > - return 0; > + return backlight_controller; > } > > typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv, -- Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] [V3] drm/i915: Enable VBT based BL control for DP
On Tue, 27 Feb 2018, Mustamin B Mustaffa wrote: > Currently, BXT_PP is hardcoded with value '0'. > It practically disabled eDP backlight on MRB (BXT) platform. > > This patch will tell which BXT_PP registers (there are two set of > PP_CONTROL in the spec) to be used as defined in VBT (Video Bios Timing > table) and this will enabled eDP backlight controller on MRB (BXT) > platform. > > v2: > - Remove unnecessary information in commit message. > - Assign vbt.backlight.controller to a backlight_controller variable and >return the variable value. > v3: > - Rebased to latest code base. > - updated commit title. > > Signed-off-by: Mustamin B Mustaffa Pushed to dinq, thanks for the patch. BR, Jani. > --- > drivers/gpu/drm/i915/intel_dp.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 475a19d76a49..20e3fcd2bf7e 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -655,18 +655,15 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) > { > struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp)); > > + int backlight_controller = dev_priv->vbt.backlight.controller; > + > lockdep_assert_held(&dev_priv->pps_mutex); > > /* We should never land here with regular DP ports */ > WARN_ON(!intel_dp_is_edp(intel_dp)); > > - /* > - * TODO: BXT has 2 PPS instances. The correct port->PPS instance > - * mapping needs to be retrieved from VBT, for now just hard-code to > - * use instance #0 always. > - */ > if (!intel_dp->pps_reset) > - return 0; > + return backlight_controller; > > intel_dp->pps_reset = false; > > @@ -676,7 +673,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) >*/ > intel_dp_init_panel_power_sequencer_registers(intel_dp, false); > > - return 0; > + return backlight_controller; > } > > typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv, -- Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] [V3] drm/i915: Enable VBT based BL control for DP
Currently, BXT_PP is hardcoded with value '0'. It practically disabled eDP backlight on MRB (BXT) platform. This patch will tell which BXT_PP registers (there are two set of PP_CONTROL in the spec) to be used as defined in VBT (Video Bios Timing table) and this will enabled eDP backlight controller on MRB (BXT) platform. v2: - Remove unnecessary information in commit message. - Assign vbt.backlight.controller to a backlight_controller variable and return the variable value. v3: - Rebased to latest code base. - updated commit title. Signed-off-by: Mustamin B Mustaffa --- drivers/gpu/drm/i915/intel_dp.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 475a19d76a49..20e3fcd2bf7e 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -655,18 +655,15 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) { struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp)); + int backlight_controller = dev_priv->vbt.backlight.controller; + lockdep_assert_held(&dev_priv->pps_mutex); /* We should never land here with regular DP ports */ WARN_ON(!intel_dp_is_edp(intel_dp)); - /* -* TODO: BXT has 2 PPS instances. The correct port->PPS instance -* mapping needs to be retrieved from VBT, for now just hard-code to -* use instance #0 always. -*/ if (!intel_dp->pps_reset) - return 0; + return backlight_controller; intel_dp->pps_reset = false; @@ -676,7 +673,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) */ intel_dp_init_panel_power_sequencer_registers(intel_dp, false); - return 0; + return backlight_controller; } typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv, -- 2.16.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] [V3] drm/i915: Enable VBT based BL control for DP
Currently, BXT_PP is hardcoded with value '0'. It practically disabled eDP backlight on MRB (BXT) platform. This patch will tell which BXT_PP registers (there are two set of PP_CONTROL in the spec) to be used as defined in VBT (Video Bios Timing table) and this will enabled eDP backlight controller on MRB (BXT) platform. v2: - Remove unnecessary information in commit message. - Assign vbt.backlight.controller to a backlight_controller variable and return the variable value. v3: - Rebased to latest code base. - updated commit title. Signed-off-by: Mustamin B Mustaffa --- drivers/gpu/drm/i915/intel_dp.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1868f73f730c..b9068bd1943f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -655,18 +655,16 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) { struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp)); + int backlight_controller = dev_priv->vbt.backlight.controller; + lockdep_assert_held(&dev_priv->pps_mutex); /* We should never land here with regular DP ports */ WARN_ON(!intel_dp_is_edp(intel_dp)); - /* -* TODO: BXT has 2 PPS instances. The correct port->PPS instance -* mapping needs to be retrieved from VBT, for now just hard-code to -* use instance #0 always. -*/ if (!intel_dp->pps_reset) - return 0; + return backlight_controller; intel_dp->pps_reset = false; @@ -676,7 +674,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp) */ intel_dp_init_panel_power_sequencer_registers(intel_dp, false); - return 0; + return backlight_controller; } typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv, -- 2.16.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx