linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tommy-huang <tommy_huang@aspeedtech.com>
To: <joel@jms.id.au>, <airlied@linux.ie>, <daniel@ffwll.ch>,
	<robh+dt@kernel.org>, <andrew@aj.id.au>,
	<linux-aspeed@lists.ozlabs.org>,
	<dri-devel@lists.freedesktop.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Cc: <BMC-SW@aspeedtech.com>
Subject: [PATCH 5/6] HACK: drm/aspeed: Paramterise modes
Date: Tue, 28 Sep 2021 10:57:02 +0800	[thread overview]
Message-ID: <20210928025703.10909-6-tommy_huang@aspeedtech.com> (raw)
In-Reply-To: <20210928025703.10909-1-tommy_huang@aspeedtech.com>

From: Joel Stanley <joel@jms.id.au>

The AST2600 will run at 1024x868.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: tommy-huang <tommy_huang@aspeedtech.com>
---
 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


  parent reply	other threads:[~2021-09-28  2:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  2:56 [PATCH 0/6] *** Add AST2600 GFX node *** tommy-huang
2021-09-28  2:56 ` [PATCH 1/6] ARM: dts: aspeed: Add GFX node to AST2600 tommy-huang
2021-09-28  2:56 ` [PATCH 2/6] ARM: dts: aspeed: ast2600-evb: Enable GFX device tommy-huang
2021-09-28  2:57 ` [PATCH 3/6] drm/aspeed: Add AST2600 support tommy-huang
2021-09-28  2:57 ` [PATCH 4/6] HACK: drm/aspeed: INTR_STS hadndling tommy-huang
2021-09-28  2:57 ` tommy-huang [this message]
2021-09-28  2:57 ` [PATCH 6/6] dt-bindings: gpu: Add ASPEED GFX bindings document tommy-huang
2021-10-04 18:24   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210928025703.10909-6-tommy_huang@aspeedtech.com \
    --to=tommy_huang@aspeedtech.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=airlied@linux.ie \
    --cc=andrew@aj.id.au \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joel@jms.id.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).