diff mbox series

[2/2] drm/i915/backlight: Modify condition to use panel luminance

Message ID 20250408050138.2382452-3-suraj.kandpal@intel.com (mailing list archive)
State New
Headers show
Series Register bit definition for EDP_GENERAL_CAP2 | expand

Commit Message

Kandpal, Suraj April 8, 2025, 5:01 a.m. UTC
According to our internal spec we need to now check if both
panel luminance and smooth brightness are available in panel for
us to be able to change brightness using luminance value.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arun R Murthy April 10, 2025, 4:08 a.m. UTC | #1
On 08-04-2025 10:31, Suraj Kandpal wrote:
> According to our internal spec we need to now check if both
> panel luminance and smooth brightness are available in panel for
> us to be able to change brightness using luminance value.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>

Thanks and Regards,
Arun R Murthy
--------------------

>   drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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 8173de8aec63..20ab90acb351 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -663,7 +663,8 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
>   	struct intel_dp *intel_dp = intel_attached_dp(connector);
>   	struct intel_panel *panel = &connector->panel;
>   
> -	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
> +	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE) &&
> +	    (intel_dp->edp_dpcd[3] & DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE)) {
>   		drm_dbg_kms(display->drm,
>   			    "[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n",
>   			    connector->base.base.id, connector->base.name);
Nautiyal, Ankit K April 10, 2025, 5:41 a.m. UTC | #2
On 4/8/2025 10:31 AM, Suraj Kandpal wrote:
> According to our internal spec we need to now check if both
> panel luminance and smooth brightness are available in panel for
> us to be able to change brightness using luminance value.

Since DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE is introduced in eDP2.0 and

DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE was introduced in eDP1.5

is it like that we intended this for eDP2.0 only and not for eDP1.5 panels?

This will perhaps change the behavior for existing eDP1.5 panel. Do we 
need to add a fix me?

Regards,

Ankit

>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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 8173de8aec63..20ab90acb351 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -663,7 +663,8 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
>   	struct intel_dp *intel_dp = intel_attached_dp(connector);
>   	struct intel_panel *panel = &connector->panel;
>   
> -	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
> +	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE) &&
> +	    (intel_dp->edp_dpcd[3] & DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE)) {
>   		drm_dbg_kms(display->drm,
>   			    "[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n",
>   			    connector->base.base.id, connector->base.name);
Nautiyal, Ankit K April 10, 2025, 5:45 a.m. UTC | #3
On 4/10/2025 11:11 AM, Nautiyal, Ankit K wrote:
>
> On 4/8/2025 10:31 AM, Suraj Kandpal wrote:
>> According to our internal spec we need to now check if both
>> panel luminance and smooth brightness are available in panel for
>> us to be able to change brightness using luminance value.
>
> Since DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE is introduced in eDP2.0 and
>
> DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE was introduced in eDP1.5
>
> is it like that we intended this for eDP2.0 only and not for eDP1.5 
> panels?
>
> This will perhaps change the behavior for existing eDP1.5 panel. Do we 
> need to add a fix me?


I meant fixes tag.

Regards,
Ankit

>
> Regards,
>
> Ankit
>
>>
>> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> 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 8173de8aec63..20ab90acb351 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
>> @@ -663,7 +663,8 @@ intel_dp_aux_supports_vesa_backlight(struct 
>> intel_connector *connector)
>>       struct intel_dp *intel_dp = intel_attached_dp(connector);
>>       struct intel_panel *panel = &connector->panel;
>>   -    if ((intel_dp->edp_dpcd[3] & 
>> DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
>> +    if ((intel_dp->edp_dpcd[3] & 
>> DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE) &&
>> +        (intel_dp->edp_dpcd[3] & DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE)) {
>>           drm_dbg_kms(display->drm,
>>                   "[CONNECTOR:%d:%s] AUX Luminance Based Backlight 
>> Control Supported!\n",
>>                   connector->base.base.id, connector->base.name);
diff mbox series

Patch

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 8173de8aec63..20ab90acb351 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -663,7 +663,8 @@  intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
 	struct intel_dp *intel_dp = intel_attached_dp(connector);
 	struct intel_panel *panel = &connector->panel;
 
-	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
+	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE) &&
+	    (intel_dp->edp_dpcd[3] & DP_EDP_SMOOTH_BRIGHTNESS_CAPABLE)) {
 		drm_dbg_kms(display->drm,
 			    "[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n",
 			    connector->base.base.id, connector->base.name);