linux/drivers/gpu/drm
Ville Syrjälä c2b6337446 drm/i915: Enable DPLL VGA mode before P1/P2 divider write
Apparently writing the DPLL register P1/P2 divider fields won't trigger
an actual change in the DPLL output unless VGA mode is enabled for
prior to the register write that changes the P1/P2 dividers. The write
with the new P1/P2 divider can itself disable VGA mode again without
problems.

I tested the behaviour on my 946GZ, and when manually frobbing the
register with the display on, the behaviour is very clear. However I
can't explain why this machine actually works. The P1/P2 divider
changes caused by normal modesets do seem to make it through to the
hardware somehow since I get a stable picture on the monitor with
any resolution. Maybe it's the "three times for luck" stuff that
somehow masks the problem, or something.

But apparently there are machines (eg. Nick Bowler's G45) where that
isn't the case and we fail to get the correct clock from the DPLL.

Things used to work because we enabled VGA mode for disabled DPLLs,
so when re-enabling the DPLL VGA mode was enabled just prior to the
first register write, and hence the P1/P2 change went through without
a hitch. That got changed in

b8afb9113c drm/i915: Keep GMCH DPLL VGA mode always disabled

in the name of consistency. In order to keep the consistency part,
leave VGA mode disabled for disabled DPLLs, but turn it on just prior
to updating the P1/P2 dividers to make sure the hardware picks up
on the new values.

Cc: Nick Bowler <nbowler@draconx.ca>
Reported-by: Nick Bowler <nbowler@draconx.ca>
Tested-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-10-13 17:03:38 +03:00
..
amd drm/amdgpu: only print meaningful VM faults 2015-09-30 12:47:14 -04:00
armada drm/armada: Use new drm_fb_helper functions 2015-08-06 14:12:56 +02:00
ast drm/ast: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:36:55 +02:00
atmel-hlcdc Linux 4.2-rc8 2015-08-24 16:36:42 +10:00
bochs drm/bochs: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:04 +02:00
bridge Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-08-27 13:01:57 +10:00
cirrus drm/cirrus: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:27 +02:00
exynos drm/exynos: Staticize local function in exynos_drm_gem.c 2015-10-01 14:29:51 +09:00
fsl-dcu drm/layerscape: fix handling fsl_dcu_drm_plane_index result 2015-09-24 08:13:09 +10:00
gma500 drm/gma500: Use new drm_fb_helper functions 2015-08-06 14:12:59 +02:00
i2c Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next 2015-08-30 15:55:54 +01:00
i810
i915 drm/i915: Enable DPLL VGA mode before P1/P2 divider write 2015-10-13 17:03:38 +03:00
imx Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-08-27 13:01:57 +10:00
mga
mgag200 drm/mgag200: Fix driver_load error handling 2015-09-24 08:10:44 +10:00
msm gpu/drm: Kill off set_irq_flags usage 2015-09-16 16:53:38 +02:00
nouveau Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2015-09-11 09:35:56 -07:00
omapdrm drm/omap: Use new drm_fb_helper functions 2015-08-06 14:13:03 +02:00
panel drm/panel: Add support for LG LG4573 480x800 4.3" panel 2015-08-14 21:35:35 +02:00
qxl drm/qxl: recreate the primary surface when the bo is not primary 2015-10-01 13:57:21 +10:00
r128
radeon drm/dp/mst: split connector registration into two parts (v2) 2015-10-02 15:34:41 +10:00
rcar-du drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
rockchip drm/rockchip: vop: support plane scale 2015-08-26 14:16:26 +08:00
savage
shmobile drm: Simplify drm_for_each_legacy_plane arguments 2015-07-22 16:25:45 +02:00
sis
sti Merge branch 'drm-sti-next-atomic-2015-08-11' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next 2015-08-14 10:14:23 +10:00
tdfx
tegra drm/tegra: Changes for v4.3-rc1 2015-08-17 15:52:39 +10:00
tilcdc drm/tilcdc: panel: make better use of gpiod API 2015-07-06 10:10:21 +02:00
ttm drm/ttm: Fix memory space allocation v2 2015-09-15 00:57:01 -07:00
udl drm/udl: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
vgem mm: mark most vm_operations_struct const 2015-09-10 13:29:01 -07:00
via treewide: fix typos in comment blocks 2015-08-07 14:46:24 +02:00
virtio drm/virtio: Use new drm_fb_helper functions 2015-08-06 14:13:07 +02:00
vmwgfx Merge tag 'vmwgfx-fixes-4.3-151001' of git://people.freedesktop.org/~thomash/linux into drm-fixes 2015-10-02 10:46:51 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-09-04 15:49:32 -07:00
drm_atomic.c drm/atomic: Fix bookkeeping with TEST_ONLY, v3. 2015-09-01 11:57:06 +03:00
drm_auth.c
drm_bridge.c drm/DocBook: Add more drm_bridge documentation 2015-05-21 13:56:51 +02:00
drm_bufs.c
drm_cache.c drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range() 2015-06-19 17:25:17 +02:00
drm_context.c drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_crtc_helper.c drm: Make the connector dpms callback return a value, v2. 2015-07-27 16:23:28 +02:00
drm_crtc_internal.h
drm_crtc.c Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/dp: Add dp_aux_i2c_speed_khz module param to set the assume i2c bus speed 2015-09-02 16:13:43 +03:00
drm_dp_mst_topology.c drm/dp/mst: add some defines for logical/physical ports 2015-10-02 15:34:42 +10:00
drm_drv.c Merge tag 'topic/connector-locking-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:30:29 +10:00
drm_edid_load.c
drm_edid.c drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid 2015-08-11 12:04:16 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/fb_cma_helper: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
drm_fb_helper.c drm: handle cursor_set2 in restore_fbdev_mode 2015-10-02 15:30:41 +10:00
drm_flip_work.c
drm_fops.c drm/mode: Add user blob-creation ioctl 2015-05-22 16:18:28 +02:00
drm_gem_cma_helper.c drm/cma-helper: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:36 +02:00
drm_gem.c drm/gem: Be more friendly with locking checks 2015-08-10 13:35:49 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c Merge tag 'topic/drm-misc-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:28:16 +10:00
drm_ioctl.c drm: Allow also control clients to check the drm version 2015-09-24 00:24:24 -07:00
drm_irq.c Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
drm_legacy.h drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_lock.c drm: Reject DRI1 hw lock ioctl functions for kms drivers 2015-07-02 17:00:48 +02:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: clean up drm_mm debugfs output 2015-05-29 09:17:57 +10:00
drm_modes.c drm/mode: Unstatic kernel-userspace mode conversion 2015-05-22 16:18:21 +02:00
drm_modeset_lock.c drm: Remove __drm_modeset_lock_all 2015-08-06 14:13:02 +02:00
drm_of.c drm: Add modeset object iterators 2015-07-22 16:25:45 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
drm_platform.c
drm_prime.c drm: prime: Document gem_prime_mmap 2015-06-19 17:50:05 +02:00
drm_probe_helper.c drm: Add a non-locking version of drm_kms_helper_poll_enable(), v2 2015-09-30 16:04:08 +03:00
drm_rect.c
drm_scatter.c
drm_sysfs.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-06-26 13:18:51 -07:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig Merge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu into drm-next 2015-08-20 14:11:17 +10:00
Makefile drm/layerscape: Add Freescale DCU DRM driver 2015-08-19 22:23:04 -04:00