linux/drivers/gpu/drm
Ville Syrjälä be8719a610 drm: Don't overwrite UNVERFIED mode status to OK
The way the mode probing works is this:
1. All modes currently on the mode list are marked as UNVERIFIED
2. New modes are on the probed_modes list (they start with
   status OK)
3. Modes are moved from the probed_modes list to the actual
   mode list. If a mode already on the mode list is deemed
   to match one of the probed modes, the duplicate is dropped
   and the mode status updated to OK. After this the
   probed_modes list will be empty.
4. All modes on the mode list are verified to not violate any
   constraints. Any that do are marked as such.
5. Any mode left with a non-OK status is pruned from the list,
   with an appropriate debug message.

What all this means is that any mode on the original list that
didn't have a duplicate on the probed_modes list, should be left
with status UNVERFIED (or previously could have been left with
some other status, but never OK).

I broke that in
commit 05acaec334 ("drm: Reorganize probed mode validation")
by always assigning something to the mode->status during the validation
step. So any mode from the old list that still passed the validation
would be left on the list with status OK in the end.

Fix this by not doing the basic mode validation unless the mode
already has status OK (meaning it came from the probed_modes list,
or at least a duplicate of it was on that list). This way we will
correctly prune away any mode from the old mode list that didn't
appear on the probed_modes list.

Cc: stable@vger.kernel.org
Cc: Adam Jackson <ajax@redhat.com>
Fixes: 05acaec334 ("drm: Reorganize probed mode validation")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1449177255-9515-2-git-send-email-ville.syrjala@linux.intel.com
Testcase: igt/kms_force_connector_basic/prune-stale-modes
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93332
[danvet: Also applying to drm-misc to avoid too much conflict hell -
there's a big pile of patches from Ville on top of this one.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-12-11 09:21:02 +01:00
..
amd drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
armada drm: Pass 'name' to drm_universal_plane_init() 2015-12-11 09:13:10 +01:00
ast drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
atmel-hlcdc drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
bochs drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
bridge drm/panel: Changes for v4.4-rc1 2015-11-05 11:07:13 +10:00
cirrus drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
exynos drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
fsl-dcu drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
gma500 drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
i2c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
i810
i915 drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
imx drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
mga
mgag200 drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
msm drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
nouveau drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
omapdrm drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
panel spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
qxl drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
r128
radeon drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
rcar-du drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
rockchip drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
savage
shmobile drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
sis
sti drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
tdfx
tegra drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
tilcdc drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
ttm
udl drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
vc4 drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
vgem
via
virtio drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
vmwgfx drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm: Add plane->name and use it in debug prints 2015-12-11 09:13:53 +01:00
drm_atomic.c drm: Add plane->name and use it in debug prints 2015-12-11 09:13:53 +01:00
drm_auth.c
drm_bridge.c drm/bridge: Improve kerneldoc 2015-12-08 16:07:53 +01:00
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c drm: Add crtc->name and use it in debug messages 2015-12-11 09:13:48 +01:00
drm_crtc_internal.h
drm_crtc.c drm: Add plane->name and use it in debug prints 2015-12-11 09:13:53 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c
drm_dp_mst_topology.c drm: fix mutex leak in drm_dp_get_mst_branch_device 2015-10-22 08:29:08 +10:00
drm_drv.c drm: Fix an unwanted master inheritance v2 2015-12-04 12:28:14 +10:00
drm_edid_load.c
drm_edid.c drm/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference 2015-12-01 07:57:14 +01:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
drm_fb_helper.c drm/core: Fix old_fb handling in pan_display_atomic. 2015-11-17 13:02:14 +02:00
drm_flip_work.c
drm_fops.c Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
drm_gem_cma_helper.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
drm_gem.c drm/gem: Update/Polish docs 2015-11-24 11:41:49 +01:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c drm/nouveau: Fix pre-nv50 pageflip events (v4) 2015-12-04 13:49:38 +10:00
drm_legacy.h
drm_lock.c signals: kill block_all_signals() and unblock_all_signals() 2015-11-06 17:50:42 -08:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_modes.c drm: Move drm_display_mode an related docs into kerneldoc 2015-12-09 09:29:36 +01:00
drm_modeset_lock.c drm: Implement drm_modeset_lock_all_ctx() 2015-12-02 23:10:59 +01:00
drm_of.c drm: Introduce generic probe function for component based masters. 2015-10-20 12:01:29 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm: Pass 'name' to drm_universal_plane_init() 2015-12-11 09:13:10 +01:00
drm_platform.c
drm_prime.c
drm_probe_helper.c drm: Don't overwrite UNVERFIED mode status to OK 2015-12-11 09:21:02 +01:00
drm_rect.c drm: Add "prefix" parameter to drm_rect_debug_print() 2015-11-24 11:47:46 +01:00
drm_scatter.c
drm_sysfs.c drm/sysfs: Send out uevent when connector->force changes 2015-11-24 11:49:34 +01:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig drm/vc4: Add KMS support for Raspberry Pi. 2015-10-21 10:33:12 +01:00
Makefile Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into drm-next 2015-10-22 10:31:17 +10:00