https://github.com/torvalds/linux
Revision cffb4c3ea37248c4fc2f4ce747e5c24af88aec76 authored by Maarten Lankhorst on 25 September 2019, 08:21:09 UTC, committed by Rodrigo Vivi on 03 October 2019, 05:20:22 UTC
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: d9218c8f6cf4 ("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 ed06efb801bd291e935238d3fba46fa03d098f0e)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 54ecb8f
History
Tip revision: cffb4c3ea37248c4fc2f4ce747e5c24af88aec76 authored by Maarten Lankhorst on 25 September 2019, 08:21:09 UTC
drm/i915/dp: Fix dsc bpp calculations, v5.
Tip revision: cffb4c3
File Mode Size
partitions
Kconfig -rw-r--r-- 6.2 KB
Kconfig.iosched -rw-r--r-- 1.3 KB
Makefile -rw-r--r-- 1.5 KB
badblocks.c -rw-r--r-- 14.1 KB
bfq-cgroup.c -rw-r--r-- 36.9 KB
bfq-iosched.c -rw-r--r-- 235.2 KB
bfq-iosched.h -rw-r--r-- 36.2 KB
bfq-wf2q.c -rw-r--r-- 52.4 KB
bio-integrity.c -rw-r--r-- 12.3 KB
bio.c -rw-r--r-- 54.0 KB
blk-cgroup.c -rw-r--r-- 47.0 KB
blk-core.c -rw-r--r-- 48.6 KB
blk-exec.c -rw-r--r-- 2.6 KB
blk-flush.c -rw-r--r-- 14.5 KB
blk-integrity.c -rw-r--r-- 11.6 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-iocost.c -rw-r--r-- 66.9 KB
blk-iolatency.c -rw-r--r-- 28.0 KB
blk-lib.c -rw-r--r-- 10.2 KB
blk-map.c -rw-r--r-- 6.0 KB
blk-merge.c -rw-r--r-- 23.9 KB
blk-mq-cpumap.c -rw-r--r-- 2.2 KB
blk-mq-debugfs-zoned.c -rw-r--r-- 435 bytes
blk-mq-debugfs.c -rw-r--r-- 24.4 KB
blk-mq-debugfs.h -rw-r--r-- 2.7 KB
blk-mq-pci.c -rw-r--r-- 1.3 KB
blk-mq-rdma.c -rw-r--r-- 1.3 KB
blk-mq-sched.c -rw-r--r-- 14.1 KB
blk-mq-sched.h -rw-r--r-- 2.5 KB
blk-mq-sysfs.c -rw-r--r-- 8.4 KB
blk-mq-tag.c -rw-r--r-- 15.1 KB
blk-mq-tag.h -rw-r--r-- 2.3 KB
blk-mq-virtio.c -rw-r--r-- 1.3 KB
blk-mq.c -rw-r--r-- 86.0 KB
blk-mq.h -rw-r--r-- 7.8 KB
blk-pm.c -rw-r--r-- 6.6 KB
blk-pm.h -rw-r--r-- 1.4 KB
blk-rq-qos.c -rw-r--r-- 6.9 KB
blk-rq-qos.h -rw-r--r-- 5.0 KB
blk-settings.c -rw-r--r-- 28.0 KB
blk-softirq.c -rw-r--r-- 3.7 KB
blk-stat.c -rw-r--r-- 4.6 KB
blk-stat.h -rw-r--r-- 4.6 KB
blk-sysfs.c -rw-r--r-- 26.4 KB
blk-throttle.c -rw-r--r-- 67.9 KB
blk-timeout.c -rw-r--r-- 3.8 KB
blk-wbt.c -rw-r--r-- 19.9 KB
blk-wbt.h -rw-r--r-- 2.9 KB
blk-zoned.c -rw-r--r-- 13.1 KB
blk.h -rw-r--r-- 10.7 KB
bounce.c -rw-r--r-- 9.3 KB
bsg-lib.c -rw-r--r-- 9.8 KB
bsg.c -rw-r--r-- 11.1 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 10.9 KB
elevator.c -rw-r--r-- 18.6 KB
genhd.c -rw-r--r-- 50.5 KB
ioctl.c -rw-r--r-- 15.4 KB
ioprio.c -rw-r--r-- 5.1 KB
kyber-iosched.c -rw-r--r-- 27.8 KB
mq-deadline.c -rw-r--r-- 20.6 KB
opal_proto.h -rw-r--r-- 9.3 KB
partition-generic.c -rw-r--r-- 17.4 KB
scsi_ioctl.c -rw-r--r-- 18.5 KB
sed-opal.c -rw-r--r-- 58.2 KB
t10-pi.c -rw-r--r-- 7.7 KB

back to top