[PATCH 6/7] drm/connector: Modify prepare_writeback_job helper

2025-09-20 Thread Suraj Kandpal
Lets now pass drm_connector to prepare_writeback_job since drm_writeback_connector now resides within drm_connector. It also make it uniform with params passed to other drm_connector_helper_funcs. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 2

[PATCH 1/7] drm: writeback: Refactor drm_writeback_connector structure

2025-09-17 Thread Suraj Kandpal
this connector without breaking them. The drivers modified here are amd, komeda, mali, vc4, vkms, rcar_du, msm Signed-off-by: Suraj Kandpal --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c

[PATCH 3/7] drm: writeback: Modify drm_writeback_queue_job params

2025-09-11 Thread Suraj Kandpal
Move to using drm_connector structure instead of drm_writeback_connector since this now writeback resides within drm_connector. This helps make sure drivers change drm_writeback_connector using helpers provided by drm core. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH 4/7] drm: writeback: Modify drm_writeback_signal_completion param

2025-09-11 Thread Suraj Kandpal
Move to using drm_connector instead of drm_writeback_connector since it now resides within drm_connector. This will also help with make sure drivers do not need to access drm_writeback_connector as much. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2

[PATCH 7/7] drm/connector: Modify cleanup_writeback_job helper

2025-09-09 Thread Suraj Kandpal
Lets now pass drm_connector to prepare_writeback_job since drm_writeback_connector now resides within drm_connector. It also make it uniform with params passed to other drm_connector_helper_funcs. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 4

[PATCH 5/7] drm: writeback: Modify params for drm_writeback_get_out_fence

2025-09-09 Thread Suraj Kandpal
Use drm_connector instead of drm_writeback_connector since it now resides within drm_connector and also helps make sure drm_wrtieback_connector is being modified mostly by drm core provided helpers. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/drm_atomic_uapi.c | 4 +--- drivers/gpu/drm

[PATCH 2/7] drm: writeback: Modify writeback init helpers

2025-09-09 Thread Suraj Kandpal
Now with drm_writeback_connector moved to drm_connector it makes more sense use drm_connector as an argument rather than drm_connector. The writeback connector can easily be derived from drm_connector. Signed-off-by: Suraj Kandpal --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 2

[PATCH 0/7] Refactor drm_writeback_connector structure

2025-09-09 Thread Suraj Kandpal
[1] https://patchwork.freedesktop.org/series/152758/ [2] https://patchwork.freedesktop.org/series/152106/ [3] https://patchwork.freedesktop.org/series/152420/ Signed-off-by: Suraj Kandpal Suraj Kandpal (7): drm: writeback: Refactor drm_writeback_connector structure drm: writeback: Modify writ

[RFC PATCH 8/8] drm/msm/dpu: Adapt dpu writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
above changes mentioned. Signed-off-by: Suraj Kandpal --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c| 16 +--- drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.h| 4 ++-- 3 files changed, 13 insertions(+), 10 deletions

[RFC PATCH 6/8] drm/vkms: Adapt vkms writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
changes mentioned. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.h | 2 +- drivers/gpu/drm/vkms/vkms_writeback.c | 15 +-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vkms

[RFC PATCH 7/8] drm/rcar_du: Adapt vkms writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
above changes mentioned. Signed-off-by: Suraj Kandpal --- .../gpu/drm/renesas/rcar-du/rcar_du_crtc.h| 4 ++-- .../drm/renesas/rcar-du/rcar_du_writeback.c | 22 +++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_crtc.h

[RFC PATCH 5/8] drm/vc4: Adapt vc4 writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
changes mentioned. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/vc4/vc4_txp.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c index fef4e4ee47cf..2428807e9714 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c

[RFC PATCH 4/8] drm/arm/mali: Adapt mali writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
changes mentioned. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/arm/malidp_drv.h | 2 +- drivers/gpu/drm/arm/malidp_mw.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.h b/drivers/gpu/drm/arm/malidp_drv.h index bc0387876dea

[RFC PATCH 3/8] drm/arm/komeda: Adapt komeda writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
the above changes mentioned. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 6 +++--- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 6 +++--- drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 8 3 files changed, 10

[RFC PATCH 2/8] drm/amd/display: Adapt amd writeback to new drm_writeback_connector

2025-08-11 Thread Suraj Kandpal
the above changes mentioned. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c| 4 +--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h| 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 8 3 files changed, 6 insertions(+), 8

[RFC PATCH 0/8] Refactor drm_writeback_connector structure

2025-08-11 Thread Suraj Kandpal
[1] https://patchwork.freedesktop.org/series/152106/ [2] https://patchwork.freedesktop.org/series/152420/ Signed-off-by: Suraj Kandpal Suraj Kandpal (8): drm: writeback: Refactor drm_writeback_connector structure drm/amd/display: Adapt amd writeback to new drm_writeback_connector drm/arm/komeda: Adapt komeda writeb

[RFC PATCH 1/8] drm: writeback: Refactor drm_writeback_connector structure

2025-08-11 Thread Suraj Kandpal
. All drivers will be expected to allocate the drm_connector. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/drm_writeback.c | 33 ++-- include/drm/drm_connector.h | 60 + include/drm/drm_writeback.h | 68 - 3 files ch

[PATCH 27/28] drm/i915/writeback: Make exception for writeback connector

2025-07-24 Thread Suraj Kandpal
Writeback connector is a special connector as it does not actually exist. This means a lot of checks and computations need to be skipped and exceptions need to be made when it comes to this connector. This commit contains all those changes for a writeback connector. Signed-off-by: Suraj Kandpal

[PATCH 28/28] drm/i915/writeback: Modify state verify function

2025-07-24 Thread Suraj Kandpal
Modify the state verify functions to take into account the fact that writeback does not need all the timings for it to be set. Moreover there is no need for dpll state nor do we need to set any sort of flags for it. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_display.c

[PATCH 26/28] drm/i915/writeback: Define the disable sequence for writeback

2025-07-24 Thread Suraj Kandpal
Define the disable sequence for a writeback encoder. We only disable the encoder if no writeback job is pending, if it is then we just need to disable the wd function so that values can be updated accordingly. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 28

[PATCH 24/28] drm/i915/writeback: Enable writeback interrupts

2025-07-24 Thread Suraj Kandpal
Enable writeback interrupts while enabling writeback and define the isr handler and schedule work for later to signal completion job. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_display_irq.c | 10 .../gpu/drm/i915/display/intel_display_regs.h | 1 + .../gpu/drm/i915

[PATCH 25/28] drm/i915/writeback: Initialize writeback encoder.

2025-07-24 Thread Suraj Kandpal
Call the init function to initialize the writeback encoder only for ADLP. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display

[PATCH 23/28] drm/i915/writeback: Configure WD_SURF register

2025-07-24 Thread Suraj Kandpal
Get the ggtt_offset of the drm_framebuffer which needs to be written to the surface base address bits of WD_SURF register. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 3 +++ drivers/gpu/drm/i915/display/intel_writeback_reg.h | 2 ++ 2 files changed, 5

[PATCH 21/28] drm/i915/writeback: Define writeback frame capture function

2025-07-24 Thread Suraj Kandpal
Define the commit function to be called at atomic_commit_tail if drm_writeback_job is available. This function calls the capture function and queues the job to be called later via interrupt handler when the job is complete. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display

[PATCH 22/28] drm/i915/writeback: Configure WD_STRIDE reg

2025-07-24 Thread Suraj Kandpal
Write to the WD_STRIDE register using the appropriate calculation based on the color mode and hactive. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 34 +++ .../drm/i915/display/intel_writeback_reg.h| 1 + 2 files changed, 35 insertions

[PATCH 20/28] drm/i915/writeback: Add writeback to xe Makefile

2025-07-24 Thread Suraj Kandpal
Add a intel_writeback.c to xe so that it builds for xe. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/xe/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 76f980475b2c..0551e75b2569 100644 --- a/drivers/gpu/drm/xe

[PATCH 19/28] drm/i915/writeback: Add the enable sequence from writeback

2025-07-24 Thread Suraj Kandpal
Add enable sequence for writeback, use encoder->enable hook to enable the transcoder. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 104 ++ 1 file changed, 104 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_writeback.c

[PATCH 18/28] drm/i915/writeback: Add connector atomic check

2025-07-24 Thread Suraj Kandpal
Add connector helper function for atomic check which sets the mode_changed bit and checks if pixel format of fb is valid or not. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 49 +++ 1 file changed, 49 insertions(+) diff --git a/drivers/gpu

[PATCH 15/28] drm/i915/writeback: Define compute_config for writeback

2025-07-24 Thread Suraj Kandpal
Define the compute config function where we assign the output_type and add the transcoder that needs to be used. We currently assign one WD0 transcoder. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 20 +++ 1 file changed, 20 insertions

[PATCH 17/28] drm/i915/writeback: Define function to destroy writeback connector

2025-07-24 Thread Suraj Kandpal
Define function to destroy the drm_writbeack_connector and drm_connector associated with it. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_writeback.c b/drivers/gpu

[PATCH 16/28] drm/i915/writeback: Define function for connector function detect

2025-07-24 Thread Suraj Kandpal
detect function always returns connector_status_connected if writeback connector has been initialized. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_writeback.c b

[PATCH 12/28] drm/i915/writeback: Fill encoder->get_config

2025-07-24 Thread Suraj Kandpal
Fill the encoder->get_config hook with relevant data which helps verify state. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_writeback.c b/drivers/gpu/drm/i

[PATCH 14/28] drm/i915/writeback: Define function for prepare and cleanup hooks

2025-07-24 Thread Suraj Kandpal
Define function for prepare and cleanup hooks which help map and unmap drm framebuffer since we need these address to do register writes in WD_SURF and WD_STRIDE register. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 68 +++ 1 file changed, 68

[PATCH 13/28] drm/i915/writeback: Add private structure for writeback job

2025-07-24 Thread Suraj Kandpal
Create intel_writeback_job to track drm_writback_job and other structure we might need to complete the writeback job. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display

[PATCH 10/28] drm/i915/writeback: Add hook to check modes

2025-07-24 Thread Suraj Kandpal
Add connector helper hooks to check if mode is valid or not. We add this restriction to make sure mode is 3840x2160 60Hz. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 20 +++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915

[PATCH 11/28] drm/i915/writeback: Define encoder->get_hw_state

2025-07-24 Thread Suraj Kandpal
Define the get_hw_state function for encoder which get's the encoder state, pipe config. Signed-off-by: Suraj Kandpal --- .../gpu/drm/i915/display/intel_writeback.c| 48 +++ .../drm/i915/display/intel_writeback_reg.h| 3 ++ 2 files changed, 51 insertions(+) diff

[PATCH 07/28] drm/i915/writeback: Add function for get_writeback_connector

2025-07-24 Thread Suraj Kandpal
Define function to get_writeback_connector which returns the drm_writeback_connector given the drm_connector. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/i915/display

[PATCH 08/28] drm/i915/writeback: Define the get_connector_from_writeback hook

2025-07-24 Thread Suraj Kandpal
Define the get_connector_from_writeback hook to get the drm_connector from drm_writeback_connector. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/i915/display

[PATCH 09/28] drm/i915/writeback: Add function to get modes

2025-07-24 Thread Suraj Kandpal
Add a function that get modes for writeback connector. Since we have a restriction on supporting only 3840x2160 60Hz modes at max we will create modes only up until that point. Bspec: 49275 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_writeback.c | 7 +++ 1 file

[PATCH 05/28] drm/i915/writeback: Add some preliminary writeback definitions

2025-07-24 Thread Suraj Kandpal
Add some preliminary definitions like, output type and transcoder related to the writeback functionality. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/display/intel_acpi.c | 1 + .../drm/i915/display/intel_crtc_state_dump.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c

[PATCH 06/28] drm/i915/writeback: Init writeback connector

2025-07-24 Thread Suraj Kandpal
which drm formats are supported by us. Bspec: 49275 Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/display/intel_writeback.c| 129 ++ .../gpu/drm/i915/display/intel_writeback.h| 17 +++ 3 files changed, 147 insertions

[PATCH 04/28] drm/i915/writeback: Add writeback registers

2025-07-24 Thread Suraj Kandpal
Add writeback registers to its own file. Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_writeback_reg.h| 136 ++ 1 file changed, 136 insertions(+) create mode 100644 drivers/gpu/drm/i915/display/intel_writeback_reg.h diff --git a/drivers/gpu/drm/i915/display

[PATCH 03/28] drm/writeback: Define function to get drm_connector from writeback

2025-07-24 Thread Suraj Kandpal
ector if the helper hook is not present. Lets use this function and call it whenever drm_connector is required mostly when connector helper private funcs need to be fetched. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/drm_writeback.c | 33 ++--- 1 file change

[PATCH 01/28] drm/writeback: Add function that takes preallocated connector

2025-07-24 Thread Suraj Kandpal
Write a function that takes a preallocated drm_connector instead of using the one allocated inside the drm writeback connector init function. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/drm_writeback.c | 76 + include/drm/drm_writeback.h | 7 +++ 2

[PATCH 02/28] drm/writeback: Add a helper function to get writeback connector

2025-07-24 Thread Suraj Kandpal
drm_writeback_connector associated with the give drm_connector. Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/drm_writeback.c | 14 ++ include/drm/drm_modeset_helper_vtables.h | 59 include/drm/drm_writeback.h | 14 -- 3 files changed, 82 insertions

[PATCH 00/28] Enable Pipe writeback

2025-07-24 Thread Suraj Kandpal
trigger a capture. Cc: Harry Wetland Signed-off-by: Suraj Kandpal Suraj Kandpal (28): drm/writeback: Add function that takes preallocated connector drm/writeback: Add a helper function to get writeback connector drm/writeback: Define function to get drm_connector from writeback

[PATCH] drm/dp: Add documentation for luminance_set

2025-07-01 Thread Suraj Kandpal
Documentation for luminance_set for struct drm_edp_backlight_info was missed which causes warnings. Fixes: 2af612ad4290 ("drm/dp: Introduce new member in drm_backlight_info") Signed-off-by: Suraj Kandpal --- include/drm/display/drm_dp_helper.h | 1 + 1 file changed, 1 insertion(+) di

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- include/drm/display/drm_dp_helper.h | 2 +- 2

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- .../gpu/drm/i915/display

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++- 1 file changed, 3 insertions(+), 31 deletions

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

2025-06-19 Thread Suraj Kandpal
Now that drm_edp_backlight init has been modified to take into account the setup of lumininace based brightness manipulation we can just use that. --v2 -Fix commit message [Arun] Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_dp_aux_backlight.c | 98 +-- 1 file

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

2025-06-19 Thread Suraj Kandpal
Add flag to enable brightness control via luminance value when enabling edp backlight. Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- 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

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display

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

2025-06-19 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. --v2 -Add comment regarding the unit [Arun] Signed-off-by: Suraj Kandpal

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display/drm_dp_helper.c | 4 ++-- drivers/gpu/drm/i915

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display/drm_dp_helper.c | 8 ++-- include/drm/display/drm_dp_helper.h

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

2025-06-19 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. --v2 -Add comment on the unit sent back [Arun] Signed-off-by: Suraj Kandpal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display

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

2025-06-19 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 00/13] Modify drm helpers to use luminance

2025-06-19 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 v3 03/13] drm/dp: Add argument for max luminance in drm_edp_backlight_init

2025-06-19 Thread Suraj Kandpal
Add new argument to drm_edp_backlight_init which gives the max_luminance which will be needed to set the max values for backlight. --v2 -Use pass only max luminance instead of luminance_range_info struct [Arun] Signed-off-by: Suraj Kandpal --- drivers/gpu/drm/display/drm_dp_helper.c

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

2025-06-19 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 Reviewed-by: Arun R Murthy --- drivers/gpu/drm/display/drm_dp_helper.c | 7 --- drivers/gpu/drm/i915

[RFC PATCH 4/4] drm/i915/writeback: Init writeback connector

2025-06-12 Thread Suraj Kandpal
which drm formats are supported by us. Bspec: 49275 Signed-off-by: Suraj Kandpal diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 13d4a16f7d33..0748edae8aa9 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -294,6 +294,7 @@ i915-y

[RFC PATCH 3/4] drm/i915/writeback: Add some preliminary writeback definitions

2025-06-12 Thread Suraj Kandpal
Add some preliminary definitions like, output type and transcoder related to the writeback functionality. Signed-off-by: Suraj Kandpal diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h index 3b54a62c290a..ae474cbeb791 100644 --- a/drivers

[RFC PATCH 2/4] drm/i915/writeback: Add writeback registers

2025-06-12 Thread Suraj Kandpal
Add writeback registers to its own file. Signed-off-by: Suraj Kandpal diff --git a/drivers/gpu/drm/i915/display/intel_writeback_reg.h b/drivers/gpu/drm/i915/display/intel_writeback_reg.h new file mode 100644 index ..dd872b6f8103 --- /dev/null +++ b/drivers/gpu/drm/i915/display

[RFC PATCH 1/4] drm/writeback: Add function that takes preallocated connector

2025-06-12 Thread Suraj Kandpal
Write a function that takes a preallocated drm_connector instead of using the one allocated inside the drm writeback connector init function. Signed-off-by: Suraj Kandpal diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c index edbeab88ff2b..0d287ab9bded 100644 --- a

[RFC PATCH 0/4] New Helper to Initialise writeback connector

2025-06-12 Thread Suraj Kandpal
This series is for review comments only and is not tested. This series added a helper to be able to initialise writeback connector in a way where drivers can send their own connector and encoder. Signed-off-by: Suraj Kandpal Suraj Kandpal (4): drm/writeback: Add function that takes

[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

  1   2   >