summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display
AgeCommit message (Collapse)Author
2025-02-10drm/i915: Convert intel_cursor.c to struct intel_displayVille Syrjälä
struct intel_display will replace struct drm_i915_private as the main thing for display code. Convert the cursor code to use it. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-10-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Finish intel_sprite.c struct intel_display conversionVille Syrjälä
intel_sprite.c was partially converted to struct intel_display. Finish the job now that we can deal with the platform checks as well. And while at it we also move the 'display' variable declaration to be the first thing in most functions, consistency. We can actually do that now since intel_display() accepts the intel_plane and intel_plane_state types. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-9-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Convert i9xx_plane.c to struct intel_displayVille Syrjälä
struct intel_display will replace struct drm_i915_private as the main thing for display code. Convert the pre-skl primary plane code to use it. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-8-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Convert intel_display_power_{get,put}*() to intel_displayVille Syrjälä
Pass intel_display to the display power stuff. These are spread all over the place so tend to hinder clean conversions of whole files. TODO: The gt part/unpark power domain shenanigans need some kind of more abstract interface... v2: Deal with cmtg Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-7-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Convert intel_fb.c to struct intel_displayVille Syrjälä
struct intel_display will replace struct drm_i915_private as the main thing for display code. Convert the fb code to use it. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-6-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Convert intel_crtc.c to struct intel_displayVille Syrjälä
struct intel_display will replace struct drm_i915_private as the main thing for display code. Convert intel_crtc.c code to use it. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-5-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Decouple intel_fb_bo.h interfaces from driver specific typesVille Syrjälä
Make the intel_fb_bo.h interfaces operated purely in base drm_ types so that each driver (i915 and xe) doesn't have to know about each other, or the display stuff. v2: s/dev/drm/ (Jani) Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-4-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Decouple i915_gem_dumb_create() from the display a bitVille Syrjälä
Pass the device argument as drm_device to intel_plane_fb_max_stride() to decouple i915_gem_dumb_create() vs. the display code a bit. xe currently doesn't even call this, but it probably should... v2: s/dev/drm/ (Jani) Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-3-ville.syrjala@linux.intel.com
2025-02-10drm/i915: Pass intel_display to intel_scanout_needs_vtd_wa()Ville Syrjälä
Now that intel_scanout_needs_vtd_wa() is no longer used from the gem code we can convert it to take struct intel_display. which will help with converting the low level plane code over as well. Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206185533.32306-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-10drm/i915/hdcp: Make some functions staticJani Nikula
With the debugfs implementation moved next to the implementation, we no longer need to expose some of the functions. Make them static. Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250207105838.179805-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-10drm/i915/hdcp: Convert platform checks to use display->platformJani Nikula
Prefer display->platform.<platform> over IS_<PLATFORM>(i915), and reducate struct drm_i915_private usages while at it. Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/58bad1e888a57a014acbaae67ccddd4f895091a7.1738924826.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-10drm/i915/hdcp: rename intel_connector to connectorJani Nikula
Follow the current convention of naming struct intel_connector pointers connector. Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/8f43542a8f0ce0ec5725b769c077d3cea723bde0.1738924826.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-10drm/i915/hdcp: Move HDCP debugfs to intel_hdcp.cJani Nikula
Continue with placing debugfs next to the implementation. intel_connector_info() still needs intel_hdcp_info(), so we'll need to expose that too. Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c118e992673f6b054aacaff0e1850fcea329e000.1738924826.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-07drm/i915/dp_mst: Fix disabling the minimum HBlank timeImre Deak
Disable the minimum HBlank time only on LNL+, where this functionality and corresponding register exists. Bspec: 74379 Fixes: a5ebe00c2ace ("drm/i915/dp: Guarantee a minimum HBlank time") Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206164624.3185280-1-imre.deak@intel.com
2025-02-07Revert "drm/i915/dp: Compute as_sdp based on if vrr possible"Mitul Golani
This reverts commit 08277aa5d5a44befd71717de35b956f55e1e8401. Compute AS SDP params only when VRR is enabled to maintain PSR exclusivity. Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206045001.2919360-3-mitulkumar.ajitkumar.golani@intel.com
2025-02-07drm/i915/display: Skip state checker for AS SDP infoframe enableMitul Golani
Avoid full modeset by skipping infoframe.enable check when toggling AS SDP while enabling VRR, preventing full modeset while pipe config changes. --v2: - Add check for exclude_infoframe. (Ankit) - Update commit message. (Ankit) --v3: - Optimise PIPE_CONF_CHECK for infoframes.enable. [Ankit] Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206045001.2919360-2-mitulkumar.ajitkumar.golani@intel.com
2025-02-06drm/i915/backlight: Enable nits based luminanceSuraj 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 <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-9-suraj.kandpal@intel.com
2025-02-06drm/i915/backlight: Setup nits based luminance via VESASuraj 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 <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-8-suraj.kandpal@intel.com
2025-02-06drm/i915/backlight: Add function to change brightness in nits for VESASuraj 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 <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-7-suraj.kandpal@intel.com
2025-02-06drm/i915/backlight: Modify function to get VESA brightness in NitsSuraj 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 <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-6-suraj.kandpal@intel.com
2025-02-06drm/i915/backlight: Check Luminance based brightness control for VESASuraj Kandpal
Check if we are capable of controlling brightness via luminance which is dependent on PANEL_LUMINANCE_CONTROL_CAPABLE bit being set on EDP_GENERAL_CAPABILITY_2 register. --v2 -Prefer using luminance rather than nits [Jani] -Fix commit message --v3 -Fix the bit name used in commit message [Arun] -Use correct edp_dpcd[] to check the capability [Arun] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-5-suraj.kandpal@intel.com
2025-02-06drm/i915/backlight: Use proper interface based on eDP versionSuraj 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 <suraj.kandpal@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-4-suraj.kandpal@intel.com
2025-02-06drm/i915/dp_mst: Fix getting display pointer in ↵Imre Deak
intel_dp_mst_compute_min_hblank() The MST intel_connector::encoder pointer is NULL if the connector hasn't been enabled before, so it can't be used to retrieve the display pointer. Use instead the crtc_state and drop the unused connector parameter. v2: Use the crtc_state and drop the unused connector parameter. Fixes: a5ebe00c2ace ("drm/i915/dp: Guarantee a minimum HBlank time") Reported-and-tested-by: Khaled Almahallawy <khaled.almahallawy@intel.com> Closes: https://lore.kernel.org/all/16754ee4cd21d99c1e81c5953134b496dd07630f.camel@intel.com Reviewed-by: Khaled Almahallawy <khaled.almahallawy@intel.com> #v1 Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206001726.3021787-1-imre.deak@intel.com
2025-02-06drm/i915/fbdev: Use fb->normal_view.gttVille Syrjälä
Grab the GTT view for the fbdev fb pinning from fb->normal_view.gtt instead of having and extra one on the stack. Seems safer in case we ever put any new information into normal GTT views. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-06drm/i915: Use per-plane VT-d guard numbersVille Syrjälä
Bspec lists different VT-d guard numbers (the number of dummy padding PTEs) for different platforms and plane types. Use those instead of just assuming the max glk+ number for everything. This could avoid a bit of overhead on older platforms due to reduced padding, and it makes it easier to cross check with the spec. Note that VLV/CHV do not document this w/a at all, so not sure if it's actually needed or not. Nor do we actually know how much padding is required if it is needed. For now use the same 128 PTEs that we use for snb-bdw primary planes. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-06drm/i915: Calculate the VT-d guard size in the display codeVille Syrjälä
Currently i915_gem_object_pin_to_display_plane() uses i915_gem_object_get_tile_row_size() to calculate the tile row size for the VT-d guard w/a. That's not really proper since i915_gem_object_get_tile_row_size() only works for fenced BOs, nor does it take rotation into account. Remedy the situation by calculating the VT-d guard size in the display code where we have more information readily available. Although the default guard size (168 PTEs now) should cover the more typical fb size use cases anyway, and only very large Y/Yf-tiled framebuffers might have tile row size that exceeds it. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-06drm/i915: Use more optimal VTd alignment for planesVille Syrjälä
Depending on the platform and/or plane type we can get away with a bit less alignment in the VT-d w/a. Reduce the numbers accordingly. Note that it's not actually clear in VLV/CHV need this w/a, and if they do we don't actually know what kind of alignment is sufficient. Leave the 256k alignment in place for now, but toss in a FIXME. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-06drm/i915: Move VT-d alignment into plane->min_alignment()Ville Syrjälä
Currently we don't account for the VT-d alignment w/a in plane->min_alignment() which means that panning inside a larger framebuffer can still cause the plane SURF to be misaligned. Fix the issue by moving the VT-d alignment w/a into plane->min_alignment() itself (for the affected platforms). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122151755.6928-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2025-02-06Merge drm/drm-next into drm-misc-nextMaxime Ripard
Bring rc1 to start the new release dev. Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-02-06drm/i915/psr: clarify intel_psr_pre_plane_update() conditionsJani Nikula
Make the conditions easier to follow. We don't do anything for !psr->enabled, so hoist psr->enabled check higher, avoiding all the checks when !psr->enabled. Stop the bitwise OR abuse on booleans by removing the temporary variable altogether. v2: Rebase Cc: Jouni Högander <jouni.hogander@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> # v1 Link: https://patchwork.freedesktop.org/patch/msgid/20250204140518.2971530-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/dp: Fix potential infinite loop in 128b/132b SSTJani Nikula
Passing 0 as the step only works when there are other reasons to break out of the BPP loop in intel_dp_mtp_tu_compute_config(). Otherwise, an infinite loop might occur. Fix it by explicitly checking for 0 step. Fixes: ef0a0757bbea ("drm/i915/dp: compute config for 128b/132b SST w/o DSC") Reported-by: Imre Deak <imre.deak@intel.com> Closes: https://lore.kernel.org/r/Z6I0knh2Kt5T0JrT@ideak-desk.fi.intel.com Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204154925.3001781-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> (cherry picked from commit a40e718d34d3d02c781c295466b013415f68c4f1) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-02-05drm/i915/backlight: convert to use struct intel_displayJani Nikula
Going forward, struct intel_display will be the main display data structure. Convert as much as possible of backlight code to use it. There are some stragglers mainly around PCH checks. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204132423.2910978-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/cx0: convert to struct intel_display based platform checksJani Nikula
Switch the IS_<PLATFORM>() checks to display->platform.<platform>, and drop a number of struct drm_i915_private pointers in the process. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204134228.2934744-3-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/cdclk: switch to new platform checksJani Nikula
Switch the IS_<PLATFORM>() checks to display->platform.<platform>, and drop a number of struct drm_i915_private pointers in the process. While at it, replace /* NOOP */; with ; /* NOOP */ to avoid a checkpatch warning on misleading indentation. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204134228.2934744-2-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/display: convert intel_ddi_buf_trans.c to struct intel_displayJani Nikula
Going forward, struct intel_display is the main device data structure for display. Switch to it. For MISSING_CASE(), log the PCI ID instead of the platform to get rid of the i915_drv.h dependency. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204134228.2934744-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/lspcon: rename interfaces to intel_lspcon_* to unifyJani Nikula
Rename all the main functions to have intel_lspcon_ prefix. Keep the infoframes hooks named lspcon_ for now, and grouped together, as there'd be a clash with intel_lspcon_infoframes_enabled(). Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/15e8c4133aee89181e6776a44e58f2573cfe23f2.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/lspcon: remove dp_to_lspcon(), hide enc_to_intel_lspcon()Jani Nikula
There are no users left for dp_to_lspcon(), remove it. The only two users of enc_to_intel_lspcon() are in intel_lspcon.c, so hide it there. v2: Rebase Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ea14ba07b88ba5ed65d832c89a3415b7a91edea9.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/lspcon: change signature of lspcon_wait_pcon_mode()Jani Nikula
Switch from struct intel_lspcon to struct intel_digital_port to unify. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/84a00791d3d7ee4e34c1224ef7471918546635aa.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/lspcon: change signature of lspcon_detect_hdr_capability()Jani Nikula
Switch from struct intel_lspcon to struct intel_digital_port to unify, and return the value so the caller doesn't have to look at lspcon->hdr_detected directly. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/6f249f5c537a16a6762faddffd6a95cbf61cf077.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/lspcon: add intel_lspcon_active() and use itJani Nikula
Hide the direct lspcon->active use behind intel_lspcon_active(). Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/3eabe0cb07a84c63119ea893e149de410b4356b0.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/hdmi: move declarations for hsw_read/write_infoframe() to the right ↵Jani Nikula
place The functions are located in intel_hdmi.c, put the declarations in intel_hdmi.h. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/e8cd28a3c46f06b9654df8b7990e1e6a1d9e18c1.1738677489.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05Merge drm/drm-next into drm-intel-nextJani Nikula
Sync with v6.14-rc1. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/dmc_wl: Do not check for DMC payloadGustavo Sousa
Enabling and disabling of DMC wakelock is already coupled with enabling and disabling of dynamic DC states, which already depend on the DMC being properly loaded. As such, we do not need to check if we already have a DMC payload parsed in __intel_dmc_wl_supported(). Furthermore, the presence of such a check causes inconsistencies in the refcount if the following sequence of events happen: 1. A call to one of the register accessors from intel_de.h is done before the DMC payload is parsed. That causes intel_dmc_wl_get() to be called. Suppose the register offset qualifies as needing the wakelock. In normal circumstances, the refcount would be incremented, but, because __intel_dmc_wl_supported() returns false, the refcount is untouched. 2. In a separate worker thread, the DMC firmware is parsed. Parsing of the DMC payload is finished before the corresponding intel_dmc_wl_put() from (1) is called. 3. When in the context of (1), intel_dmc_wl_put() gets called, now we have __intel_dmc_wl_supported() returning true and we hit the warning, because the code doesn't expect a zero refcount. Let's remove that check, since it is unnecessary and causes the inconsistency illustrated above. Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250124191250.56833-1-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
2025-02-05drm/i915/dp: Add support for DP UHBR SST DSCJani Nikula
Drop the UHBR limitation from DP SST DSC, and handle SST DSC bandwidth computation for UHBR using intel_dp_mtp_tu_compute_config(). Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250203160834.2708027-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/dp: Fix potential infinite loop in 128b/132b SSTJani Nikula
Passing 0 as the step only works when there are other reasons to break out of the BPP loop in intel_dp_mtp_tu_compute_config(). Otherwise, an infinite loop might occur. Fix it by explicitly checking for 0 step. Fixes: ef0a0757bbea ("drm/i915/dp: compute config for 128b/132b SST w/o DSC") Reported-by: Imre Deak <imre.deak@intel.com> Closes: https://lore.kernel.org/r/Z6I0knh2Kt5T0JrT@ideak-desk.fi.intel.com Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204154925.3001781-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/mst: fix INT_MAX to .4 fixed point conversion mistakeJani Nikula
intel_dp_mtp_tu_compute_config() conversion to use .4 fixed point didn't take into account that intel_dp_mst_max_dpt_bpp() may return INT_MAX when the transport limitation is not relevant. Converting INT_MAX to .4 fixed point results in -1.0, which then gets used as if it were a real max BPP value: i915 0000:00:02.0: [drm:intel_dp_mtp_tu_compute_config [i915]] Limiting bpp to max DPT bpp (24.0000 -> -1.0000) i915 0000:00:02.0: [drm:intel_dp_mtp_tu_compute_config [i915]] Looking for slots in range min bpp 18.0000 max bpp -1.0000 Just return 0 for "no max DPT BPP", and handle it explicitly. Fixes: 67782bf6e8a6 ("drm/i915/mst: Convert intel_dp_mtp_tu_compute_config() to .4 format") Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13624 Cc: Imre Deak <imre.deak@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204153717.2996923-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-02-05drm/i915/dp: Guarantee a minimum HBlank timeArun R Murthy
Mandate a minimum Hblank symbol cycle count between BlankingStart and BlankingEnd in 8b/10b MST and 128b/132b mode. v2: Affine calculation/updation of min HBlank to dp_mst (Jani) v3: moved min_hblank from struct intel_dp to intel_crtc_state (Jani) v4: use max/min functions, change intel_xx *intel_xx to intel_xx *xx (Jani) Limit hblank to 511 and accommodate BS/BE in calculated value (Srikanth) v5: Some spelling corrections (Suraj) v6: Removed DP2.1 in comment as this is applicable for both DP2.1 and DP1.4 (Suraj) v7: crtc_state holds the logical values and the register value computation is moved to mst_enable() (Jani) v8: Limit max hblank to 0x10, disable min_hblank on mst_disable (Jani) Bspec: 74379 Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122-hblank-v9-1-90afda006685@intel.com
2025-02-04drm/i915/dp: Iterate DSC BPP from high to low on all platformsJani Nikula
Commit 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp") tries to find the best compressed bpp for the link. However, it iterates from max to min bpp on display 13+, and from min to max on other platforms. This presumably leads to minimum compressed bpp always being chosen on display 11-12. Iterate from high to low on all platforms to actually use the best possible compressed bpp. Fixes: 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp") Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: <stable@vger.kernel.org> # v6.7+ Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/3bba67923cbcd13a59d26ef5fa4bb042b13c8a9b.1738327620.git.jani.nikula@intel.com (cherry picked from commit 56b0337d429356c3b9ecc36a03023c8cc856b196) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-02-04drm/i915/lttpr: Enable Extended Wake TimeoutSuraj Kandpal
Usually retimers take around 30 to 40ms to exit all devices from sleep state. Extended wake timeout mechanism helps to give that additional time. --v2 -Grant the requested time only if greater than 1ms [Arun/Jani] -Reframe commit message [Arun] --v3 -Move the function to drm_core [Dmitry/Jani] Spec: DP v2.1 Section 3.6.12.3 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250122053358.1545039-4-suraj.kandpal@intel.com
2025-02-04drm/i915/dmc_wl: Track INITIATE_PM_DMD_REQ for DC5Gustavo Sousa
The Bspec has been updated to include INITIATE_PM_DMD_REQ in the set of register offsets that require the DMC wakelock for access during DC5. Update our table accordingly. Bspec: 71583 Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250203205941.251754-1-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>