Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4514456pxb; Mon, 27 Sep 2021 20:00:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgr6usRXeQi5nk0YUMzJ4vhS9nNDcnktv3/GXU/hSQRxBNEMddwLk8xe8C5SIEiYWSQQWh X-Received: by 2002:a17:906:facf:: with SMTP id lu15mr4210936ejb.93.1632798017068; Mon, 27 Sep 2021 20:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632798017; cv=none; d=google.com; s=arc-20160816; b=aOc9lcVDR4lYPMqTXZmiYQocwpKe5sWmLPmNbgRVKmmeuMeTmFfP32o3YpKbfukHNA HaEfKc00pJ9k805iuKA2XX9UHjFH9oJAxd0ZeXawoSGYEk2ntNXhekt5JnDC7XLS/NLE sPz7qZhEtBgy0lyxNb2Np3Gk9xO52rbIXT+vtARZ2I9Nd31+/Co56L3sU2rHgIkOcoZe aWYJfspCooHNQjpiQDs7FF2km/WONhi/yJDiAei8E0cufNgVksAtKvcGb3BB9PU9bmf9 rlvk0MW3O/OmR818mnh+4kJnhXp5K64me4I2DBRBDPwcoiEt4SMj1aAaZthZZTER7xin Dh+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=iD4ErqgMYxz3NvL22GK177t/dqWcu7jiZA/Ozz+2ErA=; b=NweICCScq3Hk0f4OfgFBERv6gMkroHv/VqLO3K7Tp5zxALHBGfjKX59Kb3cCg2jQfw nranjlrkqtmJxC7o/woAPmIowzcufr2kFCGiPwgF9RuTBYp50/jLwj4YuESpjONGqYsP yKlIcXRNfOOU0A4dZAX6ivw4BwRCmxGaruqx8RVRMTlElyurWnoZbDUR2hTNmOKodWAU wi80iUx7+c5EEm51sKjrOm1rCRkzxZVvC47r8ou+JR2hhjHxR0tQH6U6uZsjhE+JXbsc 4o7cwKUGF3i6p16UQIyLqxtV+zT5bl0LtPD2of7qD/u5DtSRx13x41xTaNQGdk5fOnnC PMtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd33si24364888ejc.139.2021.09.27.19.59.53; Mon, 27 Sep 2021 20:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238756AbhI1DAB (ORCPT + 99 others); Mon, 27 Sep 2021 23:00:01 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:27605 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238745AbhI1C7z (ORCPT ); Mon, 27 Sep 2021 22:59:55 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18S2aUKl072690; Tue, 28 Sep 2021 10:36:30 +0800 (GMT-8) (envelope-from tommy_huang@aspeedtech.com) Received: from tommy0527-VirtualBox.aspeedtech.com (192.168.2.141) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Sep 2021 10:57:11 +0800 From: tommy-huang To: , , , , , , , , , CC: Subject: [PATCH 5/6] HACK: drm/aspeed: Paramterise modes Date: Tue, 28 Sep 2021 10:57:02 +0800 Message-ID: <20210928025703.10909-6-tommy_huang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com> References: <20210928025703.10909-1-tommy_huang@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.2.141] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 18S2aUKl072690 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley The AST2600 will run at 1024x868. Signed-off-by: Joel Stanley Signed-off-by: tommy-huang --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index 33095477cc03..11a44b08bd3f 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -99,7 +99,7 @@ static const struct drm_mode_config_funcs aspeed_gfx_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static int aspeed_gfx_setup_mode_config(struct drm_device *drm) +static int aspeed_gfx_setup_mode_config(struct drm_device *drm, int width, int height) { int ret; @@ -109,8 +109,8 @@ static int aspeed_gfx_setup_mode_config(struct drm_device *drm) drm->mode_config.min_width = 0; drm->mode_config.min_height = 0; - drm->mode_config.max_width = 800; - drm->mode_config.max_height = 600; + drm->mode_config.max_width = width; + drm->mode_config.max_height = height; drm->mode_config.funcs = &aspeed_gfx_mode_config_funcs; return ret; @@ -201,7 +201,7 @@ static int aspeed_gfx_load(struct drm_device *drm) writel(0, priv->base + CRT_CTRL1); writel(0, priv->base + CRT_CTRL2); - ret = aspeed_gfx_setup_mode_config(drm); + ret = aspeed_gfx_setup_mode_config(drm, 800, 600); if (ret < 0) return ret; -- 2.17.1