[PATCH 12/13] drm/i915/backlight: Use drm helper to set edp backlight

2025-05-08 Thread Suraj Kandpal
Now that the drm helper sets the backlight using luminance too we can use that. Remove the obselete function. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 11/13] drm/i915/backlight: Use drm helper to initialize edp backlight

2025-05-08 Thread Suraj Kandpal
Now that drm_edp_backlight init has been to be able to setup brightness manipulation via luminance we can just use that. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 100 +- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a

[PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level

2025-05-08 Thread Suraj Kandpal
Use u32 for level variable as one may need to pass value for DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. --v2 -Typecase is not needed [Jani] Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- include/drm/display/drm_dp_helper.h | 2 +- 2 files changed, 2 insertions

[PATCH 13/13] drm/i915/backlight: Use drm_edp_backlight_enable

2025-05-08 Thread Suraj Kandpal
Use drm dp helper to enable backlight now that it has been modified to set PANEL_LUMINANCE_CONTROL_ENABLE bit based on if capability supports it and the driver wants it. Remove the dead code. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 14

[PATCH 09/13] drm/dp: Change argument type of drm_edp_backlight_enable

2025-05-08 Thread Suraj Kandpal
Change the argument type to u32 for the default level being sent since it has to now account for luminance value which has to be set for DP_EDP_PANEL_LUMINANCE_TARGET_VALUE. --v2 -No need to typecast [Jani] Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 2

[PATCH 00/13] Modify drm helpers to use luminance

2025-05-08 Thread Suraj Kandpal
This series modifies drm dp edp helpers so that drivers can now use them to manipulate brightness using luminance value via the PANEL_TARGET_LUMINANCE_VALUE register. This feature was introduced frin eDP 1.5. Signed-off-by: Suraj Kandpal Suraj Kandpal (13): drm/dp: Introduce new member in

[PATCH 10/13] drm/dp: Enable backlight control using luminance

2025-05-08 Thread Suraj Kandpal
Add flag to enable brightness control via luminance value when enabling edp backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display

[PATCH 06/13] drm/dp: Modify drm_edp_probe_state

2025-05-08 Thread Suraj Kandpal
Modify drm_edp_probe_state to read current level from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We divide it by 1000 since the value in this register is in millinits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 35 ++--- 1 file changed, 25

[PATCH 08/13] drm/dp: Modify drm_edp_backlight_set_level

2025-05-08 Thread Suraj Kandpal
Modify drm_edp_backlight_set_level to be able to set the value for register in DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We multiply the level with 1000 since we get the value in Nits and the register accepts it in milliNits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c

[PATCH 05/13] drm/dp: Change current_level argument type to u32

2025-05-08 Thread Suraj Kandpal
Change the current_level argument type to u32 from u16 since it can now carry the value which it gets from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c

[PATCH 04/13] drm/dp: Move from u16 to u32 for max in drm_edp_backlight_info

2025-05-08 Thread Suraj Kandpal
Use u32 instead of u16 for max variable in drm_edp_backlight_info since it can now hold max luminance range value which is u32. We will set this max with max_luminance value when luminance_set is true. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 10

[PATCH 03/13] drm/dp: Add argument for luminance range info in drm_edp_backlight_init

2025-05-08 Thread Suraj Kandpal
Add new argument to drm_edp_backlight_init which gives the drm_luminance_range_info struct which will be needed to set the min and max values for backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 5 - drivers/gpu/drm/i915/display

[PATCH 02/13] drm/dp: Add argument in drm_edp_backlight_init

2025-05-08 Thread Suraj Kandpal
Add bool argument in drm_edp_backlight init to provide the drivers option to choose if they want to use luminance values to manipulate brightness. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 7 --- drivers/gpu/drm/i915/display

[PATCH 01/13] drm/dp: Introduce new member in drm_backlight_info

2025-05-08 Thread Suraj Kandpal
Introduce luminance_set flag which indicates if we can manipulate backlight using luminance value or not which is only possible after eDP v1.5. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 8 ++-- include/drm/display/drm_dp_helper.h | 1 + 2 files changed

[PATCH 01/13] drm/dp: Introduce new member in drm_backlight_info

2025-04-13 Thread Suraj Kandpal
Introduce luminance_set flag which indicates if we can manipulate backlight using luminance value or not which is only possible after eDP v1.5. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 8 ++-- include/drm/display/drm_dp_helper.h | 1 + 2 files changed

[PATCH 11/13] drm/i915/backlight: Use drm helper to initialize edp backlight

2025-04-13 Thread Suraj Kandpal
Now that drm_edp_backlight init has been to be able to setup brightness manipulation via luminance we can just use that. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 100 +- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a

[PATCH 12/13] drm/i915/backlight: Use drm helper to set edp backlight

2025-04-13 Thread Suraj Kandpal
Now that the drm helper sets the backlight using luminance too we can use that. Remove the obselete function. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 02/13] drm/dp: Add argument in drm_edp_backlight_init

2025-04-13 Thread Suraj Kandpal
Add bool argument in drm_edp_backlight init to provide the drivers option to choose if they want to use luminance values to manipulate brightness. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 7 --- drivers/gpu/drm/i915/display

[PATCH 03/13] drm/dp: Add argument for luminance range info in drm_edp_backlight_init

2025-04-13 Thread Suraj Kandpal
Add new argument to drm_edp_backlight_init which gives the drm_luminance_range_info struct which will be needed to set the min and max values for backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 5 - drivers/gpu/drm/i915/display

[PATCH 08/13] drm/dp: Modify drm_edp_backlight_set_level

2025-04-13 Thread Suraj Kandpal
Modify drm_edp_backlight_set_level to be able to set the value for register in DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We multiply the level with 1000 since we get the value in Nits and the register accepts it in milliNits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c

[PATCH 05/13] drm/dp: Change current_level argument type to u32

2025-04-13 Thread Suraj Kandpal
Change the current_level argument type to u32 from u16 since it can now carry the value which it gets from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c

[PATCH 13/13] drm/i915/backlight: Use drm_edp_backlight_enable

2025-04-13 Thread Suraj Kandpal
Use drm dp helper to enable backlight now that it has been modified to set PANEL_LUMINANCE_CONTROL_ENABLE bit based on if capability supports it and the driver wants it. Remove the dead code. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 14

[PATCH 04/13] drm/dp: Move from u16 to u32 for max in drm_edp_backlight_info

2025-04-13 Thread Suraj Kandpal
Use u32 instead of u16 for max variable in drm_edp_backlight_info since it can now hold max luminance range value which is u32. We will set this max with max_luminance value when luminance_set is true. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 10

[PATCH 09/13] drm/dp: Change argument type of drm_edp_backlight_enable

2025-04-13 Thread Suraj Kandpal
Change the argument type to u32 for the default level being sent since it has to now account for luminance value which has to be set for DP_EDP_PANEL_LUMINANCE_TARGET_VALUE. --v2 -No need to typecast [Jani] Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 2

[PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level

2025-04-13 Thread Suraj Kandpal
Use u32 for level variable as one may need to pass value for DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. --v2 -Typecase is not needed [Jani] Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- include/drm/display/drm_dp_helper.h | 2 +- 2 files changed, 2 insertions

[PATCH 10/13] drm/dp: Enable backlight control using luminance

2025-04-13 Thread Suraj Kandpal
Add flag to enable brightness control via luminance value when enabling edp backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display

[PATCH 06/13] drm/dp: Modify drm_edp_probe_state

2025-04-13 Thread Suraj Kandpal
Modify drm_edp_probe_state to read current level from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We divide it by 1000 since the value in this register is in millinits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 35 ++--- 1 file changed, 25

[PATCH 00/13] Modify drm helpers to use luminance

2025-04-13 Thread Suraj Kandpal
This series modifies drm dp edp helpers so that drivers can now use them to manipulate brightness using luminance value via the PANEL_TARGET_LUMINANCE_VALUE register. This feature was introduced frin eDP 1.5. Signed-off-by: Suraj Kandpal Suraj Kandpal (13): drm/dp: Introduce new member in

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

2025-04-10 Thread Suraj Kandpal
ntrol for VESA") Signed-off-by: Suraj Kandpal Reviewed-by: 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/i9

[PATCH 1/2] drm/dp: Add smooth brightness register bit definition

2025-04-10 Thread Suraj Kandpal
Add DP_EDP_SMOOTH_BRIGHTNESS register bit definition for EDP_GENERAL_CAPABILITY 2 register. --v2 -Add eDP 2.0 comment [Ankit] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display

[PATCH 0/2] Register bit definition for EDP_GENERAL_CAP2

2025-04-10 Thread Suraj Kandpal
Add smooth brightness register bit definition for register EDP_GENERAL_CAPABILITY 2 Signed-off-by: Suraj Kandpal Suraj Kandpal (2): drm/dp: Add smooth brightness register bit definition drm/i915/backlight: Modify condition to use panel luminance drivers/gpu/drm/i915/display

[PATCH 09/13] drm/dp: Change argument type of drm_edp_backlight_enable

2025-04-10 Thread Suraj Kandpal
Change the argument type to u32 for the default level being sent since it has to now account for luminance value which has to be set for DP_EDP_PANEL_LUMINANCE_TARGET_VALUE. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 6 +++--- drivers/gpu/drm/nouveau/dispnv50

[PATCH 08/13] drm/dp: Modify drm_edp_backlight_set_level

2025-04-10 Thread Suraj Kandpal
Modify drm_edp_backlight_set_level to be able to set the value for register in DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We multiply the level with 1000 since we get the value in Nits and the register accepts it in milliNits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c

[PATCH 12/13] drm/i915/backlight: Use drm helper to set edp backlight

2025-04-10 Thread Suraj Kandpal
Now that the drm helper sets the backlight using luminance too we can use that. Remove the obselete function. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 11/13] drm/i915/backlight: Use drm helper to initialize edp backlight

2025-04-10 Thread Suraj Kandpal
Now that drm_edp_backlight init has been to be able to setup brightness manipulation via luminance we can just use that. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 100 +- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a

[PATCH 05/13] drm/dp: Change current_level argument type to u32

2025-04-10 Thread Suraj Kandpal
Change the current_level argument type to u32 from u16 since it can now carry the value which it gets from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 4 ++-- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c

[PATCH 13/13] drm/i915/backlight: Use drm_edp_backlight_enable

2025-04-10 Thread Suraj Kandpal
Use drm dp helper to enable backlight now that it has been modified to set PANEL_LUMINANCE_CONTROL_ENABLE bit based on if capability supports it and the driver wants it. Remove the dead code. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 14

[PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level

2025-04-10 Thread Suraj Kandpal
Use u32 for level variable as one may need to pass value for DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 6 +++--- include/drm/display/drm_dp_helper.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH 01/13] drm/dp: Introduce new member in drm_backlight_info

2025-04-10 Thread Suraj Kandpal
Introduce luminance_set flag which indicates if we can manipulate backlight using luminance value or not which is only possible after eDP v1.5. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 8 ++-- include/drm/display/drm_dp_helper.h | 1 + 2 files changed

[PATCH 10/13] drm/dp: Enable backlight control using luminance

2025-04-10 Thread Suraj Kandpal
Add flag to enable brightness control via luminance value when enabling edp backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display

[PATCH 06/13] drm/dp: Modify drm_edp_probe_state

2025-04-10 Thread Suraj Kandpal
Modify drm_edp_probe_state to read current level from DP_EDP_PANEL_TARGET_LUMINANCE_VALUE. We divide it by 1000 since the value in this register is in millinits. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 35 ++--- 1 file changed, 25

[PATCH 03/13] drm/dp: Add argument for luminance range info in drm_edp_backlight_init

2025-04-10 Thread Suraj Kandpal
Add new argument to drm_edp_backlight_init which gives the drm_luminance_range_info struct which will be needed to set the min and max values for backlight. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 5 - drivers/gpu/drm/i915/display

[PATCH 04/13] drm/dp: Move from u16 to u32 for max in drm_edp_backlight_info

2025-04-10 Thread Suraj Kandpal
Use u32 instead of u16 for max variable in drm_edp_backlight_info since it can now hold max luminance range value which is u32. We will set this max with max_luminance value when luminance_set is true. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 10

[PATCH 02/13] drm/dp: Add argument in drm_edp_backlight_init

2025-04-10 Thread Suraj Kandpal
Add bool argument in drm_edp_backlight init to provide the drivers option to choose if they want to use luminance values to manipulate brightness. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 7 --- drivers/gpu/drm/i915/display

[PATCH 00/13] Modify drm helpers to use luminance

2025-04-10 Thread Suraj Kandpal
This series modifies drm dp edp helpers so that drivers can now use them to manipulate brightness using luminance value via the PANEL_TARGET_LUMINANCE_VALUE register. This feature was introduced frin eDP 1.5. Signed-off-by: Suraj Kandpal Suraj Kandpal (13): drm/dp: Introduce new member in

[PATCH 0/2] Register bit definition for EDP_GENERAL_CAP2

2025-04-10 Thread Suraj Kandpal
Add smooth brightness register bit definition for register EDP_GENERAL_CAPABILITY 2 Signed-off-by: Suraj Kandpal Suraj Kandpal (2): drm/dp: Add smooth brightness register bit definition drm/i915/backlight: Modify condition to use panel luminance drivers/gpu/drm/i915/display

[PATCH 1/2] drm/dp: Add smooth brightness register bit definition

2025-04-10 Thread Suraj Kandpal
Add DP_EDP_SMOOTH_BRIGHTNESS register bit definition for EDP_GENERAL_CAPABILITY 2 register. Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index c413ef68f9a3

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

2025-04-10 Thread Suraj Kandpal
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 --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 3 ++- 1 file changed

[PATCH 0/8] Enable Aux based Nits brightness control for eDP

2025-02-05 Thread Suraj Kandpal
off-by: Suraj Kandpal Suraj Kandpal (8): drm/dp: Add eDP 1.5 bit definition drm/dp: Increase eDP display control capability size drm/i915/backlight: Use proper interface based on eDP version drm/i915/backlight: Check Luminance based brightness control for VESA drm/i915/backlight: Mod

[PATCH 3/8] drm/i915/backlight: Use proper interface based on eDP version

2025-02-05 Thread Suraj Kandpal
eDP is supposed to use VESA interface when using revision 1.5 and above, use Intel interface for backlight control otherwise. Add check to use correct interface. Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 8 +++- 1 file

[PATCH 6/8] drm/i915/backlight: Add function to change brightness in nits for VESA

2025-02-05 Thread Suraj Kandpal
Create a function that fills in the value for PANEL_TARGET_LUMINANCE_VALUE which helps in changing the luminance in nits using VESA interface. --v2 -Prefer using luminance over nits [Jani] Signed-off-by: Suraj Kandpal Tested-by: Ben Kao Reviewed-by: Arun R Murthy --- .../drm/i915/display

[PATCH 8/8] drm/i915/backlight: Enable nits based luminance

2025-02-05 Thread Suraj Kandpal
Enable nits based luminance by writing the PANEL_LUMINANCE_CONTROL bit and set the correct register to change brightness. Signed-off-by: Suraj Kandpal Tested-by: Ben Kao Reviewed-by: Arun R Murthy --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 15 +++ 1 file changed, 15

[PATCH 4/8] drm/i915/backlight: Check Luminance based brightness control for VESA

2025-02-05 Thread Suraj Kandpal
] -Use correct edp_dpcd[] to check the capability [Arun] Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- 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

[PATCH 5/8] drm/i915/backlight: Modify function to get VESA brightness in Nits

2025-02-05 Thread Suraj Kandpal
Modify vesa_get_brightness function to take into account luminance_control_support and based on that read the appropriate register and return the value. --v2 -Changes since we now use luminance instead of nits Signed-off-by: Suraj Kandpal Tested-by: Ben Kao Reviewed-by: Arun R Murthy

[PATCH 1/8] drm/dp: Add eDP 1.5 bit definition

2025-02-05 Thread Suraj Kandpal
Add the eDP revision bit value for 1.5. Spec: eDPv1.5 Table 16-5 Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Tested-by: Ben Kao --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index

[PATCH 7/8] drm/i915/backlight: Setup nits based luminance via VESA

2025-02-05 Thread Suraj Kandpal
Modify backlight setup function for VESA interface to take into account the nits based luminance. --v2 -Prefer using luminance over nits [Jani] Signed-off-by: Suraj Kandpal Tested-by: Ben Kao Reviewed-by: Arun R Murthy --- .../drm/i915/display/intel_dp_aux_backlight.c | 99

[PATCH 2/8] drm/dp: Increase eDP display control capability size

2025-02-05 Thread Suraj Kandpal
Increase the eDP display control capability size to take into account the general capability register 703 and 704 that have recently been added. Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/display

[PATCH 5/7] drm/i915/backlight: Add function to change brightness in nits for VESA

2025-02-04 Thread Suraj Kandpal
Create a function that fills in the value for PANEL_TARGET_LUMINANCE_VALUE which helps in changing the luminance in nits using VESA interface. --v2 -Prefer using luminance over nits [Jani] Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- .../drm/i915/display/intel_dp_aux_backlight.c | 30

[PATCH 4/7] drm/i915/backlight: Modify function to get VESA brightness in Nits

2025-02-04 Thread Suraj Kandpal
Modify vesa_get_brightness function to take into account luminance_control_support and based on that read the appropriate register and return the value. --v2 -Changes since we now use luminance instead of nits Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- .../drm/i915/display

[PATCH 7/7] drm/i915/backlight: Enable nits based luminance

2025-02-04 Thread Suraj Kandpal
Enable nits based luminance by writing the PANEL_LUMINANCE_CONTROL bit and set the correct register to change brightness. Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a

[PATCH 6/7] drm/i915/backlight: Setup nits based luminance via VESA

2025-02-04 Thread Suraj Kandpal
Modify backlight setup function for VESA interface to take into account the nits based luminance. --v2 -Prefer using luminance over nits [Jani] Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- .../drm/i915/display/intel_dp_aux_backlight.c | 99 +++ 1 file changed, 59

[PATCH 3/7] drm/i915/backlight: Check Luminance based brightness control for VESA

2025-02-04 Thread Suraj Kandpal
Check if we are capable of controlling brightness via luminance which is dependent on PANEL_LUMINANCE_OVERRIDE being set. --v2 -Prefer using luminance rather than nits [Jani] -Fix commit message Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- drivers/gpu/drm/i915/display

[PATCH 2/7] drm/i915/backlight: Use proper interface based on eDP version

2025-02-04 Thread Suraj Kandpal
eDP is supposed to use VESA interface when using revision 1.5 and above, use Intel interface for backlight control otherwise. Add check to use correct interface. Signed-off-by: Suraj Kandpal Tested-by: Ben Kao --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 8 +++- 1 file

[PATCH 1/7] drm/dp: Add eDP 1.5 bit definition

2025-02-04 Thread Suraj Kandpal
Add the eDP revision bit value for 1.5. Spec: eDPv1.5 Table 16-5 Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy Tested-by: Ben Kao --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index

[PATCH 0/7] Enable Aux based Nits brightness control for eDP

2025-02-04 Thread Suraj Kandpal
tps://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3669 Signed-off-by: Suraj Kandpal Suraj Kandpal (7): drm/dp: Add eDP 1.5 bit definition drm/i915/backlight: Use proper interface based on eDP version drm/i915/backlight: Check Luminance based brightness control for VESA drm/i915/backli

[PATCH 2/7] drm/i915/backlight: Use proper interface based on eDP version

2025-01-23 Thread Suraj Kandpal
eDP is supposed to use VESA interface when using revision 1.5 and above, use Intel interface for backlight control otherwise. Add check to use correct interface. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 8 +++- 1 file changed, 7 insertions

[PATCH 3/7] drm/i915/backlight: Check Nits based brightness control for VESA

2025-01-23 Thread Suraj Kandpal
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 --- drivers/gpu/drm/i915/display/intel_display_types.h| 1 + drivers/gpu/drm/i915/display

[PATCH 6/7] drm/i915/backlight: Setup NITS based brightness via VESA

2025-01-23 Thread Suraj Kandpal
Modify backlight setup function for VESA interface to take into account the NITS based brightness. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 97 +++ 1 file changed, 57 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH 7/7] drm/i915/backlight: Enable Nits based brightness

2025-01-23 Thread Suraj Kandpal
Enable Nits based brightness by writing the PANEL_LUMINANCE_CONTROL bit and set the correct register to change brightness. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_dp_aux_backlight.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915

[PATCH 5/7] drm/i915/backlight: Add function to change brightness in NITS for VESA

2025-01-23 Thread Suraj Kandpal
Create a function that fills in the value for PANEL_TARGET_LUMINANCE_VALUE which helps in changing the brightness in NITS using VESA interface. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 29 +++ 1 file changed, 29 insertions(+) diff --git a

[PATCH 4/7] drm/i915/backlight: Modify function to get VESA brightness in NITS

2025-01-23 Thread Suraj Kandpal
Modify vesa_get_brightness function to take into account nits_support and based on that read the appropriate register and return the value. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 20 +++ 1 file changed, 20 insertions(+) diff --git a

[PATCH 1/7] drm/dp: Add eDP 1.5 bit definition

2025-01-23 Thread Suraj Kandpal
Add the eDP revision bit value for 1.5. Spec: eDPv1.5 Table 16-5 Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index a6f8b098c56f..76162ad3b152 100644 --- a/include

[PATCH 0/7] Enable Aux based Nits brightness control for eDP

2025-01-23 Thread Suraj Kandpal
off-by: Suraj Kandpal Suraj Kandpal (7): drm/dp: Add eDP 1.5 bit definition drm/i915/backlight: Use proper interface based on eDP version drm/i915/backlight: Check Nits based brightness control for VESA drm/i915/backlight: Modify function to get VESA brightness in NITS drm/i915/backlight:

[PATCH 3/3] drm/i915/lttpr: Enable Extended Wake Timeout

2025-01-21 Thread Suraj Kandpal
] Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_ddi.c | 4 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +- drivers/gpu/drm/i915/display/intel_dp_link_training.h | 1 + 3 files changed, 6

[PATCH 2/3] drm/display/dp: Define function to setup Extended wake time

2025-01-21 Thread Suraj Kandpal
sink device. --v2 -Add documentation [Dmitry] Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 58 + include/drm/display/drm_dp_helper.h | 1 + 2 files changed, 59 insertions(+) diff --git a/drivers/gpu/drm

[PATCH 1/3] drm/dp: Add the DPCD register required for Extended wake timeout

2025-01-21 Thread Suraj Kandpal
Add DPCD registers required to configure Extended Wake Timeout for LTTPR. Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- include/drm/display/drm_dp.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h

[PATCH 0/3] Extended Wake Timeout

2025-01-21 Thread Suraj Kandpal
state exit. DP source device shall keep retying the AUX tansaction up to the extended timeout that is being granted for LTTPRs from the sink device Signed-off-by: Suraj Kandpal Suraj Kandpal (3): drm/dp: Add the DPCD register required for Extended wake timeout drm/display/dp: Define

[PATCH 0/3] Extended Wake Timeout

2025-01-20 Thread Suraj Kandpal
state exit. DP source device shall keep retying the AUX tansaction up to the extended timeout that is being granted for LTTPRs from the sink device Signed-off-by: Suraj Kandpal Suraj Kandpal (3): drm/dp: Add the DPCD register required for Extended wake timeout drm/display/dp: Define

[PATCH 3/3] drm/i915/lttpr: Enable Extended Wake Timeout

2025-01-20 Thread Suraj Kandpal
] Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_ddi.c | 4 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2 +- drivers/gpu/drm/i915/display/intel_dp_link_training.h | 1 + 3 files changed, 6 insertions(+), 1 deletion

[PATCH 1/3] drm/dp: Add the DPCD register required for Extended wake timeout

2025-01-20 Thread Suraj Kandpal
Add DPCD registers required to configure Extended Wake Timeout for LTTPR. Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index a6f8b098c56f

[PATCH 2/3] drm/display/dp: Define function to setup Extended wake time

2025-01-20 Thread Suraj Kandpal
sink device. Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c | 47 + include/drm/display/drm_dp_helper.h | 1 + 2 files changed, 48 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu

[PATCH 2/2] drm/i915/lttpr: Enable Extended Wake Timeout

2025-01-16 Thread Suraj Kandpal
tansaction till the extended timeout that is being granted for LTTPRs from the sink device --v2 -Grant the requested time only if greater than 1ms [Arun] -Reframe commit message [Arun] Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2

[PATCH 1/2] drm/dp: Add the DPCD register required for Extended wake timeout

2025-01-16 Thread Suraj Kandpal
Add DPCD registers required to configure Extended Wake Timeout for LTTPR. Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index a6f8b098c56f

[PATCH 0/2] Extended Wake Timeout

2025-01-16 Thread Suraj Kandpal
state exit. DP source device shall keep retying the AUX tansaction upto the extended timeout that is being granted for LTTPRs from the sink device Signed-off-by: Suraj Kandpal Suraj Kandpal (2): drm/dp: Add the DPCD register required for Extended wake timeout drm/i915/lttpr: Enable

[PATCH] drm/i915/cx0_phy: Fix C10 pll programming sequence

2024-12-16 Thread Suraj Kandpal
("drm/i915/mtl: Add Support for C10 PHY message bus and pll programming") Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drive

[PATCH 1/2] drm/dp: Add the DPCD register required for Extended wake timeout

2024-12-12 Thread Suraj Kandpal
Add DPCD registers required to configure Extended Wake Timeout for LTTPR. Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index a6f8b098c56f

[PATCH 2/2] drm/i915/lttpr: Enable Extended Wake Timeout

2024-12-12 Thread Suraj Kandpal
sink device. Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_ddi.c | 2 + .../drm/i915/display/intel_dp_link_training.c | 46 +++ .../drm/i915/display/intel_dp_link_training.h | 1 + 3 files changed, 49 insertions(+) diff

[PATCH 0/2] Extended Wake Timeout

2024-12-12 Thread Suraj Kandpal
state exit. Signed-off-by: Suraj Kandpal Suraj Kandpal (2): drm/dp: Add the DPCD register required for Extended wake timeout drm/i915/lttpr: Enable Extended Wake Timeout drivers/gpu/drm/i915/display/intel_ddi.c | 2 + .../drm/i915/display/intel_dp_link_training.c | 46

[PATCH v3 6/7] drm/i915/vdsc: Check slice design requirement

2023-03-08 Thread Suraj Kandpal
and height are of two -fix minimum pixel in slice condition --v10 -condition should be < rather then >= [Uma] Cc: Uma Shankar Signed-off-by: Suraj Kandpal Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/display/intel_vdsc.c | 32 +++ 1 file changed, 32 insertions(+)

[PATCH v3 7/7] drm/i915/dsc: Add debugfs entry to validate DSC output formats

2023-03-08 Thread Suraj Kandpal
From: Swati Sharma DSC_Output_Format_Sink_Support entry is added to i915_dsc_fec_support_show to depict if sink supports DSC output formats (RGB/YCbCr420/YCbCr444). Also, new debugfs entry is created to enforce output format. This is required because of our driver policy. For ex. if a mode is sup

[PATCH v3 4/7] drm/i915/dsc: Enable YCbCr420 for VDSC

2023-03-08 Thread Suraj Kandpal
need to be chosen. Other rc_parameters need to be set where currently values for 444 format is hardcoded in calculate_rc_parameters( ). vdsc_cfg struct needs to be filled with output format information, where these are hardcoded for 444 format. Bspec: 49259 Signed-off-by: Suraj Kandpal Reviewed-by

[PATCH v3 5/7] drm/i915/dsc: Fill in native_420 field

2023-03-08 Thread Suraj Kandpal
v12 -fix state mismatch issue of compressed_bpp Cc: Uma Shankar Cc: Jani Nikula Signed-off-by: Suraj Kandpal Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/display/icl_dsi.c| 2 - drivers/gpu/drm/i915/display/intel_dp.c | 16 +++- drivers/gpu/drm/i915/display/intel_vds

[PATCH v3 3/7] drm/i915/dsc: Adding the new registers for DSC

2023-03-08 Thread Suraj Kandpal
Adding new DSC register which are introducted MTL onwards Signed-off-by: Suraj Kandpal Reviewed-by: Vandita Kulkarni Reviewed-by: Uma Shankar --- .../gpu/drm/i915/display/intel_vdsc_regs.h| 28 +++ 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/i915/display

[PATCH v3 2/7] drm/i915/dp: Check if DSC supports the given output_format

2023-03-08 Thread Suraj Kandpal
From: Ankit Nautiyal Go with DSC only if the given output_format is supported. v2: Use drm helper to get DSC format support for sink. v3: remove drm_dp_dsc_compute_bpp. Cc: Uma Shankar Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar --- drivers/gpu/drm/i915/display/intel_dp.c | 28 +

[PATCH v3 1/7] drm/dp_helper: Add helper to check DSC support with given o/p format

2023-03-08 Thread Suraj Kandpal
From: Ankit Nautiyal Add helper to check if the DP sink supports DSC with the given o/p format. v2: Add documentation for the helper. (Uma Shankar) v3: /** instead of /* (Uma Shankar) Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar --- include/drm/display/drm_dp_helper.h | 13 ++

[PATCH v3 0/7] Enable YCbCr420 format for VDSC

2023-03-08 Thread Suraj Kandpal
patches have gotten rb and can be found in the below link https://patchwork.freedesktop.org/series/113729 Ankit Nautiyal (2): drm/dp_helper: Add helper to check DSC support with given o/p format drm/i915/dp: Check if DSC supports the given output_format Suraj Kandpal (4): drm/i915/dsc

[PATCH v2 5/7] drm/i915/display: Fill in native_420 field

2023-03-02 Thread Suraj Kandpal
v12 -fix state mismatch issue of compressed_bpp Cc: Uma Shankar Cc: Jani Nikula Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/icl_dsi.c| 2 - drivers/gpu/drm/i915/display/intel_dp.c | 16 +++- drivers/gpu/drm/i915/display/intel_vdsc.c | 98 --- 3 files

[PATCH 7/7] drm/i915/dsc: Add debugfs entry to validate DSC output formats

2023-02-21 Thread Suraj Kandpal
From: Swati Sharma DSC_Output_Format_Sink_Support entry is added to i915_dsc_fec_support_show to depict if sink supports DSC output formats (RGB/YCbCr420/YCbCr444). Also, new debugfs entry is created to enforce output format. This is required because of our driver policy. For ex. if a mode is sup

[PATCH 5/7] drm/i915/display: Fill in native_420 field

2023-02-21 Thread Suraj Kandpal
Cc: Uma Shankar Cc: Jani Nikula Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/icl_dsi.c| 2 - drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_vdsc.c | 74 ++- 3 files changed, 75 insertions(+), 8 deletions(-) diff --git a

[PATCH 6/7] drm/i915/vdsc: Check slice design requirement

2023-02-21 Thread Suraj Kandpal
and height are of two -fix minimum pixel in slice condition --v10 -condition should be < rather then >= [Uma] Cc: Uma Shankar Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_vdsc.c | 32 +++ 1 file changed, 32 insertions(+) diff --git a/drivers/g

  1   2   >