linux-uconsole/include/drm
Ville Syrjälä e00b29d81b UPSTREAM: drm/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference
Rather than using drm_match_cea_mode() to see if the EDID detailed
timings are supposed to represent one of the CEA/HDMI modes, add a
special version of that function that takes in an explicit clock
tolerance value (in kHz). When looking at the detailed timings specify
the tolerance as 5kHz due to the 10kHz clock resolution limit inherent
in detailed timings.

drm_match_cea_mode() uses the normal KHZ2PICOS() matching of clocks,
which only allows smaller errors for lower clocks (eg. for 25200 it
won't allow any error) and a bigger error for higher clocks (eg. for
297000 it actually matches 296913-297000). So it doesn't really match
what we want for the fixup. Using the explicit +-5kHz is much better
for this use case.

Not sure if we should change the normal mode matching to also use
something else besides KHZ2PICOS() since it allows a different
proportion of error depending on the clock. I believe VESA CVT
allows a maximum deviation of .5%, so using that for normal mode
matching might be a good idea?

Change-Id: I824ec50368ddf152c9daa747ba92aaba1ef50f4b
Cc: Adam Jackson <ajax@redhat.com>
Tested-by: nathan.d.ciobanu@linux.intel.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92217
Fixes: fa3a7340ea ("drm/edid: Fix up clock for CEA/HDMI modes specified via detailed timings")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 4c6bcf4454)
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-03 11:39:23 +08:00
..
bridge CHROMIUM: drm: bridge/dw_hdmi: improved the hdmi audio N/CTS cacluate math 2016-07-19 15:24:47 +08:00
i2c
ttm drm/ttm: Make ttm_bo_mem_compat available 2016-07-27 09:47:35 -07:00
ati_pcigart.h
drm_agpsupport.h drm: Remove dummy agp ioctl wrappers 2015-09-30 10:49:22 +02:00
drm_atomic.h drm/atomic: add a drm_atomic_clean_old_fb helper. 2015-11-17 13:02:14 +02:00
drm_atomic_helper.h UPSTREAM: drm/atomic-helper: Implement subsystem-level suspend/resume 2016-08-08 14:39:36 +08:00
drm_cache.h drm: Loongson-3 doesn't fully support wc memory 2016-05-04 14:48:46 -07:00
drm_core.h
drm_crtc.h FROMLIST: drm: edid: HDMI 2.0 HF-VSDB block parsing 2017-02-27 19:07:51 +08:00
drm_crtc_helper.h drm/rockchip: add loader protect ops to drm connector 2016-12-02 17:06:56 +08:00
drm_displayid.h
drm_dp_helper.h Merge commit '06d1ee32a4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2015-10-16 10:25:28 +10:00
drm_dp_mst_helper.h drm/dp/mst: move GUID storage from mgr, port to only mst branch 2016-03-03 15:07:21 -08:00
drm_edid.h FROMLIST: drm: edid: HDMI 2.0 HF-VSDB block parsing 2017-02-27 19:07:51 +08:00
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h drm/fb-helper: atomic restore_fbdev_mode().. 2015-09-16 11:39:26 -07:00
drm_fixed.h drm: Add drm_fixp_from_fraction and drm_fixp2int_ceil 2016-03-03 15:07:20 -08:00
drm_flip_work.h
drm_gem.h drm/gem: Check locking in drm_gem_object_unreference 2015-10-19 11:00:35 +02:00
drm_gem_cma_helper.h
drm_global.h
drm_hashtab.h
drm_legacy.h
drm_mem_util.h drm: use kvfree() in drm_free_large() 2015-06-30 19:44:59 -07:00
drm_mipi_dsi.h UPSTREAM: drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format 2016-03-18 20:44:21 +08:00
drm_mm.h drm/mm: Support 4 GiB and larger ranges 2015-03-05 09:01:37 +10:00
drm_modes.h UPSTREAM: drm/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference 2017-03-03 11:39:23 +08:00
drm_modeset_lock.h UPSTREAM: drm: Implement drm_modeset_lock_all_ctx() 2016-08-08 14:39:25 +08:00
drm_of.h UPSTREAM: drm: add drm_of_encoder_active_endpoint helpers 2016-06-28 18:40:44 +08:00
drm_os_linux.h
drm_panel.h drm/panel: Add display timing support 2015-04-02 19:04:12 +02:00
drm_pciids.h rk: revert to v3.10 2015-11-11 15:57:28 +08:00
drm_plane_helper.h drm/atomic: Make prepare_fb/cleanup_fb only take state, v3. 2015-09-08 13:45:54 +02:00
drm_rect.h
drm_scdc_helper.h FROMLIST: drm: Add SCDC helpers 2017-02-27 19:07:34 +08:00
drm_sync_helper.h CHROMIUM: drm: add helpers for fence and reservation based dma-buf sync 2016-04-08 11:39:49 +08:00
drm_sysfs.h
drm_vma_manager.h drm/gem: Use kref_get_unless_zero for the weak mmap references 2015-10-19 11:00:44 +02:00
drmP.h UPSTREAM: drm: Introduce DRM_DEV_* log messages 2016-12-19 18:06:20 +08:00
exynos_drm.h
gma_drm.h
i915_component.h drm/i915: add kerneldoc for i915_audio_component 2015-10-07 16:05:37 +02:00
i915_drm.h
i915_pciids.h drm/i915/skl: Add missing SKL ids 2016-09-15 08:27:44 +02:00
intel-gtt.h drm/i915/gtt: Allow >= 4GB sizes for vm. 2015-06-26 10:41:13 +02:00