goto fail;
        }
 
+       dev->mode_config.min_width = 0;
+       dev->mode_config.min_height = 0;
+       dev->mode_config.max_width = 2048;
+       dev->mode_config.max_height = 2048;
+
        return kms;
 
 fail:
 
                .count = 5,
                .base = { 0x03200, 0x03600, 0x03a00, 0x03e00, 0x04200 },
                .nb_stages = 5,
+               .max_width = 2048,
+               .max_height = 0xFFFF,
        },
        .dspp = {
                .count = 3,
                .count = 6,
                .base = { 0x03a00, 0x03e00, 0x04200, 0x04600, 0x04a00, 0x04e00 },
                .nb_stages = 5,
+               .max_width = 2048,
+               .max_height = 0xFFFF,
        },
        .dspp = {
                .count = 4,
                .count = 2, /* LM0 and LM3 */
                .base = { 0x45000, 0x48000 },
                .nb_stages = 5,
+               .max_width = 2048,
+               .max_height = 0xFFFF,
        },
        .dspp = {
                .count = 1,
                .count = 6,
                .base = { 0x45000, 0x46000, 0x47000, 0x48000, 0x49000, 0x4a000 },
                .nb_stages = 8,
+               .max_width = 2048,
+               .max_height = 0xFFFF,
        },
        .dspp = {
                .count = 4,
 
 struct mdp5_lm_block {
        MDP5_SUB_BLOCK_DEFINITION;
        uint32_t nb_stages;             /* number of stages per blender */
+       uint32_t max_width;             /* Maximum output resolution */
+       uint32_t max_height;
 };
 
 struct mdp5_ctl_block {
 
                goto fail;
        }
 
+       dev->mode_config.min_width = 0;
+       dev->mode_config.min_height = 0;
+       dev->mode_config.max_width = config->hw->lm.max_width;
+       dev->mode_config.max_height = config->hw->lm.max_height;
+
        return kms;
 
 fail:
 
                }
        }
 
-       dev->mode_config.min_width = 0;
-       dev->mode_config.min_height = 0;
-       dev->mode_config.max_width = 2048;
-       dev->mode_config.max_height = 2048;
        dev->mode_config.funcs = &mode_config_funcs;
 
        ret = drm_vblank_init(dev, priv->num_crtcs);