]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Add and connect CRTC helper functions
authorSinclair Yeh <syeh@vmware.com>
Thu, 23 Mar 2017 20:14:54 +0000 (13:14 -0700)
committerSinclair Yeh <syeh@vmware.com>
Fri, 31 Mar 2017 20:36:11 +0000 (13:36 -0700)
commit0372f65bf6b1314bf784fb2ddd368732c22dd1a1
tree8e38f19c07d6ae63aafb371a0d02479582d8f57e
parente60e4ca404346ee02ffd0d1eabf1643ab8a09e5f
drm/vmwgfx: Add and connect CRTC helper functions

Atomic mode set requires us to refactor existing vmw_stdu_crtc_set_config
code into sections that check the validity of the new mode, and sections
that actually program the hardware state.

vmw_du_crtc_atomic_check() takes CRTC-related checking code.  In a later
patch, vmw_du_primary_plane_atomic_check() will take framebuffer-related
checking code.

These helpers won't be called until we flip on the atomic support
flag or set drm_crtc_funcs->set_config to using the atomic
helper.

v2:
* The state->num_connector is actually the total number of potential
  connectors, not just the one associated with the display unit.
  The proper one to check is ->connector_mask.

* Add the check to only allow plane state to be the same as crtc state
  (Thanks to mlankhorst)

* Make sure to turn on SVGA mode before using VRAM.  SVGA mode is
  disabled in master_drop if dbdev is not running.

v3:
* Moved dot clock override to crtc_atomic_check

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c