]> git.itanic.dy.fi Git - linux-stable/commit
drm/dsc: fix drm_edp_dsc_sink_output_bpp() DPCD high byte usage
authorJani Nikula <jani.nikula@intel.com>
Thu, 6 Apr 2023 13:46:14 +0000 (16:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 12:01:59 +0000 (14:01 +0200)
commit6e6df8bc3dc0187c49e2677340231703be0239cb
treeb2dbf6f3623b1cb53ad845fc66dcb08c740bfafb
parentfb4726500548510cdb5b3d3c8ec5a806ba8f3c54
drm/dsc: fix drm_edp_dsc_sink_output_bpp() DPCD high byte usage

commit 13525645e2246ebc8a21bd656248d86022a6ee8f upstream.

The operator precedence between << and & is wrong, leading to the high
byte being completely ignored. For example, with the 6.4 format, 32
becomes 0 and 24 becomes 8. Fix it, and remove the slightly confusing
and unnecessary DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT macro while at it.

Fixes: 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters")
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: Manasi Navare <navaremanasi@google.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230406134615.1422509-1-jani.nikula@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/drm/display/drm_dp.h
include/drm/display/drm_dp_helper.h