On Tue, 25 Feb 2020 at 10:19, Xinliang Liu <xinliang....@linaro.org> wrote:
> > > On Wed, 19 Feb 2020 at 10:52, Tian Tao <tiant...@hisilicon.com> wrote: > >> set the preferred mode resolution to 1024 * 768 and maximum >> resolution to 1920 * 1200. >> >> Signed-off-by: Tian Tao <tiant...@hisilicon.com> >> Signed-off-by: Gong junjie <gongjunj...@huawei.com> >> --- >> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c >> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c >> index 6d98fdc..82fc7d3 100644 >> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c >> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c >> @@ -11,8 +11,10 @@ >> * Jianhua Li <lijian...@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,13 @@ >> >> static int hibmc_connector_get_modes(struct drm_connector *connector) >> { >> - return drm_add_modes_noedid(connector, 800, 600); >> + int count; >> + >> + drm_connector_update_edid_property(connector, NULL); >> > And as there is no edid for the connector, don't think call drm_connector_update_edid_property is required. > + count = drm_add_modes_noedid(connector, 1920, 1200); >> > > Hi Tao, maybe it's better like this: > count = drm_add_modes_noedid( connector , > conn->dev->mode_config.max_width, > conn->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, >> -- >> 2.7.4 >> >>
_______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel