Commit 29b7216b authored by Tian Tao's avatar Tian Tao Committed by Xinliang Liu

drm/hisilicon: Set preferred mode resolution and maximum resolution

set the preferred mode resolution to 1024 * 768 and maximum
resolution to 1920 * 1200.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarGong junjie <gongjunjie2@huawei.com>
Signed-off-by: default avatarXinliang Liu <xinliang.liu@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1582080707-18825-1-git-send-email-tiantao6@hisilicon.com
parent bc17e557
......@@ -11,8 +11,10 @@
* Jianhua Li <lijianhua@huawei.com>
*/
#include <drm/drm_gem_vram_helper.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_print.h>
#include "hibmc_drm_drv.h"
......@@ -20,7 +22,14 @@
static int hibmc_connector_get_modes(struct drm_connector *connector)
{
return drm_add_modes_noedid(connector, 800, 600);
int count;
count = drm_add_modes_noedid(connector,
connector->dev->mode_config.max_width,
connector->dev->mode_config.max_height);
drm_set_preferred_mode(connector, 1024, 768);
return count;
}
static enum drm_mode_status hibmc_connector_mode_valid(struct drm_connector *connector,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment