drm: Reject mode set with current fb if no current fb is bound
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Mar 2012 10:35:38 +0000 (12:35 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 15 Mar 2012 09:48:56 +0000 (09:48 +0000)
commit6653cc8d3b8d1c685fbf01cc8a536957045f4609
tree7b42e3c557fff0dec3cc31e70ac91676be1b5f23
parent09016a11fc738e82ca1303e2332473b517bbd660
drm: Reject mode set with current fb if no current fb is bound

When doing a mode set with the special fb id -1, reject the mode set if
no fb is currently bound to the crtc.

Also remove the pointless list traversal to find the current crtc based
on the current crtc :)

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>
drivers/gpu/drm/drm_crtc.c