drm: Fix drm_mode_attachmode_crtc()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Mar 2012 14:46:11 +0000 (16:46 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:39 +0000 (12:30 +0300)
commitffb7f6d0982e92315053b45d1ff028e72c85d549
tree5d4add3fbd8e6e96d8d6ecd8562bda32290777e0
parente0fc63cafda590558737c7a7d26526eca99afaea
drm: Fix drm_mode_attachmode_crtc()

Change drm_mode_attachmode_crtc() to take an "all or nothing" approach.
If an error is returned, there are no side effects visible.

Also change the function to always duplicate the mode passed in.

Also change the function to not give up when it finds the first
connector without and encoder.

A simpler approach would be to just remove the function completely as
it's unused currently.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_crtc.h