Message ID | 20250124054631.1796456-4-suraj.kandpal@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable Aux based Nits brightness control for eDP | expand |
This patch works as expected with 6.13.0-rc7 on Dell Bolan.
Tested-by: Ben Kao <ben.kao@intel.com>
On Fri, 24 Jan 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote: > Check if we are capable of controlling brightness via Nits which > is dependant on PANEL_LUMINANCE_OVERRIDE and SMOOTH_BRIGHTNESS > capablility being set. > > Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_display_types.h | 1 + > drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h > index 083eb86f0904..f900e1f2d93e 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > @@ -412,6 +412,7 @@ struct intel_panel { > union { > struct { > struct drm_edp_backlight_info info; > + bool nits_support; > } vesa; > struct { > bool sdr_uses_aux; > 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 09e82f24d030..c5ff6e044866 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > @@ -575,6 +575,15 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector) > { > struct intel_display *display = to_intel_display(connector); > struct intel_dp *intel_dp = intel_attached_dp(connector); > + struct intel_panel *panel = &connector->panel; > + > + if ((intel_dp->edp_dpcd[2] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) { > + drm_dbg_kms(display->drm, > + "[CONNECTOR:%d:%s] AUX Nits Based Backlight Control Supported!\n", > + connector->base.base.id, connector->base.name); > + panel->backlight.edp.vesa.nits_support = true; Should we refer to luminance rather than nits here? BR, Jani. > + return true; > + } > > if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) { > drm_dbg_kms(display->drm,
> -----Original Message----- > From: Jani Nikula <jani.nikula@linux.intel.com> > Sent: Tuesday, February 4, 2025 2:15 PM > To: Kandpal, Suraj <suraj.kandpal@intel.com>; intel-xe@lists.freedesktop.org; > intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: Shankar, Uma <uma.shankar@intel.com>; Murthy, Arun R > <arun.r.murthy@intel.com>; Kao, Ben <ben.kao@intel.com>; Kandpal, Suraj > <suraj.kandpal@intel.com> > Subject: Re: [PATCH 3/7] drm/i915/backlight: Check Nits based brightness > control for VESA > > On Fri, 24 Jan 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote: > > Check if we are capable of controlling brightness via Nits which is > > dependant on PANEL_LUMINANCE_OVERRIDE and SMOOTH_BRIGHTNESS > > capablility being set. > > > > Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> > > --- > > drivers/gpu/drm/i915/display/intel_display_types.h | 1 + > > drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++++++ > > 2 files changed, 10 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h > > b/drivers/gpu/drm/i915/display/intel_display_types.h > > index 083eb86f0904..f900e1f2d93e 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > > @@ -412,6 +412,7 @@ struct intel_panel { > > union { > > struct { > > struct drm_edp_backlight_info info; > > + bool nits_support; > > } vesa; > > struct { > > bool sdr_uses_aux; > > 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 09e82f24d030..c5ff6e044866 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c > > @@ -575,6 +575,15 @@ intel_dp_aux_supports_vesa_backlight(struct > > intel_connector *connector) { > > struct intel_display *display = to_intel_display(connector); > > struct intel_dp *intel_dp = intel_attached_dp(connector); > > + struct intel_panel *panel = &connector->panel; > > + > > + if ((intel_dp->edp_dpcd[2] & > DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) { > > + drm_dbg_kms(display->drm, > > + "[CONNECTOR:%d:%s] AUX Nits Based Backlight > Control Supported!\n", > > + connector->base.base.id, connector->base.name); > > + panel->backlight.edp.vesa.nits_support = true; > > Should we refer to luminance rather than nits here? Sure I can refactor the series to use luminance over nits then Regards, Suraj Kandpal > > BR, > Jani. > > > > + return true; > > + } > > > > if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) { > > drm_dbg_kms(display->drm, > > -- > Jani Nikula, Intel
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 083eb86f0904..f900e1f2d93e 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -412,6 +412,7 @@ struct intel_panel { union { struct { struct drm_edp_backlight_info info; + bool nits_support; } vesa; struct { bool sdr_uses_aux; 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 09e82f24d030..c5ff6e044866 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -575,6 +575,15 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector) { struct intel_display *display = to_intel_display(connector); struct intel_dp *intel_dp = intel_attached_dp(connector); + struct intel_panel *panel = &connector->panel; + + if ((intel_dp->edp_dpcd[2] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) { + drm_dbg_kms(display->drm, + "[CONNECTOR:%d:%s] AUX Nits Based Backlight Control Supported!\n", + connector->base.base.id, connector->base.name); + panel->backlight.edp.vesa.nits_support = true; + return true; + } if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) { drm_dbg_kms(display->drm,
Check if we are capable of controlling brightness via Nits which is dependant on PANEL_LUMINANCE_OVERRIDE and SMOOTH_BRIGHTNESS capablility being set. Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> --- drivers/gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++++++ 2 files changed, 10 insertions(+)