Skip to content

Commit

Permalink
drm/hisilicon: Set preferred mode resolution and maximum resolution
Browse files Browse the repository at this point in the history
set the preferred mode resolution to 1024 * 768 and maximum
resolution to 1920 * 1200.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Gong junjie <gongjunjie2@huawei.com>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1582080707-18825-1-git-send-email-tiantao6@hisilicon.com
  • Loading branch information
Tian Tao authored and Xinliang Liu committed Feb 27, 2020
1 parent bc17e55 commit 29b7216
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@
* 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"
#include "hibmc_drm_regs.h"

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,
Expand Down

0 comments on commit 29b7216

Please sign in to comment.