linux/drivers/gpu/drm
Ville Syrjälä 4e042f0222 drm/dp_mst: Fix fractional DSC bpp handling
[ Upstream commit 7707dd6022 ]

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
..
amd drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
arm drm/komeda: drop all currently held locks if deadlock happens 2023-11-28 17:19:39 +00:00
armada fbdev: Use _IOMEM_ infix for I/O-memory helpers 2023-07-31 20:06:52 +02:00
aspeed drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
ast drm/ast: Disconnect BMC if physical connector is connected 2023-12-03 07:33:06 +01:00
atmel-hlcdc drm: atmel-hlcdc: Support inverting the pixel clock polarity 2023-08-10 08:44:34 +02:00
bridge drm/bridge: ps8640: Fix size mismatch warning w/ len 2024-01-10 17:16:47 +01:00
ci drm: Add initial ci/ subdirectory 2023-08-29 19:56:11 +02:00
display drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2023-08-18 06:42:12 +10:00
exynos drm/exynos: fix a wrong error checking 2024-01-20 11:51:42 +01:00
fsl-dcu drm/fsl-dcu: Convert to platform remove callback returning void 2023-06-08 09:04:10 -07:00
gma500 drm/gma500: Fix call trace when psb_gem_mm_init() fails 2023-11-28 17:19:39 +00:00
gud drm/gud: use vmalloc_array and vcalloc 2023-07-04 12:05:08 +02:00
hisilicon drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
hyperv drm/hyperv: Fix a compilation issue because of not including screen_info.h 2023-07-09 17:00:09 +02:00
i2c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00
i915 drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
imx Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
ingenic drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
kmb
lib
lima drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
logicvc drm/logicvc: Kconfig: select REGMAP and REGMAP_MMIO 2023-10-25 12:05:25 +02:00
loongson drm/loongson: Fix error handling in lsdc_pixel_pll_setup() 2023-11-20 11:59:08 +01:00
mcde drm/mcde: remove redundant of_match_ptr 2023-08-07 22:58:52 +02:00
mediatek drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get 2023-12-20 17:02:02 +01:00
meson drm/meson: fix memory leak on ->hpd_notify callback 2023-09-20 15:44:31 +02:00
mgag200 drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:16:46 +01:00
msm drm/msm/dpu: Add missing safe_lut_tbl in sc8280xp catalog 2023-12-03 07:33:06 +01:00
mxsfb drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
nouveau drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
omapdrm Revert "drm/omapdrm: Annotate dma-fence critical section in commit path" 2024-01-25 15:35:31 -08:00
panel drm/panel: nt36523: fix return value check in nt36523_probe() 2023-12-08 08:52:24 +01:00
panfrost drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
pl111 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
qxl drm/qxl: prevent memory leak 2023-11-28 17:19:47 +00:00
radeon drm/radeon: fix a possible null pointer dereference 2023-11-28 17:19:41 +00:00
renesas drm:rcar-du: Enable ABGR and XBGR formats 2023-08-14 13:47:30 +03:00
rockchip drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full 2023-12-03 07:33:03 +01:00
scheduler dma-buf: add dma_fence_timestamp helper 2023-10-05 11:05:58 +02:00
solomon drm/ssd130x: Fix screen clearing 2023-11-20 11:59:09 +01:00
sprd drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sti drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
stm drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
sun4i This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
tegra fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
tests drm/dp_mst: Fix fractional DSC bpp handling 2024-01-25 15:35:31 -08:00
tidss Revert "drm/tidss: Annotate dma-fence critical section in commit path" 2024-01-25 15:35:31 -08:00
tilcdc drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
tiny drm/tiny: correctly print struct resource * on error 2023-10-12 10:57:07 +02:00
ttm drm/ttm: Reorder sys manager cleanup step 2023-10-16 14:27:27 +02:00
tve200 drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
udl drm/udl: Convert to drm_crtc_helper_atomic_check() 2023-07-29 21:01:27 +02:00
v3d drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout() 2023-07-27 13:01:27 -03:00
vboxvideo drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-11-20 11:59:10 +01:00
vc4 drm/vc4: tests: Fix UAF in the mock helpers 2023-11-20 11:59:37 +01:00
vgem
virtio drm/virtio: clean out_fence on complete_submit 2023-09-21 00:11:24 +03:00
vkms Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit" 2023-09-14 07:48:19 -03:00
vmwgfx drm: Update file owner during use 2024-01-01 12:42:25 +00:00
xen drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
xlnx drm: xlnx: zynqmp_dpsub: Use devm_platform_ioremap_resource_byname() 2023-08-02 01:36:54 +03:00
drm_agpsupport.c
drm_aperture.c
drm_atomic_helper.c drm/atomic-helpers: Invoke end_fb_access while owning plane state 2023-12-13 18:45:25 +01:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm/atomic: log errors in drm_mode_atomic_ioctl() 2023-06-23 16:34:25 +02:00
drm_atomic.c drm/atomic: Fix potential use-after-free in nonblocking commits 2023-07-21 09:53:30 -07:00
drm_auth.c drm: Fix FD ownership check in drm_master_check_perm() 2024-01-01 12:42:25 +00:00
drm_blend.c
drm_bridge_connector.c drm/bridge_connector: Handle drm_connector_init_with_ddc() failures 2023-07-29 20:56:42 +02:00
drm_bridge.c drm/bridge: Add debugfs print for bridge chains 2023-08-02 10:05:01 +02:00
drm_buddy.c drm/buddy: Fix drm buddy info output format 2023-08-09 09:46:05 -04:00
drm_bufs.c
drm_cache.c
drm_client_modeset.c drm/client: Fix memory leak in drm_client_modeset_probe 2023-07-13 15:55:58 +02:00
drm_client.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
drm_color_mgmt.c
drm_connector.c One doc fix for drm/connector, one fix for amdgpu for an crash when 2023-09-14 14:00:51 +02:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c drm/crtc: fix uninitialized variable use 2024-01-20 11:51:47 +01:00
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c drm: Update file owner during use 2024-01-01 12:42:25 +00:00
drm_displayid.c
drm_dma.c
drm_drv.c drm/drv: use enum drm_minor_type when appropriate 2023-07-17 10:40:07 +02:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: also call add modes in EDID connector update fallback 2023-12-20 17:02:04 +01:00
drm_encoder_slave.c
drm_encoder.c
drm_exec.c drm/drm_exec: Work around a WW mutex lockdep oddity 2023-09-07 10:30:12 +02:00
drm_fb_dma_helper.c
drm_fb_helper.c tty: sysrq: switch sysrq handlers from int to u8 2023-07-25 19:21:03 +02:00
drm_fbdev_dma.c fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
drm_fbdev_generic.c fbdev: Align deferred I/O with naming of helpers 2023-07-31 20:07:24 +02:00
drm_file.c drm: Update file owner during use 2024-01-01 12:42:25 +00:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c
drm_gem_atomic_helper.c
drm_gem_dma_helper.c
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Consistenly use drm_dbg_kms() 2023-07-28 11:46:02 +02:00
drm_gem_shmem_helper.c Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c drm/vram-helper: fix function names in vram helper doc 2023-05-08 09:16:18 +02:00
drm_gem.c drm: Do not overrun array in drm_gem_get_pages() 2023-10-12 10:44:06 +02:00
drm_gpuva_mgr.c drm/gpuva_mgr: remove unused prev pointer in __drm_gpuva_sm_map() 2023-08-24 14:27:14 +02:00
drm_hashtab.c
drm_internal.h drm/syncobj: add IOCTL to register an eventfd 2023-07-20 12:01:03 +02:00
drm_ioc32.c
drm_ioctl.c drm: Update file owner during use 2024-01-01 12:42:25 +00:00
drm_irq.c
drm_kms_helper_common.c
drm_lease.c drm_lease.c: copy user-array safely 2023-11-28 17:19:40 +00:00
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_managed.c Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
drm_memory.c
drm_mipi_dbi.c drm/mipi-dbi: Lock SPI bus before setting D/C GPIO 2023-08-02 13:18:07 +02:00
drm_mipi_dsi.c Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
drm_mm.c
drm_mode_config.c
drm_mode_object.c drm/kms: log when querying an object not included in lease 2023-06-23 16:38:00 +02:00
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for One Mix 2S 2023-10-03 12:06:08 +01:00
drm_panel.c drm/panel: Add a way for other devices to follow panel state 2023-08-01 07:38:13 -07:00
drm_pci.c
drm_plane_helper.c drm: Remove references to removed transitional helpers 2023-07-29 21:25:16 +02:00
drm_plane.c
drm_prime.c Revert "drm/prime: Unexport helpers for fd/handle conversion" 2024-01-20 11:51:39 +01:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm: Add an HPD poll helper to reschedule the poll work 2023-08-23 17:14:37 -04:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE 2023-11-20 11:59:37 +01:00
drm_sysfs.c drm/sysfs: rename drm_sysfs_connector_status_event() 2023-06-23 15:54:00 +02:00
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c
drm_vm.c
drm_vma_manager.c
drm_writeback.c
Kconfig drm: fix up fbdev Kconfig defaults 2023-09-18 10:52:55 +02:00
Makefile drm: manager to keep track of GPUs VA mappings 2023-07-20 05:15:53 +02:00