]> git.baikalelectronics.ru Git - kernel.git/commit
drm/dp: Split drm_dp_mst_allocate_vcpi
authorPandiyan, Dhinakaran <dhinakaran.pandiyan@intel.com>
Thu, 16 Mar 2017 07:10:26 +0000 (00:10 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Mar 2017 20:47:44 +0000 (21:47 +0100)
commit353d6e122702c5d32f4ad3ad4b37e1ffd8db8594
treeea9ece0eeb34cfd1a0392faa0b5b680fa8c7df1c
parenta94c615f6fd0f3f802be2e6e63a512d02b304cf3
drm/dp: Split drm_dp_mst_allocate_vcpi

drm_dp_mst_allocate_vcpi() apart from setting up the vcpi structure,
also finds if there are enough slots available. This check is a duplicate
of that implemented in drm_dp_mst_find_vcpi_slots(). Let's move this check
out and reuse the existing drm_dp_mst_find_vcpi_slots() function to check
if there are enough vcpi slots before allocating them.

This brings the check to one place. Additionally drivers that will use MST
state tracking for atomic modesets can use the atomic version of
find_vcpi_slots() and reuse drm_dp_mst_allocate_vcpi()

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-4-git-send-email-dhinakaran.pandiyan@intel.com
drivers/gpu/drm/drm_dp_mst_topology.c
drivers/gpu/drm/i915/intel_dp_mst.c
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/radeon/radeon_dp_mst.c
include/drm/drm_dp_mst_helper.h