From patchwork Tue Sep 28 02:57:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommy Huang X-Patchwork-Id: 12521647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52D00C433F5 for ; Tue, 28 Sep 2021 03:35:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11F4B61052 for ; Tue, 28 Sep 2021 03:35:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 11F4B61052 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1R6aeusXGwkppnc1PaieKr5cW/JpcrJznj6s7bxHPAA=; b=cjFX5sGq1argD+ teeZdgFQvlV+Fr58MuT732NIv2wjfXOSGUC7hK38r8Ba+Zb9ZQqBDo6Tg+cd4zb9JnIOBEX9FYS8D eodFERN/BG9OcJuMaG1sBEojPxnxyLZ2hwiv2YtpkPxkqT0D+TV1SN+GnNNf83l7xWc+fXlrM4T46 eZ4Ug0Z/CsUMZ+9LAV1QFjeYvY8L69sAw6cYsigfFAvMNt1ZJnz1Vu5Pap8S0sS3Y5KFQWXFLQ+Cg al4uMhvVIbIGQ+hLPC2V2lRxqqqs2j4SRnY5zu7v1ojpFd/beZq8keDj/dhUFDmjAnlBK04VNwSIw 8R7dPqEh5tkz9voL4BQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rc-005Qer-0A; Tue, 28 Sep 2021 03:33:04 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3rI-005Qdr-V4 for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Sep 2021 03:32:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iD4ErqgMYxz3NvL22GK177t/dqWcu7jiZA/Ozz+2ErA=; b=qRCabVj47qfjCmu/u2VBA4fGeb kzfJ9+4rGcMk4A/DHxjpDBfZgxnW9Ez+XEFG+Z+bnstp856Z7YiZs2IoUbNwIaCj1zQHzTyPg1Iq3 XZE9Awn79osDqcJDfnGievxZ5KdC4GBcoiPSKdTjc34IKEaD9dTXTsN2UNUIXKZYM0xgedj6O+gWn NtU1EhUywEQW/uYSMrVhuHmqoEf+9Pg4uYm7m3GG/96pNC7eJe8gNoaKydtkOA7a0035bc9UGOkY0 xgJ4NJwOLAz8t64DObuCnmplCNk+ya9yeHwjkxcJ6FuT/bWlPw3lwd6gnuGMAK9IvCniJQAF7A9yn VmJ8Rdiw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV3JT-006OGz-1V for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:57:50 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_035748_504209_02DE65C4 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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;