> -----Original Message-----
> From: Murthy, Arun R <arun.r.mur...@intel.com>
> Sent: Wednesday, February 5, 2025 8:14 PM
> To: Kandpal, Suraj <suraj.kand...@intel.com>; intel...@lists.freedesktop.org;
> intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Cc: Shankar, Uma <uma.shan...@intel.com>; Nikula, Jani
> <jani.nik...@intel.com>; Kao, Ben <ben....@intel.com>
> Subject: RE: [PATCH 3/7] drm/i915/backlight: Check Luminance based
> brightness control for VESA
>
> > Check if we are capable of controlling brightness via luminance which
> > is dependent on PANEL_LUMINANCE_OVERRIDE being set.
> >
> Is PANEL_LUMINANCE_OVERRIDE a macro? I don't see this definition!
>
So this is my bad, it isn't a macro it's a bit in EDP GENERAL CAP 2 and the
name too here is wrong
It should have been PANEL_LUMINANCE_CONTROL CAPABLE will fix it in the next
revision
> > --v2
> > -Prefer using luminance rather than nits [Jani] -Fix commit message
> >
> > Signed-off-by: Suraj Kandpal <suraj.kand...@intel.com>
> > Tested-by: Ben Kao <ben....@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 cb51b7936f93..3b64ad724b29 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 luminance_control_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..84126e7d1716 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)) {
>
> DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE seems to be for
> EDP_GENERAL_CAP_2 register, addr is 0x703 But the dpcd offset referred over
> here is dpd[2] which is EDP_BACKLIGHT_ADJUSTMENT_CAP reg, addr 0x702
Yes, you are correct it should have been dpcd[3] will fix it in the next
revision.
Regards,
Suraj Kandpal
>
> > + drm_dbg_kms(display->drm,
> > + "[CONNECTOR:%d:%s] AUX Luminance Based
> > Backlight Control Supported!\n",
> > + connector->base.base.id, connector->base.name);
> > + panel->backlight.edp.vesa.luminance_control_support = true;
> > + return true;
> > + }
> >
> > if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) {
> > drm_dbg_kms(display->drm,
> > --
> > 2.34.1
>
> Thanks and Regards,
> Arun R Murthy
> --------------------