Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1887789rwn; Fri, 16 Sep 2022 02:19:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6YRPbhVKDFvfEvpf3CDbiKaYvAw5R3K7g1LClnhQB51Kziz02uzuPg6AlW+zJP5qCjjuwD X-Received: by 2002:a17:907:b03:b0:770:872d:d7e9 with SMTP id h3-20020a1709070b0300b00770872dd7e9mr2954419ejl.272.1663319969321; Fri, 16 Sep 2022 02:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663319969; cv=none; d=google.com; s=arc-20160816; b=cesTHfiQ9FxipClTeMoGQKQdi5pItsTDhKf4cYX6X74puF0k4/mFMK8mo8kVkHSg1F HtpOYq5CGbJDJxcfiwySdu+8idLsp/KWbbifkUvl06hqvsMhkFKzFoLkL3NOekrOWB1v WUJjqn+Ntmz/8Aqmh92Z6ZrsFrWzRcBXtxym7UVhap7D1gSranVG6+0BG6Bw7PaIfyXh 2yzdOZoKbePc/sR1RVf9dq2AawjRzxxOo0kEJsaV20elylutzyMsgMpdqUO5cTN/dZ8t rMzR0ahfxyEGvgrWtYLomvR6OcufPVp1tW4wYyjGJPqckffigH9TpipZ1Qm2K8s6oXcs BSag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=/aBynBxrzpad7KX3AQwQVeqKKTmUDMxOm9ul2iiZ9hc=; b=0RLmqh0SJB6AyW58oOSZxkVWqw7KyB5vFblei/GHtsp7gsz8ma8HVre2JeoZFDgTuf WW+NgLRTIWLxDzvoAsC5wAOeqgR0LnXHFLC7e5LTiPh2yYr24ooPmrs3sKD4P5JlOv9B G9T+TRA4L46iQdbqQfvjdsSaHzlT9nce4ZyXBnHpEePMJgxrufKw4Oimir8vrqB/Wx5Y z+fRssWEHfRyr9+w2T88II8+8WcIggiKBjGJhNyjRAvElW36gRuPJ/WMtQTQ8TkCInCv j/awq/CMTMQJ2O/ljWtmkyh9kvT2Q3tVWGvDXQ7hbJVJ/itS6e0k5MybvvOcruQwvp4+ 4+cA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd16-20020a170907629000b0077087274a48si20808342ejc.257.2022.09.16.02.19.04; Fri, 16 Sep 2022 02:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbiIPIvi (ORCPT + 99 others); Fri, 16 Sep 2022 04:51:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230470AbiIPIva (ORCPT ); Fri, 16 Sep 2022 04:51:30 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB94FA894D for ; Fri, 16 Sep 2022 01:51:28 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 28G8URNb082766; Fri, 16 Sep 2022 16:30:27 +0800 (GMT-8) (envelope-from jammy_huang@aspeedtech.com) Received: from JammyHuang-PC.aspeed.com (192.168.2.115) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Sep 2022 16:50:59 +0800 From: Jammy Huang To: , , , , , Subject: [PATCH v2] drm/ast: Add resolution support for 1152x864@75 Date: Fri, 16 Sep 2022 16:50:58 +0800 Message-ID: <20220916085058.3386-1-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.115] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 28G8URNb082766 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add 1152x864 into support list. Signed-off-by: Jammy Huang --- v2 changes: - add check in mode_valid --- drivers/gpu/drm/ast/ast_mode.c | 9 +++++++++ drivers/gpu/drm/ast/ast_tables.h | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 214b10178454..d327dcbaf032 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -114,6 +114,9 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format, case 1024: vbios_mode->enh_table = &res_1024x768[refresh_rate_index]; break; + case 1152: + vbios_mode->enh_table = &res_1152x864[refresh_rate_index]; + break; case 1280: if (mode->crtc_vdisplay == 800) vbios_mode->enh_table = &res_1280x800[refresh_rate_index]; @@ -1058,6 +1061,8 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode return MODE_OK; if ((mode->hdisplay == 1600) && (mode->vdisplay == 900)) return MODE_OK; + if ((mode->hdisplay == 1152) && (mode->vdisplay == 864)) + return MODE_OK; if ((ast->chip == AST2100) || (ast->chip == AST2200) || (ast->chip == AST2300) || (ast->chip == AST2400) || @@ -1090,6 +1095,10 @@ ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode if (mode->vdisplay == 768) status = MODE_OK; break; + case 1152: + if (mode->vdisplay == 864) + status = MODE_OK; + break; case 1280: if (mode->vdisplay == 1024) status = MODE_OK; diff --git a/drivers/gpu/drm/ast/ast_tables.h b/drivers/gpu/drm/ast/ast_tables.h index dbe1cc620f6e..0378c9bc079b 100644 --- a/drivers/gpu/drm/ast/ast_tables.h +++ b/drivers/gpu/drm/ast/ast_tables.h @@ -272,6 +272,13 @@ static const struct ast_vbios_enhtable res_1600x1200[] = { (SyncPP | Charx8Dot), 0xFF, 1, 0x33 }, }; +static const struct ast_vbios_enhtable res_1152x864[] = { + {1600, 1152, 64, 128, 900, 864, 1, 3, VCLK108, /* 75Hz */ + (SyncPP | Charx8Dot | NewModeInfo), 75, 1, 0x3B }, + {1600, 1152, 64, 128, 900, 864, 1, 3, VCLK108, /* end */ + (SyncPP | Charx8Dot | NewModeInfo), 0xFF, 1, 0x3B }, +}; + /* 16:9 */ static const struct ast_vbios_enhtable res_1360x768[] = { {1792, 1360, 64, 112, 795, 768, 3, 6, VCLK85_5, /* 60Hz */ -- 2.25.1