mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/i915/display: harden masks in HSW_AUD_PIN_ELD_CP_VLD macros
HSW_AUD_PIN_ELD_CP_VLD has a 4-bit field per transcoder for TRANSCODER_A..TRANSCODER_D only (bits 0..15). Any other transcoder value (TRANSCODER_EDP, TRANSCODER_DSI_*, INVALID_TRANSCODER) is not valid here. This is not a problem with the current implementation, because trans is always valid when these macros are called, but it's more robust to mask the index to the low 2 bits so the shift is always well-defined. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Link: https://patch.msgid.link/20260609095525.570614-2-luciano.coelho@intel.com Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
eaed815ca3
commit
e26c92e712
1 changed files with 12 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue