Skip to content

Commit 29b7216

Browse files
Tian Taoxin3liang
authored andcommitted
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: Tian Tao <[email protected]> Signed-off-by: Gong junjie <[email protected]> Signed-off-by: Xinliang Liu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bc17e55 commit 29b7216

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,25 @@
1111
* Jianhua Li <[email protected]>
1212
*/
1313

14+
#include <drm/drm_gem_vram_helper.h>
1415
#include <drm/drm_atomic_helper.h>
1516
#include <drm/drm_probe_helper.h>
17+
#include <drm/drm_crtc_helper.h>
1618
#include <drm/drm_print.h>
1719

1820
#include "hibmc_drm_drv.h"
1921
#include "hibmc_drm_regs.h"
2022

2123
static int hibmc_connector_get_modes(struct drm_connector *connector)
2224
{
23-
return drm_add_modes_noedid(connector, 800, 600);
25+
int count;
26+
27+
count = drm_add_modes_noedid(connector,
28+
connector->dev->mode_config.max_width,
29+
connector->dev->mode_config.max_height);
30+
drm_set_preferred_mode(connector, 1024, 768);
31+
32+
return count;
2433
}
2534

2635
static enum drm_mode_status hibmc_connector_mode_valid(struct drm_connector *connector,

0 commit comments

Comments
 (0)