OpenCloudOS-Kernel/drivers/gpu/drm/display
Ville Syrjälä 4e042f0222 drm/dp_mst: Fix fractional DSC bpp handling
[ Upstream commit 7707dd6022593f3edd8e182e7935870cf326f874 ]

The current code does '(bpp << 4) / 16' in the MST PBN
calculation, but that is just the same as 'bpp' so the
DSC codepath achieves absolutely nothing. Fix it up so that
the fractional part of the bpp value is actually used instead
of truncated away. 64*1006 has enough zero lsbs that we can
just shift that down in the dividend and thus still manage
to stick to a 32bit divisor.

And while touching this, let's just make the whole thing more
straightforward by making the passed in bpp value .4 binary
fixed point always, instead of having to pass in different
things based on whether DSC is enabled or not.

v2:
- Fix DSC kunit test cases.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: David Francis <David.Francis@amd.com>
Cc: Mikita Lipski <mikita.lipski@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Fixes: dc48529fb1 ("drm/dp_mst: Add PBN calculation for DSC modes")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[Imre: Fix kunit test cases]
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-3-imre.deak@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:31 -08:00
..
Kconfig drm/display: Fix build error without CONFIG_OF 2022-06-23 16:18:02 +02:00
Makefile drm: split build lists one per line and sort 2022-10-12 17:00:05 +03:00
drm_display_helper_mod.c
drm_dp_aux_bus.c driver core: make struct device_type.uevent() take a const * 2023-01-27 13:45:36 +01:00
drm_dp_aux_dev.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
drm_dp_cec.c
drm_dp_dual_mode_helper.c drm/display: Don't assume dual mode adaptors support i2c sub-addressing 2022-11-15 23:31:02 +02:00
drm_dp_helper.c drm/display/dp_mst: Replace all non-returning strlcpy with strscpy 2023-06-01 07:07:36 -07:00
drm_dp_helper_internal.h
drm_dp_mst_topology.c drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
drm_dp_mst_topology_internal.h
drm_dsc_helper.c drm/display/dsc: Add drm_dsc_get_bpp_int helper 2023-06-15 12:58:56 +03:00
drm_hdcp_helper.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_hdmi_helper.c drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF 2023-03-07 15:54:18 -05:00
drm_scdc_helper.c drm/scdc-helper: Pimp SCDC debugs 2023-04-06 01:30:12 +03:00