<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 19 Feb 2020 at 10:52, Tian Tao <<a href="mailto:tiantao6@hisilicon.com">tiantao6@hisilicon.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">set the preferred mode resolution to 1024 * 768 and maximum<br>
resolution to 1920 * 1200.<br>
<br>
Signed-off-by: Tian Tao <<a href="mailto:tiantao6@hisilicon.com" target="_blank">tiantao6@hisilicon.com</a>><br>
Signed-off-by: Gong junjie <<a href="mailto:gongjunjie2@huawei.com" target="_blank">gongjunjie2@huawei.com</a>><br>
---<br>
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 10 +++++++++-<br>
1 file changed, 9 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c<br>
index 6d98fdc..82fc7d3 100644<br>
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c<br>
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c<br>
@@ -11,8 +11,10 @@<br>
* Jianhua Li <<a href="mailto:lijianhua@huawei.com" target="_blank">lijianhua@huawei.com</a>><br>
*/<br>
<br>
+#include <drm/drm_gem_vram_helper.h><br>
#include <drm/drm_atomic_helper.h><br>
#include <drm/drm_probe_helper.h><br>
+#include <drm/drm_crtc_helper.h><br>
#include <drm/drm_print.h><br>
<br>
#include "hibmc_drm_drv.h"<br>
@@ -20,7 +22,13 @@<br>
<br>
static int hibmc_connector_get_modes(struct drm_connector *connector)<br>
{<br>
- return drm_add_modes_noedid(connector, 800, 600);<br>
+ int count;<br>
+<br>
+ drm_connector_update_edid_property(connector, NULL);<br>
+ count = drm_add_modes_noedid(connector, 1920, 1200);<br></blockquote><div><br></div><div>Hi Tao, maybe it's better like this:</div><div>count = drm_add_modes_noedid(
connector
,<br> conn->dev->mode_config.max_width,<br> conn->dev->mode_config.max_height);<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+ drm_set_preferred_mode(connector, 1024, 768);<br>
+<br>
+ return count;<br>
}<br>
<br>
static enum drm_mode_status hibmc_connector_mode_valid(struct drm_connector *connector,<br>
-- <br>
2.7.4<br>
<br>
</blockquote></div></div>