Skip to content

Commit 8f037e1

Browse files
committed
Merge tag 'drm-intel-next-2025-11-04' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
drm/i915 feature pull for v6.19: Features and functionality: - Enable LNL+ content adaptive sharpness filter (CASF) (Nemesa) - Use optimized VRR guardband (Ankit, Ville) - Enable Xe3p LT PHY (Suraj) - Enable FBC support for Xe3p_LPD display (Sai Teja, Vinod) - Specify DMC firmware for display version 30.02 (Dnyaneshwar) - Report reason for disabling PSR to debugfs (Michał) - Extend i915_display_info with Type-C port details (Khaled) - Log DSI send packet sequence errors and contents Refactoring and cleanups: - Refactoring to prepare for VRR guardband optimization (Ankit) - Abstract VRR live status wait (Ankit) - Refactor VRR and DSB timing to handle Set Context Latency explicitly (Ankit) - Helpers for prefill latency calculations (Ville) - Refactor SKL+ watermark latency setup (Ville) - VRR refactoring and cleanups (Ville) - SKL+ universal plane cleanups (Ville) - Decouple CDCLK from state->modeset refactor (Ville) - Refactor VLV/CHV clock functions (Jani) - Refactor fbdev handling (Jani) - Call i915 and xe runtime PM from display via function pointers (Jouni) - IRQ code refactoring (Jani) - Drop display dependency on i915 feature check macros (Jani) - Refactor and unify i915 and xe stolen memory interfaces towards display (Jani) - Switch to driver agnostic drm to display pointer chase (Jani) - Use display version over graphics version in display code (Matt A) - GVT cleanups (Jonathan, Andi) - Rename a VLV clock function to unify (Michał) - Explicitly sanitize DMC package header num entries (Luca) - Remove redundant port clock check from ALPM (Jouni) - Use sysfs_emit() instead of sprintf() in PMU sysfs (Madhur Kumar) - Clean up C20 PHY PLL register macros (Imre, Mika)) - Abstract "address in MMIO table" helper for general use (Matt A) - Improve VRR platform abstractions (Ville) - Move towards more standard PCI PM code usage (Ville) - Framebuffer refactoring (Ville) - Drop display dependency on i915_utils.h (Jani) - Include cleanups (Jani) Fixes: - Workaround docking station DSC issues with high pixel clock and bpp (Imre) - Fix Panel Replay in DSC mode (Imre) - Disable tracepoints for PREEMPT_RT as a workaround (Maarten) - Fix intel_crtc_get_vblank_counter() on PREEMPT_RT (Maarten) - Fix C10 PHY identification on PTL/WCL (Dnyaneshwar) - Take AS SDP into account with optimized guardband (Jouni) - Fix panic structure allocation memory leak (Jani) - Adjust an FBC workaround platforms (Vinod) - Add fallback for CDCLK selection (Naladala) - Avoid using invalid transcoder in MST transport select (Suraj) - Don't use cursor size reduction on display version 14+ (Nemesa) - Fix C20 PHY PLL register programming (Imre, Mika) - Fix PSR frontbuffer flush handling (Jouni) - Store ALPM parameters in crtc state (Jouni) - Defeature DRRS on LNL+ (Ville) - Fix the scope of the large DRAM DIMM workaround (Ville) - Fix PICA vs. AUX power ordering issue (Gustavo) - Fix pixel rate for computing watermark line time (Ville) - Fix framebuffer set_tiling vs. addfb race (Ville) - DMC event handler fixes (Ville) DRM Core: - CRTC sharpness strength property (Nemesa) - DPCD DSC quirk for Synaptics Panamera devices (Imre) - Helpers to query the branch DSC max throughput/line-width (Imre) Merges: - Backmerge drm-next for v6.18-rc and to sync with drm-xe-next (Jani) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/ec5a05f2df6d597a62033ee2d57225cce707b320@intel.com
2 parents f67d54e + c4227e1 commit 8f037e1

182 files changed

Lines changed: 7573 additions & 2274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/drm/display/drm_dp_helper.c

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,6 +2552,10 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
25522552
{ OUI(0x00, 0x0C, 0xE7), DEVICE_ID_ANY, false, BIT(DP_DPCD_QUIRK_HBLANK_EXPANSION_REQUIRES_DSC) },
25532553
/* Apple MacBookPro 2017 15 inch eDP Retina panel reports too low DP_MAX_LINK_RATE */
25542554
{ OUI(0x00, 0x10, 0xfa), DEVICE_ID(101, 68, 21, 101, 98, 97), false, BIT(DP_DPCD_QUIRK_CAN_DO_MAX_LINK_RATE_3_24_GBPS) },
2555+
/* Synaptics Panamera supports only a compressed bpp of 12 above 50% of its max DSC pixel throughput */
2556+
{ OUI(0x90, 0xCC, 0x24), DEVICE_ID('S', 'Y', 'N', 'A', 0x53, 0x22), true, BIT(DP_DPCD_QUIRK_DSC_THROUGHPUT_BPP_LIMIT) },
2557+
{ OUI(0x90, 0xCC, 0x24), DEVICE_ID('S', 'Y', 'N', 'A', 0x53, 0x31), true, BIT(DP_DPCD_QUIRK_DSC_THROUGHPUT_BPP_LIMIT) },
2558+
{ OUI(0x90, 0xCC, 0x24), DEVICE_ID('S', 'Y', 'N', 'A', 0x53, 0x33), true, BIT(DP_DPCD_QUIRK_DSC_THROUGHPUT_BPP_LIMIT) },
25552559
};
25562560

25572561
#undef OUI
@@ -2841,6 +2845,158 @@ int drm_dp_dsc_sink_supported_input_bpcs(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_S
28412845
}
28422846
EXPORT_SYMBOL(drm_dp_dsc_sink_supported_input_bpcs);
28432847

2848+
/*
2849+
* See DP Standard v2.1a 2.8.4 Minimum Slices/Display, Table 2-159 and
2850+
* Appendix L.1 Derivation of Slice Count Requirements.
2851+
*/
2852+
static int dsc_sink_min_slice_throughput(int peak_pixel_rate)
2853+
{
2854+
if (peak_pixel_rate >= 4800000)
2855+
return 600000;
2856+
else if (peak_pixel_rate >= 2700000)
2857+
return 400000;
2858+
else
2859+
return 340000;
2860+
}
2861+
2862+
/**
2863+
* drm_dp_dsc_sink_max_slice_throughput() - Get a DSC sink's maximum pixel throughput per slice
2864+
* @dsc_dpcd: DSC sink's capabilities from DPCD
2865+
* @peak_pixel_rate: Cumulative peak pixel rate in kHz
2866+
* @is_rgb_yuv444: The mode is either RGB or YUV444
2867+
*
2868+
* Return the DSC sink device's maximum pixel throughput per slice, based on
2869+
* the device's @dsc_dpcd capabilities, the @peak_pixel_rate of the transferred
2870+
* stream(s) and whether the output format @is_rgb_yuv444 or yuv422/yuv420.
2871+
*
2872+
* Note that @peak_pixel_rate is the total pixel rate transferred to the same
2873+
* DSC/display sink. For instance to calculate a tile's slice count of an MST
2874+
* multi-tiled display sink (not considering here the required
2875+
* rounding/alignment of slice count)::
2876+
*
2877+
* @peak_pixel_rate = tile_pixel_rate * tile_count
2878+
* total_slice_count = @peak_pixel_rate / drm_dp_dsc_sink_max_slice_throughput(@peak_pixel_rate)
2879+
* tile_slice_count = total_slice_count / tile_count
2880+
*
2881+
* Returns:
2882+
* The maximum pixel throughput per slice supported by the DSC sink device
2883+
* in kPixels/sec.
2884+
*/
2885+
int drm_dp_dsc_sink_max_slice_throughput(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
2886+
int peak_pixel_rate, bool is_rgb_yuv444)
2887+
{
2888+
int throughput;
2889+
int delta = 0;
2890+
int base;
2891+
2892+
throughput = dsc_dpcd[DP_DSC_PEAK_THROUGHPUT - DP_DSC_SUPPORT];
2893+
2894+
if (is_rgb_yuv444) {
2895+
throughput = (throughput & DP_DSC_THROUGHPUT_MODE_0_MASK) >>
2896+
DP_DSC_THROUGHPUT_MODE_0_SHIFT;
2897+
2898+
delta = ((dsc_dpcd[DP_DSC_RC_BUF_BLK_SIZE - DP_DSC_SUPPORT]) &
2899+
DP_DSC_THROUGHPUT_MODE_0_DELTA_MASK) >>
2900+
DP_DSC_THROUGHPUT_MODE_0_DELTA_SHIFT; /* in units of 2 MPixels/sec */
2901+
delta *= 2000;
2902+
} else {
2903+
throughput = (throughput & DP_DSC_THROUGHPUT_MODE_1_MASK) >>
2904+
DP_DSC_THROUGHPUT_MODE_1_SHIFT;
2905+
}
2906+
2907+
switch (throughput) {
2908+
case 0:
2909+
return dsc_sink_min_slice_throughput(peak_pixel_rate);
2910+
case 1:
2911+
base = 340000;
2912+
break;
2913+
case 2 ... 14:
2914+
base = 400000 + 50000 * (throughput - 2);
2915+
break;
2916+
case 15:
2917+
base = 170000;
2918+
break;
2919+
}
2920+
2921+
return base + delta;
2922+
}
2923+
EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_throughput);
2924+
2925+
static u8 dsc_branch_dpcd_cap(const u8 dpcd[DP_DSC_BRANCH_CAP_SIZE], int reg)
2926+
{
2927+
return dpcd[reg - DP_DSC_BRANCH_OVERALL_THROUGHPUT_0];
2928+
}
2929+
2930+
/**
2931+
* drm_dp_dsc_branch_max_overall_throughput() - Branch device's max overall DSC pixel throughput
2932+
* @dsc_branch_dpcd: DSC branch capabilities from DPCD
2933+
* @is_rgb_yuv444: The mode is either RGB or YUV444
2934+
*
2935+
* Return the branch device's maximum overall DSC pixel throughput, based on
2936+
* the device's DPCD DSC branch capabilities, and whether the output
2937+
* format @is_rgb_yuv444 or yuv422/yuv420.
2938+
*
2939+
* Returns:
2940+
* - 0: The maximum overall throughput capability is not indicated by
2941+
* the device separately and it must be determined from the per-slice
2942+
* max throughput (see @drm_dp_dsc_branch_slice_max_throughput())
2943+
* and the maximum slice count supported by the device.
2944+
* - > 0: The maximum overall DSC pixel throughput supported by the branch
2945+
* device in kPixels/sec.
2946+
*/
2947+
int drm_dp_dsc_branch_max_overall_throughput(const u8 dsc_branch_dpcd[DP_DSC_BRANCH_CAP_SIZE],
2948+
bool is_rgb_yuv444)
2949+
{
2950+
int throughput;
2951+
2952+
if (is_rgb_yuv444)
2953+
throughput = dsc_branch_dpcd_cap(dsc_branch_dpcd,
2954+
DP_DSC_BRANCH_OVERALL_THROUGHPUT_0);
2955+
else
2956+
throughput = dsc_branch_dpcd_cap(dsc_branch_dpcd,
2957+
DP_DSC_BRANCH_OVERALL_THROUGHPUT_1);
2958+
2959+
switch (throughput) {
2960+
case 0:
2961+
return 0;
2962+
case 1:
2963+
return 680000;
2964+
default:
2965+
return 600000 + 50000 * throughput;
2966+
}
2967+
}
2968+
EXPORT_SYMBOL(drm_dp_dsc_branch_max_overall_throughput);
2969+
2970+
/**
2971+
* drm_dp_dsc_branch_max_line_width() - Branch device's max DSC line width
2972+
* @dsc_branch_dpcd: DSC branch capabilities from DPCD
2973+
*
2974+
* Return the branch device's maximum overall DSC line width, based on
2975+
* the device's @dsc_branch_dpcd capabilities.
2976+
*
2977+
* Returns:
2978+
* - 0: The maximum line width is not indicated by the device
2979+
* separately and it must be determined from the maximum
2980+
* slice count and slice-width supported by the device.
2981+
* - %-EINVAL: The device indicates an invalid maximum line width
2982+
* (< 5120 pixels).
2983+
* - >= 5120: The maximum line width in pixels.
2984+
*/
2985+
int drm_dp_dsc_branch_max_line_width(const u8 dsc_branch_dpcd[DP_DSC_BRANCH_CAP_SIZE])
2986+
{
2987+
int line_width = dsc_branch_dpcd_cap(dsc_branch_dpcd, DP_DSC_BRANCH_MAX_LINE_WIDTH);
2988+
2989+
switch (line_width) {
2990+
case 0:
2991+
return 0;
2992+
case 1 ... 15:
2993+
return -EINVAL;
2994+
default:
2995+
return line_width * 320;
2996+
}
2997+
}
2998+
EXPORT_SYMBOL(drm_dp_dsc_branch_max_line_width);
2999+
28443000
static int drm_dp_read_lttpr_regs(struct drm_dp_aux *aux,
28453001
const u8 dpcd[DP_RECEIVER_CAP_SIZE], int address,
28463002
u8 *buf, int buf_size)

drivers/gpu/drm/drm_atomic_uapi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
419419
set_out_fence_for_crtc(state->state, crtc, fence_ptr);
420420
} else if (property == crtc->scaling_filter_property) {
421421
state->scaling_filter = val;
422+
} else if (property == crtc->sharpness_strength_property) {
423+
state->sharpness_strength = val;
422424
} else if (crtc->funcs->atomic_set_property) {
423425
return crtc->funcs->atomic_set_property(crtc, state, property, val);
424426
} else {
@@ -456,6 +458,8 @@ drm_atomic_crtc_get_property(struct drm_crtc *crtc,
456458
*val = 0;
457459
else if (property == crtc->scaling_filter_property)
458460
*val = state->scaling_filter;
461+
else if (property == crtc->sharpness_strength_property)
462+
*val = state->sharpness_strength;
459463
else if (crtc->funcs->atomic_get_property)
460464
return crtc->funcs->atomic_get_property(crtc, state, property, val);
461465
else {

drivers/gpu/drm/drm_crtc.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,25 @@ struct dma_fence *drm_crtc_create_fence(struct drm_crtc *crtc)
229229
* Driver's default scaling filter
230230
* Nearest Neighbor:
231231
* Nearest Neighbor scaling filter
232+
* SHARPNESS_STRENGTH:
233+
* Atomic property for setting the sharpness strength/intensity by userspace.
234+
*
235+
* The value of this property is set as an integer value ranging
236+
* from 0 - 255 where:
237+
*
238+
* 0: Sharpness feature is disabled(default value).
239+
*
240+
* 1: Minimum sharpness.
241+
*
242+
* 255: Maximum sharpness.
243+
*
244+
* User can gradually increase or decrease the sharpness level and can
245+
* set the optimum value depending on content.
246+
* This value will be passed to kernel through the UAPI.
247+
* The setting of this property does not require modeset.
248+
* The sharpness effect takes place post blending on the final composed output.
249+
* If the feature is disabled, the content remains same without any sharpening effect
250+
* and when this feature is applied, it enhances the clarity of the content.
232251
*/
233252

234253
__printf(6, 0)
@@ -940,6 +959,22 @@ int drm_crtc_create_scaling_filter_property(struct drm_crtc *crtc,
940959
}
941960
EXPORT_SYMBOL(drm_crtc_create_scaling_filter_property);
942961

962+
int drm_crtc_create_sharpness_strength_property(struct drm_crtc *crtc)
963+
{
964+
struct drm_device *dev = crtc->dev;
965+
struct drm_property *prop =
966+
drm_property_create_range(dev, 0, "SHARPNESS_STRENGTH", 0, 255);
967+
968+
if (!prop)
969+
return -ENOMEM;
970+
971+
crtc->sharpness_strength_property = prop;
972+
drm_object_attach_property(&crtc->base, prop, 0);
973+
974+
return 0;
975+
}
976+
EXPORT_SYMBOL(drm_crtc_create_sharpness_strength_property);
977+
943978
/**
944979
* drm_crtc_in_clone_mode - check if the given CRTC state is in clone mode
945980
*

drivers/gpu/drm/i915/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
1313
# drivers. Define I915 when building i915.
1414
subdir-ccflags-y += -DI915
1515

16+
# FIXME: Disable tracepoints on i915 for PREEMPT_RT, unfortunately
17+
# it's an all or nothing flag. You cannot selectively disable
18+
# only some tracepoints.
19+
subdir-ccflags-$(CONFIG_PREEMPT_RT) += -DNOTRACE
20+
1621
subdir-ccflags-y += -I$(src)
1722

1823
# Please keep these build lists sorted!
@@ -26,6 +31,7 @@ i915-y += \
2631
i915_ioctl.o \
2732
i915_irq.o \
2833
i915_mitigations.o \
34+
i915_mmio_range.o \
2935
i915_module.o \
3036
i915_params.o \
3137
i915_pci.o \
@@ -228,6 +234,7 @@ i915-y += \
228234
display/intel_bios.o \
229235
display/intel_bo.o \
230236
display/intel_bw.o \
237+
display/intel_casf.o \
231238
display/intel_cdclk.o \
232239
display/intel_cmtg.o \
233240
display/intel_color.o \
@@ -236,6 +243,7 @@ i915-y += \
236243
display/intel_crtc.o \
237244
display/intel_crtc_state_dump.o \
238245
display/intel_cursor.o \
246+
display/intel_dbuf_bw.o \
239247
display/intel_display.o \
240248
display/intel_display_conversion.o \
241249
display/intel_display_driver.o \
@@ -248,6 +256,7 @@ i915-y += \
248256
display/intel_display_rpm.o \
249257
display/intel_display_rps.o \
250258
display/intel_display_snapshot.o \
259+
display/intel_display_utils.o \
251260
display/intel_display_wa.o \
252261
display/intel_dmc.o \
253262
display/intel_dmc_wl.o \
@@ -297,9 +306,11 @@ i915-y += \
297306
display/intel_vblank.o \
298307
display/intel_vga.o \
299308
display/intel_wm.o \
309+
display/skl_prefill.o \
300310
display/skl_scaler.o \
301311
display/skl_universal_plane.o \
302312
display/skl_watermark.o \
313+
display/vlv_clock.o \
303314
display/vlv_sideband.o
304315
i915-$(CONFIG_ACPI) += \
305316
display/intel_acpi.o \
@@ -346,6 +357,7 @@ i915-y += \
346357
display/intel_gmbus.o \
347358
display/intel_hdmi.o \
348359
display/intel_lspcon.o \
360+
display/intel_lt_phy.o \
349361
display/intel_lvds.o \
350362
display/intel_panel.o \
351363
display/intel_pfit.o \

drivers/gpu/drm/i915/display/g4x_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "g4x_dp.h"
1313
#include "i915_reg.h"
14-
#include "i915_utils.h"
1514
#include "intel_audio.h"
1615
#include "intel_backlight.h"
1716
#include "intel_connector.h"
@@ -20,6 +19,7 @@
2019
#include "intel_display_power.h"
2120
#include "intel_display_regs.h"
2221
#include "intel_display_types.h"
22+
#include "intel_display_utils.h"
2323
#include "intel_dp.h"
2424
#include "intel_dp_aux.h"
2525
#include "intel_dp_link_training.h"

0 commit comments

Comments
 (0)