]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/drm_edid.c
Merge tag 'trace-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[karo-tx-linux.git] / drivers / gpu / drm / drm_edid.c
index e8d17eebde7164bf61885c0b8a26b550cabbc923..95d6f4b6967c6df03b4bfcf5e5a5ea27d63cf70d 100644 (file)
@@ -968,6 +968,9 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid)
        u8 csum = 0;
        struct edid *edid = (struct edid *)raw_edid;
 
+       if (WARN_ON(!raw_edid))
+               return false;
+
        if (edid_fixup > 8 || edid_fixup < 0)
                edid_fixup = 6;
 
@@ -1010,15 +1013,15 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid)
                break;
        }
 
-       return 1;
+       return true;
 
 bad:
-       if (raw_edid && print_bad_edid) {
+       if (print_bad_edid) {
                printk(KERN_ERR "Raw EDID:\n");
                print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1,
                               raw_edid, EDID_LENGTH, false);
        }
-       return 0;
+       return false;
 }
 EXPORT_SYMBOL(drm_edid_block_valid);
 
@@ -1706,11 +1709,11 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
                return NULL;
 
        if (pt->misc & DRM_EDID_PT_STEREO) {
-               printk(KERN_WARNING "stereo mode not supported\n");
+               DRM_DEBUG_KMS("stereo mode not supported\n");
                return NULL;
        }
        if (!(pt->misc & DRM_EDID_PT_SEPARATE_SYNC)) {
-               printk(KERN_WARNING "composite sync not supported\n");
+               DRM_DEBUG_KMS("composite sync not supported\n");
        }
 
        /* it is incorrect if hsync/vsync width is zero */