From: Joe Perches <joe@perches.com>
To: Marcin Raszka <djraszit@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] I was wondering why I can't set the resolution to 2560x1080, while in windows 7 I can without a problem. I looked at the radeon driver code and found it doesn't support this resolution. So I made some changes. I added the hdmi_mhz parameter. In cmdline I set radeon.hdmi_mhz=190 Only tested on the Radeon HD 5830
Date: Sun, 07 Feb 2021 02:45:44 -0800 [thread overview]
Message-ID: <c00c5058effff98b6cd76a0cfadb469c33091e08.camel@perches.com> (raw)
In-Reply-To: <20210207094604.7250-1-djraszit@gmail.com>
Your subject needs to be changed and a commit log added.
> diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
[]
> @@ -37,6 +37,8 @@
> #include <linux/pm_runtime.h>
> #include <linux/vga_switcheroo.h>
>
> +extern int hdmimhz;
> +
> static int radeon_dp_handle_hpd(struct drm_connector *connector)
> {
> struct radeon_connector *radeon_connector = to_radeon_connector(connector);
> @@ -503,7 +505,7 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn
> struct mode_size {
> int w;
> int h;
> - } common_modes[17] = {
> + } common_modes[18] = {
probably better without a specific array size
> { 640, 480},
> { 720, 480},
> { 800, 600},
> @@ -520,10 +522,11 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn
> {1680, 1050},
> {1600, 1200},
> {1920, 1080},
> - {1920, 1200}
> + {1920, 1200},
> + {2560, 1080}
> };
>
>
> - for (i = 0; i < 17; i++) {
> + for (i = 0; i < 18; i++) {
for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
> @@ -1491,25 +1494,32 @@ static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connecto
> (mode->clock > 135000))
> return MODE_CLOCK_HIGH;
>
>
> - if (radeon_connector->use_digital && (mode->clock > 165000)) {
> + if (radeon_connector->use_digital && (mode->clock > (hdmimhz * 1000))) {
> if ((radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I) ||
> (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D) ||
> - (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B))
> + (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B)){
> + printk("MODE_CLOCK_HIHG0 %d", hdmimhz);
unnecessary debugging printks?
next prev parent reply other threads:[~2021-02-07 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-07 9:46 Marcin Raszka
2021-02-07 10:31 ` Willy Tarreau
2021-02-07 10:45 ` Joe Perches [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-07 9:39 Marcin Raszka
2021-02-07 13:02 ` Simon Ser
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=c00c5058effff98b6cd76a0cfadb469c33091e08.camel@perches.com \
--to=joe@perches.com \
--cc=djraszit@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®