From: Ville Syrjälä Date: Mon, 2 Feb 2015 17:13:57 +0000 (+0200) Subject: drm/modes: Print the mode status in human readable form X-Git-Tag: fixes-v4.0-rc1~91^2~6^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f79d1548b0fea94f2ccf089e49480da5202918bc;p=pandora-kernel.git drm/modes: Print the mode status in human readable form Currently when a mode is rejected the reason is printed as a raw number. Having to manually decode that to a enum drm_mode_status value is tiresome. Have the code do the decoding instead and print the result in a human readable format. Just having an array of strings indexed with the mode status doesn't work since the enum includes negative values. So we offset the status by +3 which makes all the indexes non-negative. Also add a bit of paranoia into the code to catch out of bounds accesses in case someone adds more enum values but forgets to update the code. Signed-off-by: Ville Syrjälä Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed