]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Simplify and defend later checks when disabling a crtc
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 31 Jan 2011 11:16:33 +0000 (11:16 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 31 Jan 2011 12:36:33 +0000 (12:36 +0000)
commita040e936d7efb3c320b9b4102c9934af33ba68c4
treedda9eb0628576ad239f1315d05e94359db1f4770
parent4afc95587e8feb860d22fbae6833827aa1c58077
drm: Simplify and defend later checks when disabling a crtc

By setting the FB of a CRTC to NULL, we are turning off the CRTC (and so
disable the unused encoders and connectors). As such we can simplify the
later tests by making sure the set->mode is NULL. Setting the
num_connectors to zero means that we do not need to loop over the unused
connectors.

All current usage appears correct, this only builds additional defense
into the routine.

References: https://bugzilla.kernel.org/show_bug.cgi?id=27722
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/drm_crtc_helper.c