Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/dp: Fail state computation for invalid min/max link BPP values

Make sure that state computation fails if the minimum/maximum link BPP
values got invalid as a result of limiting both of these values
separately to the corresponding source/sink capability limits.

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20251215192357.172201-14-imre.deak@intel.com

Imre Deak 2018e291 3755e200

+6 -1
+6 -1
drivers/gpu/drm/i915/display/intel_dp.c
··· 2646 2646 limits->link.max_bpp_x16 = max_link_bpp_x16; 2647 2647 2648 2648 drm_dbg_kms(display->drm, 2649 - "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d max link_bpp " FXP_Q4_FMT "\n", 2649 + "[ENCODER:%d:%s][CRTC:%d:%s] DP link limits: pixel clock %d kHz DSC %s max lanes %d max rate %d max pipe_bpp %d min link_bpp " FXP_Q4_FMT " max link_bpp " FXP_Q4_FMT "\n", 2650 2650 encoder->base.base.id, encoder->base.name, 2651 2651 crtc->base.base.id, crtc->base.name, 2652 2652 adjusted_mode->crtc_clock, ··· 2654 2654 limits->max_lane_count, 2655 2655 limits->max_rate, 2656 2656 limits->pipe.max_bpp, 2657 + FXP_Q4_ARGS(limits->link.min_bpp_x16), 2657 2658 FXP_Q4_ARGS(limits->link.max_bpp_x16)); 2659 + 2660 + if (limits->link.min_bpp_x16 <= 0 || 2661 + limits->link.min_bpp_x16 > limits->link.max_bpp_x16) 2662 + return false; 2658 2663 2659 2664 return true; 2660 2665 }