linux_dsm_epyc7002/drivers/gpu/drm
Maarten Lankhorst cffb4c3ea3 drm/i915/dp: Fix dsc bpp calculations, v5.
There was a integer wraparound when mode_clock became too high,
and we didn't correct for the FEC overhead factor when dividing,
with the calculations breaking at HBR3.

As a result our calculated bpp was way too high, and the link width
limitation never came into effect.

Print out the resulting bpp calcululations as a sanity check, just
in case we ever have to debug it later on again.

We also used the wrong factor for FEC. While bspec mentions 2.4%,
all the calculations use 1/0.972261, and the same ratio should be
applied to data M/N as well, so use it there when FEC is enabled.

This fixes the FIFO underrun we are seeing with FEC enabled.

Changes since v2:
- Handle fec_enable in intel_link_compute_m_n, so only data M/N is adjusted. (Ville)
- Fix initial hardware readout for FEC. (Ville)
Changes since v3:
- Remove bogus fec_to_mode_clock. (Ville)
Changes since v4:
- Use the correct register for icl. (Ville)
- Split hw readout to a separate patch.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: d9218c8f6c ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC")
Cc: <stable@vger.kernel.org> # v5.0+
Cc: Manasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit ed06efb801)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2019-10-02 22:20:22 -07:00
..
amd drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
arc
arm drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
armada drm/armada: drop use of drmP.h 2019-08-14 18:31:10 +02:00
aspeed drm/aspeed: gfc_crtc: Make structure aspeed_gfx_funcs constant 2019-08-14 19:27:26 +02:00
ast drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
atmel-hlcdc
bochs
bridge drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
cirrus
etnaviv drm/etnaviv: fix missing unlock on error in etnaviv_iommuv1_context_alloc() 2019-09-02 12:48:55 +02:00
exynos drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
fsl-dcu drm/fsl-dcu: fix opencoded use of drm_panel_* 2019-08-10 15:41:48 +02:00
gma500
hisilicon drm-misc-next for 5.4: 2019-08-27 17:21:04 +10:00
i2c drm/i2c/tda998x: drop use of drmP.h 2019-08-14 18:30:52 +02:00
i810
i915 drm/i915/dp: Fix dsc bpp calculations, v5. 2019-10-02 22:20:22 -07:00
imx drm/imx: IPUv3 image converter fixes and improvements 2019-08-27 16:52:12 +10:00
ingenic drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
lib
lima drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
mcde drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
mediatek drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
meson drm: meson: use match data to detect vpu compatibility 2019-08-22 17:54:05 +02:00
mga
mgag200
msm drm/msm: Use the correct dma_sync calls harder 2019-09-04 10:05:05 -07:00
mxsfb dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
nouveau drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
omapdrm drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
panel drm/panel: tpo-td043mtea1: remove redundant assignment 2019-08-17 16:53:55 +02:00
panfrost drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
pl111 drm/pl111: Support grayscale 2019-08-09 09:15:05 +02:00
qxl drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
r128
radeon drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
rcar-du drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
rockchip drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
savage
scheduler drm/scheduler: use job count instead of peek 2019-08-15 10:52:10 -05:00
selftests drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
shmobile
sis
sti
stm
sun4i drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
tdfx
tegra drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
tilcdc
tiny drm: gm12u320: Add -ENODEV to list of errors to ignore 2019-08-12 21:30:21 +02:00
ttm drm-misc-next for 5.4: 2019-08-21 16:44:41 +10:00
tve200
udl
v3d dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
vboxvideo drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-18 12:52:52 +02:00
vc4 drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
vgem dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
via drivers/gpu/drm/via: convert put_page() to put_user_page*() 2019-09-24 15:54:08 -07:00
virtio drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
vkms
vmwgfx drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
xen drm/xen-front: Make structure fb_funcs constant 2019-08-19 08:32:52 +03:00
zte
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm: Measure Self Refresh Entry/Exit times to avoid thrashing 2019-09-19 10:03:32 -04:00
drm_atomic_state_helper.c drm/atomic: Rename crtc_state->pageflip_flags to async_flip 2019-09-18 18:43:36 +02:00
drm_atomic_uapi.c drm/atomic: Reject FLIP_ASYNC unconditionally 2019-09-18 18:42:57 +02:00
drm_atomic.c
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_client_modeset.c
drm_client.c
drm_color_mgmt.c
drm_connector.c drm: Fix kerneldoc warns in connector-related docs 2019-08-12 10:16:39 -04:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: Remove bridge support from legacy helpers 2019-08-16 15:50:27 +03:00
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c
drm_drv.c drm/kms: Duct-tape for mode object lifetime checks 2019-09-18 11:27:18 +02:00
drm_dsc.c
drm_dumb_buffers.c Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()" 2019-08-07 11:56:48 -04:00
drm_edid_load.c
drm_edid.c
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c
drm_fb_helper.c
drm_file.c
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
drm_gem_shmem_helper.c drm/shmem: Use mutex_trylock in drm_gem_shmem_purge 2019-08-28 10:02:39 -05:00
drm_gem_vram_helper.c
drm_gem.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
drm_hashtab.c
drm_hdcp.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm/atomic: Take the atomic toys away from X 2019-09-18 18:42:21 +02:00
drm_irq.c
drm_kms_helper_common.c drm: fix module name in edid_firmware log message 2019-08-22 10:41:06 +03:00
drm_lease.c
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dbi.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c drm/kms: Duct-tape for mode object lifetime checks 2019-09-18 11:27:18 +02:00
drm_modes.c drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel_orientation_quirks.c
drm_panel.c drm/panel: drop return code from drm_panel_detach() 2019-08-10 15:41:48 +02:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c
drm_print.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_self_refresh_helper.c drm: Measure Self Refresh Entry/Exit times to avoid thrashing 2019-09-19 10:03:32 -04:00
drm_simple_kms_helper.c
drm_syncobj.c drm/syncobj: Add better overview documentation for syncobj (v2) 2019-08-12 16:58:52 +02:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank.c
drm_vm.c
drm_vma_manager.c
drm_vram_helper_common.c
drm_vram_mm_helper.c
drm_writeback.c
Kconfig drm-misc-next for 5.4: 2019-08-09 16:04:31 +10:00
Makefile drm/amd: remove meaningless descending into amd/amdkfd/ 2019-08-27 10:09:12 -05:00