Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp106940ybv; Tue, 18 Feb 2020 18:53:11 -0800 (PST) X-Google-Smtp-Source: APXvYqys9ShBRCrCMFHNxLh9mVojDKbN8XFlU/50C//I9DRXgy8DBWpUAPw6iRMpHihWTcyqJlam X-Received: by 2002:a9d:634c:: with SMTP id y12mr4367975otk.12.1582080791186; Tue, 18 Feb 2020 18:53:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582080791; cv=none; d=google.com; s=arc-20160816; b=qdzNS7BnfjXZzLnuUfSFJS03Pi/Vb1ctQKG7HN4Q4gNr5e9yK6hui2Ma0wSMRKmVpv NqVE7YVApa5DHrGjfeiatLSI9iztm/9tsnyveszBmPx15z7uVdwBcCAgRascG8Ic6FJf vWUhGpSA/o9WUZOdR+WqcODkjKISq82cgI6AhIaTYJjDBthn8MflVHSXeqUw2tX5Fvas aUgoPaYzNP+w6x7Zyt9iWQhZX6cRIlLde9EudIDN/LVh50AFWiNjrmKKRSzb6fxUJSU9 ZM0M1qmddbubcsfHFKZ4JsMLRwusi4Ubd1bYKs6kTt9uO27UNRW8VztXGzyh6D4RS6b2 OTwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=eaz0yF9c6eP2wrjSwmswbN8RBNwDddO4Y5SfULk8qOM=; b=pvDm7hnTm2eciM2+yee3gXvILlytRDFsOz2z9JTNQCP31UbV+e8vS71HHAfEqvsbGM 5joEDnUm+qR6E8hsaXjRWbgDexZW0xymnGauHnDKHqoicuZ2Qq4MAGAwTBAo5x2jHqd9 PZAGq6pa18Bv4SA13JeEZhb9r7+80uyO4Qio9B1ScDT8uJBZBBMFMhrcp6DGgLH7NKyp rQiR815H33guKerkU9ZRoMpCixVcJN4+Y3p4KRUC6X4mDxNpuqk/u7asPXM0nzGpQU1q GrBE4aZ8tjWq6sBmorhW/ymx95Dp0W1jc0ljotY64ZzORJ8tmOePsW+kOKg2rStwRrpf kMaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si364121otp.186.2020.02.18.18.52.58; Tue, 18 Feb 2020 18:53:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728298AbgBSCwP (ORCPT + 99 others); Tue, 18 Feb 2020 21:52:15 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:39466 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728027AbgBSCwP (ORCPT ); Tue, 18 Feb 2020 21:52:15 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BE3FAAF365DBB3DB6BE6; Wed, 19 Feb 2020 10:52:12 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Wed, 19 Feb 2020 10:52:05 +0800 From: Tian Tao To: , , , , , , , , , CC: Subject: [PATCH] drm/hisilicon: Set preferred mode resolution and maximum resolution Date: Wed, 19 Feb 2020 10:51:47 +0800 Message-ID: <1582080707-18825-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org set the preferred mode resolution to 1024 * 768 and maximum resolution to 1920 * 1200. Signed-off-by: Tian Tao Signed-off-by: Gong junjie --- 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 */ +#include #include #include +#include #include #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); + count = drm_add_modes_noedid(connector, 1920, 1200); + 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